Simulation of Logic Primitives and Dynamic D-latch with Verilog-XL

Similar documents
Sequential Logic Worksheet

EE141Microelettronica. CMOS Logic

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING QUESTION BANK

Homework Assignment #1 Solutions EE 477 Spring 2017 Professor Parker

Gates and Flip-Flops

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences

Boolean Logic Prof. James L. Frankel Harvard University. Version of 3:20 PM 29-Aug-2017 Copyright 2017, 2016 James L. Frankel. All rights reserved.

Laboratory Exercise #8 Introduction to Sequential Logic

EE 447 VLSI Design. Lecture 5: Logical Effort

EGC221: Digital Logic Lab

Spiral 2 7. Capacitance, Delay and Sizing. Mark Redekopp

VLSI Design, Fall Logical Effort. Jacob Abraham

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017

EECS 312: Digital Integrated Circuits Final Exam Solutions 23 April 2009

Sequential Logic Circuits

ECE429 Introduction to VLSI Design

Boolean Logic Continued Prof. James L. Frankel Harvard University

UNIVERSITY OF CALIFORNIA, BERKELEY College of Engineering Department of Electrical Engineering and Computer Sciences

ESE 570: Digital Integrated Circuits and VLSI Fundamentals

CMPEN 411. Spring Lecture 18: Static Sequential Circuits

Digital Integrated Circuits A Design Perspective

Chapter 9. Estimating circuit speed. 9.1 Counting gate delays

Lecture 7: Logic design. Combinational logic circuits

Logical Effort. Sizing Transistors for Speed. Estimating Delays

NAND, NOR and XOR functions properties

MOSIS REPORT. Spring MOSIS Report 1. MOSIS Report 2. MOSIS Report 3

Last Lecture. Power Dissipation CMOS Scaling. EECS 141 S02 Lecture 8

! Charge Leakage/Charge Sharing. " Domino Logic Design Considerations. ! Logic Comparisons. ! Memory. " Classification. " ROM Memories.

Chapter 4. Sequential Logic Circuits

Lecture 6: Logical Effort

Adders, subtractors comparators, multipliers and other ALU elements

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output of

Name: Answers. Mean: 83, Standard Deviation: 12 Q1 Q2 Q3 Q4 Q5 Q6 Total. ESE370 Fall 2015

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

Where Does Power Go in CMOS?

Experiment 7: Magnitude comparators

ESE 570: Digital Integrated Circuits and VLSI Fundamentals

Computer organization

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part A Combinational Logic Building Blocks

Lab #10: Design of Finite State Machines

Lecture A: Logic Design and Gates

Digital Integrated Circuits A Design Perspective

EE241 - Spring 2000 Advanced Digital Integrated Circuits. Announcements

Mealy & Moore Machines

and V DS V GS V T (the saturation region) I DS = k 2 (V GS V T )2 (1+ V DS )

ECE 545 Digital System Design with VHDL Lecture 1A. Digital Logic Refresher Part A Combinational Logic Building Blocks

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

EE115C Digital Electronic Circuits Homework #5

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

VLSI VLSI CIRCUIT DESIGN PROCESSES P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) Department of Electronics and Communication Engineering, VBIT

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

ESE 570: Digital Integrated Circuits and VLSI Fundamentals

Combinatorial and Sequential CMOS Circuits Dr. Lynn Fuller Webpage:

Static CMOS Circuits. Example 1

Adders, subtractors comparators, multipliers and other ALU elements

Digital Integrated Circuits Designing Combinational Logic Circuits. Fuyuzhuo

ESE 570: Digital Integrated Circuits and VLSI Fundamentals

Announcements. EE141- Fall 2002 Lecture 7. MOS Capacitances Inverter Delay Power

Topics. CMOS Design Multi-input delay analysis. John A. Chandy Dept. of Electrical and Computer Engineering University of Connecticut

ECEN 651: Microprogrammed Control of Digital Systems Department of Electrical and Computer Engineering Texas A&M University

EE141- Spring 2007 Digital Integrated Circuits

Chapter 5 CMOS Logic Gate Design

Lab 3 Revisited. Zener diodes IAP 2008 Lecture 4 1

EECS 141 F01 Lecture 17

Quiz 2 Solutions Room 10 Evans Hall, 2:10pm Tuesday April 2 (Open Katz only, Calculators OK, 1hr 20mins)

COMP 103. Lecture 16. Dynamic Logic

FSM Examples. Young Won Lim 11/6/15

EE141- Fall 2002 Lecture 27. Memory EE141. Announcements. We finished all the labs No homework this week Projects are due next Tuesday 9am EE141

Transfer Gate and Dynamic Logic Dr. Lynn Fuller Webpage:

MODULE 5 Chapter 7. Clocked Storage Elements

Lecture 5. MOS Inverter: Switching Characteristics and Interconnection Effects

Lecture Outline. ESE 570: Digital Integrated Circuits and VLSI Fundamentals. Total Power. Energy and Power Optimization. Worksheet Problem 1

EE 434 Lecture 33. Logic Design

VLSI Circuit Design (EEC0056) Exam

Digital Integrated Circuits A Design Perspective

CARNEGIE MELLON UNIVERSITY DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING DIGITAL INTEGRATED CIRCUITS FALL 2002

Answers. Name: Grade: Q1 Q2 Q3 Q4 Total mean: 83, stdev: 14. ESE370 Fall 2017

Circuit A. Circuit B

Floating Point Representation and Digital Logic. Lecture 11 CS301

EE115C Digital Electronic Circuits Homework #4

ELCT201: DIGITAL LOGIC DESIGN

LECTURE 28. Analyzing digital computation at a very low level! The Latch Pipelined Datapath Control Signals Concept of State

Homework Assignment #5 EE 477 Spring 2017 Professor Parker

Name: Grade: Q1 Q2 Q3 Q4 Q5 Total. ESE370 Fall 2015

C.K. Ken Yang UCLA Courtesy of MAH EE 215B

ΗΜΥ 307 ΨΗΦΙΑΚΑ ΟΛΟΚΛΗΡΩΜΕΝΑ ΚΥΚΛΩΜΑΤΑ Εαρινό Εξάμηνο 2018

ESE570 Spring University of Pennsylvania Department of Electrical and System Engineering Digital Integrated Cicruits AND VLSI Fundamentals

Objective and Outline. Acknowledgement. Objective: Power Components. Outline: 1) Acknowledgements. Section 4: Power Components

Fundamentals of Digital Design

EE 330 Lecture 37. Digital Circuits. Other Logic Families. Propagation Delay basic characterization Device Sizing (Inverter and multiple-input gates)

Digital Circuits. 1. Inputs & Outputs are quantized at two levels. 2. Binary arithmetic, only digits are 0 & 1. Position indicates power of 2.

Properties of CMOS Gates Snapshot

EECS 151/251A Homework 5

Lecture 8: Combinational Circuit Design

PSEUDORANDOM BINARY SEQUENCES GENERATOR

CMOS Technology Worksheet

ESE 570: Digital Integrated Circuits and VLSI Fundamentals

EE 466/586 VLSI Design. Partha Pande School of EECS Washington State University

DATA SHEET. HEF4543B MSI BCD to 7-segment latch/decoder/driver. For a complete data sheet, please also download: INTEGRATED CIRCUITS

Using the NOT realization from the NAND, we can NOT the output of the NAND gate making it a NOT NOT AND or simply an AND gate.

Transcription:

Simulation of Logic Primitives and Dynamic D-latch with Verilog-XL November 30, 2011 Robert D Angelo Tufts University Electrical and Computer Engineering EE-103 Lab 3: Part I&II Professor: Dr. Valencia Joyner Koomson 1

Abstract In this lab logic primitives NOT, NAND2, NOR2, NAND3, NOR3, and XOR2 were constructed from functional views written in Verilog. These primitives are to be used for the design of a multiplier in Part II of this exercise. Additionally, a dynamic d-latch was simulated from a functional view. This circuit exploits leakage effects of transistors to store the previous input until the next clock transition. It is shown that a large leakage time relative to the clock period is necessary for proper functioning of the latch. 2

CONTENTS LIST OF TABLES Contents Abstract 2 1 Logic Primitives 4 1.1 Logical Effort............................................. 4 1.2 Simulations.............................................. 6 2 Dynamic D Latch 8 2.1 Design................................................. 8 2.2 Simulation............................................... 9 3 Conclusions 10 List of Figures 1 Logic Primitives Test Schematic.................................. 6 2 Logic Primitives Simulation Results................................ 7 3 D Latch Circuit............................................ 8 4 D Latch Schematic.......................................... 9 5 D Latch Simulation, 20ns Decay Time............................... 9 6 D Latch Simulation, 2ns Decay TIme................................ 9 7 Leakage Independent D Latch Schematic............................. 10 List of Tables 1 Summary of Gate Delays...................................... 4 2 D Latch Truth Table......................................... 8 3

1 LOGIC PRIMITIVES 1 Logic Primitives 1.1 Logical Effort Logical effort can be used to estimate the delay of logic gates from the following formula. d = gh + p (1.1) where d is the delay, g is the logical effort of the gate, h is the electrical effort, and p is the parasitic effort. For simplicity we assume that h = 1, implying that the input capacitance is equal to load capacitance, and that p = 0, implying that parasitics are insignificant to the delay estimate. Therefore, the gate delay is equal to the logical effort, g. The logical effort of a gate is dependent upon the aspect ratio of the transistors used (r), the number of gate inputs, and the type of gate. g NOT = 1 (1.2) g NAND = n + r (1.3) 1 + r g NOR = 1 + nr (1.4) 1 + r g XOR = n2 n 1 (1.5) From Lab 2 it was determined that r = 1.8 for equal rise and fall time of an inverter (assuming equal gate lengths): r = W n = 2.7µm = 1.8 (1.6) W p 1.5µm This inverter will serve as the reference for determining the delays through other gates. Therefore, the NOT gate will have a delay of 1 unit. Table 1 summarizes the equations and estimated delays for the remaining gates. The gate delays are rounded to the nearest integer so that they can be programmed using Verilog. Table 1: Summary of Gate Delays Gate Logical Effort g (exact) g (estimate) NOT 1 1 1 2+r NAND2 1+r 1.35 1 3+r NAND3 1+r 1.71 2 1+2r NOR2 1+r 1.64 2 1+3r NOR3 1+r 2.29 2 XOR2 2 2 2 1 4 4 Using these delays the functional views for each gate were written in Verilog. Programing Listings 1-6 below show the functional views. 4

1.1 Logical Effort 1 LOGIC PRIMITIVES // V e r i l o g HDL f o r " ee103 ", " inv " " f u n c t i o n a l " module inv (Y, A) ; output Y; input A; not #1 (Y, A) ; Listing 1: Booth Encoder Verilog Stimulus // V e r i l o g HDL f o r " ee103 ", "NAND2" " f u n c t i o n a l " module NAND2 ( vout, va, vb ) ; input va ; input vb ; output vout ; nand #1 ( vout, va, vb ) ; Listing 2: Booth Encoder Verilog Stimulus // V e r i l o g HDL f o r " ee103 ", "NAND3" " f u n c t i o n a l " module NAND3 ( vout, va, vb, vc ) ; output vout ; input va, vb, vc ; nand #2 ( vout, va, vb, vc ) ; Listing 3: Booth Encoder Verilog Stimulus // V e r i l o g HDL f o r " ee103 ", "NOR2" " f u n c t i o n a l " module NOR2 ( vout, va, vb ) ; input va ; input vb ; output vout ; nor #2 ( vout, va, vb ) ; Listing 4: Booth Encoder Verilog Stimulus // V e r i l o g HDL f o r " ee103 ", "NAND3" " f u n c t i o n a l " module NOR3 ( vout, va, vb, vc ) ; output vout ; input va, vb, vc ; nor #2 ( vout, va, vb, vc ) ; Listing 5: Booth Encoder Verilog Stimulus 5

1.2 Simulations 1 LOGIC PRIMITIVES // V e r i l o g HDL f o r " ee103 ", "XOR2" " f u n c t i o n a l " module XOR2 ( vout, va, vb ) ; output vout ; input va, vb ; xor #4 ( vout, va, vb ) ; Listing 6: Booth Encoder Verilog Stimulus 1.2 Simulations The logic primitive symbol views can be seen in the schematic in Figure 1. This schematic was used to simulate the logic gates in Verilog XL. The simulation results are shown in Figure 2. The Verilog stimulus file is shown in Program Listing 7. The inputs are swept from 0b000 to 0b111. It can be seen that the gates are operating correctly. Note that the delays shown in the simulation match those in the functional view. Figure 1: Logic Primitives Test Schematic 6

1.2 Simulations 1 LOGIC PRIMITIVES Figure 2: Logic Primitives Simulation Results // V e r i l o g s t i m u l u s f i l e. // Please do not c r e a t e a module in t h i s f i l e. i n i t i a l begin IN2=1 b0 ; IN1=1 b0 ; IN0=1 b0 ; #50 IN2=1 b0 ; IN1=1 b0 ; IN0=1 b1 ; #50 IN2=1 b0 ; IN1=1 b1 ; IN0=1 b0 ; #50 IN2=1 b0 ; IN1=1 b1 ; IN0=1 b1 ; #50 IN2=1 b1 ; IN1=1 b0 ; IN0=1 b0 ; #50 IN2=1 b1 ; IN1=1 b0 ; IN0=1 b1 ; #50 IN2=1 b1 ; IN1=1 b1 ; IN0=1 b0 ; #50 IN2=1 b1 ; IN1=1 b1 ; IN0=1 b1 ; #50 $finish ; end Listing 7: Booth Encoder Verilog Stimulus 7

2 DYNAMIC D LATCH 2 Dynamic D Latch 2.1 Design A dynamic D Latch is a device that produces the input, D, at the output Q when the clock is asserted high, but holds the previous value when the clock is low. This functionality is shown in the truth table in Table 2. An implementation of a D Latch is shown in Figure 3. When the clock is high, the transmission gate passes the signal D, which charges the parasitic capacitance at the input of the buffer. This capacitance is prone to leakage; therefore, the clock period must be smaller than the leakage time so that the signal will not decay at the output. Table 2: D Latch Truth Table Clk D Q 0 x Q prev 1 0 0 1 1 1 Figure 3: D Latch Circuit The transmission gate is modeled using rcmos and the parasitic capacitance is modeled using trireg command with delay. If the delay is too fast compared to the clock period, the output will decay before the next transition. The functional view of the D Latch is shown in Program Listing 8. // V e r i l o g HDL f o r " ee103 ", " d l a t c h " " f u n c t i o n a l " module dlatch (d, clk, q, q_) ; output q, q_ ; input d, c l k ; wire clk_ ; not #1 ( clk_, c l k ) ; trireg (medium) #(0,0,20) s t o r a g e ; rcmos #1 ( storage, d, clk, clk_ ) ; not #1 (q_, s t o r a g e ) ; not #1 ( q, q_) ; Listing 8: Booth Encoder Verilog Stimulus 8

2.2 Simulation 2 DYNAMIC D LATCH 2.2 Simulation A schematic view of the D latch is shown in Figure 4. The functional view was simulated with two different decay rates to demonstrate the effects of having leakage that is faster than the clock rate (2ns delay) and leakage that is slower than the clock rate (20ns delay). The simulations agree well with common sense, showing that it is more desirable to have a long decay time so that the output does not fall below the threshold before the next clock transition. For comparison, Figure 7 shows the typical D latch schematic that does not depend on leakage. This implementation is slower and larger, however. Figure 4: D Latch Schematic Figure 5: D Latch Simulation, 20ns Decay Time Figure 6: D Latch Simulation, 2ns Decay TIme 9

3 CONCLUSIONS // V e r i l o g HDL f o r " ee103 ", " d l a t c h " " f u n c t i o n a l " module dlatch (d, clk, q, q_) ; output q, q_ ; input d, c l k ; wire clk_ ; not #1 ( clk_, c l k ) ; trireg (medium) #(0,0,20) s t o r a g e ; rcmos #1 ( storage, d, clk, clk_ ) ; not #1 (q_, s t o r a g e ) ; not #1 ( q, q_) ; Listing 9: Booth Encoder Verilog Stimulus Figure 7: Leakage Independent D Latch Schematic 3 Conclusions This lab involved the construction of logical primitives using Verilog. All of the gates were successfully simulated using Verilog-XL. The calculated delay times were observed. A dynamic d-latch was implemented at the functional level. Two different schematic implementations are shown. It was verified that a large leakage time relative to the clock period is necessary so that the latch can hold the previous value until the next transition. 10