Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania 18042 ECE 426 - VLSI System Design Lecture 4 - Advanced Verilog.

Slides:



Advertisements
Similar presentations
Digital System Design-II (CSEB312)
Advertisements

VERILOG: Synthesis - Combinational Logic Combination logic function can be expressed as: logic_output(t) = f(logic_inputs(t)) Rules Avoid technology dependent.
FSM and Efficient Synthesizable FSM Design using Verilog
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Sequential Logic in Verilog
ECE 551 Digital Design And Synthesis
Synchronous Sequential Logic
Combinational Logic.
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
FSM Revisit Synchronous sequential circuit can be drawn like below  These are called FSMs  Super-important in digital circuit design FSM is composed.
Give qualifications of instructors: DAP
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.
2/9/20031 ECE 551: Digital System Design & Synthesis Lecture Set 4 4.1: Verilog – Procedural Assignments &Scheduling Semantics 4.2: Verilog – More Behavioral.
 HDLs – Verilog and Very High Speed Integrated Circuit (VHSIC) HDL  „ Widely used in logic design  „ Describe hardware  „ Document logic functions.
ECE 551 Digital System Design & Synthesis Lecture 09 Synthesis of Common Verilog Constructs.
Spring 20067W. Rhett Davis with minor modifications by Dean Brock ECE 406 at UNASlide 1 ECE 406 Design of Complex Digital Systems Lecture 10: 9: State.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE VLSI System Design Lecture 3 - Verilog Delay.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 4 - Sequential Design.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE VLSI System Design Lecture 7 - Synchronizers.
Lecture 2: Hardware Modeling with Verilog HDL
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 5 - Coding Guidelines;
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE VLSI System Design Lecture 9 - ASM Diagrams.
Digital System Design by Verilog University of Maryland ENEE408C.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
Verilog Sequential Circuits Ibrahim Korpeoglu. Verilog can be used to describe storage elements and sequential circuits as well. So far continuous assignment.
ELEN 468 Lecture 161 ELEN 468 Advanced Logic Design Lecture 16 Synthesis of Language Construct II.
Silicon Programming--Intro. to HDLs1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 4 - Verilog 2 (Sequential.
ENEE 408C Lab Capstone Project: Digital System Design Fall 2005 Sequential Circuit Design.
ECEN ECEN475 Introduction to VLSI System Design Verilog HDL.
ELEN 468 Advanced Logic Design
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 2 FPGAs & Verilog.
Digital System Design Verilog ® HDL Maziar Goudarzi.
Advanced Verilog EECS 270 v10/23/06.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 6 - Behavioral Modeling.
University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
O VERVIEW OF DIGITAL SYSTEMS Hardware Description Language 1.
Prof Sandip Kundu ECE 353 Lab B (Part B – Verilog Design Approach)
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
Sequential Logic in Verilog
1 VERILOG Fundamentals Workshop סמסטר א ' תשע " ה מרצה : משה דורון הפקולטה להנדסה Workshop Objectives: Gain basic understanding of the essential concepts.
ECE 2372 Modern Digital System Design
ECE 551 Digital System Design & Synthesis Fall 2011 Midterm Exam Overview.
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Ders 8: FSM Gerçekleme ve.
1 An Update on Verilog Ξ – Computer Architecture Lab 28/06/2005 Kypros Constantinides.
Digital System 數位系統 Verilog HDL Ping-Liang Lai (賴秉樑)  
ECE/CS 352 Digital System Fundamentals© 2001 C. Kime 1 ECE/CS 352 Digital Systems Fundamentals Spring 2001 Chapters 3 and 4: Verilog – Part 2 Charles R.
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,
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).
Behavioral Modelling - 1. Verilog Behavioral Modelling Behavioral Models represent functionality of the digital hardware. It describes how the circuit.
ELEN 468 Lecture 131 ELEN 468 Advanced Logic Design Lecture 13 Synthesis of Combinational Logic II.
Finite State Machine (FSM) Nattha Jindapetch December 2008.
Verilog A Hardware Description Language (HDL ) is a machine readable and human readable language for describing hardware. Verilog and VHDL are HDLs.
ELEE 4303 Digital II Introduction to Verilog. ELEE 4303 Digital II Learning Objectives Get familiar with background of HDLs Basic concepts of Verilog.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Introduction to ASIC flow and Verilog HDL
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Chapter 11: System Design.
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 9: State Machines & Reset Behavior Spring.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part4: Verilog – Part 2.
‘if-else’ & ‘case’ Statements
FSM MODELING MOORE FSM MELAY FSM. Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-2]
332:437 Lecture 8 Verilog and Finite State Machines
CS 153 Logic Design Lab Professor Ian G. Harris
The Verilog Hardware Description Language
332:437 Lecture 8 Verilog and Finite State Machines
Introduction to Digital IC Design
Presentation transcript:

Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE VLSI System Design Lecture 4 - Advanced Verilog February 5, 2003

2/5/03ECE Lecture 42 Announcements  Reading  Wolf:

2/5/03ECE Lecture 43 Where we are...  Last Time:  Timing and Delay in Event-Driven Simulation  Verilog Delay Constructs  initial blocks  Tasks and Functions  Discuss Lab 1  Today  A Little More about Delay  System Tasks and Functions  A little more FSM coding  More Verilog features  Recent Developments in Verilog

2/5/03ECE Lecture 44 Verilogger Demo - Delay module delay_test(in1, in2, out1, out2, out3, out4, out5); input in1, in2; output out1, out2, out3, out4, out5; reg out3, out4, out5; and #10 and1 (out1, in1, in2); assign #10 out2 = in1 & in2; or in2) #10 out3 = in1 & in2; or in2) out4 = #10 in1 & in2; or in2) out5 <= #10 in1 & in2; endmodule Structural Delay Blocking Delay (Behavioral) Interassignment Delay (Blocking Assignment) Interassignment Delay (Non-Blocking Assignment)

2/5/03ECE Lecture 45 Guidelines for Using Delays  Use structural delays for accurate modeling of:  Primitive gate instantiation and #5 (c, b, a);  Continuous assignment assign #5 c = b & a;  Use blocking delays w/ blocking assignments to sequence testbench inputs (more about this later)  #5 a = 1;  #5 a = 0;  Avoid interassignment (RHS) delays  a = #5 b + c;  a <= #5 c + d;

2/5/03ECE Lecture 46 Verilog Delays: More Information  Cliff Cummings, “Correct Models for Adding Delays to Verilog Models”, Proceedings HDLCON, Available at

2/5/03ECE Lecture 47 More about Verilog FSMs  Many ways to describe  Explicit Style 1 State register - clocked always block Next-state Logic - combinational always block Output logic - combinational always block (or assign)  Explicit Style 2 Next-state logic AND state register: clocked always block Output logic - combinational always block (or assign)  Implicit Style State sequence specified using multiple event control clk); –…–…

2/5/03ECE Lecture 48 Coding FSMs - Explicit Style 1  Clocked always block - state register  Combinational always block -  next state logic  output logic

2/5/03ECE Lecture 49 Coding FSMs - Explicit Style 2  Clocked always block  state register  next-state logic  Comb. always block  output logic

2/5/03ECE Lecture 410 Coding FSMs - Explicit Style 3  Clocked always block  state register  next-state logic  output logic (REGISTERED) DQ DQ

2/5/03ECE Lecture 411 Coding FSMs - Implicit Style  Use event to mark state boundaries  State flow follows procedural flow  General form: always clk);... clk);... statements... end

2/5/03ECE Lecture 412 Implicit Style FSM  Key idea: if the FSM has no branching, describe in a always block with clk) module implicit (clk,... ); input clk; // other inputs, outputs always (posedge clk) // state (posedge clk) // state (posedge clk) // state S2 end endmodule S0 S1 S2

2/5/03ECE Lecture 413 More about Implicit Style FSMs  Awkward when reset needed: module SUM3 (clk,... ); always begin: (posedge clk) if (reset) disable reset_label; else // function for state (posedge clk) if (reset) disable reset_label; else // function for state S1... endmodule This is similar to “break” in Java/C/C++

2/5/03ECE Lecture 414 Implicit Style FSM with Branching clk) module implicit (clk,... ); input clk; // other inputs, outputs always begin // state (posedge clk) if (A) begin // state (posedge clk) end else begin // state (posedge clk) end endmodule S0 S1 S2

2/5/03ECE Lecture 415 Implicit FSM Example: SAR Circuit module sar_implicit(clk, start, GT, E, RDY); input clk; input start; input GT; output [3:0] E; output RDY; reg [3:0] E; reg RDY; always begin... end endmodule See next Page

2/5/03ECE Lecture 416 Implicit FSM Example: SAR Circuit always clk); RDY <= 1'b1; if (start) clk) RDY <= 1'b0; E <= clk); if (GT) E[3] <= 1'b0; E[2] <= clk); if (GT) E[2] <= 1'b0; E[1] <= clk); if (GT) E[1] <= 1'b0; E[0] <= clk) if (GT) E[0] <= 1'b0; end

2/5/03ECE Lecture 417 Implicit-Style FSM Tradeoffs  Advantages  Concise  High-level specification - lets synthesis worry about implementation details (like state codes)  Disadvantages  All outputs registered!  Difficult to debug synthesized hardware (no explicit state codes)

2/5/03ECE Lecture 418 Verilog Stuff we Won’t Talk about Much  wait(condition)  suspends execution until condition true  Not used in synthesis  Procedural continuous assignment  assign / desassign as procedural statements  Not used in synthesis  User-Defined Primitives (UDPs)  Look-up table specification of primitive gates  Not used in synthesis  Programming Language Interface (PLI)  Allows simulation models to link to C programs  Not used in synthesis

2/5/03ECE Lecture 419 Verilog - Recent Developments  Verilog 2001(IEEE Standard) - Adds several new features  Cleaner module specifications  Lots of “syntatic sugar” - features that make language “nicer” to use  Superlog / System Verilog  Meant to allow hardware/software codesign  Integrates many features of C: C primitive types Structures Enumerated Types

2/5/03ECE Lecture 420 HDLs - What Else is Out There?  VHDL  More general; more verbose  Continued extension - VHDL 2001 is current standard  SystemC  C++ class library of synthesizeable constructs  Meant for large system hardware/software codesign  Reference:

2/5/03ECE Lecture 421 Coming Up  Verification and Testbenches  System Design Issues

2/5/03ECE Lecture 422 A Snapshot of the HDL World  VHDL  Verilog / Verilog 2001  Superlog  SystemC

2/5/03ECE Lecture 423 System Design Issues  ASM Diagrams  Synchronization & Metastability  Handshaking  Working with Multiple Clocks