You are on page 1of 3

Computer Science and Engineering 477 VLSI Digital Circuits Fall 2005 Homework #5 Distributed: Oct 25, 2005

Due: Nov 8, 2005 at the beginning of class Objective: This homework introduces power measurement (both dynamic and leakage). It will also help in understanding the dependence of power supply (Vdd) and output load on power and delay consumption of a circuit. Task 1: Design a 3-input nand gate with minimum sized inverter at its output. Also make sure that the rise and fall times of the nand gate are equal. Task 2: Measure dynamic power for all the transitions (23 *23 = 64). Please refer to appendix for steps involved in measuring dynamic and leakage power. Task 3: Measure leakage power for all the 8 (23) state of the 3-input nand gate. Report the state that has the minimum leakage power consumption. Please take special care of measuring the leakage power when the circuit is idle. Refer to appendix for further details. Task 4: To investigate the dependence of the power supply on delay and power consumption, vary the power supply (Vdd) from 1.2V down to 0.6V in steps of 0.1V. Plot both the delay and power measurements against Vdd (delay and power separately on Y axis and Vdd on the X axis). Use the transition 111 100 for all the cases. Task 5: Lastly vary the size of the inverter (at the output of the 3-input nand gate) from minimum sized to 2X, 3X and 4X. Measure the dynamic power and delay for transition 111 100 for all the cases. Plot both the delay and power measurements against inverter size (delay and power separately on Y axis and inverter size on the X axis).

Appendix
Steps for measuring dynamic and leakage power. (http://www.cse.psu.edu/~cg578/fa05/hspice.pdf)
A. Dynamic power: i. Add the following lines in the nand.sp file: .measure avgpow avg power from t1 to t2 .measure maxpow max power from t1 to t2 .measure rmspow rms power from t1 to t2 ii. type hspice nand.sp % hspice nand.sp After the simulation finishes, you will have nand.mt0 in the design directory. This file contains the measurement data of power in Watts. B. Leakage power i. Add the following line in nand.sp to assign the temperature to high temperature, say 1000C. .temp 100 ii. Modify the simulation time to insure the circuit is in idle mode when measuring leakage current. We use 200ns simulation time in this tutorial. In your nand.sp, replace .TRANS 0.01NS 40NS with .TRANS 0.01NS 200.00NS iii. Add the following line in the nand.sp file to measure the subthreshold and gate leakage current of every power supply. Note that the input pins are also connected to power supplies. .measure Isub avg i(vvdd) from t3 to t4 .measure Igatea avg i(va) from t3 to t4 .measure Igateb avg i(vb) from t3 to t4 .measure Igatec avg i(vc) from t3 to t4 After the simulation finishes, you will have nand.mt0 in the design directory. This file contains the measurement data of leakage current in Amps. iv. Leakage power is the power consumed when your design is idle. So, multiply the total leakage current by power supply level, you can get the leakage power.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Appendix A: A word for measuring leakage current:


1. Make sure you measure the power when there is no switching activity in your design. You can use Awaves to check all the signals are stable during the time period of your measurement of leakage. 2. Subthreshold leakage is much higher in high temperature, so you want to set the temperature higher, say 85oC~125oC. 3. BSIM3 device models give only subthreshold leakage while BSIM4 device models include both subthreshold leakage and gate leakage. To check if the model is BSIM4 model, you can view the device model file that you include in your .sp file. If it says level=54 in the model file, it is BSIM4 model.

Appendix B: syntax for the measure command in Hspice


syntax: .MEASURE <DC | AC | TRAN> result func out_var <FROM=val> <TO=val> where <DC/AC/TRAN> is the simulation type which is optional; result is the name given to the measurement; func indicates the type of measurement like, avg -> average, max -> maximum, min-> minimum, pp -> peak to peak, rms-> root mean square, integ->integral; out_var is the name of the output variable whose function is to be measureed in the simulation; from specifies the initial value for the 'func' calculation. For transient it is in units of time; to specifies the end of the func calculation. example: .MEAS TRAN avgval AVG V(10) FROM=10ns TO=55ns

You might also like