![]() Measuring Average power for a period by HSPICE. T HL: delay from input 50% to output 50% when output is falling. T LH: delay from input 50% to output 50% when output is rising. Slew rate: the time period for a signal between 0.1*vdd and 0.9*vdd. Please create your own spice file from the example, you may need add your own input sources and device Inv : subckt name of the subckt you are calling In out : IO ports, please follow the same order as the IOs in your netlist (ports are mapped by the order) include invlvs.sp include the circuit file generated by PEX or created manually. measure edp2 param='abs(delay*energysum)' measure energysum param='energy1+energy2' measure energy2 param='1.2*i2*(t4-t3)' $calculate energy when output fall measure energy1 param='1.2*i1*(t2-t1)' $calculate energy when output rise measure tran i2 avg i(vdd) from=t3 to=t4 $average current when output fall measure tran i1 avg i(vdd) from=t1 to=t2 $average current when output rise measure energy param='1.2*iavg*10n' $calculate energy in one clock cycle measure tran iavg avg i(vdd) from=0 to=10n $average current in one clock cycle measure delay param='max(trise,tfall)' $calculate worst case delay measure tdiff param='abs(trise-tfall)' $calculate delay difference measure tavg param = '(trise+tfall)/2' $calculate average delay measure tran tfall trig v(IN) val=0.6v rise=1 targ v(OUT) val=0.6v fall=1 $measure tpl at 0.6v measure tran trise trig v(IN) val=0.6v fall=1 targ v(OUT) val=0.6v rise=1 $measure tlh at 0.6v $example of parameter sweep, replace numeric value W of pfet with WP in invlvs.sp Make sure the first line is empty or a comment($.), it will be ignored by HSPICE You can use any text editor to read it, you can also use WaveView if sweep with some parameter. Your transient analysis measurement results is stored in YOUR_SPICE_FILE.mt0. You can use the waveform viewer (WaveView) to open it. Your transient analysis results waveform is stored in YOUR_SPICE_0. If it said job concluded, it means simulation running successfully, otherwise, if it said job aborted or some other message, your simulation didn't finish and you won't see any output files. You can check the output log if there's any warning or error. If you want to get the output log, you can do: hspice YOUR_SPICE_FILE.sp > YOUR_SPICE_FILE.out To run hspice you enter this command: hspice YOUR_SPICE_FILE.sp Go to your HSPICE working directory first. use Cadence in one terminal, and use HSPICE in another, after sourcing proper profiles. If you need to use both Cadence tools and Synopsys tools, use them in different terminals (tabs), e.g.
0 Comments
Leave a Reply. |