ENEE 408C Lab Capstone Project: Digital System Design Verilog Tutorial Class Web Site:

Slides:



Advertisements
Similar presentations
Verilog HDL -Introduction
Advertisements

Verilog.
Simulation executable (simv)
The Verilog Hardware Description Language
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Combinational Logic.
ELEN 468 Lecture 21 ELEN 468 Advanced Logic Design Lecture 2 Hardware Modeling.
Chapter 11 Verilog HDL Application-Specific Integrated Circuits Michael John Sebastian Smith Addison Wesley, 1997.
Verilog Intro: Part 1.
Hardware Description Language (HDL)
16/04/20151 Hardware Descriptive Languages these notes are taken from Mano’s book It can represent: Truth Table Boolean Expression Diagrams of gates and.
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.
 HDLs – Verilog and Very High Speed Integrated Circuit (VHSIC) HDL  „ Widely used in logic design  „ Describe hardware  „ Document logic functions.
ECE 353 Computer Systems Lab I Verilog Hardware Description Language.
ENEE 408C Lab Capstone Project: Digital System Design Verilog Tutorial Class Web Site:
ENEE 408C Lab Capstone Project: Digital System Design Spring 2005 Class Web Site: e408c.
Hardware Description Language HDL. 2 Hardware Description Language HDL  Describes circuits and systems in text. −As a software program.  Can be processed.
ENEE 408C Lab Capstone Project: Digital System Design Spring 2006 Class Web Site:
ECEN ECEN475 Introduction to VLSI System Design Verilog HDL.
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
Lecture 7 Verilog Additional references Structural constructs
Introduction to FPGA AVI SINGH. Prerequisites Digital Circuit Design - Logic Gates, FlipFlops, Counters, Mux-Demux Familiarity with a procedural programming.
ECE 2372 Modern Digital System Design
COE 405 Introduction to Logic Design with Verilog
Verilog Language Concepts
ECE 551 Digital System Design & Synthesis Fall 2011 Midterm Exam Overview.
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 3: Structural Modeling Spring 2009 W. Rhett.
1 An Update on Verilog Ξ – Computer Architecture Lab 28/06/2005 Kypros Constantinides.
Digital System 數位系統 Verilog HDL Ping-Liang Lai (賴秉樑)  
Module 2.1 Gate-Level/Structural Modeling UNIT 2: Modeling in Verilog.
CH71 Chapter 7 Hardware Description Language (HDL) By Taweesak Reungpeerakul.
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.
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
Chap. 4 Modules and Ports. 2 Modules and Ports Modules Ports Hierarchical Names Summary.
3/4/20031 ECE 551: Digital System Design * & Synthesis Lecture Set 3 3.1: Verilog - User-Defined Primitives (UDPs) (In separate file) 3.2: Verilog – Operators,
The Verilog Hardware Description Language. GUIDELINES How to write HDL code: How to write HDL code:
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
M.Mohajjel. Objectives Learn How to write synthesizable Verilog code Common mistakes and how to avoid them What is synthesized for what we code Digital.
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 4: Testing, Dataflow Modeling Spring 2009.
ECE 171 Digital Circuits Chapter 8 Hardware Description Language Herbert G. Mayer, PSU Status 11/23/2015 Copied with Permission from prof. Mark
Introduction to Verilog
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
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 University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
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
An Introduction to Verilog: Transitioning from VHDL
Reg and Wire:.
Discussion 2: More to discuss
Verilog Introduction Fall
Hardware Description Languages: Verilog
Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-I]
Hardware Descriptive Languages these notes are taken from Mano’s book
Behavioral Modeling in Verilog
Introduction to Verilog
102-1 Under-Graduate Project Verilog
Hardware Descriptive Languages these notes are taken from Mano’s book
The Verilog Hardware Description Language
The Verilog Hardware Description Language
COE 202 Introduction to Verilog
Presentation transcript:

ENEE 408C Lab Capstone Project: Digital System Design Verilog Tutorial Class Web Site:

Modules and Primitives Modules Modules The user-defined components module fulladder ( ) …endmodule Primitives Primitives Pre-defined components nand g( ) Have to specify inputs and outputs Can have multiple outputs Module instantiation fulladder f(<port_list); First port is output Have only one output Primitives instantiation nand g( );

Registers and Nets reg reg –stores 1 bit information by default –similar to C/C++ variables in syntax –used on both LHS and RHS in procedural assignment –cannot be used on LHS in continuous assignment wire wire –default width is 1 bit –establish connectivity between two components –driven by the components it connects to –used on LHS in continuous assignment –cannot be used on LHS in procedural assignment integer integer –a 32-bit reg

Port Declaration input input –must be wire type inout inout –must be wire type output output –can be reg or wire type If not specified, all of aboves are by default wire type. If not specified, all of aboves are by default wire type.

Behavioral Description VS. Structural Description Structural Description Structural Description –a Verilog description of schematic –easy to synthesize –like gate-level netlist –less readable from human’s point of view. Behavioral Description Behavioral Description –a description of the functionality –flexible and more readable –suitable for large scale design –not always synthesizable

Structure Description primitive instantiation (AND, NAND, OR, NOR, XOR, XNOR, BUF, NOT, BUFIF, NOTIF) primitive instantiation (AND, NAND, OR, NOR, XOR, XNOR, BUF, NOT, BUFIF, NOTIF) parameter value assignment parameter value assignment

Structural Description Example module weird_logic (a,b,c,d); output a; input b,c,d; wire w; nand g1(w,b,c); nor g2(a,w,d); endmodule primitive don’t forget

Behavioral Description 1 Boolean-Equation-Based Model Boolean-Equation-Based Model module weird_logic (a,b,c,d); output a; input b,c,d; wire w; assign w = ~(b & c); assign a = ~(w | d); endmodule –continuous assignment –level-sensitive –normally used for combinational circuits continuous assignment

Behavioral Description 2 Cyclic Behavior Model Cyclic Behavior Model module weird_logic (a,b,c,d); output a; input b,c,d; reg w,a; or c) w = ~(b & c); or posedge w) a = ~(w | d); endmodule –always block –can be both level and edge sensitive –do not expire after the last statements

Behavioral Description 2 Cyclic Behavior Model Cyclic Behavior Model module weird_logic (a,b,c,d); output a; input b,c,d; wire w; or c) w = ~(b & c); or posedge w) a = ~(w | d); endmodule –always block –can be both level and edge sensitive –do not expire after the last statements

Using Testbench By giving a set of combination of inputs to test the timing and functionality of your design. By giving a set of combination of inputs to test the timing and functionality of your design. Can be separate from your design. Can be separate from your design. Must match the interface of your design Must match the interface of your design Need not to be synthesizable. Need not to be synthesizable.

With Stimulus initial block initial block $monitor system task $monitor system task $time system task $time system task $display system task $display system task delay statements and assignments - discussion of simulator engine delay statements and assignments - discussion of simulator engine $finish system task $finish system task

Testbench Example module tb_weird_logic; wire A; reg B, C, D; weird_logic instance1(A, C, D, B); initial // two slashes introduce a single line comment begin $monitor ($time,,, "A = %b B = %b C = %b D = %b", A, B, C, D); //waveform for simulating the binaryToESeg driver //waveform for simulating the binaryToESeg driver #10 B = 0; C = 0; D = 0; #10 D = 1; #10 C = 1; D = 0; #10 $finish; endendmodule