Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-1 Chapter 2a: Structural Modeling.

Slides:



Advertisements
Similar presentations
Verilog HDL -Introduction
Advertisements

//HDL Example 4-10 // //Gate-level description of circuit of Fig. 4-2 module analysis (A,B,C,F1,F2); input.
Verilog.
The Verilog Hardware Description Language
Verilog Intro: Part 1.
Combinational Logic with Verilog Materials taken from: Digital Design and Computer Architecture by David and Sarah Harris & The Essentials of Computer.
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices XOR, Parity Circuits, Comparators.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part3: Verilog – Part 1.
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.
 HDLs – Verilog and Very High Speed Integrated Circuit (VHSIC) HDL  „ Widely used in logic design  „ Describe hardware  „ Document logic functions.
Lecture 1 Design Hierarchy Chapter 1. Digital System Design Flow 1.Register-Transfer Levl (RTL) – e.g. VHDL/Verilog 2.Gate Level Design 3.Circuit Level.
1 Lecture 1: Verilog HDL Introduction. 2 What is Verilog HDL? Verilog Hardware Description Language(HDL)? –A high-level computer language can model, represent.
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:
ENEE 408C Lab Capstone Project: Digital System Design Verilog Tutorial Class Web Site:
Reconfigurable Computing (EN2911X, Fall07) Lecture 05: Verilog (1/3) Prof. Sherief Reda Division of Engineering, Brown University
©2010 Cengage Learning Engineering. All Rights Reserved.10-0 Introduction to VHDL PowerPoint Presentation © Cengage Learning, Engineering. All Rights.
Computer Organization Lecture Set – 03 Introduction to Verilog Huei-Yung Lin.
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
Digital System Design EEE344 Lecture 2 Introduction to Verilog HDL Prepared by: Engr. Qazi Zia, Assistant Professor EED, COMSATS Attock1.
Programmable Logic Architecture Verilog HDL FPGA Design Jason Tseng Week 5.
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.
Chapter 5: Tasks, Functions, and UDPs Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 5-1 Ders - 5 : Görevler,
Module 1.2 Introduction to Verilog
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
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.
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
Digital System Design Verilog ® HDL Design at Structural Level Maziar Goudarzi.
Introduction to ASIC flow and Verilog HDL
Chapter 8: Combinational Logic Modules Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 8-1 Chapter 8: Combinational.
Introduction to Verilog
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
Chapter 3: Dataflow Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 3-1 Chapter 3: Dataflow Modeling.
Chapter 5: Tasks, Functions, and UDPs Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 5-1 Chapter 5: Tasks, Functions,
Chapter 6: Hierarchical Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 6-1 Chapter 6: Hierarchical.
ECE 2110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices XOR and parity check Circuits.
Chapter1: Introduction Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 1-1 Chapter 1: Introduction Prof. Ming-Bo.
Verilog Intro: Part 1. Hardware Description Languages A Hardware Description Language (HDL) is a language used to describe a digital system, for example,
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.
Hardware Description Languages: Verilog
ECE 3130 Digital Electronics and Design
ECE 3130 Digital Electronics and Design
Lecture 2 Supplement Verilog-01
Homework Reading Machine Projects Labs
Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-I]
Behavioral Modeling in Verilog
Chapter 2a: Structural Modeling
Chapter 3: Dataflow Modeling
OUTLINE Introduction Basics of the Verilog Language
Introduction to Verilog
Chapter 8: Combinational Logic Modules
DIGITAL ELECTRONICS B.SC FY
Supplement on Verilog adder examples
The Verilog Hardware Description Language
XOR Function Logic Symbol  Description  Truth Table 
Prof. Onur Mutlu ETH Zurich Spring March 2019
COE 202 Introduction to Verilog
Presentation transcript:

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-1 Chapter 2a: Structural Modeling Prof. Ming-Bo Lin Department of Electronic Engineering National Taiwan University of Science and Technology

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-2 Structural Styles  A set of interconnected components  Modules/UDPs  Gate primitives  Switch primitives

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-3 Gate Primitives  12 gate primitives  Synthesizable  and/or gates  One scalar output  Multiple scalar inputs  Include and or xor nand nor xnor

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-4 Gate Primitives  buf/not Gates  One scalar input  One or multiple scalar outputs  Include buf not bufif0 notif0 bufif1 notif1

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-5 Switch Primitives  16 switch primitives  To model a new logic gate circuit at switch level  Not synthesizable, in general

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-6 Logic Gates

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-7 buf/not Gates

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-8 bufif0/notif0 Gates Note that: L represents 0 or z and H represents 1 or z.

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-9 bufif1/notif1 Gates

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-10 Instantiation of Basic Gates  To instantiate and/or gates gatename [instance_name](output, input1, input2,..., inputn);  instance_name is optional module basic_gates (x, y, z, f) ; input x, y, z; output f ; wire a, b, c; // Structural modeling nor g1 (b, x, y); not g2 (a, x); and g3 (c, a, z); nor g4 (f, b, c); endmodule

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-11 Array of Instances  Array instantiations may be a synthesizer dependent!  Suggestion: check this feature before using the synthesizer wire [3:0] out, in1, in2; // basic array instantiations of nand gate. nand n_gate[3:0] (out, in1, in2); // this is equivalent to the following: nand n_gate0 (out[0], in1[0], in2[0]); nand n_gate1 (out[1], in1[1], in2[1]); nand n_gate2 (out[2], in1[2], in2[2]); nand n_gate3 (out[3], in1[3], in2[3]);

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-12 An Example --- A 1-Bit Full Adder module full_adder_structural(x, y, c_in, s, c_out); // I/O port declarations input x, y, c_in; output s, c_out; wire s1, c1, c2, c3; // Structural modeling of the 1-bit full adder. xor xor_s1(s1, x, y); // compute sum. xor xor_s2(s, s1, c_in); and and_c1(c1, x, y); // compute carry out. and and_c2(c2, x, c_in); and and_c3(c3, y, c_in); or or_cout(c_out, c1, c2, c3); endmodule

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-13 An Example --- A 4-to-1 Multiplexer module mux4_to_1_structural (i0, i1, i2, i3, s1, s0, out); input i0, i1, i2, i3, s1, s0; output out; wire s1n, s0n; // Internal wire wire y0, y1, y2, y3; // Gate instantiations not (s1n, s1); // Create s1n and s0n signals not (s0n, s0); and (y0, i0, s1n, s0n); and (y1, i1, s1n, s0); and (y2, i2, s1, s0n); and (y3, i3, s1, s0); or (out, y0, y1, y2, y3); endmodule

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-14 An Example --- A 9-Bit Parity Generator

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-15 An Example --- A 9-Bit Parity Generator module parity_gen_9b_structural(x, ep, op); // I/O port declarations input [8:0] x; output ep, op; wire c, d, e, f, g, h, j; xor xor_11(c, x[0], x[1]); // first level xor xor_12(d, x[2], x[3]); xor xor_13(e, x[4], x[5]); xor xor_14(f, x[6], x[7]); xor xor_21(g, c, d); // second level xor xor_22(h, e, f); xor xor_31(i, g, h); // third level xor xor_ep(ep, i, x[8]); // fourth level xnor xnor_op(op, i, x[8]); endmodule

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-16 Instantiation of Tristate Buffers  To instantiate tristate buffers  The instance_name is optional // 2-to-1 mux module two_to_one_mux_tristate (x, y, s, f); input x, y, s; output f; tri f; // internal declaration // data selector body bufif0 b1 (f, x, s); bufif1 b2 (f, y, s); endmodule buf_name[instance_name](output, input, control);

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-17 Delay Models  Inertial delay model  Transport delay model

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-18 The Effects of Inertial Delays

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-19 Transport delay model  Transport delay model  To model net (i.e. wires) delays  The default delay of a net is zero

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-20 The Effects of Transport and Inertial Delays

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-21 Hazards and Their Effects  Hazards  Unwanted short-width output signals  Types  Static hazards  Dynamic hazards

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-22 A Static Hazard Example module hazard_static (x, y, z, f); input x, y, z; output f; wire a, b, c; and #5 a1 (a, x, y); not #5 n1 (c, x); and #5 a2 (b, c, z); or #5 o2 (f, b, a); endmodule

Chapter 2: Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 2-23 A Dynamic Hazard Example