GATE-LEVEL MODELING (Source: a Verilog HDL Primer by J. Bhasker)

Slides:



Advertisements
Similar presentations
Verilog HDL -Introduction
Advertisements

HDL Programming Fundamentals
ELEN 468 Lecture 21 ELEN 468 Advanced Logic Design Lecture 2 Hardware Modeling.
Verilog Intro: Part 1.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part3: Verilog – Part 1.
1 Brief Introduction to Verilog Weiping Shi. 2 What is Verilog? It is a hardware description language Originally designed to model and verify a design.
CSE 341 Verilog HDL An Introduction. Hardware Specification Languages Verilog  Similar syntax to C  Commonly used in  Industry (USA & Japan) VHDL 
1 Pertemuan 9 Verilog HDL Matakuliah: H0362/Very Large Scale Integrated Circuits Tahun: 2005 Versi: versi/01.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Copyright 2001, Agrawal & BushnellDay-1 PM Lecture 4a1 Design for Testability Theory and Practice Lecture 4a: Simulation n What is simulation? n Design.
Lecture 2: Hardware Modeling with Verilog HDL
1 Lecture 1: Verilog HDL Introduction. 2 What is Verilog HDL? Verilog Hardware Description Language(HDL)? –A high-level computer language can model, represent.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
The Multicycle Processor II CPSC 321 Andreas Klappenecker.
CSE241 R1 Verilog.1Kahng & Cichy, UCSD ©2003 CSE241 VLSI Digital Circuits Winter 2003 Recitation 1: Verilog Introduction.
ELEN 468 Lecture 111 ELEN 468 Advanced Logic Design Lecture 11 Switch Level Models.
The Design Process CPSC 321 Computer Architecture Andreas Klappenecker.
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
ENEE 408C Lab Capstone Project: Digital System Design Verilog Tutorial Class Web Site:
Lecture #24 Gates to circuits
ENEE 408C Lab Capstone Project: Digital System Design Verilog Tutorial Class Web Site:
Variables and Logic Value Set
Verilog.
Silicon Programming--Intro. to HDLs1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities.
ENEE 408C Lab Capstone Project: Digital System Design Spring 2006 Class Web Site:
ECEN ECEN475 Introduction to VLSI System Design Verilog HDL.
Field-Effect Transistors 1.Understand MOSFET operation. 2. Understand the basic operation of CMOS logic gates. 3. Make use of p-fet and n-fet for logic.
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
O VERVIEW OF DIGITAL SYSTEMS Hardware Description Language 1.
Programmable Logic Architecture Verilog HDL FPGA Design Jason Tseng Week 2-3.
Lecture Note on Verilog, Course # , EE, NTU, C.H Tsai Basic Logic Design with Verilog TA: Chen-han Tsai.
Switch-Level Modeling How to describe a switch-level circuit ?
ECE 2372 Modern Digital System Design
ECE/CS 352 Digital Systems Fundamentals
COE 405 Introduction to Logic Design with Verilog
Introduction Verilog is a HARDWARE DESCRIPTION LANGUAGE (HDL) A hardware description language is a language or means used to describe or model a digital.
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 3: Structural Modeling Spring 2009 W. Rhett.
Programmable Logic Architecture Verilog HDL FPGA Design Jason Tseng Week 4.
Digital System 數位系統 Verilog HDL Ping-Liang Lai (賴秉樑)  
Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-1 Ders – 2: Yapısal Modelleme.
CH71 Chapter 7 Hardware Description Language (HDL) By Taweesak Reungpeerakul.
EMT 351 Digital IC Design Lecturers: En. Rizalafande Che Ismail (Subject Coordinator) Pn. Siti Zarina Md. Naziri Blok B, Tingkat 2, Kompleks Pusat Pengajian.
Module 1.2 Introduction to Verilog
1 CSE-308 Digital System Design (DSD) N-W.F.P. University of Engineering & Technology, Peshawar.
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
The digital system design and Verilog Members: r 劉致元 r 羅棠年 r 賴宥任.
ELEN 468 Lecture 111 ELEN 468 Advanced Logic Design Lecture 11 Switch Level Models.
Digital System Design Verilog ® HDL Design at Structural Level Maziar Goudarzi.
Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-1 Chapter 2a: Structural Modeling.
Introduction to ASIC flow and Verilog HDL
CMOS Logic Gates. NMOS transistor acts as a switch 2 When gate voltage is 0 V No channel is formed current does not flow easily “open switch” When gate.
Introduction to Verilog
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
Verilog Intro: Part 1. Hardware Description Languages A Hardware Description Language (HDL) is a language used to describe a digital system, for example,
102-1 Under-Graduate Project Synthesis of Combinational Logic
1 Lecture 1: Verilog HDL Introduction. 2 What is Verilog HDL? Verilog Hardware Description Language(HDL)? –A high-level computer language can model, represent.
Exp#5 & 6 Introduction to Verilog COE203 Digital Logic Laboratory Dr. Ahmad Almulhem KFUPM Spring 2009.
1 A hardware description language is a computer language that is used to describe hardware. Two HDLs are widely used Verilog HDL VHDL (Very High Speed.
Introduction to Verilog COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals.
Discussion 2: More to discuss
Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-I]
Chapter 2a: Structural Modeling
OUTLINE Introduction Basics of the Verilog Language
Introduction to Verilog
102-1 Under-Graduate Project Verilog
Chapter 2b: Switch-Level Modeling
Chapters 4 – Part3: Verilog – Part 1
The Verilog Hardware Description Language
COE 202 Introduction to Verilog
Presentation transcript:

GATE-LEVEL MODELING (Source: a Verilog HDL Primer by J. Bhasker)

D IFFERENT L EVELS OF A BSTRACTION Architectural / Algorithmic Level Implement a design algorithm in high-level language constructs. Register Transfer Level Describes the flow of data between registers and how a design process these data. System Algorithm Architecture Register Transfer Level Gate Level Transistor Level

D IFFERENT L EVELS OF A BSTRACTION Gate Level Describe the logic gates and the interconnections between them. Switch (Transistor) Level Describe the transistors and the interconnections between them. System Algorithm Architecture Register Transfer Level Gate Level Transistor Level

GATE-LEVEL MODELING The gate-level modeling describes the available built-in primitive gates and how these can be used to describe hardware.

M ULTIPLE - INPUT G ATES and, nand, or, nor. xor, xnor These logic gates have only one output and one or more inputs.

M ULTIPLE - INPUT G ATES Syntax : multiple_input_gate_type[instance_name] (OutputA,Input1,Input2,….,Input1); Note:A value z at an input is handled like an x and the output can never be a z. Multiple-input gate Output A Input1 Input2 Input3

M ULTIPLE - INPUT G ATES nand01xz xx x1xxx z1xxx and01xz xx x0xxx z0xxx or01xz 001xx xx1xx zx1xx xnor01xz 010xx 101xx xxxxx zxxxx

nor01xz 010xx xx0xx zx0xx xor01xz 001xx 110xx xxxxx zxxxx

E XAMPLES : and A1 (Out1, In1, In2) ; and RBX (Sty, Rib, Bro, Qit, Fix) ; xor (Bar, Bud[0], Bud[1], Bud[2] ), (Car, Cut[0], Cut[1] ), (Sar, Sut[2], Sut[1], Sut[0], Sut[3] ) ;

M ULTIPLE - OUTPUT G ATES : buf, not These gates have only one input and one or more outputs

M ULTIPLE - OUTPUT G ATES : Syntax: multiple_output_gate_type[instance_name] (Out1,Out2,…..,OutN, InputA); InputA Out1 Out2 OutN Out1 Out2 OutN InputA

E XAMPLES : BUF B1 ( F AN [0], F AN [1], F AN [2], F AN [3], C LK ) ; NOT N1 (P H A, P H B, R EADY ) ; buf01xz output01xx buf01xz output01xx

T RISTATE G ATES : bufif0, bufif1, notif0, notif1 These gates model three state drivers and have one output, one data input and one control input. Note: For a bufif0 gate, the output is z if control is 1, else data is transferred to output. For a bufif1 gate, the output is z if control is 0. For a notif0 gate, the output is z if control is 1, else output is the invert of the input data value. For a notif1 gate, the output is z if control is 0.

T RISTATE GATES : Syntax : tristate_gate [instance_name] (OutA, InputB, ControlC); InputAOutputAControlCnotif1 InputAOutputA ControlC notif1 InputAOutputA ControlC notif0 InputAOutputA ControlC bufif1 InputAOutputA ControlC bufif0

E XAMPLES : BUFIF BF1 ( D BUS, M EM D ATA, S TROBE ) ; NOTIF 0 NT2 (A DDR, A BUS, P ROBE ) ; Bufif0Control 01xz Data00z0/z 11z1/z xxzxx zxzxx Bufif1Control 01xz Data0z00/z 1z11/z xzxxx zzxxx Notif0Control 01xz Data01z1/z 10z0/z xxzxx zxzxx Notif1Control 01xz Data0z11/z 1z00/z xzxxx zzxxx

P ULL G ATES : pullup, pulldown These gates have only one output with no inputs. Note : A pullup gate places a 1 on its output. A pulldown gate places a 0 on its output. Syntax : pull_gate_type[instance_name](OutA); Examples : Pullup PUP(Pwr) ;

MOS SWITCHES : cmos, pmos, nmos, rcmos, rpmos, rnmos These gates model unidirectional switches, that is, data flows from input to output and the data flow can be turned off by appropriately setting the control input(s). Note : The pmos( p-type MOS transistor), nmos(n-type MOS transistor), rnmos( r stands for resistive) and rpmos switches have one output, one input, and one control input. If control is 0 for nmos and rnmos switches and 1 for pmos and rpmos switches, the switch is turned off, that is, output has a value z; if control is 1, data at input passes to output.

MOS SWITCHES : Syntax: gate_type[instance_name](OutputA, InputB, ControlC); InputBOutput A ControlC nmos switch ControlC OutputAInputB

MOS SWITCHES : pmos rpmos Control 01xz Data00z0/z 11z1/z xxzxx zzzxx nmos rnmos Control 01xz Data0z00/z 1z11/z xzxxx zzzxx

E XAMPLES : PMOS P1( B IG B US, S MALL B US, G ATE C ONTROL ) ; RNMOS RN1(C ONTROL B IT,R EADY B IT,H OLD ) ; Pcontrol OutputA Ncontrol InputB ( r ) cmos switch

B IDIRECTIONAL SWITCHES : tran, rtran, tranif0, rtranif0, tranif1, rtranif1 These switches are bidirectional, that is, data flows both ways and there is no delay when data propagates through the switches. The last four switches can be turned off by setting a control signal appropriately. The tran and rtran switches cannot be turned off. If control is 1 for tranif0 and rtranif0, and 0 for tranif1 and rtranif1, the bidirectional data flow is disabled. Syntax: gate_type[instance_name](SignalA, SignalB, SignalC);

G ATE D ELAYS The signal propagation delay from any gate input to the gate output can be specified using a gate delay using the syntax: gate_type [delay] [ instance_name] ( terminal list ); Example: and #3 g (a, b, c);

W HEN NO GATE DELAY IS SPECIFIED, THE DEFAULT DELAY IS ZERO. A gate delay can be comprised of up to three values: Rise delay Fall delay Turn-off delay

E XAMPLE : 1- BIT M ULTIPLEXER

G ATE L EVEL D ESCRIPTION Gate Level: you see only netlist (gates and wires) in the code. a1 a2 in1 in2 sel out o1o1 iv_sel a1_o a2_o n1 iv_sel

G ATE -L EVEL M ODELING Steps Develop the Boolean function of output Draw the circuit with logic gates/primitives Connect gates/primitives with net (usually wire) HDL : Hardware Description Language Figure out architecture first, then write code.

T EST M ETHODOLOGY Systematically verify the functionality of a model. Procedure of simulation Detect syntax violations in source code Simulate behavior Monitor results

T EST M ETHODOLOGY

V ERILOG S IMULATOR

C ASE S TUDY : F ULL A DDER 30

C ASE S TUDY : F ULL A DDER 31 C o = AB + BC i + C i A

C ASE S TUDY : F ULL A DDER sum = a  b  c i 32

C ASE S TUDY : F ULL A DDER Full Adder Connection Instance ins_c from FA_co Instance ins_s from FA_sum 33

T ESTBENCH FOR F ULL A DDER module TestBench; reg a,b,ci; wire sum,cout; initial begin $display(“a b ci sum cout"); a = 1'b0; b = 1'b0;ci = 1'b0; #8 $finish; end always #4 b = ~b; always #2 a = ~a; always #1 ci = ~ci; FA_sum U1(sum,a,b,ci,cout); initial $monitor("%b %b %b %b %b“, a, b, ci, sum, cout); endmodule