The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 25th, 2024, 3:59pm
Pages: 1
Send Topic Print
Consumption measurement (Read 3127 times)
Torq
New Member
*
Offline



Posts: 6

Consumption measurement
Nov 03rd, 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!
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Consumption measurement
Reply #1 - 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

Back to top
 
 
View Profile WWW   IP Logged
Torq
New Member
*
Offline



Posts: 6

Re: Consumption measurement
Reply #2 - 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?
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Consumption measurement
Reply #3 - 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
Back to top
 
 
View Profile WWW   IP Logged
Torq
New Member
*
Offline



Posts: 6

Re: Consumption measurement
Reply #4 - 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!
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.