I am modeling an analog device using verilog-a (to which I am quite new). I would like the model to match the power consumption of the physical device, for which the energy cost associated with state transitions has been measured.
What is the usually preferred way of achieving this? As this device is voltage-controlled, I could add some contribution rules to the current that roughly follow the measured power, although that would be complicated to implement. I also saw that I could add charge contribution directly, which would be easier to do given my data.
I do not need extremely high precision, especially when it comes to transient simulations: a rough estimate of electric power consumption over the whole simulation time should be enough.
These points are of particular interest to me:
- What way (if any) is it usually done?
- Do discontinuities in current or charge contribution (ex:
Q(vin) <+ 1e3;
) risk to cause convergence or stability problems for the simulator? - Is it a lot more costly to compute this? (Will it negatively impact my simulation time?)