# how to measure the total power of a cirucit using Hspice?

Status
Not open for further replies.

#### samuel

##### Full Member level 3 power calculation in hspice

dear, friends
i want to evaluate a circuit power using Hspice simulator, but i dont know to how to do that? anyone can tell me in details?

thank you.

sm.

#### saber_haijun

##### Newbie level 3 hspice average current meas

Maybe you can place a ideal voltage source in the line of vdd, all current must flow cross the line. Set the ideal voltage source value=0 and you can get the whole current of the circuit. Then, you use the function power=vdd*I(total).
This method is not very simple. But I only know this. #### Hughes hspice measure power

To print the total power:
.PRINT POWER

To print the current (or power) from VDD (usually it means the total power):
.PRINT I(VDD)
.PRINT PTOTAL=PAR('V(VDD)*I(VDD)')

Other examples:
.PRINT PTOTAL=PAR('V(VDDD)*I(VDDD)+V(VDDA)*I(VDDA)')
.PRINT PTOTAL=PAR('3.3*I(VDD)')

• canarybird33, thader, allennlowaton and 1 other person

Points: 2

Points: 2

### canarybird33

Points: 2

#### designtech

##### Member level 1 hspice total current

best way is to integrate supply current over a period, multiply by vdd and then divide by the period to get the power.

h**p://bwrc.eecs.berkeley.edu/classes/icdesign/ee141_f05/Project/Tips.Background.pdf

look at the hspice code on pages 3 and 4

#### dwilliam

##### Newbie level 5 hspice code of low power

You can use a measure comand to evaluate the average current on the time period you want, and them multiply the result bu the supply voltage;

for example:
.measure TRAN iavg AVG i(vvdd) FROM=5e-6 TO=10e-6

the result will be stored on the .lis file, someting like this:
iavg=10e-6

If you want you can also do the power calculation with hspice:
.PARAM vvddpar=3.3
.measure TRAN power PARAM='iavg*vvddpar'

• Points: 2

Points: 2

### canarybird33

Points: 2

#### samuel

##### Full Member level 3 hspice power measure

first of all, thank you everyone.

but i want to know which method is accuracy.

sm.

#### Hughes measure tran iavg

samuel said:
first of all, thank you everyone.

but i want to know which method is accuracy.

sm.

Either one.
But results may be different.

.PRINT POWER
will give you total power dissipation of the whole circuit. It is supplied by all independent voltage/current sources.

.PRINT P(VDD)
or
.PRINT PAR('VDD*I(VDD)')
will give you total power dissipation supplied by VDD.

For unloaded CMOS digital circuit, the above two results may be very close because currents drawn from digital input signal sources are usually very low.

• allennlowaton

### allennlowaton

Points: 2
V
Points: 2

#### vbhupendra

##### Full Member level 4 site:edaboard.com hspice power measure

just use
.PRINT POWER

it will give you accurate power.

#### beckchm

##### Banned total power hspice code

.PRINT POWER
just calculate the total power

Status
Not open for further replies.