ECE 274 Digital Logic Fall 2008

Size: px
Start display at page:

Download "ECE 274 Digital Logic Fall 2008"

Transcription

1 Register ehavior ECE 274 Digital Logic Fall 28 equential Logic Design using Verilog Verilog for Digital Design Ch. 3 equential circuits have storage Register: most common storage component N-bit register stores N bits tructure may consist of connected flip-flops I3 I2 I I 4-bit register I3 I2 I I reg(4) 3 2 D D D D R R R R Register ehavior Vectors Register ehavior Constants Typically just describe register behaviorally Declare output as reg variable to achieve storage Uses vector types Collection of bits More convenient than declaring separate bits like I3, I2, I, I Vector's bits are numbered Options: [:3], [:4], etc. [3:] Most-significant bit is on left Assign with binary constant (more on net slide) module Reg4(I3,I2,I,I,3,); input I3, I2, I, I; I3 I2 I I module Reg4(I,, ); input [3:] I; I: I[3]I[2]I[]I[] I3 I2 I I reg(4) 3 2 `timescale ns/ ns module Reg4(I,,, ); input [3:] I; output [3:] ; reg [3:] ; input, ; ) begin if ( == ) <= 4'b; <= I; module vldd_ch3_reg4.v 3 inary constant 4'b 4: size, in number of bits 'b: binary base : binary value Other constant bases possible d: decimal base, o: octal base, h: headecimal base 2'hFA2 'h: headecimal base 2: 3 he digits require 2 bits FA2: he value ize is always in bits, and optional 'hfa2 is OK For decimal constant, size and 'd optional 8'd255 or just 255 In previous uses like A <= ; and are actually decimal numbers. b and b would eplicitly represent bits Underscores may be inserted into value for readability 2'b 8 I3 I2 I I reg(4) 3 2 `timescale ns/ ns module Reg4(I,,, ); input [3:] I; output [3:] ; reg [3:] ; input, ; ) begin if ( == ) <= 4'b; <= I; module vldd_ch3_reg4.v 4

2 Register ehavior Procedure's event control involves input No the I input. Thus, synchronous "posedge " Event is not just any change on, but specifically change from to (positive edge) negedge also possible Process has synchronous reset Resets output only on rising edge of Process writes output declared as reg variable, thus stores value too I3 I2 I I reg(4) 3 2 `timescale ns/ ns module Reg4(I,,, ); input [3:] I; output [3:] ; reg [3:] ; input, ; ) begin if ( == ) <= 4'b; <= I; module vldd_ch3_reg4.v 5 Register ehavior Testbench reg/wire declarations and module instantiation similar to previous testbenches Module uses two procedures One generates 2 ns clock for ns, for ns Note: always procedure repeats Other provides values for and I (i.e., vectors) initial procedure eecutes just once, does not repeat `timescale ns/ ns module Testbench(); reg [3:] I_s; reg _s, _s; wire [3:] _s; Reg4 CompToTest(I_s, _s, _s, _s); // Clock Procedure _s <= ; #; _s <= ; #; // Note: Procedure repeats _s <= ; I_s <= 4'b; #5 _s <= ; I_s <= 4'b; #5 _s <= ; I_s <= 4'b; #5 _s <= ; I_s <= 4'b; module (more on net slide) vldd_ch3_reg4t.v 6 Register ehavior Testbench /nets can be shared between procedures Only one procedure should write to variable Variable can be read by many procedures Clock procedure writes to _s Vector procedures reads _s Event control "@(posedge _s)" May be preped to statement to synchronize eecution with event occurrence tatement may be just ";" as in eample In previous eamples, the statement was a sequential block (begin-) Test vectors thus don't include the clock's period hard coded Care taken to change input values away from clock edges `timescale ns/ ns module Testbench(); reg [3:] I_s; reg _s, _s; wire [3:] _s; Reg4 CompToTest(I_s, _s, _s, _s); // Clock Procedure _s <= ; #; _s <= ; #; // Note: Procedure repeats _s <= ; I_s <= 4'b; #5 _s <= ; I_s <= 4'b; #5 _s <= ; I_s <= 4'b; #5 _s <= ; I_s <= 4'b; module vldd_ch3_reg4t.v 7 Register ehavior Testbench imulation results Note that _s updated only on rising clock edges Note _s thus unknown until first clock edge _s is reset to on first clock edge _s _s I_s _s time (ns) _s <= ; I_s <= 4'b; #5 _s <= ; I_s <= 4'b; #5 _s <= ; I_s <= 4'b; #5 _s <= ; I_s <= 4'b; ) begin if ( == ) <= 4'b; <= I; Initial value of a bit is the unknown value vldd_ch3_reg4t.v Remember that _s is connected to, and I_s to I, in the testbench vldd_ch3_reg4.v 8 2

3 Common Pitfalls Common Pitfalls Using "always" instead of "initial" procedure Causes repeated procedure eecution Not including any delay control or event control in an always procedure May cause infinite loop in the simulator imulator eecutes those statements over and over, never eecuting statements of another procedure imulation time can never advance ymptom imulator appears to just hang, generating no waveforms _s _s I_s _s <= ; I_s <= 4'b; #5 _s <= ; I_s <= 4'b; _s <= ; I_s <= 4'b; Not initializing all module May cause undefined Or simulator may initialize to default value. witching simulators may cause design to fail. Tip: Immediately initialize all module when first writing procedure _s <= ; I_s <= 4'b; #5 _s <= ; I_s <= 4'b; _s time (ns) 9 Common Pitfalls Finite-tate Machines (s) equential ehavior Forgetting to eplicitly declare as a wire an identifier used in a port connection e.g., _s Verilog implicitly declares identifier as a net of the default net type, typically a one-bit wire Inted as shortcut to save typing for large circuits May not give warning message during compilation Works fine if a one-bit wire was desired ut may be mismatch in this eample, the wire should have been four bits, not one bit Unepected simulation results Always eplicitly declare wires est to avoid use of Verilog's implicit declaration shortcut `timescale ns/ ns module Testbench(); reg [3:] I_s; reg _s, _s; wire [3:] _s; Reg4 CompToTest(I_s, _s, _s, _s); Finite-state machine () is a common model of sequential behavior Eample: If =, hold = for 3 clock cycles Note: Transitions implicitly ANDed with rising clock edge Implementation model has two parts: tate register HDL model will reflect those two parts Inputs: ; Outputs: = Off = On ' = On2 tate tate register tatenet = On3 2 3

4 Finite-tate Machines (s) equential ehavior Modules with Multiple and hared Finite-tate Machines (s) equential ehavior Inputs: ; Outputs: = Off = On ' = On2 tate tate register tatenet = On3 `timescale ns/ ns module LaserTimer(,,, ); input ; output reg ; input, ; parameter _Off =, _On =, _On2 = 2, _On3 = 3; reg [:] tate, tatenet; ) begin case (tate) _Off: begin <= ; if ( == ) tatenet <= _Off; tatenet <= _On; _On: begin <= ; tatenet <= _On2; _On2: begin <= ; tatenet <= _On3; _On3: begin <= ; tatenet <= _Off; case // tatereg ) begin if ( == ) tate <= _Off; tate <= tatenet; module Modules has two procedures One procedure for combinational One procedure for state register ut it's still a behavioral description tate tate register tatenet `timescale ns/ ns module LaserTimer(,,, ); input ; output reg ; input, ; parameter _Off =, _On =, _On2 = 2, _On3 = 3; reg [:] tate, tatenet; ) begin // tatereg ) begin module vldd_ch3_lasertimereh.v vldd_ch3_lasertimereh.v 3 4 Finite-tate Machines (s) equential ehavior Parameters Finite-tate Machines (s) equential ehavior parameter declaration Not a variable or net, but rather a constant A constant is a value that must be initialized, and that cannot be changed within the module s definition Four parameters defined _Off, _On, _On2, _On3 Correspond to s states hould be initialized to unique values `timescale ns/ ns module LaserTimer(,,, ); input ; output reg ; input, ; parameter _Off =, _On =, _On2 = 2, _On3 = 3; reg [:] tate, tatenet; ) begin // tatereg ) begin module Module declares two reg variables tate, tatenet Each is 2-bit vector (need two bits to represent four unique state values to 3) are shared between CombLogic and tatereg procedures CombLogic procedure Event control sensitive to tate and input Will output tatenet and tatereg procedure ensitive to input Will output tate, which it stores tate tate register `timescale ns/ ns module LaserTimer(,,, ); input ; output reg ; input, ; parameter _Off =, _On =, _On2 = 2, _On3 = 3; reg [:] tate, tatenet; ) begin // tatereg ) begin module tatenet vldd_ch3_lasertimereh.v vldd_ch3_lasertimereh.v 5 6 4

5 Finite-tate Machines (s) equential ehavior with Case tatements Procedure may use case statement Preferred over if--if when just one epression determines which statement to eecute case (epression) Eecute statement whose case item epression value matches case epression case item epression : statement statement is commonly a begin- block, as in eample First case item epression that matches eecutes; remaining case items ignored If no item matches, nothing eecutes Last item may be "default : statement" tatement eecutes if none of the previous items matched ) begin case (tate) _Off: begin <= ; if ( == ) tatenet <= _Off; tatenet <= _On; _On: begin <= ; tatenet <= _On2; _On2: begin <= ; tatenet <= _On3; _On3: begin <= ; tatenet <= _Off; case Finite-tate Machines (s) equential ehavior with Case tatements s CombLogic procedure Case statement describes states case (tate) Eecutes corresponding statement (often a begin- block) based on tate's current value A state's statements consist of Actions of the state etting of net state (transitions) E: tate is _On Eecutes statements for state On, jumps to case Inputs: ; Outputs: = Off = On ' = On2 reg [:] tate, tatenet; ) begin case (tate) uppose tate is _Off: begin _On <= ; if ( == ) tatenet <= _Off; tatenet <= _On; _On: begin <= ; tatenet <= _On2; _On2: begin <= ; tatenet <= _On3; _On3: begin <= ; tatenet <= _Off; = case On3 vldd_ch3_lasertimereh.v vldd_ch3_lasertimereh.v 7 8 Finite-tate Machines (s) equential ehavior Finite-tate Machines (s) equential ehavior Modules with Multiple and hared tatereg Procedure imilar to 4-bit register Register for tate is 2-bit vector reg variable Procedure has synchronous reset Resets tate to s initial state, _Off parameter _Off =, _On =, _On2 = 2, _On3 = 3; reg [:] tate, tatenet; // tatereg ) begin if ( == ) tate <= _Off; tate <= tatenet; Inputs: ; Outputs: = Off = On ' = On2 tate tate register tatenet = On3 `timescale ns/ ns module LaserTimer(,,, ); input ; output reg ; input, ; parameter _Off =, _On =, _On2 = 2, _On3 = 3; reg [:] tate, tatenet; ) begin case (tate) _Off: begin <= ; if ( == ) tatenet <= _Off; tatenet <= _On; _On: begin <= ; tatenet <= _On2; _On2: begin <= ; tatenet <= _On3; _On3: begin <= ; tatenet <= _Off; case // tatereg ) begin if ( == ) tate <= _Off; tate <= tatenet; module vldd_ch3_lasertimereh.v vldd_ch3_lasertimereh.v 9 2 5

6 Finite-tate Machines (s) equential ehavior elf-checking Testbenches testbench First part of file (variable/net declarations, module instantiations) similar to before Vector Procedure Resets ets 's input values ( test vectors ) Waits for specific clock cycles We observe the resulting waveforms to determine if behaves correctly _s _s _s _s time (ns) // Clock Procedure _s <= ; #; _s <= ; #; // Note: Procedure repeats _s <= ; _s <= ; #5 _s <= ; #5 _s <= ; #5 _s <= ; module Finite-tate Machines (s) equential ehavior elf-checking Testbenches Reading waveforms is error-prone Create self-checking testbench Use if statements to check for epected values If a check fails, print error message E: if _s fell to one cycle too early, simulation might output: _s _s _s _s 95: Third = failed time (ns) _s <= ; _s <= ; #5 if (_s!= ) $display("%t: Reset failed", $time); _s <= ; #5 _s <= ; #5 _s <= ; if (_s!= ) $display("%t: First = failed", $time); #5 if (_s!= ) $display("%t: econd = failed", $time); #5 if (_s!= ) $display("%t: Third = failed", $time); #5 if (_s!= ) $display("%t: Final = failed", $time); vldd_ch3_lasertimert.v 2 vldd_ch3_lasertimertdisplay.v 22 Finite-tate Machines (s) equential ehavior $display ystem Procedure Common Pitfall: Not Assigning Every Output in Every tate $display built-in Verilog system procedure for printing information to display during simulation A system procedure interacts with the simulator and/or host computer system To write to a display, read a file, get the current simulation time, etc. tarts with $ to distinguish from regular procedures tring argument is printed literally $display("hello") will print "Hello" Automatically adds newline character ecept when special sequences appear %t: Display a time epression Time epression must be net argument $time uilt-in system procedure that returns the current simulation time 95: Third = failed _s <= ; _s <= ; #5 if (_s!= ) $display("%t: Reset failed", $time); _s <= ; #5 _s <= ; #5 _s <= ; if (_s!= ) $display("%t: First = failed", $time); #5 if (_s!= ) $display("%t: econd = failed", $time); #5 if (_s!= ) $display("%t: Third = failed", $time); #5 if (_s!= ) $display("%t: Final = failed", $time); should be combinational function of current state (for Moore ) Not assigning output in given state means previous value is remembered Output has memory ehavior is not an olution e sure to assign every output in every state olution 2 Assign default values before case statement Later assignment in state overwrites default ) begin <= ; case (tate) _Off: begin <= ; if ( == ) Could delete this tatenet <= _Off; without changing behavior (but tatenet <= _On; probably clearer to keep it) _On: begin <= ; tatenet <= _On2; _On2: begin <= ; tatenet <= _On3; _On3: begin <= ; tatenet <= _Off; case vldd_ch3_lasertimertdisplay.v

7 Common Pitfall: Not Assigning Every Output in Every tate The imulation Cycle `timescale ns/ ns olution 2 Assign default values before case statement Later assignment in state overwrites default Helps clarify which actions are important in which state Corresponds directly to the common simplifying diagram notation of implicitly setting unassigned to case tate : begin A <= ; <= ; C <= ; T: begin A <= ; <= ; C <= ; case A <= ; <= ; C <= ; case tate : begin <= ; T: begin C <= ; case A= = C= T A= = C= T = C= Instructive to consider how an HDL simulator works HDL simulation is comple; we'll introduce simplified form Consider eample ime Three reg variables,, Three procedures P, P2, imulator's job: Determine values for nets and variables over time Repeatedly eecutes and susps procedures Note: Actually considers more objects, known collectively as processes, but we'll keep matters simple here to get just the basic idea of simulation Maintains a simulation time Time module ime(); output reg ; reg, ; // P <= ; #; <= ; #; <= ~; <= ; <= ; module vldd_ch3_ime.v The imulation Cycle `timescale ns/ ns The imulation Cycle `timescale ns/ ns tart of simulation imulation time Time is it variables/nets initialized to the unknown value Eecute each procedure In any order, until stops at a delay or event control Time (ns): tart P P2 <=, then stop. Activate when Time is += ns. No actions, then stop. Activate when changes. No actions, then stop. Activate when changes to We'll use arrow to show where a procedure stops module ime(); output reg ; reg, ; // P <= ; #; <= ; #; <= ~; <= ; <= ; imulation cycle et time to net time at which a procedure activates (note: could be same as current time) In this case, time = ns (P activates) Eecute active procedures (in any order) until stops P P2 Time (ns): tart Activate when Time is ns. <=, stop, activate when Time=+=2 ns. Activate when changes. Activate when changes to. module ime(); output reg ; reg, ; // P <= ; #; <= ; #; <= ~; <= ; <= ; module module vldd_ch3_ime.v vldd_ch3_ime.v

8 The imulation Cycle `timescale ns/ ns The imulation Cycle `timescale ns/ ns imulation cycle et time to net time at which a procedure activates till ns; just changed to ( activates) Eecute active procedures (in any order) until stops P Activate when Time is 2 ns. P2 Activate when changes. Activate when changes to <=, stop, activate when changes to again Time (ns): tart module ime(); output reg ; reg, ; // P <= ; #; <= ; #; <= ~; <= ; <= ; imulation cycle et time to net time at which a procedure activates till ns; just changed (P2 activates) Eecute active procedures until stops P P2 Time (ns): tart Activate when Time is 2 ns. Activate when changes. <= (~), stop, activate when changes. Activate when change on to. module ime(); output reg ; reg, ; // P <= ; #; <= ; #; <= ~; <= ; <= ; module module vldd_ch3_ime.v vldd_ch3_ime.v 29 3 The imulation Cycle `timescale ns/ ns The imulation Cycle `timescale ns/ ns imulation cycle et time to net time at which a procedure activates In this case, set Time = 2 ns (P activates) Eecute active procedures until stops P P2 Time (ns): Init Activate when Time is 2 ns. <=, stop, activate when T=2+=3ns. Activate when changes. Activate when change on to. 2 module ime(); output reg ; reg, ; // P <= ; #; <= ; #; <= ~; <= ; <= ; imulation s when user-specified time is reached Variable/net values translate to waveforms Time (ns): Init Time (ns) module ime(); output reg ; reg, ; // P <= ; #; <= ; #; <= ~; <= ; <= ; module module vldd_ch3_ime.v vldd_ch3_ime.v

9 Variable Updates imulation cycle (revised) Assignment using "<=" ("non blocking assignment") et time to net time at doesn't change variable's value immediately which a procedure resumes Instead, schedules a change of value by placing an Eecute active procedures event on an event queue Update variables with cheduled changes occur at of simulation cycle schedule values Important implications Procedure eecution order in a simulation cycle doesn't matter Assume procedures and 2 are both active Assume is. Proc: <= ~; Proc schedules to be, but does not change the present Proc2: value of. is still. A <= ; Proc2 schedules A to be (the present value of ). A will be, not. At of simulation cycle, is updated to and A to Order of assignments to different variables in a procedure doesn't matter Assume C was. cheduled values will be C= and D=, for either Proc3a or Proc3b. Later assignment in procedure effectively overwrites earlier assignment E will be updated with, but then by ; so E is at the of the simulation cycle. Recall output assignment eample, in which default assignments were added before the case statement. Proc3a: C <= ~C; D <= C; ame Proc4: E <= ; E <= ; Proc3b: D <= C; C <= ~C; 33 9

ECE 274 Digital Logic Verilog

ECE 274 Digital Logic Verilog ECE 274 igital Logic Verilog egister ehavior equential circuits have storage egister: most common storage component N-bit register stores N bits tructure may consist of connected flip-flops I3 I2 I I 3

More information

ECE 274 Digital Logic Verilog

ECE 274 Digital Logic Verilog ECE 274 igital Logic Verilog egister ehavior equential circuits have storage egister: most common storage component N-bit register stores N bits tructure may consist of connected flip-flops I3 I2 I I 3

More information

ECE 274 Digital Logic

ECE 274 Digital Logic ECE 274 igital Logic Combinational Logic esign using Verilog Verilog for igital esign Ch. & 2 igital ystems and HLs Typical digital components per IC 96s/97s: -, 98s:,-, 99s: Millions 2s: Billions 97s

More information

Lab 7 (All Sections) Prelab: Introduction to Verilog

Lab 7 (All Sections) Prelab: Introduction to Verilog Lab 7 (All Sections) Prelab: Introduction to Verilog Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received unauthorized aid on this academic work 1 Objective The

More information

Verilog 1 - Fundamentals

Verilog 1 - Fundamentals Verilog 1 - Fundamentals FA FA FA FA module adder( input [3:0] A, B, output cout, output [3:0] S ); wire c0, c1, c2; FA fa0( A[0], B[0], 1 b0, c0, S[0] ); FA fa1( A[1], B[1], c0, c1, S[1] ); FA fa2( A[2],

More information

Midterm Exam Thursday, October 24, :00--2:15PM (75 minutes)

Midterm Exam Thursday, October 24, :00--2:15PM (75 minutes) Last (family) name: Answer Key First (given) name: Student I.D. #: Department of Electrical and Computer Engineering University of Wisconsin - Madison ECE 551 Digital System Design and Synthesis Midterm

More information

ECE 551: Digital System *

ECE 551: Digital System * ECE 551: Digital System * Design & Synthesis Lecture Set 5 5.1: Verilog Behavioral Model for Finite State Machines (FSMs) 5.2: Verilog Simulation I/O and 2001 Standard (In Separate File) 3/4/2003 1 Explicit

More information

VERILOG: FLIP-FLOPS AND REGISTERS

VERILOG: FLIP-FLOPS AND REGISTERS VERILOG: FLIP-FLOPS AND REGISTERS Semiconductor Memories Single-bit or Memory (Foreground) Individual memory circuits that store a single bit of information and have at least a 1) data input, 2) data output,

More information

Synthesizable Verilog

Synthesizable Verilog Synthesizable Verilog Courtesy of Dr. Edwards@Columbia, and Dr. Franzon@NCSU http://csce.uark.edu +1 (479) 575-6043 yrpeng@uark.edu Design Methodology Structure and Function (Behavior) of a Design HDL

More information

The Verilog Hardware Description Language Testing the Design Overview

The Verilog Hardware Description Language Testing the Design Overview The Verilog Hardware Description Language Testing the Design Overview In this lesson we will Move from design to test Introduce the test bench Examine several of the system tools that support testing Learn

More information

Department of Computer Science and Electrical Engineering. CMPE 415 Verilog Events Timing and Testbenches Prof. Ryan Robucci

Department of Computer Science and Electrical Engineering. CMPE 415 Verilog Events Timing and Testbenches Prof. Ryan Robucci Department of Computer Science and Electrical Engineering CMPE 415 Verilog Events Timing and Testbenches Prof. Ryan Robucci An Event Driven Language also used for Synthesis We emphasize use of Verilog

More information

Lecture 32: SystemVerilog

Lecture 32: SystemVerilog Lecture 32: SystemVerilog Outline SystemVerilog module adder(input logic [31:0] a, input logic [31:0] b, output logic [31:0] y); assign y = a + b; Note that the inputs and outputs are 32-bit busses. 17:

More information

ECE 4514 Digital Design II. Spring Lecture 9: Review of Key Ideas, System Commands and Testbenches

ECE 4514 Digital Design II. Spring Lecture 9: Review of Key Ideas, System Commands and Testbenches ECE 4514 Digital Design II Lecture 9: Review of Key Ideas, System Commands and Testbenches A Language Lecture Iterating the Key Ideas Verilog is a modeling language. It cannot express hardware directly.

More information

Verilog 1 - Fundamentals

Verilog 1 - Fundamentals Verilog 1 - Fundamentals FA FA FA FA module adder( input [3:0] A, B, output cout, output [3:0] S ); wire c0, c1, c2; FA fa0( A[0], B[0], 1 b0, c0, S[0] ); FA fa1( A[1], B[1], c0, c1, S[1] ); FA fa2( A[2],

More information

Lab 7 (Sections 300, 301 and 302) Prelab: Introduction to Verilog

Lab 7 (Sections 300, 301 and 302) Prelab: Introduction to Verilog Lab 7 (Sections 300, 301 and 302) Prelab: Introduction to Verilog Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received unauthorized aid on this academic work

More information

VERILOG 2: LANGUAGE BASICS

VERILOG 2: LANGUAGE BASICS VERILOG 2: LANGUAGE BASICS Verilog module Modules are basic building blocks. These are two example module definitions which you should use: // Safer traditional method module abc (in1, in2, out); input

More information

ECE 4514 Digital Design II. Spring Lecture 13: Logic Synthesis

ECE 4514 Digital Design II. Spring Lecture 13: Logic Synthesis ECE 4514 Digital Design II A Tools/Methods Lecture Second half of Digital Design II 9 10-Mar-08 L13 (T) Logic Synthesis PJ2 13-Mar-08 L14 (D) FPGA Technology 10 18-Mar-08 No Class (Instructor on Conference)

More information

ECE 2300 Digital Logic & Computer Organization. More Verilog Finite State Machines

ECE 2300 Digital Logic & Computer Organization. More Verilog Finite State Machines ECE 2300 Digital Logic & Computer Organization Spring 2018 More Verilog Finite Machines Lecture 8: 1 Prelim 1, Thursday 3/1, 1:25pm, 75 mins Arrive early by 1:20pm Review sessions Announcements Monday

More information

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Comp 541 Digital Logic and Computer Design Fall 2014 Lab #4: Sequential Design: Counters Issued Wed 9/10/14; Due Wed 9/17/14 (11:59pm) This lab assignment

More information

ECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog

ECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog ECE 2300 Digital Logic & Computer Organization Spring 2018 More Sequential Logic Verilog Lecture 7: 1 Announcements HW3 will be posted tonight Prelim 1 Thursday March 1, in class Coverage: Lectures 1~7

More information

Control in Digital Systems

Control in Digital Systems CONTROL CIRCUITS Control in Digital Systems Three primary components of digital systems Datapath (does the work) Control (manager, controller) Memory (storage) B. Baas 256 Control in Digital Systems Control

More information

ECE 2300 Digital Logic & Computer Organization. More Finite State Machines

ECE 2300 Digital Logic & Computer Organization. More Finite State Machines ECE 2300 Digital Logic & Computer Organization Spring 2018 More Finite State Machines Lecture 9: 1 Announcements Prelab 3(B) due tomorrow Lab 4 to be released tonight You re not required to change partner(s)

More information

Modeling Sequential Circuits in Verilog

Modeling Sequential Circuits in Verilog Modeling Sequential Circuits in Verilog COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals Presentation Outline Modeling Latches and Flip-Flops Blocking versus

More information

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 11. Introduction to Verilog II Sequential Circuits

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 11. Introduction to Verilog II Sequential Circuits Name: Instructor: Engr. Date Performed: Marks Obtained: /10 Group Members (ID):. Checked By: Date: Experiment # 11 Introduction to Verilog II Sequential Circuits OBJECTIVES: To understand the concepts

More information

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013 EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013 Print Here Student ID Signature This is a closed book exam. The exam is to be completed in one-hundred ten (110) minutes. Don t use scratch

More information

ECE 2300 Digital Logic & Computer Organization. More Verilog Finite State Machines

ECE 2300 Digital Logic & Computer Organization. More Verilog Finite State Machines ECE 2300 Digital Logic & Computer Organization Spring 2017 More Verilog Finite State Machines Lecture 8: 1 Announcements 1 st batch of (raw) quiz scores released on CMS Solutions to HW 1-3 released on

More information

EE 231 Fall EE 231 Homework 8 Due October 20, 2010

EE 231 Fall EE 231 Homework 8 Due October 20, 2010 EE 231 Homework 8 Due October 20, 20 1. Consider the circuit below. It has three inputs (x and clock), and one output (z). At reset, the circuit starts with the outputs of all flip-flops at 0. x z J Q

More information

CS232 VHDL Lecture. Types

CS232 VHDL Lecture. Types CS232 VHDL Lecture VHSIC Hardware Description Language [VHDL] is a language used to define and describe the behavior of digital circuits. Unlike most other programming languages, VHDL is explicitly parallel.

More information

VLSI II E. Özgür ATES

VLSI II E. Özgür ATES VERILOG TUTORIAL VLSI II E. Özgür ATES Outline Introduction Language elements Gate-level modeling Data-flow modeling Behavioral modeling Modeling examples Simulation and test bench Hardware Description

More information

EECS 3201: Digital Logic Design Lecture 4. Ihab Amer, PhD, SMIEEE, P.Eng.

EECS 3201: Digital Logic Design Lecture 4. Ihab Amer, PhD, SMIEEE, P.Eng. EECS 32: Digital Logic Design Lecture 4 Ihab Amer, PhD, SMIEEE, P.Eng. What is a HDL? A high-level computer language that can describe digital systems in tetual form Two applications of HDL processing:

More information

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Comp 541 Digital Logic and Computer Design Prof. Montek Singh Fall 2017 Lab #3A: Sequential Design: Counters Issued Wed 9/6/17; Due Wed 9/13/17 (11:59pm)

More information

ECE331: Hardware Organization and Design

ECE331: Hardware Organization and Design ECE331: Hardware Organization and Design Lecture 19: Verilog and Processor Performance Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Verilog Basics Hardware description language

More information

Introduction. Why Use HDL? Simulation output. Explanation

Introduction. Why Use HDL? Simulation output. Explanation Introduction Verilog HDL is a Hardware Description Language (HDL) HDL is a language used to describe a digital system, for example, a computer or a component of a computer. Most popular HDLs are VHDL and

More information

Digital design laboratory 5

Digital design laboratory 5 Digital design laboratory 5 Preparations Launch the ISE Design Suite Create new project: File -> New Project Preparations Name: DigLab5 Location: D drive! D:\DigLab5 Working directory: The same as Location

More information

CSE 591: Advanced Hardware Design and Verification (2012 Spring) LAB #0

CSE 591: Advanced Hardware Design and Verification (2012 Spring) LAB #0 Lab 0: Tutorial on Xilinx Project Navigator & ALDEC s Active-HDL Simulator CSE 591: Advanced Hardware Design and Verification Assigned: 01/05/2011 Due: 01/19/2011 Table of Contents 1 Overview... 2 1.1

More information

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1 FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1 Anurag Dwivedi Digital Design : Bottom Up Approach Basic Block - Gates Digital Design : Bottom Up Approach Gates -> Flip Flops Digital

More information

Digital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University

Digital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University Digital Circuit Design and Language Datapath Design Chang, Ik Joon Kyunghee University Typical Synchronous Design + Control Section : Finite State Machine + Data Section: Adder, Multiplier, Shift Register

More information

Tutorial 3. Appendix D. D.1 Design Using Verilog Code. The Ripple-Carry Adder Code. Functional Simulation

Tutorial 3. Appendix D. D.1 Design Using Verilog Code. The Ripple-Carry Adder Code. Functional Simulation Appendix D Tutorial 3 This tutorial introduces more advanced capabilities of the Quartus II system. We show how Verilog code is organized and compiled and illustrate how multibit signals are represented

More information

Sequential Logic Design

Sequential Logic Design Sequential Logic Design Design of Digital Circuits 2017 Srdjan Capkun Onur Mutlu (Guest starring: Frank K. Gürkaynak and Aanjhan Ranganathan) http://www.syssec.ethz.ch/education/digitaltechnik_17 Adapted

More information

DIGITAL SYSTEM DESIGN

DIGITAL SYSTEM DESIGN DIGITAL SYSTEM DESIGN Prepared By: Engr. Yousaf Hameed Lab Engineer BASIC ELECTRICAL & DIGITAL SYSTEMS LAB DEPARTMENT OF ELECTRICAL ENGINEERING Digital System Design 1 Name: Registration No: Roll No: Semester:

More information

Verilog Introduc/on Part 2. B39VS Systems project

Verilog Introduc/on Part 2. B39VS Systems project Verilog Introduc/on Part 2 B39VS Systems project COMBINATIONAL LOGIC VERILOG: Synthesis - Combina/onal Logic Combina/on logic func/on can be expressed as: logic_output(t) = f(logic_inputs(t)) logic_inputs(t)

More information

Verilog Tutorial. Verilog Fundamentals. Originally designers used manual translation + bread boards for verification

Verilog Tutorial. Verilog Fundamentals. Originally designers used manual translation + bread boards for verification Verilog Fundamentals Verilog Tutorial History Data types Structural Verilog Functional Verilog Adapted from Krste Asanovic Originally designers used manual translation + bread boards for verification Hardware

More information

Verilog Tutorial 9/28/2015. Verilog Fundamentals. Originally designers used manual translation + bread boards for verification

Verilog Tutorial 9/28/2015. Verilog Fundamentals. Originally designers used manual translation + bread boards for verification Verilog Fundamentals Verilog Tutorial History Data types Structural Verilog Functional Verilog Adapted from Krste Asanovic Originally designers used manual translation + bread boards for verification Hardware

More information

Lab 7 (All Sections) Prelab: Verilog Review and ALU Datapath and Control

Lab 7 (All Sections) Prelab: Verilog Review and ALU Datapath and Control Lab 7 (All Sections) Prelab: Verilog Review and ALU Datapath and Control Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received unauthorized aid on this academic

More information

N-input EX-NOR gate. N-output inverter. N-input NOR gate

N-input EX-NOR gate. N-output inverter. N-input NOR gate Hardware Description Language HDL Introduction HDL is a hardware description language used to design and document electronic systems. HDL allows designers to design at various levels of abstraction. It

More information

Laboratory Exercise 7

Laboratory Exercise 7 Laboratory Exercise 7 Finite State Machines This is an exercise in using finite state machines. Part I We wish to implement a finite state machine (FSM) that recognizes two specific sequences of applied

More information

Introduction to Verilog and XILINX

Introduction to Verilog and XILINX DEPARTAMENTO DE TECNOLOGÍA ELECTRÓNICA ESCUELA TÉCNICA SUPERIOR DE INGENIERÍA INFORMÁTICA Introduction to Verilog and XILINX Lab Session Computer Structure WARNING: A written solution of the preliminary

More information

EECS150 - Digital Design Lecture 7 - Computer Aided Design (CAD) - Part II (Logic Simulation) Finite State Machine Review

EECS150 - Digital Design Lecture 7 - Computer Aided Design (CAD) - Part II (Logic Simulation) Finite State Machine Review EECS150 - Digital Design Lecture 7 - Computer Aided Design (CAD) - Part II (Logic Simulation) Feb 9, 2010 John Wawrzynek Spring 2010 EECS150 - Lec7-CAD2 Page 1 Finite State Machine Review State Transition

More information

FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language. Reference: [1]

FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language. Reference: [1] FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language Reference: [] FIELD PROGRAMMABLE GATE ARRAY FPGA is a hardware logic device that is programmable Logic functions may be programmed

More information

EECS 270 Verilog Reference: Sequential Logic

EECS 270 Verilog Reference: Sequential Logic 1 Introduction EECS 270 Verilog Reference: Sequential Logic In the first few EECS 270 labs, your designs were based solely on combinational logic, which is logic that deps only on its current inputs. However,

More information

A Brief Introduction to Verilog Hardware Definition Language (HDL)

A Brief Introduction to Verilog Hardware Definition Language (HDL) www.realdigital.org A Brief Introduction to Verilog Hardware Definition Language (HDL) Forward Verilog is a Hardware Description language (HDL) that is used to define the structure and/or behavior of digital

More information

In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design

In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design 1 In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design a fininte state machine in order to produce the desired

More information

In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design

In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design a fininte state machine in order to produce the desired

More information

ECE 353 Lab 4. Verilog Review. Professor Daniel Holcomb UMass Amherst Fall 2017

ECE 353 Lab 4. Verilog Review. Professor Daniel Holcomb UMass Amherst Fall 2017 ECE 353 Lab 4 Verilog Review Professor Daniel Holcomb UMass Amherst Fall 2017 What You Will Do In Lab 4 Design and implement a serial MIDI receiver Hardware in an Altera Complex Programmable Logic Device

More information

EE178 Lecture Verilog FSM Examples. Eric Crabill SJSU / Xilinx Fall 2007

EE178 Lecture Verilog FSM Examples. Eric Crabill SJSU / Xilinx Fall 2007 EE178 Lecture Verilog FSM Examples Eric Crabill SJSU / Xilinx Fall 2007 In Real-time Object-oriented Modeling, Bran Selic and Garth Gullekson view a state machine as: A set of input events A set of output

More information

Abstraction of State Elements. Sequential Logic Implementation. Forms of Sequential Logic. Finite State Machine Representations

Abstraction of State Elements. Sequential Logic Implementation. Forms of Sequential Logic. Finite State Machine Representations Sequential ogic Implementation! Models for representing sequential circuits " Finite-state machines (Moore and Mealy) " epresentation of memory (states) " hanges in state (transitions)! Design procedure

More information

Contents. Appendix D Verilog Summary Page 1 of 16

Contents. Appendix D Verilog Summary Page 1 of 16 Appix D Verilog Summary Page 1 of 16 Contents Appix D Verilog Summary... 2 D.1 Basic Language Elements... 2 D.1.1 Keywords... 2 D.1.2 Comments... 2 D.1.3 Identifiers... 2 D.1.4 Numbers and Strings... 3

More information

ECE 4514 Digital Design II. Spring Lecture 3: Verilog Bread and Butter

ECE 4514 Digital Design II. Spring Lecture 3: Verilog Bread and Butter ECE 4514 Digital Design II Spring 2007 Verilog Difference between synthesis and simulation Modules, module declarations and instantiation Constants Numbers Data types Value Levels Regs Vectors Arrays Synthesis

More information

Spring 2017 EE 3613: Computer Organization Chapter 5: Processor: Datapath & Control - 2 Verilog Tutorial

Spring 2017 EE 3613: Computer Organization Chapter 5: Processor: Datapath & Control - 2 Verilog Tutorial Spring 2017 EE 3613: Computer Organization Chapter 5: Processor: Datapath & Control - 2 Verilog Tutorial Avinash Kodi Department of Electrical Engineering & Computer Science Ohio University, Athens, Ohio

More information

Spiral 1 / Unit 4 Verilog HDL. Digital Circuit Design Steps. Digital Circuit Design OVERVIEW. Mark Redekopp. Description. Verification.

Spiral 1 / Unit 4 Verilog HDL. Digital Circuit Design Steps. Digital Circuit Design OVERVIEW. Mark Redekopp. Description. Verification. 1-4.1 1-4.2 Spiral 1 / Unit 4 Verilog HDL Mark Redekopp OVERVIEW 1-4.3 1-4.4 Digital Circuit Design Steps Digital Circuit Design Description Design and computer-entry of circuit Verification Input Stimulus

More information

Introduction To Verilog Design. Chun-Hung Chou

Introduction To Verilog Design. Chun-Hung Chou Introduction To Verilog Design Chun-Hung Chou 1 Outline Typical Design Flow Design Method Lexical Convention Data Type Data Assignment Event Control Conditional Description Register Description Synthesizable

More information

Chap 3. Modeling structure & basic concept of Verilog HDL

Chap 3. Modeling structure & basic concept of Verilog HDL Chap 3. Modeling structure & basic concept of Verilog HDL Fall semester, 2016 Prof. Jaeseok Kim School of Electrical & Electronics Eng. Yonsei university jaekim@yonsei.ac.kr Digital System Design 3-1 Chapter

More information

ECEN : Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University. Homework #1 Solutions

ECEN : Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University. Homework #1 Solutions ECEN 449 749: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University Homework #1 Solutions Upload your homework solution to ecampus as a single pdf file. Your

More information

The Verilog Language COMS W Prof. Stephen A. Edwards Fall 2002 Columbia University Department of Computer Science

The Verilog Language COMS W Prof. Stephen A. Edwards Fall 2002 Columbia University Department of Computer Science The Verilog Language COMS W4995-02 Prof. Stephen A. Edwards Fall 2002 Columbia University Department of Computer Science The Verilog Language Originally a modeling language for a very efficient event-driven

More information

register:a group of binary cells suitable for holding binary information flip-flops + gates

register:a group of binary cells suitable for holding binary information flip-flops + gates 9 차시 1 Ch. 6 Registers and Counters 6.1 Registers register:a group of binary cells suitable for holding binary information flip-flops + gates control when and how new information is transferred into the

More information

Finite-State Machine (FSM) Design

Finite-State Machine (FSM) Design 1 Finite-State Machine (FSM) Design FSMs, an important category of sequential circuits, are used frequently in designing digital systems. From the daily used electronic machines to the complex digital

More information

Designing Safe Verilog State Machines with Synplify

Designing Safe Verilog State Machines with Synplify Designing Safe Verilog State Machines with Synplify Introduction One of the strengths of Synplify is the Finite State Machine compiler. This is a powerful feature that not only has the ability to automatically

More information

Behavioral Modeling and Timing Constraints

Behavioral Modeling and Timing Constraints Lab Workbook Introduction Behavioral modeling was introduced in Lab 1 as one of three widely used modeling styles. Additional capabilities with respect to testbenches were further introduced in Lab 4.

More information

Lecture 24: Sequential Logic Design. Let s refresh our memory.

Lecture 24: Sequential Logic Design. Let s refresh our memory. 18 100 Lecture 24: equential Logic esign 15 L24 1 James C. Hoe ept of ECE, CMU April 21, 2015 Today s Goal: tart thinking about stateful stuff Announcements: Read Rizzoni 12.6 HW 9 due Exam 3 on April

More information

Verilog HDL. Lecture #6. Madhu Mutyam Dept. of Computer Science and Engineering Indian Institute of Technology, Madras

Verilog HDL. Lecture #6. Madhu Mutyam Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Verilog HDL Lecture #6 Madhu Mutyam Dept. of Computer Science and Engineering Indian Institute of Technology, Madras madhu@cse.iitm.ac.in 2 Verilog RTL Structural Level Verilog allows a designer to develop

More information

Nikhil Gupta. FPGA Challenge Takneek 2012

Nikhil Gupta. FPGA Challenge Takneek 2012 Nikhil Gupta FPGA Challenge Takneek 2012 RECAP FPGA Field Programmable Gate Array Matrix of logic gates Can be configured in any way by the user Codes for FPGA are executed in parallel Configured using

More information

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited April 2, 2009 John Wawrzynek Spring 2009 EECS150 - Lec20-fsm Page 1 Finite State Machines (FSMs) FSM circuits are a type of sequential

More information

Nonblocking Assignments in Verilog Synthesis; Coding Styles That Kill!

Nonblocking Assignments in Verilog Synthesis; Coding Styles That Kill! Nonblocking Assignments in Verilog Synthesis; Coding Styles That Kill! by Cliff Cummings Sunburst Design, Inc. Abstract -------- One of the most misunderstood constructs in the Verilog language is the

More information

Introduction to Verilog

Introduction to Verilog Introduction to Verilog Synthesis and HDLs Verilog: The Module Continuous (Dataflow) Assignment Gate Level Description Procedural Assignment with always Verilog Registers Mix-and-Match Assignments The

More information

HDL. Hardware Description Languages extensively used for:

HDL. Hardware Description Languages extensively used for: HDL Hardware Description Languages extensively used for: Describing (digital) hardware (formal documentation) Simulating it Verifying it Synthesizing it (first step of modern design flow) 2 main options:

More information

Verilog HDL. Testing & Verification Dept. of Computer Science & Engg,, IIT Kharagpur

Verilog HDL. Testing & Verification Dept. of Computer Science & Engg,, IIT Kharagpur Verilog HDL Testing & Verification Dept. of Computer Science & Engg,, IIT Kharagpur Pallab Dasgupta Professor, Dept. of Computer Science & Engg., Professor-in in-charge, AVLSI Design Lab, Indian Institute

More information

FSM and Efficient Synthesizable FSM Design using Verilog

FSM and Efficient Synthesizable FSM Design using Verilog FSM and Efficient Synthesizable FSM Design using Verilog Introduction There are many ways to code FSMs including many very poor ways to code FSMs. This lecture offers guidelines for doing efficient coding,

More information

A Verilog Primer. An Overview of Verilog for Digital Design and Simulation

A Verilog Primer. An Overview of Verilog for Digital Design and Simulation A Verilog Primer An Overview of Verilog for Digital Design and Simulation John Wright Vighnesh Iyer Department of Electrical Engineering and Computer Sciences College of Engineering, University of California,

More information

271/471 Verilog Tutorial

271/471 Verilog Tutorial 271/471 Verilog Tutorial Prof. Scott Hauck, last revised 9/15/14 Introduction The following tutorial is inted to get you going quickly in circuit design in Verilog. It isn t a comprehensive guide to System

More information

ECE 353 Lab 4. Verilog Review. Professor Daniel Holcomb With material by Professor Moritz and Kundu UMass Amherst Fall 2016

ECE 353 Lab 4. Verilog Review. Professor Daniel Holcomb With material by Professor Moritz and Kundu UMass Amherst Fall 2016 ECE 353 Lab 4 Verilog Review Professor Daniel Holcomb With material by Professor Moritz and Kundu UMass Amherst Fall 2016 Recall What You Will Do Design and implement a serial MIDI receiver Hardware in

More information

Digital Integrated Circuits

Digital Integrated Circuits Digital Integrated Circuits Lecture 3 Jaeyong Chung System-on-Chips (SoC) Laboratory Incheon National University GENERAL MODEL OF MEALY MACHINE Chung EPC6055 2 GENERAL MODEL OF MOORE MACHINE Chung EPC6055

More information

FSM Components. FSM Description. HDL Coding Methods. Chapter 7: HDL Coding Techniques

FSM Components. FSM Description. HDL Coding Methods. Chapter 7: HDL Coding Techniques FSM Components XST features: Specific inference capabilities for synchronous Finite State Machine (FSM) components. Built-in FSM encoding strategies to accommodate your optimization goals. You may also

More information

Computer Aided Design Basic Syntax Gate Level Modeling Behavioral Modeling. Verilog

Computer Aided Design Basic Syntax Gate Level Modeling Behavioral Modeling. Verilog Verilog Radek Pelánek and Šimon Řeřucha Contents 1 Computer Aided Design 2 Basic Syntax 3 Gate Level Modeling 4 Behavioral Modeling Computer Aided Design Hardware Description Languages (HDL) Verilog C

More information

ENSC E-123: HW D3: Counter Applications; Counter in Verilog

ENSC E-123: HW D3: Counter Applications; Counter in Verilog HW D3; Counter Applications 1 ENSC E-123: HW D3: Counter Applications; Counter in Verilog REV 0 1 ; February 12, 2015 Contents 1 Counter Applications: Sync vs Async Function (5 points) 2 1.1 Crummy: asyncclear(2points).................

More information

Introduction to Verilog

Introduction to Verilog Introduction to Verilog COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals Presentation Outline Hardware Description Language Logic Simulation versus Synthesis

More information

VERILOG 5: TESTING. If you don t test it, it isn t going to work - Mark Horowitz

VERILOG 5: TESTING. If you don t test it, it isn t going to work - Mark Horowitz VERILOG 5: TESTING If you don t test it, it isn t going to work - Mark Horowitz Testing Hardware blocks (*.v) Will be synthesized into hardware circuits Testing blocks (*.vt OR *_tb.v OR tb_*.v) Also called

More information

Sunburst Design - Verilog-2001 Design & Best Coding Practices by Recognized Verilog & SystemVerilog Guru, Cliff Cummings of Sunburst Design, Inc.

Sunburst Design - Verilog-2001 Design & Best Coding Practices by Recognized Verilog & SystemVerilog Guru, Cliff Cummings of Sunburst Design, Inc. World Class Verilog & SystemVerilog Training Sunburst Design - Verilog-2001 Design & Best Coding Practices by Recognized Verilog & SystemVerilog Guru, Cliff Cummings of Sunburst Design, Inc. Cliff Cummings

More information

Hardware description language (HDL)

Hardware description language (HDL) Hardware description language (HDL) A hardware description language (HDL) is a computer-based language that describes the hardware of digital systems in a textual form. It resembles an ordinary computer

More information

Verilog Coding Guideline

Verilog Coding Guideline Verilog Coding Guideline Digital Circuit Lab TA: Po-Chen Wu Outline Introduction to Verilog HDL Verilog Syntax Combinational and Sequential Logics Module Hierarchy Write Your Design Finite State Machine

More information

Schematic design. Gate level design. 0 EDA (Electronic Design Assistance) 0 Classical design. 0 Computer based language

Schematic design. Gate level design. 0 EDA (Electronic Design Assistance) 0 Classical design. 0 Computer based language 1 / 15 2014/11/20 0 EDA (Electronic Design Assistance) 0 Computer based language 0 HDL (Hardware Description Language) 0 Verilog HDL 0 Created by Gateway Design Automation Corp. in 1983 First modern hardware

More information

Register Transfer Level in Verilog: Part I

Register Transfer Level in Verilog: Part I Source: M. Morris Mano and Michael D. Ciletti, Digital Design, 4rd Edition, 2007, Prentice Hall. Register Transfer Level in Verilog: Part I Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National

More information

Last Lecture. Talked about combinational logic always statements. e.g., module ex2(input logic a, b, c, output logic f); logic t; // internal signal

Last Lecture. Talked about combinational logic always statements. e.g., module ex2(input logic a, b, c, output logic f); logic t; // internal signal Last Lecture Talked about combinational logic always statements. e.g., module ex2(input logic a, b, c, output logic f); logic t; // internal signal always_comb t = a & b; f = t c; should use = (called

More information

Course Details: Webpage

Course Details: Webpage Course Details: Webpage What you will be able to do after this class.! Write top-notch System Verilog! Employ top-notch HW Design Practices! Design your own processor! Design pipelined hardware! Design

More information

Department of Computer Science and Electrical Engineering. Intro to Verilog II

Department of Computer Science and Electrical Engineering. Intro to Verilog II Department of Computer Science and Electrical Engineering Intro to Verilog II http://6004.csail.mit.edu/6.371/handouts/l0{2,3,4}.pdf http://www.asic-world.com/verilog/ http://www.verilogtutorial.info/

More information

ECE 353 Lab 3 (Verilog Design Approach)

ECE 353 Lab 3 (Verilog Design Approach) ECE 353 Lab 3 (Verilog Design Approach) Prof Daniel Holcomb Recall What You Will Do Design and implement a serial MIDI receiver Hardware in an Altera Complex Programmable Logic Device (CPLD) MAX 7000S

More information

Chapter 4 :: Topics. Introduction. SystemVerilog. Hardware description language (HDL): allows designer to specify logic function only.

Chapter 4 :: Topics. Introduction. SystemVerilog. Hardware description language (HDL): allows designer to specify logic function only. Chapter 4 :: Hardware Description Languages Digital Design and Computer Architecture David Money Harris and Sarah L. Harris Chapter 4 :: Topics Introduction Combinational Logic Structural Modeling Sequential

More information

EN2911X: Reconfigurable Computing Topic 02: Hardware Definition Languages

EN2911X: Reconfigurable Computing Topic 02: Hardware Definition Languages EN2911X: Reconfigurable Computing Topic 02: Hardware Definition Languages Professor Sherief Reda http://scale.engin.brown.edu School of Engineering Brown University Spring 2014 1 Introduction to Verilog

More information

CSCB58 - Lab 3. Prelab /3 Part I (in-lab) /2 Part II (in-lab) /2 TOTAL /8

CSCB58 - Lab 3. Prelab /3 Part I (in-lab) /2 Part II (in-lab) /2 TOTAL /8 CSCB58 - Lab 3 Latches, Flip-flops, and Registers Learning Objectives The purpose of this exercise is to investigate the fundamental synchronous logic elements: latches, flip-flops, and registers. Prelab

More information

Verilog Nonblocking Assignments with Delays - Myths & Mysteries

Verilog Nonblocking Assignments with Delays - Myths & Mysteries Verilog Nonblocking Assignments with Delays - Myths & Mysteries Clifford E. Cummings, Inc. cliffc@sunburst-design.com www.sunburst-design.com 2 of 67 Agenda IEEE 1364 reference model & event queue Review

More information