The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> Consumption measurement
https://designers-guide.org/forum/YaBB.pl?num=1446558676

Message started by Torq on Nov 3rd, 2015, 5:51am

Title: Consumption measurement
Post by Torq on Nov 3rd, 2015, 5:51am

Hi!
I'm new in Verilog-a. The question is: i it possible to measure total current in the given time interval?

For example, i have a analog design with vdd - power net and gnd - ground.
Next, i use the voltage source:  V(vdd) <+ 1;
It is easy to measure the dinamic current also: current = I(gnd,vdd);

After that, i put iccs for copying the current source: I(v_measure1,gnd) <+ 1*current;  loaded to 1 Ohm:  V(v_measure1) <+ 1*I(v_measure1,gnd);  And, I am trying to build voltage controlling source with idt function: V(v_measure2) <+ idtmod(V(v_measure1));  It is not working. What is wrong? Is any simple examples exists, since it is common task to calculate the supply consumption?

Thanx!

Title: Re: Consumption measurement
Post by Ken Kundert on Nov 4th, 2015, 1:00am

It is not at all clear what you want. You say you want the total current, but then you start using idt() which seems like it would compute the charge. When you say total current, do you mean charge?

Also, you ask for why your model is not working, but you only give us little fragments of your model and give no information on what it is doing that seems wrong to you. That makes it very difficult to figure out what you are doing and what might be going wrong. Just give the whole model.

You seem to be trying to use idtmod. That is probably not what you want.

-Ken


Title: Re: Consumption measurement
Post by Torq on Nov 4th, 2015, 3:22am

Hello, Ken!
Thank you for the answer. My current task is to measure the power per operation of mixed D/A operating block. The block is fully asynchronous (so-called self-timed or speed independent circuits design), so the time of each operation is vary. This is a research project, not commercial. The top module of test-bench written in Verilog-AMS, the DUT module represented as spice-netlist. I use the stable voltage source (1 Volt), and measure the dynamic current also. The question is - how to compute power. I assume, that i need to compute the integral of current in the given (resettable) time period, and multiply the results by 1V (supply voltage). The design have a output signal (done of operation), which is suitable for resetting the power calculation.

Are you mean, that idt/idtmod is not good for the integration purposes?

Title: Re: Consumption measurement
Post by Ken Kundert on Nov 4th, 2015, 8:31am

It sounds like you are measuring the energy rather than the power. And energy is charge times voltage. So integrating the current to get the charge using idt() (not idtmod()) seems like the way to go.

-Ken

Title: Re: Consumption measurement
Post by Torq on Nov 5th, 2015, 1:49am

Hello, Ken!

Thank you very much! I am done with the problem.
At the first time i forgot to point the starting value for the calculation of integral (the second operand of idt function), so the simulator fails every time. So, the proper usage is idt(var,0,reset). It helped. Now, i can see the energy right in the wave browser, along with signals!

You're right, i meant energy, not power. I'm sorry. Thank you again, for the help!

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.