Testbench and Simulation

Size: px
Start display at page:

Download "Testbench and Simulation"

Transcription

1 Testbench and Simulation Graphics: Alexandra Nolte, Gesine Marwedel, 2003

2 Focus of this Class Understand the simulator Event Based Simulation Testbenches and verification Approaches and metodologies Examples:

3 Introduction Purpose of Verification: Discover as many potential bugs in the design as reasonable before sending chip out for fabrication Do this by simulating chip (and chip components) in Verilog Why is verification important? Chip fab might cost $4M and take 8 weeks Very expensive and time consuming to iterate chip fab! Want to get prototype correct in one to two fab cycles FPGAs can rely more on using the prototype for debug But, note, it is more difficult to debug hardware than a simulation

4 Introduction Verification consumes more than 60% of design resources People, compute cycles Verification mainly done with pre synthesis code Though some simulation, and other checks, are done to make sure the netlist is correct With increased reuse of existing Intellectual Property ( IP ), verification has become very challenging IP = Predesigned blocks, internally developed, purchased or obtained from open source Debugging is often harder than design! Focus of these Notes Primarily on verification tasks likely to be performed by module level designer, and code constructs commonly used

5 Verification Tools and Methods It is impossible to know that you have eliminated all the bugs in a design Thus it is important to use a variety of tools, techniques and methods that give you a high probability of discovering bugs And to have a plan to apply them! Get as many avenues of attack as possible Available tools and methods include: Simulation through test fixtures Including mixed level simulation Inserting and tracking assertions Formal verification Emulation

6 Simulations Through Test Fixtures Basic concept: Apply vectors to design as stimulus Observe outputs, and internal nodes, for correct functionality Key Questions: Where to you get the vectors? How do you observe the outputs? What are the available coding styles?

7 Sources of Verification Vectors. From expected functionality Vectors designed to exercise expected functions of chip or block From specification or understanding of function of chip/block Prioritized from must work to would like to work 2. From Higher Level Model Obtain vectors for individual blocks from a higher level behavioral model E.g. C model developed for project Example: Run video stream through C model of MPEG encoder Extract examples from this to run through Motion Estimator C model here is an example of a reference behavioral model

8 Sources of Simulation Vectors 3. Vectors added specifically as a result of production of verification plan E.g. Vectors specifically designed to test difficult aspects of design Features that were hard to design Modules are more likely to be buggy E.g. Bus arbiters E.g. vectors designed to increase the coverage of the design Increase code and functional coverage 4. Random vectors Run random vectors Compare results with same vectors run in a higher level model

9 Sources of Simulation Vectors 5. System level vectors simulating the chip in its entirety Important to do a LOT of this Very slow and time consuming While design is incomplete, can be a mixed behavioral (e.g. C) and RTL simulation Using Verilog Programming Language Interface (PLI) Requires good behavioral models for interface chips Memories, etc.

10 Observing Correctness. Observe in Waveform Viewer 2. Observing results of assertions 3. Try to write self checking test fixtures, that analyze the results and inform you of correctness. Useful as it means you can automatically check other parts of a design when you redesign some portion. #0 dec = ; #28 if (zero == b) $display ( Check passed ) else $display ( Error: Check FAILED ); Try to take to a higher level. i.e. Incorporate `understanding of function into self checking feature integer testdata; // test data being used integer ExpectedDelay; // expected delay for test data initial begin testdata = 4; in = testdata;... ExpectedDelay = testdata * 0; #ExpectedDelay if (zero == b) $display ( Check passed ) else $display ( Error: Check FAILED );

11 Verilog Code for Test Fixtures Approaches Can use any syntactically correct code Choose test vector generation approach: On the fly generation: Use continuous loops for repetitive signals Use simple assignments for signals with few transitions (e.g. reset) Use tasks to generate specific waveform sets Read vectors stored as constants in an array Read vectors from a file Choose timing approach: Relative Timing, or Absolute Timing Generate clock separately from vectors Whenever possible check simulation results within test fixture Against a stored set of expected results, or Against an internal model of expected behavior

12 Examples On the fly generation Use a task to generate an often repeated vector set task refresh; // generate a RAS before CAS refresh cycle output RAS, CAS; begin // assume RAS and CAS high on entry #5 RAS = 0; #5 RAS = ; #0 CAS = 0; #5 CAS = ; #45; // allow refresh to complete end initial begin refresh (RAS, CAS);

13 Assertions Code blocks that check for correct and incorrect behavior Put inside RTL code (but do not synthesize) Usually inserted by designer System Verilog allows more concise assertions, but can also be written in normal Verilog Example (Verlog95): // synopsys off ifdef Assertions_on // check ONE bus request granted ONE clock cyle after any reqest clock) if (( request) & (~ grant)) // request, no active grants clock) // wait one cycle if (~ grant) $display( ERROR: bus access not granted ); else if ((grant[0] + grant[] + grant[2] + grant[3])>) $display ( ERROR: multiple buses accesses granted ); end endif // synopsys on

14 Assertion Types Concurrent: the property must be true throughout a simulation Procedural: incorporated in procedural code apply only for a limited time 4

15 Procedural Assertions Immediate : at the time of statement execution Strobed : schedule the evaluation of the expression for the end of current timescale to let the glitches settle down Not in functions Clocked : being triggered by an event or sampling clock 5

16 Immediate assertions Severity level $fatal : terminates the simulation with an error code. The first argument shall be consistent with the argument to $finish. $error $warning $info assert (myfunc(a,b)) count = count + ; else >event; [ identifier : ] assert ( expression ) [ pass_statement ] [ else fail_statement ] 6

17 System Functions $onehot (<expression>) returns true if only one and only one bit of expression is high. $onehot0(<expression>) returns true if at most one bit of expression is low. $inset (<expression>, <expression> {, <expression> } ) returns true if the first expression is equal to at least one of the subsequent expression arguments. $insetz(<expression>,<expression> {, <expression> } ) returns true if the first expression is equal to at least other expression argument. $isunknown(<expression>) returns true if any bit of the expression is x. 7

18 Assertion example a sequence of conditions that span multiple clock cycles 8

19 Formal Verification Equivalency Checking Determines that two designs are logically equivalent Examples: RTL and netlist Different netlists after non design coding changes Often used to help verify output of synthesis Model Checking Trying to prove or disprove that a circuit possesses a property that is part of a more abstract, higher level specification E.g. Correct design capture of a Finite State Automata Requires good capture of specification in a suitable language

20 Simulation Engines There are never enough simulation cycles to complete verification. Event based Verilog simulator Most general but slowest 2. Cycle based Verilog simulator Slightly less general but faster 3. Verilog simulator hardware accelerator Use hardware as a co processor to accelerate simulation of Verilog (that does not have a lot of I/O i.e. not all signals captured) 4. Emulation i.e. Build a multi FPGA system that can emulate the standard cell ASIC, though at a slower clock rate Allows very complete verification (except for timing critical issues) but takes a lot of engineering resource

21 Verification Metrics How do you know your chip is ready for fabrication? You can never know you are bug free! General solution: When cost (and opportunity cost) of more verification is higher than the cost of using the first silicon to complete the debug process i.e. When it is quicker and cheaper to build the chip to find the remaining bugs Note: Some bugs can be worked around with firmware Common Metrics:. Bug discovery rate 2. Code coverage 3. Functional Coverage 4. Assertion coverage

22 Verification Metrics Code Coverage Has every line of code been simulated? What percentage of possible paths have been simulated? E.g. All alternatives in an if then sequence What percentage of possible state sequences have been simulated? Requires instrumentation of code and appropriate data collecting and reporting tools Functional Coverage Have all the functions in the specification been simulated? E.g. All interface modes in a USB interface Requires writing of code (SystemVerilog or integrated via PLI) to monitor the hardware that implements these functions and data collecting within the test fixture

23 Verification Environment Definitions Creates stimulus Executes transactions Supplies data to the DUT Test Transactor Driver Checks correctness Scoreboard Assertions Testbench Verification Environment Checker Monitor Identifies transactions Observes data from DUT DUT

24 Coverage Driven Verification Measure progress using functional coverage With VIP Coverage-Driven Methodology Productivity gain % Coverage Goal Self-checking random environment development time Directed Methodology Time

25 Graphics: Alexandra Nolte, Gesine Marwedel, 2003 Universität Dortmund Event Based Simulation

26 Analog Circuit Simulation Divide time into slices Update information in whole circuit at each slice Used by SPICE Allows detailed modeling of current and voltage Computationally intensive and slow Don t need this level of detail for most digital logic simulation 26

27 Digital Simulation Could update every signal on input change Could update just the full path on input change Don t even need to do that much work!

28 Event Driven Simulation When an input to the simulating circuit changes, put it on a changed list Loop while the changed list isn t empty: Remove a signal from the changed list For each sink of the signal Recompute its new output(s) For any output(s) that have changed value, add that signal to the changed list When the changed list is empty, keep simulation results until next input change 28

29 Simulation Update only if changed Some circuits are very large Updating every signal => very slow simulation Event driven simulation is much faster! 29

30 Graphics: Alexandra Nolte, Gesine Marwedel, 2003 Universität Dortmund Testbenches

31 Simulation of Verilog Need to verify your design Unit Under Test (UUT) Use a testbench! Special Verilog module with no ports Generates or routes inputs to the UUT Outputs information about the results Inputs UUT Outputs (Response) OR Stimulus Inputs UUT Outputs (Response) Testbench Testbench

32 Simulation Example module adder4b (sum, c_out, a, b, c_in); input [3:0] a, b; input c_in; output [3:0] sum; output c_out; assign {c_out, sum} = a + b + c_in; endmodule a[3:0] b[3:0] c_in 4 4 adder4b 4 sum[3:0] c_out 32

33 Simulation Example Testbenches frequently named t_<uut name> t_adder4b a[3:0] b[3:0] c_in 4 4 adder4b (UUT) 4 sum[3:0] c_out 33

34 Example `timescale ns /00ps // time_unit/time_precision module t_adder4b; reg[8:0] stim; // inputs to UUT are regs wire[3:0] S; // outputs of UUT are wires UUT wire C_out; all inputs grouped into // instantiate UUT single vector (not adder4b(s, C_out, stim[8:5], stim[4:], stim[0]); required) Behav. Verilog: do this once // stimulus generation initial begin end endmodule not an apostrophe! stim = 9'b ; // at 0 ns #0 stim = 9'b0000; // at 0 ns #0 stim = 9'b0000; // at 20 ns #0 stim = 9'b0000; // at 30 ns #0 stim = 9'b0000; // at 40 ns #0 $stop; // at 50 ns stops simulation timing control for simulation see response to each of these input vectors 34

35 Overview Simulation and Testbenches Simulation Overview Timing Controls and Delay Testbenches Verilog Shortcuts Concatenating Vectors Arrays of Instances Introduction to RTL Verilog (Continuous Assignments) 35

36 Timing Controls For Simulation Can put delays in a Verilog design Gates, wires, even behavioral statements! SIMULATION Used to approximate real operation while simulating Used to control testbench SYNTHESIS Synthesis tool IGNORES these timing controls Cannot tell a gate to wait.5 nanoseconds! Delay is a result of physical properties! The only timing that can be (easily) controlled is on a clockcycle basis Can tell synthesizer to attempt to meet cycle time restriction 36

37 No Delay vs. Unit Delay When no timing controls specified: no delay Unrealistic even electrons take time to move OUT is updated at same time A and/or B change: and(out, A, B) Unit delay often used Not accurate either, but closer Depth of circuit does affect speed! Easier to see how changes propagate through circuit OUT is updated unit after A and/or B change: and # A0(OUT, A, B); #0 delay Don t use this. 37

38 Unit Delay Example A B C Y Z No Delay: Y and Z change at same time as A, B, and C! Unit Delay: Y changes unit after B, C Unit Delay: Z changes unit after A, Y T A B C Y Z No Delay T A B C Y Z Unit Delay 0 0 x x x

39 Types Of Delays Inertial Delay (Gates) Suppresses pulses shorter than delay amount In reality, gates need to have inputs held a certain time before output is accurate This models that behavior Transport Delay (Nets) Time of flight from source to sink Short pulses transmitted 39

40 Delay Examples wire #5 net_; // 5 unit transport delay and #4 (z_out, x_in, y_in); // 4 unit inertial delay assign #3 z_out = a & b; // 3 unit inertial delay wire #2 z_out; // 2 unit transport delay and #3 (z_out, x_in, y_in); // 3 for gate, 2 for wire wire #3 c; // 3 unit transport delay assign #5 c = a & b; // 5 for assign, 3 for wire 40

41 Delays In Testbenches Most common use in class A single testbench will test many possibilities Want to examine each case separately Spread them out over time Use to generate a clock signal Example later in lecture 4

42 Overview Simulation and Testbenches Simulation Overview Timing Controls and Delay Testbenches Introduction to RTL Verilog (Continuous Assignments) 42

43 Testbench Basics Instantiate the unit being tested (UUT) Provide input to that unit Usually a number of different input combinations! Watch the results (outputs of UUT) Can watch ModelSim Wave window Can print out information to the screen or to a file 43

44 Print Test Information A number of system calls to output info $monitor Give a list of nets and variables to monitor Output the given values every time a one of them changes $display, $strobe Output a value at a specific time during simulation Can use formatting strings with these commands Also have system calls that write to files Only have meaning in simulation System calls are ignored in synthesis 44

45 Output String Formatting Formatting string %h, %H hex %d, %D decimal %o, %O octal %b, %B binary %t time $monitor( %t: %b %h %h %h %b\n, $time, c_out, sum, a, b, c_in); Can get more details from Verilog standard 45

46 Output Example `timescale ns /00ps module t_adder4b; reg[8:0] stim; wire[3:0] S; wire C4; // time_unit/time_precision // inputs to UUT are regs // outputs of UUT are wires // instantiate UUT adder4b(s, C4, stim[8:5], stim[4:], stim[0]); // monitor statement initial $monitor($time, C4, S, stim[8:5], stim[4:], stim[0]); // stimulus generation initial begin end endmodule All values will run together; easier to read with formatting string stim = 9'b ; // at 0 ns #0 stim = 9'b0000; // at 0 ns #0 stim = 9'b0000; // at 20 ns #0 stim = 9'b0000; // at 30 ns #0 stim = 9'b0000; // at 40 ns #0 $stop; // at 50 ns stops simulation 46

47 Output Example `timescale ns /00ps module t_adder4b; reg[8:0] stim; wire[3:0] S; wire C4; // time_unit/time_precision // inputs to UUT are regs // outputs of UUT are wires // instantiate UUT adder4b(s, C4, stim[8:5], stim[4:], stim[0]); // monitor statement initial $monitor( %t %b %d %d %d %b, $time, C4, S, stim[8:5], stim[4:], stim[0]); // stimulus generation initial begin end endmodule Formatted with spaces between values, vectors shown as decimal stim = 9'b ; // at 0 ns #0 stim = 9'b0000; // at 0 ns #0 stim = 9'b0000; // at 20 ns #0 stim = 9'b0000; // at 30 ns #0 stim = 9'b0000; // at 40 ns #0 $stop; // at 50 ns stops simulation 47

48 Exhaustive Testing For combinational designs with few inputs Test ALL combinations of inputs to verify output Could enumerate all test vectors, but don t Generate them using a for loop! reg [4:0] x; initial begin for (x = 0; x < 6; x = x + ) #5 // need a delay here! end Need to use reg type for x. Why? It s a variable assigned a value in a behavioral block What would happen without the delay? 48

49 Why Loop Vector Has Extra Bit Want to test all vectors 0000 to reg [3:0] x; initial begin for (x = 0; x < 6; x = x + ) #5 // need a delay here! end If x is 4 bits, it only gets up to => 5 00 => 0 => 0 => => 0000 => 000 x is never >= 6 so loop goes forever! 49

50 Exhaustive Example: UUT module Comp_4_str(A_gt_B, A_lt_B, A_eq_B, A, B); output A_gt_B, A_lt_B, A_eq_B; input [3:0] A, B; // Code to compare A to B and set outputs // A_gt_B, A_lt_B, A_eq_B accordingly endmodule 50

51 Exhaustive Example: Testbench module t_comp_4_str(); wire A_gt_B, A_lt_B, A_eq_B; reg [4:0] A, B; // sized to prevent loop wrap around wire [3:0] A_bus, B_bus; assign A_stim = A[3:0]; // display only 4 bit values assign B_stim = B[3:0]; Comp_4_str M (A_gt_B, A_lt_B, A_eq_B, A_stim, B_stim); // UUT initial $monitor( %t A: %h B: %h AgtB: %b AltB: %b AeqB: %b, $time, A_stim, B_stim, A_gt_B, A_lt_B, A_eq_B); initial #2000 $finish; // end simulation, quit program note multiple initial blocks initial begin #5 for (A = 0; A < 6; A = A + ) begin // exhaustive test of valid inputs for (B = 0; B < 6; B = B + ) begin #5; // may want to test x s and z s end // first for end // second for end // initial endmodule 5

52 Generating Clocks Hard way: initial begin #5 clk = 0; #5 clk = ; #5 clk = 0; (repeat hundreds of times) end Better way: initial begin clk = 0; forever #5 clk = ~clk; end 52

53 FSM Testing Response to input vector depends on state For each state: Check all transitions For Moore, check output at each state For Mealy, check output for each transition This includes any transitions back to same state! Can be time consuming to traverse FSM repeatedly 53

54 Example : Gray Code Counter Write a 3 bit Grey Code counter Write a testbench to test a 3 bit gray code counter. module gray_counter(out, up down, en, clk, rst_n); In this module, rst_n is asynchronous active low en input is used to enable the counter: if 0 the counter is freezed up_down input signal is used to choose to increment or decrement ( increment, 0 decrement) 54

55 Gray Code Counter Only bit can switch at the same time!!!! Widely used in asynchronous blocks (avoid hazard and glitches) IN OUT How to implement it? Counter + Binary to Grey encoder

56 Gray Code Counter + sel Up-down 3 bit FF Binary To Gray clk rst_n en en

57 Gray Code Counter Counter reg [2:0] counter; clk, negedge rst_n) begin if(rst_n== b0) counter <= 3 b000; else if(en == b) begin case(sel) b: counter <= counter+ b; b0: counter <= counter- b; default: counter+ b; endcase end else; end

58 Gray Code Counter + sel 3 bit FF Binary To Grey clk Up-down rst_n en en Sequential And Comb Comb

59 Gray Code Counter Encoder Truth table IN = [A,B,C] OUT out[0] out[] out[2] AB C Karnaugh Maps AB C AB C out[2] = A out[] = AB +A B = A^B OUT = (IN >> ) ^ IN; out[0] = BC +B C = B^C

60 Gray Code Counter Encoder counter[2] counter[] counter[0] counter_out[2] counter_out[] counter_out[0]

61 Gray Counter : Code module GreyCounter ( input wire input wire input wire input wire output wire [2:0] ) reg [2:0] clk, rst_n, sel, en, counter_out counter; clk, negedge rst_n) begin if(rst_n== b0) counter <= 3 b000; else if(en == b) begin case(sel) b: counter <= counter+ b; b0: counter <= counter b; default: counter+ b; endcase end else; end assign counter_out = (counter>>) ^ counter; endmodule

62 Testing Gray Counter stim Test Fix up-down en DUT counter_out_dut clk rst_n DUT == Error Golden Model counter_out_gm

63 Be careful not to change your inputs on the active clock edge of your flipflops! Solution : Gray Code Counter Test module t_gray_counter(); wire [2:0] out_gc, out_gm; reg clk, rst; reg sel, en; gray_counter GC(clk, rst_n, sel, en, out_gc); golden_model GM(clk,rst_n,sel, en, out_gm); initial $monitor( %t out: %b, sel: %b, en: %b, rst: %b, $time, out, sel, en, rst); initial #00 $stop; // end simulation // UUT // GoldenModel // clk not displayed initial begin clk = 0; forever #5 clk = ~clk; // What is the clock period? end initial begin rst = 0; #0 rst = ; // When does rst change relative to clk); sel = ; en=; end // initial always@(posedge clk) begin if(out_gc!= out_gm) $error( Output Mismach at %t ns, $time); end endmodule 63

64 Simulation: Gray Code Counter Test # 0 out: xxx rst_n: 0 // reset system # 5 out: 000 rst_n: 0 // first positive edge # 0 out: 000 rst_n: // release reset # 5 out: 00 rst_n: // next positive edge # 25 out: 0 rst_n: # 35 out: 00 rst_n: # 45 out: 0 rst_n: # 55 out: rst_n: # 65 out: 0 rst_n: # 75 out: 00 rst_n: # 85 out: 000 rst_n: # 95 out: 00 rst_n: 64

65 Force/Release In Testbenches Allows you to override value FOR SIMULATION Does NOT apply to hardware Can t tell the synthesis tools when you get here, make this value become 3 d5 Synthesizer won t allow force release How does this help testing? Pinpoint bug by controlling other signals Can use with FSMs to override state Force to a state Test all edges/outputs for that state Force the next state to be tested, and repeat Can also use simulator GUI to force values 65

66 Force/Release Example assign y = a & b; assign z = y c; initial begin a = 0; b = 0; c = 0; #5 a = 0; b = ; c = 0; #5 force y = ; #5 b = 0; #5 release y; #5 $stop; end t a b c y z

67 Review Questions What is the difference between transport and inertial delay? When is each used? What does it mean to exhaustively test a design? Why are force/release statements useful? How do you generate a clock with a period of 6 time units? 67

Quick Introduction to SystemVerilog: Sequental Logic

Quick Introduction to SystemVerilog: Sequental Logic ! Quick Introduction to SystemVerilog: Sequental Logic Lecture L3 8-545 Advanced Digital Design ECE Department Many elements Don Thomas, 24, used with permission with credit to G. Larson Today Quick synopsis

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

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

Synthesis of Combinational and Sequential Circuits with Verilog

Synthesis of Combinational and Sequential Circuits with Verilog Synthesis of Combinational and Sequential Circuits with Verilog What is Verilog? Hardware description language: Are used to describe digital system in text form Used for modeling, simulation, design Two

More information

Module 4. Design of Embedded Processors. Version 2 EE IIT, Kharagpur 1

Module 4. Design of Embedded Processors. Version 2 EE IIT, Kharagpur 1 Module 4 Design of Embedded Processors Version 2 EE IIT, Kharagpur 1 Lesson 23 Introduction to Hardware Description Languages-III Version 2 EE IIT, Kharagpur 2 Instructional Objectives At the end of the

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

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

Logic Verification 13-1

Logic Verification 13-1 Logic Verification 13-1 Verification The goal of verification To ensure 100% correct in functionality and timing Spend 50 ~ 70% of time to verify a design Functional verification Simulation Formal proof

More information

Graduate Institute of Electronics Engineering, NTU. Lecturer: Chihhao Chao Date:

Graduate Institute of Electronics Engineering, NTU. Lecturer: Chihhao Chao Date: Design of Datapath Controllers and Sequential Logic Lecturer: Date: 2009.03.18 ACCESS IC LAB Sequential Circuit Model & Timing Parameters ACCESS IC LAB Combinational Logic Review Combinational logic circuits

More information

Logic Circuits II ECE 2411 Thursday 4:45pm-7:20pm. Lecture 3

Logic Circuits II ECE 2411 Thursday 4:45pm-7:20pm. Lecture 3 Logic Circuits II ECE 2411 Thursday 4:45pm-7:20pm Lecture 3 Lecture 3 Topics Covered: Chapter 4 Discuss Sequential logic Verilog Coding Introduce Sequential coding Further review of Combinational Verilog

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

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

World Class Verilog & SystemVerilog Training

World Class Verilog & SystemVerilog Training World Class Verilog & SystemVerilog Training Sunburst Design - Expert Verilog-2001 FSM, Multi-Clock Design & Verification Techniques by Recognized Verilog & SystemVerilog Guru, Cliff Cummings of Sunburst

More information

Graduate Institute of Electronics Engineering, NTU Design of Datapath Controllers

Graduate Institute of Electronics Engineering, NTU Design of Datapath Controllers Design of Datapath Controllers Lecturer: Wein-Tsung Shen Date: 2005.04.01 ACCESS IC LAB Outline Sequential Circuit Model Finite State Machines Useful Modeling Techniques pp. 2 Model of Sequential Circuits

More information

101-1 Under-Graduate Project Digital IC Design Flow

101-1 Under-Graduate Project Digital IC Design Flow 101-1 Under-Graduate Project Digital IC Design Flow Speaker: Ming-Chun Hsiao Adviser: Prof. An-Yeu Wu Date: 2012/9/25 ACCESS IC LAB Outline Introduction to Integrated Circuit IC Design Flow Verilog HDL

More information

EECS150 - Digital Design Lecture 6 - Logic Simulation. Encoder Example

EECS150 - Digital Design Lecture 6 - Logic Simulation. Encoder Example EECS150 - Digital Design Lecture 6 - Logic Simulation Feb 7, 2013 John Wawrzynek Spring 2013 EECS150 - Lec06-sim Page 1 Encoder Example What is y if x == 4 b1111? always @(x) : encode if (x == 4'b0001)

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

EECS150 - Digital Design Lecture 6 - Logic Simulation

EECS150 - Digital Design Lecture 6 - Logic Simulation EECS150 - Digital Design Lecture 6 - Logic Simulation Sep. 17, 013 Prof. Ronald Fearing Electrical Engineering and Computer Sciences University of California, Berkeley (slides courtesy of Prof. John Wawrzynek)

More information

CSE140L: Components and Design Techniques for Digital Systems Lab

CSE140L: Components and Design Techniques for Digital Systems Lab CSE140L: Components and Design Techniques for Digital Systems Lab Tajana Simunic Rosing Source: Vahid, Katz, Culler 1 Announcements & Outline Lab 4 due; demo signup times listed on the cse140l site Check

More information

Verilog. What is Verilog? VHDL vs. Verilog. Hardware description language: Two major languages. Many EDA tools support HDL-based design

Verilog. What is Verilog? VHDL vs. Verilog. Hardware description language: Two major languages. Many EDA tools support HDL-based design Verilog What is Verilog? Hardware description language: Are used to describe digital system in text form Used for modeling, simulation, design Two major languages Verilog (IEEE 1364), latest version is

More information

EEL 4783: HDL in Digital System Design

EEL 4783: HDL in Digital System Design EEL 4783: HDL in Digital System Design Lecture 15: Logic Synthesis with Verilog Prof. Mingjie Lin 1 Verilog Synthesis Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for

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

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 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

Hardware Design Verification: Simulation and Formal Method-Based Approaches William K Lam Prentice Hall Modern Semiconductor Design Series

Hardware Design Verification: Simulation and Formal Method-Based Approaches William K Lam Prentice Hall Modern Semiconductor Design Series Design Verification An Introduction Main References Hardware Design Verification: Simulation and Formal Method-Based Approaches William K Lam Prentice Hall Modern Semiconductor Design Series A Roadmap

More information

Speaker: Shao-Wei Feng Adviser: Prof. An-Yeu Wu Date: 2010/09/28

Speaker: Shao-Wei Feng Adviser: Prof. An-Yeu Wu Date: 2010/09/28 99-1 Under-Graduate Project Verilog Simulation & Debugging Tools Speaker: Shao-Wei Feng Adviser: Prof. An-Yeu Wu Date: 2010/09/28 ACCESS IC LAB Outline Basic Concept of Verilog HDL Gate Level Modeling

More information

Introduction to Verilog/System Verilog

Introduction to Verilog/System Verilog NTUEE DCLAB Feb. 27, 2018 Introduction to Verilog/System Verilog Presenter: Yao-Pin Wang 王耀斌 Advisor: Prof. Chia-Hsiang Yang 楊家驤 Dept. of Electrical Engineering, NTU National Taiwan University What is

More information

תכן חומרה בשפת VERILOG הפקולטה להנדסה

תכן חומרה בשפת VERILOG הפקולטה להנדסה תכן חומרה בשפת VERILOG סמסטר ב' תשע"ג משה דורון מרצה: מתרגלים: אריאל בורג, חג'ג' חן הפקולטה להנדסה 1 Course Topics - Outline Lecture 1 - Introduction Lecture 2 - Lexical conventions Lecture 3 - Data types

More information

Laboratory Exercise 3 Davide Rossi DEI University of Bologna AA

Laboratory Exercise 3 Davide Rossi DEI University of Bologna AA Laboratory Exercise 3 Davide Rossi DEI University of Bologna AA 2017-2018 Objectives Summary of finite state machines (Mealy, Moore) Description of FSMs in System Verilog Design of control blocks based

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

ENGN1640: Design of Computing Systems Topic 02: Design/Lab Foundations

ENGN1640: Design of Computing Systems Topic 02: Design/Lab Foundations ENGN1640: Design of Computing Systems Topic 02: Design/Lab Foundations Professor Sherief Reda http://scale.engin.brown.edu School of Engineering Brown University Spring 2017 1 Topics 1. Programmable logic

More information

CSE140L: Components and Design

CSE140L: Components and Design CSE140L: Components and Design Techniques for Digital Systems Lab Tajana Simunic Rosing Source: Vahid, Katz, Culler 1 Grade distribution: 70% Labs 35% Lab 4 30% Lab 3 20% Lab 2 15% Lab 1 30% Final exam

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

Verilog for High Performance

Verilog for High Performance Verilog for High Performance Course Description This course provides all necessary theoretical and practical know-how to write synthesizable HDL code through Verilog standard language. The course goes

More information

Bulletproofing FSM Verification Automated Approach to Detect Corner Case Issues in an FSM Design

Bulletproofing FSM Verification Automated Approach to Detect Corner Case Issues in an FSM Design Bulletproofing FSM Verification Automated Approach to Detect Corner Case Issues in an FSM Design Lisa Piper Technical Marketing Real Intent Inc., Sunnyvale, CA Comprehensive verification of Finite State

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

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

What is Verilog HDL? Lecture 1: Verilog HDL Introduction. Basic Design Methodology. What is VHDL? Requirements

What is Verilog HDL? Lecture 1: Verilog HDL Introduction. Basic Design Methodology. What is VHDL? Requirements What is Verilog HDL? Lecture 1: Verilog HDL Introduction Verilog Hardware Description Language(HDL)? A high-level computer language can model, represent and simulate digital design Hardware concurrency

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

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

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

Recommended Design Techniques for ECE241 Project Franjo Plavec Department of Electrical and Computer Engineering University of Toronto

Recommended Design Techniques for ECE241 Project Franjo Plavec Department of Electrical and Computer Engineering University of Toronto Recommed Design Techniques for ECE241 Project Franjo Plavec Department of Electrical and Computer Engineering University of Toronto DISCLAIMER: The information contained in this document does NOT contain

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

Digital Design with FPGAs. By Neeraj Kulkarni

Digital Design with FPGAs. By Neeraj Kulkarni Digital Design with FPGAs By Neeraj Kulkarni Some Basic Electronics Basic Elements: Gates: And, Or, Nor, Nand, Xor.. Memory elements: Flip Flops, Registers.. Techniques to design a circuit using basic

More information

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis Jan 31, 2012 John Wawrzynek Spring 2012 EECS150 - Lec05-verilog_synth Page 1 Outline Quick review of essentials of state elements Finite State

More information

Lecture 15: System Modeling and Verilog

Lecture 15: System Modeling and Verilog Lecture 15: System Modeling and Verilog Slides courtesy of Deming Chen Intro. VLSI System Design Outline Outline Modeling Digital Systems Introduction to Verilog HDL Use of Verilog HDL in Synthesis Reading

More information

Chap 6 Introduction to HDL (d)

Chap 6 Introduction to HDL (d) Design with Verilog Chap 6 Introduction to HDL (d) Credit to: MD Rizal Othman Faculty of Electrical & Electronics Engineering Universiti Malaysia Pahang Ext: 6036 VERILOG HDL Basic Unit A module Module

More information

271/469 Verilog Tutorial

271/469 Verilog Tutorial 271/469 Verilog Tutorial Prof. Scott Hauck, last revised 8/14/17 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

Graphics: Alexandra Nolte, Gesine Marwedel, Universität Dortmund. RTL Synthesis

Graphics: Alexandra Nolte, Gesine Marwedel, Universität Dortmund. RTL Synthesis Graphics: Alexandra Nolte, Gesine Marwedel, 2003 Universität Dortmund RTL Synthesis Purpose of HDLs Purpose of Hardware Description Languages: Capture design in Register Transfer Language form i.e. All

More information

Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis. Spring 2007 Lec #8 -- HW Synthesis 1

Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis. Spring 2007 Lec #8 -- HW Synthesis 1 Verilog Synthesis Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis Spring 2007 Lec #8 -- HW Synthesis 1 Logic Synthesis Verilog and VHDL started out

More information

Introduction to Verilog design. Design flow (from the book)

Introduction to Verilog design. Design flow (from the book) Introduction to Verilog design Lecture 2 ECE 156A 1 Design flow (from the book) ECE 156A 2 1 Hierarchical Design Chip Modules Cells Primitives A chip contain many modules A module may contain other modules

More information

Verilog Module 1 Introduction and Combinational Logic

Verilog Module 1 Introduction and Combinational Logic Verilog Module 1 Introduction and Combinational Logic Jim Duckworth ECE Department, WPI 1 Module 1 Verilog background 1983: Gateway Design Automation released Verilog HDL Verilog and simulator 1985: Verilog

More information

Test Scenarios and Coverage

Test Scenarios and Coverage Test Scenarios and Coverage Testing & Verification Dept. of Computer Science & Engg,, IIT Kharagpur Pallab Dasgupta Professor, Dept. of Computer Science & Engg., Professor-in in-charge, AVLSI Design Lab,

More information

Advanced Digital Design with the Verilog HDL

Advanced Digital Design with the Verilog HDL Copyright 2001, 2003 MD Ciletti 1 Advanced Digital Design with the Verilog HDL M. D. Ciletti Department of Electrical and Computer Engineering University of Colorado Colorado Springs, Colorado ciletti@vlsic.uccs.edu

More information

Lecture 3. Behavioral Modeling Sequential Circuits. Registers Counters Finite State Machines

Lecture 3. Behavioral Modeling Sequential Circuits. Registers Counters Finite State Machines Lecture 3 Behavioral Modeling Sequential Circuits Registers Counters Finite State Machines Behavioral Modeling Behavioral Modeling Behavioral descriptions use the keyword always, followed by optional event

More information

Intro to Digital Logic, Lab 5 Sequential Logic. Lab Objectives. Assigned Task Mapping sequential logic to the FPGA

Intro to Digital Logic, Lab 5 Sequential Logic. Lab Objectives. Assigned Task Mapping sequential logic to the FPGA Intro to Digital Logic, Lab 5 Sequential Logic Lab Objectives Now that we have mastered combinational logic, it is time to figure out sequential circuits. In this lab you will download a premade design

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

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

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

ENGN1640: Design of Computing Systems Topic 02: Design/Lab Foundations

ENGN1640: Design of Computing Systems Topic 02: Design/Lab Foundations ENGN1640: Design of Computing Systems Topic 02: Design/Lab Foundations Professor Sherief Reda http://scale.engin.brown.edu School of Engineering Brown University Spring 2016 1 Topics 1. Programmable logic

More information

Administrivia. ECE/CS 5780/6780: Embedded System Design. Acknowledgements. What is verification?

Administrivia. ECE/CS 5780/6780: Embedded System Design. Acknowledgements. What is verification? Administrivia ECE/CS 5780/6780: Embedded System Design Scott R. Little Lab 8 status report. Set SCIBD = 52; (The Mclk rate is 16 MHz.) Lecture 18: Introduction to Hardware Verification Scott R. Little

More information

Sunburst Design - Comprehensive SystemVerilog Design & Synthesis by Recognized Verilog & SystemVerilog Guru, Cliff Cummings of Sunburst Design, Inc.

Sunburst Design - Comprehensive SystemVerilog Design & Synthesis by Recognized Verilog & SystemVerilog Guru, Cliff Cummings of Sunburst Design, Inc. World Class SystemVerilog & UVM Training Sunburst Design - Comprehensive SystemVerilog Design & Synthesis by Recognized Verilog & SystemVerilog Guru, Cliff Cummings of Sunburst Design, Inc. Cliff Cummings

More information

ECE 4514 Digital Design II. Spring Lecture 15: FSM-based Control

ECE 4514 Digital Design II. Spring Lecture 15: FSM-based Control ECE 4514 Digital Design II Lecture 15: FSM-based Control A Design Lecture Overview Finite State Machines Verilog Mapping: one, two, three always blocks State Encoding User-defined or tool-defined State

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

Logic Synthesis. EECS150 - Digital Design Lecture 6 - Synthesis

Logic Synthesis. EECS150 - Digital Design Lecture 6 - Synthesis Logic Synthesis Verilog and VHDL started out as simulation languages, but quickly people wrote programs to automatically convert Verilog code into low-level circuit descriptions (netlists). EECS150 - Digital

More information

Introduction to Verilog design. Design flow (from the book) Hierarchical Design. Lecture 2

Introduction to Verilog design. Design flow (from the book) Hierarchical Design. Lecture 2 Introduction to Verilog design Lecture 2 ECE 156A 1 Design flow (from the book) ECE 156A 2 Hierarchical Design Chip Modules Cells Primitives A chip contain many modules A module may contain other modules

More information

TOPIC : Verilog Synthesis examples. Module 4.3 : Verilog synthesis

TOPIC : Verilog Synthesis examples. Module 4.3 : Verilog synthesis TOPIC : Verilog Synthesis examples Module 4.3 : Verilog synthesis Example : 4-bit magnitude comptarator Discuss synthesis of a 4-bit magnitude comparator to understand each step in the synthesis flow.

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

Testbenches for Sequential Circuits... also, Components

Testbenches for Sequential Circuits... also, Components ! Testbenches for Sequential Circuits... also, Components Lecture L04 18-545 Advanced Digital Design ECE Department Many elements Don Thomas, 2014, used with permission with credit to G. Larson State Transition

More information

CS/ECE 5780/6780: Embedded System Design

CS/ECE 5780/6780: Embedded System Design CS/ECE 5780/6780: Embedded System Design John Regehr Lecture 18: Introduction to Verification What is verification? Verification: A process that determines if the design conforms to the specification.

More information

ECE 545 Lecture 12. Datapath vs. Controller. Structure of a Typical Digital System Data Inputs. Required reading. Design of Controllers

ECE 545 Lecture 12. Datapath vs. Controller. Structure of a Typical Digital System Data Inputs. Required reading. Design of Controllers ECE 545 Lecture 12 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts Required reading P. Chu, using VHDL Chapter 1, Finite State Machine: Principle & Practice Chapter

More information

VHDL: RTL Synthesis Basics. 1 of 59

VHDL: RTL Synthesis Basics. 1 of 59 VHDL: RTL Synthesis Basics 1 of 59 Goals To learn the basics of RTL synthesis. To be able to synthesize a digital system, given its VHDL model. To be able to relate VHDL code to its synthesized output.

More information

Introduction to Verilog HDL. Verilog 1

Introduction to Verilog HDL. Verilog 1 Introduction to HDL Hardware Description Language (HDL) High-Level Programming Language Special constructs to model microelectronic circuits Describe the operation of a circuit at various levels of abstraction

More information

Verilog introduction. Embedded and Ambient Systems Lab

Verilog introduction. Embedded and Ambient Systems Lab Verilog introduction Embedded and Ambient Systems Lab Purpose of HDL languages Modeling hardware behavior Large part of these languages can only be used for simulation, not for hardware generation (synthesis)

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

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

ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL. Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS

ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL. Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS Note: Closed book no notes or other material allowed apart from the one

More information

Verilog. Verilog for Synthesis

Verilog. Verilog for Synthesis Verilog Verilog for Synthesis 1 Verilog background 1983: Gateway Design Automation released Verilog HDL Verilog and simulator 1985: Verilog enhanced version Verilog-XL 1987: Verilog-XL becoming more popular

More information

Pragmatic Simulation-Based Verification of Clock Domain Crossing Signals and Jitter using SystemVerilog Assertions

Pragmatic Simulation-Based Verification of Clock Domain Crossing Signals and Jitter using SystemVerilog Assertions Pragmatic Simulation-Based Verification of Clock Domain Crossing Signals and Jitter using SystemVerilog Assertions Mark Litterick (Verification Consultant) mark.litterick@verilab.com 2 Introduction Clock

More information

EECS150 - Digital Design Lecture 10 Logic Synthesis

EECS150 - Digital Design Lecture 10 Logic Synthesis EECS150 - Digital Design Lecture 10 Logic Synthesis February 13, 2003 John Wawrzynek Spring 2003 EECS150 Lec8-synthesis Page 1 Logic Synthesis Verilog and VHDL started out as simulation languages, but

More information

Chapter-5. EE 335 : Advanced Microprocessor. Logic Design with Behavioral Models of Combinational and Sequential Logic

Chapter-5. EE 335 : Advanced Microprocessor. Logic Design with Behavioral Models of Combinational and Sequential Logic EE 335 : Advanced Microprocessor Chapter-5 Logic Design with Behavioral Models of Combinational and Sequential Logic Ajay Kumar Yadav (Instructor) Electrical & Computer Engineering Temple University Data

More information

Image Courtesy CS250 Section 2. Yunsup Lee 9/4/09

Image Courtesy  CS250 Section 2. Yunsup Lee 9/4/09 CS250 Section 2 Image Courtesy www.intel.com Yunsup Lee 9/4/09 Upcoming dates! 9/8/09 (12:30pm) - Lab 1 due (No late days for Lab 1!)! Submit using SVN (source, build, writeup)! 9/8/09 - Lab 2 out! Write

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

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

RIZALAFANDE CHE ISMAIL TKT. 3, BLOK A, PPK MIKRO-e KOMPLEKS PENGAJIAN KUKUM. SYNTHESIS OF COMBINATIONAL LOGIC (Chapter 8)

RIZALAFANDE CHE ISMAIL TKT. 3, BLOK A, PPK MIKRO-e KOMPLEKS PENGAJIAN KUKUM. SYNTHESIS OF COMBINATIONAL LOGIC (Chapter 8) RIZALAFANDE CHE ISMAIL TKT. 3, BLOK A, PPK MIKRO-e KOMPLEKS PENGAJIAN KUKUM SYNTHESIS OF COMBINATIONAL LOGIC (Chapter 8) HDL-BASED SYNTHESIS Modern ASIC design use HDL together with synthesis tool to create

More information

Reference. Wayne Wolf, FPGA-Based System Design Pearson Education, N Krishna Prakash,, Amrita School of Engineering

Reference. Wayne Wolf, FPGA-Based System Design Pearson Education, N Krishna Prakash,, Amrita School of Engineering FPGA Fabrics Reference Wayne Wolf, FPGA-Based System Design Pearson Education, 2004 Logic Design Process Combinational logic networks Functionality. Other requirements: Size. Power. Primary inputs Performance.

More information

ECE 551 Digital System Design and Synthesis. Instructor: Kewal K. Saluja. Midterm Exam

ECE 551 Digital System Design and Synthesis. Instructor: Kewal K. Saluja. Midterm Exam Last (family) name: First (given) name: Student I.D. #: Department of Electrical and Computer Engineering University of Wisconsin - Madison ECE 551 Digital System Design and Synthesis Instructor: Kewal

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

TSEA44: Computer hardware a system on a chip

TSEA44: Computer hardware a system on a chip TSEA44: Computer hardware a system on a chip Lecture 2: A short introduction to SystemVerilog (System)Verilog 2016-11-02 2 Assume background knowledge of VHDL and logic design Focus on coding for synthesis

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

Introduction To HDL. Verilog HDL. Debdeep Mukhopadhyay Dept of CSE, IIT Madras 1

Introduction To HDL. Verilog HDL. Debdeep Mukhopadhyay Dept of CSE, IIT Madras 1 Introduction To HDL Verilog HDL Debdeep Mukhopadhyay debdeep@cse.iitm.ernet.in Dept of CSE, IIT Madras 1 How it started! Gateway Design Automation Cadence purchased Gateway in 1989. Verilog was placed

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

Finite State Machines

Finite State Machines Finite State Machines Design methodology for sequential logic -- identify distinct states -- create state transition diagram -- choose state encoding -- write combinational Verilog for next-state logic

More information

VERILOG HDL. (and C) 1 ENGN3213: Digital Systems and Microprocessors L#5-6

VERILOG HDL. (and C) 1 ENGN3213: Digital Systems and Microprocessors L#5-6 VERILOG HDL (and C) 1 ENGN3213: Digital Systems and Microprocessors L#5-6 Some Reference Material The following are suggested reading.. http://engnet.anu.edu.au/decourses/engn3213/documents/verilog/ VerilogIntro.pdf

More information

EECS150 - Digital Design Lecture 10 Logic Synthesis

EECS150 - Digital Design Lecture 10 Logic Synthesis EECS150 - Digital Design Lecture 10 Logic Synthesis September 26, 2002 John Wawrzynek Fall 2002 EECS150 Lec10-synthesis Page 1 Logic Synthesis Verilog and VHDL stated out as simulation languages, but quickly

More information

Chapter 2 Using Hardware Description Language Verilog. Overview

Chapter 2 Using Hardware Description Language Verilog. Overview Chapter 2 Using Hardware Description Language Verilog CSE4210 Winter 2012 Mokhtar Aboelaze based on slides by Dr. Shoab A. Khan Overview Algorithm development isa usually done in MATLAB, C, or C++ Code

More information

Hardware Description Language (HDL)

Hardware Description Language (HDL) Hardware Description Language (HDL) What is the need for Hardware Description Language? Model, Represent, And Simulate Digital Hardware Hardware Concurrency Parallel Activity Flow Semantics for Signal

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

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