EDA 實作 Verilog Tutorial 國研院國家晶片系統設計中心 July 2005 陳正斌.

Slides:



Advertisements
Similar presentations
Xilinx 6.3 Tutorial Integrated Software Environment (ISE) Set up basic environment Select Gates or Modules to Be simulated (Insert Program Code) Run Waveform.
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 Descriptions of Digital Systems
Verilog Modules for Common Digital Functions
CPEN Digital System Design
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.
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.
Anurag Dwivedi.  Verilog- Hardware Description Language  Modules  Combinational circuits  assign statement  Control statements  Sequential circuits.
Full Adder Section 4.5 Spring, 2014 J.Ou. Schedule 62/3MondayBinary addition: full adder 72/5WednesdayBinary addition: full adder/four-bit adder L2/6ThursdayLab.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part3: Verilog – Part 1.
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
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 
 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.
DON’T CARE CONDITIONS Functions that have unspecified output for some input combinations are called incompletely specified functions. Unspecified minterms.
B. RAMAMURTHY Hardware Description Language 8/2/
Digital System Design EEE344 Lecture 2 Introduction to Verilog HDL Prepared by: Engr. Qazi Zia, Assistant Professor EED, COMSATS Attock1.
Verilog Intro: Part 2. Procedural Blocks There are two types of procedural blocks in Verilog. – initial for single-pass behavior: initial blocks execute.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Hardware Design Environment Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Introduction Verilog is a HARDWARE DESCRIPTION LANGUAGE (HDL) A hardware description language is a language or means used to describe or model a digital.
Verilog HDL: A solution for Everybody By, Anil Kumar Ram Rakhyani
Digital System 數位系統 Verilog HDL Ping-Liang Lai (賴秉樑)  
CPEN Digital System Design
Module 2.1 Gate-Level/Structural Modeling UNIT 2: Modeling in Verilog.
EEE2243 Digital System Design Chapter 3: Verilog HDL (Combinational) by Muhazam Mustapha, January 2011.
Module 1.2 Introduction to Verilog
Chap. 4 Modules and Ports. 2 Modules and Ports Modules Ports Hierarchical Names Summary.
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 Combinational Verilog EECS270 rev 9/25/12.
Introduction to ASIC flow and Verilog HDL
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. Data Types A wire specifies a combinational signal. – Think of it as an actual wire. A reg (register) holds a value. – A reg.
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
Chapter 6: Hierarchical Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 6-1 Chapter 6: Hierarchical.
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,
Introduction to Verilog. Structure of a Verilog Program A Verilog program is structured as a set of modules, which may represent anything from a collection.
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 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
Introduction to Verilog
KARTHIK.S Lecturer/ECE S.N.G.C.E
Supplement on Verilog adder examples
Lecture 2 Supplement Verilog-01
Hardware Description Languages: Verilog
Chapter 4 Combinational Logic
Introduction to Verilog
Hardware Descriptive Languages these notes are taken from Mano’s book
Introduction to Verilog
Hardware Descriptive Languages these notes are taken from Mano’s book
مدار منطقی به نام یگانه مهندس هستی مهدی قدیری
Introduction to Verilog
Supplement on Verilog adder examples
Introduction to Verilog
The Verilog Hardware Description Language
XOR Function Logic Symbol  Description  Truth Table 
Introduction to Verilog
Prof. Onur Mutlu ETH Zurich Spring March 2019
Test Fixture Template module testfixture ; // data type declaration
Introduction to Digital IC Design
COE 202 Introduction to Verilog
Combinational Circuit Design
Presentation transcript:

EDA 實作 Verilog Tutorial 國研院國家晶片系統設計中心 July 2005 陳正斌

Traditional VLSI Design Flow

EDA Electronic Design Automation (EDA) Computer-Aided Design (CAD)

Hardware Description Language A hardware description language (HDL) is a high- level programming language with special constructs used to model the function of hardware logic circuits. The special language constructs can: –Describe the connectivity of the circuit –Describe the functionality of the circuit –Describe the timing of a circuit

Verilog Verilog is a Hardware Description Language. Verilog models digital circuits. Verilog lets you develop tests to verify the functionality of the circuits you model.

Verilog Module

Module Ports

Module Instances

A Simple and Complete Example

Sample Design – Full Adder x in y in c in coutsum

Full Adder – Boolean Algebra cout = x in y in c in ’+ x in y in c in +x in ’y in c in +x in y in ’c in = x in y in +c in (x in ’y in +x in y in ’) = x in y in + c in (x in ⊕ y in ) sum = x in ’y in ’c in + x in ’y in c in ’+x in y in ’c in ’+x in y in c in = (x in ’y in +x in y in ’)c in ’ + (x in ’y in ’+x in y in ) c in = (x in ⊕ y in ) ⊕ c in

Full Adder – Schematic

Full Adder – Verilog Model module COUT(cout, xin, yin, cin); input xin; input yin; input cin; output cout; wire xin, yin, cin, out; wire p1, p2, p3; and (p1, xin, yin); xor (p2, xin, yin); and (p3, p2, cin); or (cout, p1, p3); endmodule module SUM(sum, xin, yin, cin); input xin; input yin; input cin; output sum; xor (sum, xin, yin, cin); endmodule

Full Adder -- Schematic

Full Adder – Verilog Model module FA(Cii,Si,Xi,Yi,Ci); input Xi; input Yi; input Ci; output Cii; output Si; SUM inst0 (.sum(Si),.xin(Xi),.yin(Yi),.cin(Ci)); COUT inst1 (.cout(Cii),.xin(Xi),.yin(Yi),.cin(Ci)); endmodule

Test Bench -- Template module FA_test; //Signal declaration //Instantiate modules //Apply stimulus //Display results endmodule

Test Bench --Instance module FA_test; //Signal declaration //Instantiate modules FA inst0 (Cii,Si,Xi,Yi,Ci); //Apply stimulus //Display results endmodule

Test Bench -- Stimulus module FA_test; // Signal declaration reg Xi, Yi, Ci; // Instantiate modules FA inst0 (Cii,Si,Xi,Yi,Ci); // Apply Stimulus initial begin #0 Xi = 0; Yi = 0; Ci = 0; #10 Xi = 0; Yi = 0; Ci = 1; #10 Xi = 0; Yi = 1; Ci = 0; #10 Xi = 0; Yi = 1; Ci = 1; #10 $finish; end //Display results endmodule TimeValues XiYiCi

Test Bench – Display Result module FA_test; // Signal declaration reg Xi, Yi, Ci; // Instantiate modules FA inst0 (Cii,Si,Xi,Yi,Ci); // Apply Stimulus initial begin #10 Xi = 0; Yi = 0; Ci = 0; #10 Xi = 0; Yi = 0; Ci = 1; #10 Xi = 0; Yi = 1; Ci = 0; #10 Xi = 0; Yi = 1; Ci = 1; #10 $finish; end //Display results initial // print all changes to all signal values $monitor($time, " Xi = %b Yi = %b Ci = %b Ci+1 = %b Si = %b", Xi,Yi,Ci,Cii,Si); endmodule

Dump Waveform initial begin $dumpfile(“file.vcd”); $dumpvars(0,inst0); end

Simulation unix> verilog FA_test.v FA.v COUT.v SUM.v unix> nWave &

Waveform

Quiz Design a 4 bit adder by instancing 4 full adder

Edit ADDR4.v module ADDR4(cout,sum,a,b,cin); input cin; input [3:0] a; input [3:0] b; output [3:0] sum; output cout; //Design Started Here!!! endmodule

Apply Stimulus Edit ADDR4_test.v // Apply Stimulus initial begin // ** Add stimulus here ** end

Apply Stimulus TimeValues abCin