Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Topics n Verilog register-transfer modeling: –basics using traffic light controller;

Slides:



Advertisements
Similar presentations
Traffic light contoller using FSM
Advertisements

The Verilog Hardware Description Language
Synchronous Sequential Logic
Combinational Logic.
Verilog Intro: Part 1.
Hardware Description Language (HDL)
Anurag Dwivedi.  Verilog- Hardware Description Language  Modules  Combinational circuits  assign statement  Control statements  Sequential circuits.
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
Verilog. 2 Behavioral Description initial:  is executed once at the beginning. always:  is repeated until the end of simulation.
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.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
FPGA-Based System Design: Chapter 6 Copyright  2004 Prentice Hall PTR Register-transfer Design n Basics of register-transfer design: –data paths and controllers.
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
Silicon Programming--Intro. to HDLs1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities.
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Verilog for sequential machines.
Verilog Basics Nattha Jindapetch November Agenda Logic design review Verilog HDL basics LABs.
FPGA-Based System Design: Chapter 5 Copyright  2004 Prentice Hall PTR Topics n Verilog styles for sequential machines. n Flip-flops and latches.
1 VERILOG Fundamentals Workshop סמסטר א ' תשע " ה מרצה : משה דורון הפקולטה להנדסה Workshop Objectives: Gain basic understanding of the essential concepts.
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.
Chapter 4: Behavioral Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 4-1 Ders – 4: Davranışsal Modelleme.
ECE 551 Digital System Design & Synthesis Fall 2011 Midterm Exam Overview.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
FPGA-Based System Design Copyright  2004 Prentice Hall PTR Logic Design Process n Functional/ Non-functional requirements n Mapping into an FPGA n Hardware.
1 CSE-308 Digital System Design (DSD) N-W.F.P. University of Engineering & Technology, Peshawar.
Module 1.2 Introduction to Verilog
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
Modern VLSI Design 4e: Chapter 8 Copyright  2008 Wayne Wolf Topics VHDL register-transfer modeling: –basics using traffic light controller; –synthesis.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
Modern VLSI Design 4e: Chapter 8 Copyright  2008 Wayne Wolf Topics Modeling with hardware description languages (HDLs).
Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Topics n Modeling with hardware description languages (HDLs).
The Verilog Hardware Description Language. GUIDELINES How to write HDL code: How to write HDL code:
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Introduction to ASIC flow and Verilog HDL
Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Topics n Basics of register-transfer design: –data paths and controllers; –ASM.
Verilog hdl – II.
FPGA-Based System Design Copyright  2004 Prentice Hall PTR Topics n Modeling with hardware description languages (HDLs).
Verilog® HDL Behavioral Modeling (2)
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
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.
Exp#5 & 6 Introduction to Verilog COE203 Digital Logic Laboratory Dr. Ahmad Almulhem KFUPM Spring 2009.
Structural Description
Hardware Description Languages: Verilog
Adapted from Krste Asanovic
Figure 8.1. The general form of a sequential circuit.
Reg and Wire:.
Verilog Introduction Fall
Topics Modeling with hardware description languages (HDLs).
‘if-else’ & ‘case’ Statements
Supplement on Verilog Sequential circuit examples: FSM
Hardware Description Languages: Verilog
Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-I]
Topics The logic design process..
Topics Modeling with hardware description languages (HDLs).
Chapter 4: Behavioral Modeling
Topics Verilog styles for sequential machines. Flip-flops and latches.
Supplement on Verilog Sequential circuit examples: FSM
Register-Transfer Level Components in Verilog
The Verilog Hardware Description Language
Supplement on Verilog adder examples
The Verilog Hardware Description Language
The Verilog Hardware Description Language
Verilog HDL Basic Syntax
Introduction to Digital IC Design
COE 202 Introduction to Verilog
Lecture 7: Verilog Part II
Presentation transcript:

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Topics n Verilog register-transfer modeling: –basics using traffic light controller; –synthesis.

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Verilog n Verilog was designed as an efficient simulation language. n Relatively simple, terse syntax. n Most popular HDL in use today.

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Verilog formulas

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Verilog constants n Bit constant: –0, 1 n Bit vector constant: –4’b1010

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Some useful constructs ‘define aconst 2’b00 constant vector $monitor($time,,”a=%b, b=%b”,a,b); value monitor output #1 a=0; b=0 #2 a=1; b=0 sequence of waveforms

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Four-valued OR function

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Four-valued AND function

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Verilog structural model Module adder(a,b,cin,sum,cout); input a, b, cin; output sum, cout; xor #2 s(sum,a,b,cin); // sum and #1 // carry out c1(x1,a,b); c2(x2,a,cin); c3(x3,b,cin); or #1 c4(cout,x1,x2,x3); endmodule Time delay for output Output wire Input wires

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR If statements if (b | c) then y = 1; else y <= 0; if (b | c) then y = 1; else z = a | b; y assigned value in both cases different net assigned in true, false cases

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Conditional assignments if (b | c) then y = ‘1’; else z = a | b; n Simulation: –Condition is tested based on current signal states. –Only one net gets an event. n Synthesis: –Creates don’t-cares for y and z.

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Loop statement n A loop performs an operation over an array of signals: for (i=0; i<N; i=i+1) x[i] = a[i] & b[i];

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR always statement always guards execution of a block of statements. –Block is always executed on the logical condition. n begin.. end

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Structure of a Verilog model n Module statement. –Declares I/O pin names. n Declarations: –inputs and outputs; –registers. n Body.

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR A synthesizable Verilog archtiecture n Declarations of pins and registers. n Definitions of constants (similar to C #define statement). –‘define GREEN ‘2b11 n Combinational and sequential portions. statements.

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Verilog combinational portion or short or long or cars) begin when HG: begin // state hwy-green highway_light = GREEN; farm_light = RED; if (cars & long) then begin ctrl_next = HY; start_timer = 1; end else begin ctrl_next - HG; start_timer = 0; end end

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Verilog sequential portion clock or negedge reset) if (~reset) ctrl_state <= 0; else ctrl_state <= ctrl_next; end Condition on clock/reset Transfer of next state to current state

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Testbench structure Unit under test (UUT) testbench tester

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Verilog testbed organization n Module declaration. –Two components: UUT and tester. n Definition of UUT. n Definition of tester.

Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Testbench tester process initial begin $monitor($time,,”a=%b”,a); #1a=0; b=0; cin=0; #1 a=1; b=0; cin=0; #2 a=1; b=1; cin=1; end endmodule Test inputs Prints signal values