Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Verilog Part 3 – Chapter.

Slides:



Advertisements
Similar presentations
Counters Discussion D8.3.
Advertisements

Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Supplement on Verilog adder examples
Hardware Description Language (HDL)
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
//HDL Example 5-1 // //Description of D latch (See Fig.5-6) module D_latch (Q,D,control); output Q; input.
Verilog. 2 Behavioral Description initial:  is executed once at the beginning. always:  is repeated until the end of simulation.
FSM Revisit Synchronous sequential circuit can be drawn like below  These are called FSMs  Super-important in digital circuit design FSM is composed.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 7 – Registers.
Overview Part 1 - Storage Elements and Analysis
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.
Overview Datapath and Control Algorithmic State Machines (ASM)
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Verilog Part 2 – Chapter.
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
Digital System Design by Verilog University of Maryland ENEE408C.
Verilog Sequential Circuits Ibrahim Korpeoglu. Verilog can be used to describe storage elements and sequential circuits as well. So far continuous assignment.
Silicon Programming--Intro. to HDLs1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 3 – Combinational.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 4 Technology.
Advanced Verilog EECS 270 v10/23/06.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 10 – Computer.
Verilog Intro: Part 2. Procedural Blocks There are two types of procedural blocks in Verilog. – initial for single-pass behavior : initial blocks execute.
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
Overview Logistics Last lecture Today HW5 due today
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Logic and Computer Design.
Spring 2007W. Rhett Davis with minor modification by Dean Brock UNCA ECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 7: Design Example,
Sequential Logic in Verilog
Overview Part 1 Part 2 Sequential Circuit Design
1 Chapter 5 Synchronous Sequential Logic 5-1 Sequential Circuits Every digital system is likely to have combinational circuits, most systems encountered.
Verilog Intro: Part 2. Procedural Blocks There are two types of procedural blocks in Verilog. – initial for single-pass behavior: initial blocks execute.
ECE 2372 Modern Digital System Design
Chapter 4: Behavioral Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 4-1 Ders – 4: Davranışsal Modelleme.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Ders 8: FSM Gerçekleme ve.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Logic and Computer Design.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Part 2 – Sequential.
EEE2243 Digital System Design Chapter 4: Verilog HDL (Sequential) by Muhazam Mustapha, January 2011.
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.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
1 CSE-308 Digital System Design (DSD) N-W.F.P. University of Engineering & Technology, Peshawar.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 7: Design Example, Modeling Flip-Flops Spring.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Logic and Computer Design.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Logic and Computer Design.
Overview Memory definitions Random Access Memory (RAM)
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,
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
Behavioral Modelling - 1. Verilog Behavioral Modelling Behavioral Models represent functionality of the digital hardware. It describes how the circuit.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
Multiplexers Section Topics Multiplexers – Definition – Examples – Verilog Modeling.
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
1 University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part4: Verilog – Part 2.
1 (c) W. J. Dally Digital Design: A Systems Approach Lecture 7: Data Path State Machines.
1 Lecture 3: Modeling Sequential Logic in Verilog HDL.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
Lecture 3 – Binary Arithmetic
TODAY’S OUTLINE Procedural Assignments Verilog Coding Guidelines
Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-I]
EE2174: Digital Logic and Lab
Lecture 26 – Hardwired and Microprogrammed Control
Overview Part 1 - Registers, Microoperations and Implementations
Dr. Tassadaq Hussain Introduction to Verilog – Part-3 Expressing Sequential Circuits and FSM.
The Verilog Hardware Description Language
Lecture 4 – Binary Logic and Logic Gates
Presentation transcript:

Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Verilog Part 3 – Chapter 6 – Finite State Machines Logic and Computer Design Fundamentals

Verilog - Part 3 2  Part 3 Process (Procedural) Description Verilog Keywords and Constructs Process Verilog for a Positive Edge-triggered D Flip-flop Process Verilog for Figure 6-19(a) Overview

Verilog - Part 3 3 Process (Procedural) Description  So far, we have done dataflow and behavioral Verilog using continuous assignment statements ( assign )  Continuous assignments are limited in the complexity of what can be described  A process can be viewed as a replacement for a continuous assignment statement that permits much more complex descriptions  A process uses procedural assignment statements much like those in a typical programming language

Verilog - Part 3 4  Because of the use of procedural rather than continuous assignment statements, assigned values must be retained over time. Register type: reg The reg in contrast to wire stores values between executions of the process A reg type does not imply hardware storage!  Process types initial – executes only once beginning at t = 0. always – executes at t = 0 and repeatedly thereafter. Timing or event control is exercised over an always process using, for example, followed by an event control statement in ( ). Verilog Keywords & Constructs - 1

Verilog - Part 3 5 Verilog Keywords & Constructs - 2  Process begins with begin and ends with end.  The body of the process consists of procedural assignments Blocking assignments  Example: C = A + B;  Execute sequentially as in a programming language Non-blocking assignments  Example: C <= A + B;  Evaluate right-hand sides, but do not make any assignment until all right-hand sides evaluated. Execute concurrently unless delays are specified.

Verilog - Part 3 6 Verilog Keywords & Constructs - 3  Conditional constructs The if-else  If (condition)  begin procedural statements end  {else if (condition)  begin procedural statements end}  else  begin procedural statements end The case  case expression  {case expression : statements}  endcase;

Verilog - Part 3 7 Examples always begin B = A; C = B; end  Suppose initially A = 0, B = 1, and C = 2. After execution, B = 0 and C = 0. always begin B <= A; C <= B; end  Suppose initially A = 0, B = 1, and C = 2. After execution, B = 0 and C = 1.

Verilog - Part 3 8 Verilog for Positive Edge-Triggered D Flip-Flop module dff (CLK, RESET, D, Q) input CLK, RESET, D; output Q; reg Q; (posedge CLK or posedge RESET) begin if (RESET) Q <= 0; else Q <= D; end endmodule

Verilog - Part 3 9 Describing Sequential Circuits  There are many different ways to organize models for sequential circuits. We will use a model that corresponds to the following diagram:  A process corresponds to each of the 3 blocks in the diagram. Next State Function Output Function CLK Reset FFs State Register

Verilog - Part 3 10 Verilog for Figure 6-19(a) State Diagram module fig_619 (CLK, RESET, X, Z); input CLK, RESET, X; output Z; reg[1:0] state, next_state; parameter S0 = 2'b00, S1 = 2'b01, S2 = 2'b10, S3 = 2'b11; //state register CLK or posedge RESET) begin if (RESET == 1) state <= S0; else state <= next_state; end

Verilog - Part 3 11 Verilog State Diagram (continued) //next state function or state) begin case (state) S0: if (X == 1) next_state <= S1; else next_state <= S0; S1: if (X == 1) next_state <= S3; else next_state <= S0; S2: if (X == 1) next_state <= S2; else next_state <= S0; S3: if (X == 1) next_state <= S2; else next_state <= S0; default: next_state <= 2'bxx; endcase end

Verilog - Part 3 12 Verilog State Diagram (continued) reg Z; //output function or state) begin case (state) S0: Z <= 1'b0; S1: if (X == 1) Z <= 1'b0; else Z <= 1'b1; S2: if (X == 1) Z <= 1'b0; else Z <= 1'b1; S3: if (X == 1) Z <= 1'b0; else Z <= 1'b1; default: Z <= 1'bx; endcase end endmodule

Verilog - Part 3 13 Terms of Use  © 2004 by Pearson Education,Inc. All rights reserved.  The following terms of use apply in addition to the standard Pearson Education Legal Notice.Legal Notice  Permission is given to incorporate these materials into classroom presentations and handouts only to instructors adopting Logic and Computer Design Fundamentals as the course text.  Permission is granted to the instructors adopting the book to post these materials on a protected website or protected ftp site in original or modified form. All other website or ftp postings, including those offering the materials for a fee, are prohibited.  You may not remove or in any way alter this Terms of Use notice or any trademark, copyright, or other proprietary notice, including the copyright watermark on each slide.  Return to Title Page Return to Title Page