EE 141 Discussion 2Yue [email protected]/14/2009Topics to cover• CMOS Logic– Definition of static gate– CMOS logic example– Explanation of XOR logic function•More About SPICE Syntax•More About SPICE Syntax– How to find derivatives of VTC– SPICE syntax example• Decoder Warm-up– 2-4 decoder implementation• NAND2 and/or inverter• NOR2 and/or inverter– Energy consumption analysis• QuestionsCMOS Logic• Definition of static gate– “At every point in time (except during the switching transients) each gate output is connected to either VDDor VSSvia a low resistive connected to either VDDor VSSvia a low resistive path” (pp.13, Lecture 4)CMOS Logic• CMOS logic example– Implement using CMOS Logic• Expand logic function to AND/OR form•Start with PDN then use duality to find PUN•Start with PDN then use duality to find PUN• Explanation of XOR function–A B F0 0 00 1 11 0 11 1 0Widely used in digital logic (e.g. adder), you’d better get familiar with it now!More About SPICE Syntax• How to find derivatives of VTC– Useful when you need to find VIH, VIL– Instantiate a dummy•Set same environment as device under test (DUT)•Set same environment as device under test (DUT)• Apply an input offset (=dx) compared to DUT• Sweep input of DUT with step size dx and find the output difference between Dummy and DUT(=dy)• dy/dx can be found using simple syntaxMore About SPICE Syntax• SPICE syntax example– Find VIL/VIH of an inverter Note: Load .ms0 file in WaveViewAnalyzer to plot WaveViewAnalyzer to plot the measured data!More About SPICE Syntax• SPICE syntax example– Energy measurement (Red for SPICE code)• Measure average current of supply during the time interval you are interested in using .MEASURE TRAN iavg AVG I(Vdd)FROM=startTO=endFROM=startTO=end– start and end are the boundary for the time period you are interested in• Measure average energy consumption using .MEASURE eavgPARAM=‘-1.2*iavg*interval’– 1.2 is the supply voltage, with “–” sign to make the result positive– iavg is the average current just measured– interval is the time period you are interested inDecoder Warm-up• 2-4 decoder implementationNAND imple. NOR imple.b3b2b1b1b0Decoder Warm-up• Energy consumption analysis– Assume one input transitions, the other fixed– Ignore junction capacitance, only consider gate
View Full Document