Graduate Institute of Electronics Engineering, NTU Design of Datapath Controllers

Size: px
Start display at page:

Download "Graduate Institute of Electronics Engineering, NTU Design of Datapath Controllers"

Transcription

1 Design of Datapath Controllers Lecturer: Wein-Tsung Shen Date: ACCESS IC LAB

2 Outline Sequential Circuit Model Finite State Machines Useful Modeling Techniques pp. 2

3 Model of Sequential Circuits Modeling system outputs depend not only on current input Depend on inputs Depend on current state Fundamental components Combinational circuits Memory elements Inputs Combinational Logic Outputs Current State Memory Elements Next State clock pp. 3

4 Types of Memory Elements Flip-Flop Latch Registers Others Register Files Cache Flash memory ROM RAM pp. 4

5 D-FF vs. D-Latch D FF is edge sensitive (can be either positive or negative edge) At trigger edge of clock, input transferred to output Latch is level sensitive (can be either active-high or active-low) When clock is active, input passes to output (transparent) When clock is not active, output stays unchanged in out in D Q clk D Q FF clk Latch E out in clk out in clk out pp. 5

6 FF Based, Edge Trigger Clocking T d = delay of combinational logic T cycle = cycle time of clock Duty cycle does not matter Timing requirements for T d T dmax < T cycle T setup T cq T dmin > T hold T cq no setup time violation no hold time violation clk FF Combinational Logic Td FF T cycle T cq T d T setup pp. 6

7 Latch Based, Single Phase Clocking Aka. Pulse Mode clocking T cycle = cycle time of clock; T w = pulse width of clock Timing requirements for T d T dmax < T cycle T dq T dmin > T w T dq data latched correctly no racing through next stage clk Latch Combinational Logic Td Latch T w T cycle T dq T d pp. 7

8 Flip-Flop Based Larger in area Comparison Larger clocking overhead (T setup, T cq ) + Design more robust Only have to worry about T dmax T dmin usually small, can be easily fixed by buffer + Pulse width does not matter Latch Based Single Phase + Smaller area + Smaller clocking overhead ( only T dq ) Worry about both T dmax and T dmin Pulse width DOES matter (unfortunately, pulse width can vary on chip) pp. 8

9 D Flip-Flop Flop with Positive-Edge Clock module flop (Q, D, C, S, R); output Q; // Flip-Flop Output input D; // Data Input input C; // Positive Edge Clock input E; // Clock Enable D C Q reg Q; // Register Type C) begin if (E) // Check Enable Q <= D; end endmodule D E C Q pp. 9

10 D Flip-Flop Flop with Positive-Edge Clock module flop (Q, D, C, S, R); output Q; // Flip-Flop Output input D; // Data Input input C; // Positive Edge Clock input R; // Asynchronous Reset input S; // synchronous Set reg Q; // Register Type C or negedge R) begin if (!R) Q <= 1 b0; else if (S) Q <= 1 b1; else Q <= D; end endmodule S D C R Q pp. 10

11 D-Latch Active High with Clear/Preset module flop (Q, D, G, C, P); output Q; // Flip-Flop Output input D; // Data Input input G; // Positive Gate input C; // synchronous Clear input P; // synchronous Preset reg Q; // Register Type or G or C or P) begin if (!C) Q <= 1 b0; else if (P) Q <= 1 b1; else if (G) Q <= D; end endmodule P D G C Q pp. 11

12 Finite State Machine ACCESS IC LAB

13 Finite State Machine Used control the circuit core Partition FSM and non-fsm part Controller Non-FSM Circuit core FSM pp. 13

14 Finite State Machines Synchronous (i.e. clocked) finite state machines (FSMs) have widespread application in digital systems, e.g. as datapath controllers in computational units and processors. Synchronous FSMs are characterized by a finite number of states and by clock-driven state transitions. Mealy Machine: The next state and the outputs depend on the present state and the inputs. Moore Machine: The next state depends on the present state and the inputs, but the output depends on only the present state. Mealy machine Moore machine Inputs Next State and Output Combinational Logic State Register Outputs Inputs Next State Combinational Logic clock State Register Output Combinational Logic Outputs clock pp. 14

15 What is FSM A model of computation consisting of a set of states, (limited number) a start state, input symbols, a transition function that maps input symbols and current states to a next state. pp. 15

16 Memory Elements (ME) Elements of FSM Memorize Current States (CS) Usually consist of FF or latch N-bit FF have 2 n possible states Next-state Logic (NL) Combinational Logic Produce next state Based on current state (CS) and input (X) Output Logic (OL) Combinational Logic Produce outputs (Z) Based on current state, or Based on current state and input pp. 16

17 Output is function of both Input and current state Mealy Machine pp. 17

18 Output is function of CS only Not function of inputs Moore Machine pp. 18

19 Mealy Finite State Machine A serially-transmitted BCD (8421 code) word is to be converted into an Excess-3 code. An Excess-3 code word is obtained by adding 3 to the decimal value and taking the binary equivalent. Excess-3 code is self-complementing [Wakerly, p. 80], i.e. the 9's complement of a code word is obtained by complementing the bits of the word. Decimal Excess-3 Digit Code Code (BCD) B in = 8 bcd LSB MSB B out = 8 Excess-3 MSB MSB B in t clk LSB Excess-3 Code Converter B out t pp. 19

20 Mealy Finite State Machine The serial code converter is described by the state transition graph of a Mealy FSM. State Transition Graph 0/1 S_0 1/0 S_1 1/0 S_2 0/1 S_3 S_4 0/0, 1/1 0/1 0/0, 1/1 1/0 S_5 S_6 input / output Next State/OutputTable next state/output state input 0 1 S_0 S_1 / 1 S_2 / 0 S_1 S_3 / 1 S_4 / 0 S_2 S_4 / 0 S_4 / 1 S_3 S_5 / 0 S_5 / 1 S_4 S_5 / 1 S_6 / 0 S_5 S_0 / 0 S_0 / 1 S_6 S_0 / 1 - / - 0/0, 1/1 The vertices of the state transition graph of a Mealy machine are labeled with the states. The branches are labeled with (1) the input that causes a transition to the indicated next state, and (2) with the output that is asserted in the present state for that input. The state transition is synchronized to a clock. 0/1 The state table summarizes the machine's behavior in tabular format. pp. 20

21 Design of a Mealy Finite State Machine To design a D-type flip-flop realization of a FSM having the behavior described by a state transition graph, (1) select a state code, (2) encode the state table, (3) develop Boolean equations describing the input of a D-type flip-flop, and (4) using K-maps, optimize the Boolean equations. Encoded Next state/ Output Table state next state output Next State/Output Table next state/output state input 0 1 S_0 S_1 / 1 S_2 / 0 S_1 S_3 / 1 S_4 / 0 S_2 S_4 / 0 S_4 / 1 S_3 S_5 / 0 S_5 / 1 S_4 S_5 / 1 S_6 / 0 S_5 S_0 / 0 S_0 / 1 S_6 S_0 / 1 - / - State Assigment q S_0 S_1 0 1 S_6 S_4 1 0 S_2 1 1 S_5 S_3 q 2 q + 2 q + 1 q + 0 input input S_ S_ S_ S_ S_ S_ S_ pp. 21

22 Design of a Mealy Finite State Machine B in S_0 S_0 S_1 S_ S_6 S_6 S_4 S_ S_5 S_5 S_3 S_3 x x 1 1 S_2 + = ' S_2 B in S_0 S_0 S_ x x 0 0 S_1 S_6 S_6 S_4 S_4 S_5 S_5 S_3 S_3 S_2 S_2 B in S_0 S_0 S_1 S_ S_6 S_6 S_4 S_ S_5 S_5 S_3 S_3 x x 1 1 S_2 + = S_2 B in q x x 1 0 S_0 S_0 S_1 S_1 S_6 S_6 S_4 S_4 S_5 S_5 S_3 S_3 S_2 S_2 Note: We will optimize the equations individually. In general -this does not necessarily produce the optimal (area, speed) realization of the logic. We'll address this when we consider synthesis. q 2 + = ' 'B in + q 2 ' B in ' + q 2 q 2 + = ' 'B in + q 2 ' B in ' + q 2 q 2 + = ' 'B in q 2 ' B in ' q 2 q 2 + = ' 'B in q 2 ' B in ' q 2 q 2 + = ' 'B in + q 2 ' B in ' + q 2 B out = q 2 'B in ' + q 2 B in pp. 22

23 Design of a Mealy Finite State Machine Realization of the sequential BCD-to-Excess-3 code converter (Mealy machine): q 2 + = ' 'B in + q 2 ' B in ' + q 2 q 2 + = ' 'B in + q 2 ' B in ' + q 2 q 2 + = ' 'B in q 2 ' B in ' q 2 ' D Q q 2 + = ' 'B in q 2 ' B in ' q 2 Q ' q 2 D Q Q ' Bin B in q 2 ' B in ' ' ' D Q Q q 2 q 2 ' B in ' B out clk pp. 23

24 Design of a Mealy Finite State Machine Simulation results for Mealy machine: B_in B_out pp. 24

25 Examples Design of A Serial Line Code Converter Serial Line Codes [Wakerly] are used for serial data time transmission or storage. NRZ Code NRZI Code RZ Code Manchester Code Serial Bit Value B_in NRZ Mealy NRZ Moore NRZI Mealy NRZI Moore RZ Manchester clock_1 clock_2 pp. 25

26 Serial Line Code Converter Mealy FSM Objective: Design a Mealy-type FSM that converts a data stream in NRZ format to a data stream in Manchester code format. Data NRZ NRZ-to- Manchester Code Converter Data Manchester time Serial Bit Value S_2 1 / 0 S_0 0 / 1 S_1 B_in 1 / 1 0 / 0 NRZ Mealy Manchester clock_1 clock_2 pp. 26

27 Serial Line Code Converter Mealy FSM State Transition Graph State Code: 1 / 0 0 / S_2 S_0 S_1 0 S_0 S_1 1 / 1 0 / 0 1 S_2 State Table: next state/output state input 0 1 S_0 S_1 / 0 S_2 / 1 S_1 S_0 / 1 - S_2 - S_0 / 0 Encoded State Table: state next state output q + 1 q + 0 input input S_ S_ S_ pp. 27

28 Encoded State Table: Graduate Institute of Electronics Engineering, NTU Serial Line Code Converter Mealy FSM state next state output + + input input S_ S_ S_ ' ' D Q B_in' q Q 0 ' ' B in ' D Q B q Q 1 ' in clk B out Karnaugh Maps: B in S_0 0 0 S_1 - - S_0 S_1 0 S_2 0 S_2 + = ' 'B in B in S_0 0 0 S_ S_2 S_0 S_1 S_2 + = ' 'B in ' B in S_0 1 1 S_ S_2 S_0 S_1 S_2 B out = ' ( + B in ) pp. 28

29 Serial Line Code Converter Mealy FSM Input and output bit times coincide Note: The Mealy machine's output is subject to glitches in the input bit stream. pp. 29

30 Serial Line Code Converter Moore FSM Objective: Design a Moore-type FSM that converts a data stream in NRZ format to a data stream in Manchester code format. Data NRZ NRZ-to- Manchester Code Converter Data Manchester time Serial Bit Value S_0 0 0 S_1 0 B_in NRZ Mealy Manchester clock_1 1 S_ S_2 1 0 clock_2 pp. 30

31 Serial Line Code Converter Moore FSM State Transition Graph S_0 0 0 S_1 0 State Code: S_0 S_1 0 1 S_2 S_3 S_3 1 1 S_2 1 State Table: Encoded State Table: state next state/output input 0 1 S_0 S_1 / 0 S_3 / 1 S_1 S_2 / 1 - S_3 - S_0 / 1 S_2 S_1 / 0 S_3 / 0 state next state output q + 1 q + 0 input 0 1 S_ S_ S_ S_ pp. 31

32 Encoded State Table: Karnaugh Maps: Graduate Institute of Electronics Engineering, NTU Serial Line Code Converter Moore FSM state next state output + + input 0 1 S_ S_ S_ S_ ' ' B in B out D Q Q ' clk D Q q Q 0 ' B in S_0 1 - S_1-0 S_3 S_0 S_1 S_3 0 S_2 1 S_2 + = ' + 'B in B in S_0 0 - S_1 - S_3 S_ S_2 S_1 S_3 S_2 + = ' S_0 1 1 S_1 S_0 S_1 B_out = pp. 32

33 Serial Line Code Converter Moore FSM NRZ bit time Manchester bit time Note: The Manchester encoder must run at twice the frequency of the incoming data. The output bit stream lags the input bit stream by one-half the input cycle time. pp. 33

34 Building Behavioral Models ACCESS IC LAB

35 Modeling FSM in Verilog Sequential Circuits Memory elements of States (CS) Combinational Circuits Next-state Logic (NL) Output Logic (OL) Three coding styles (1) Separate CS, OL and NL (2) Combines NL+ OL, separate CS (3) Combine CS + NL, separate OL pp. 35

36 CS Graduate Institute of Electronics Engineering, NTU Coding Style 1 Separate CS, NL, OL NL OL pp. 36

37 CS Graduate Institute of Electronics Engineering, NTU Coding Style 2 Combine NL+OL; Separate CS NL+OL pp. 37

38 CS+NL Graduate Institute of Electronics Engineering, NTU Coding Style 3 Combine CS+NL; Separate OL OL pp. 38

39 Behavioral Models of FSM Example1 brake=0 accelerator=1 brake=0 accelerator=1 low speed medium speed brake=1 brake=1 brake=1 stopped high speed brake=1 brake=0 accelerator=1 brake accelerator clock speed brake=0 accelerator=1 pp. 39

40 Verilog Coding 1 (CS, NL, OL) module speed_machine ( clock, accelerator, brake, speed ); input clock, accelerator, brake; output [1:0] speed; reg [1:0] current_state, next_state; // state encoding parameter stopped = 2`b00; parameter s_slow = 2`b01; parameter s_medium = 2`b10; parameter s_high = 2`b11; // CS ( posedge clock ) current_state <= next_state; // OL, Output Logic assign speed = current_state; // NL, Next-state Logic always@( state or accelerator or brake ) if ( brake == 1`b1 ) case ( current_state ) stopped: next_state <= stopped; s_low: next_state <= stopped; s_medium:next_state <= s_low; s_high: next_state <= s_medium; default: next_state <= stopped; endcase else if ( accelerator == 1`b1 ) case ( current_state ) stopped: next_state <= s_low; s_low: next_state <= s_medium; s_medium:next_state <= s_high; s_high: next_state <= s_high; default: next_state <= stopped; endcase else next_state <= current_state; endmodule pp. 40

41 Verilog Coding 3 (CS+NL, OL) module speed_machine2 ( clock, accelerator, brake, speed ); input clock, accelerator, brake; output [1:0] speed; reg [1:0] speed; `define stopped 2`b00 `define s_low 2`b01 `define s_medium 2`b10 `define s_high 2`b11 // OL is empty // because speed itself is state // NL + CS ( posedge clock ) if ( brake == 1`b1 ) case ( speed ) `stopped: speed <= `stopped; `s_low: speed <= `stopped; `s_medium:speed <= `s_low; `s_high: speed <= `s_medium; default: speed <= `stopped; endcase else if ( accelerator == 1`b1 ) case ( speed ) `stopped: speed <= `s_low; `s_low: speed <= `s_medium; `s_medium:speed <= `s_high; `s_high: speed <= `s_high; default: speed <= `stopped; endcase endmodule pp. 41

42 State encoding pp. 42

43 FSM Design Conclusion Partition FSM and non-fsm logic Partition combinational part and sequential part Use parameter to define names of the state vector Assign a default (reset) state pp. 43

44 Homework #4 Design a traffic signal controller at crossroads One pair traffic signal controller State Diagram State Coding Performance [Optional] With interrupt/extra setting 1 2 Other example: Automatic Vending Machine Automatic Teller Machine 2 1 pp. 44

45 Useful Modeling Techniques ACCESS IC LAB

46 Learning Objectives Describe procedural continuous assignment statements assign, deassign, force, and release. Understand how to override parameters by using the defparam statement at the time of module instantiation. Explain conditional compilation and execution of parts of the Verilog. Identify system tasks for file output, displaying hierarchy, strobing, random number generation, memory initialization, and value change dump. pp. 46

47 Procedural Continuous Assignments Procedural Assignments assign a value to a register. The value stays in the register until another procedural assignment puts another value in that register. Procedural Continuous Assignments behave differently. They are procedural statements which allow value of expressions to be driven continuously onto register or net for limited periods of time. They override existing assignments to a register or net, They provide an useful extension to regular procedural assignment statement. pp. 47

48 assign & deassign First type of procedural continuous assignment. The LHS of procedural continuous assignments can only be a register or a concatenation of registers. It cannot be a part or bit select of a net or an array of registers. Procedural continuous assignments override the effect of regular procedural assignments. Procedural continuous assignments are normally used for controlled periods of time. pp. 48

49 Example module edge_dff(q, qbar, d, clk, reset); output q, qbar; input d, clk, reset; reg q, qbar; clk) begin q = d; qbar = ~d; end if (reset) begin assign q = 1 b0; assign qbar = 1 b1; end else begin deassign q; deassign qbar; end endmodule pp. 49

50 force & release Second form of the procedural continuous assignments. They can be used to override assignments on both register and nets. Typically, used in the interactive debugging process, where certain registers or nets are forced to a value and the effect on other registers and nets is noted. They not be used inside design blocks. They should appear only in stimulus or as debug statements. pp. 50

51 Example module stimulus; // instantiate the d-flip-flop edge_dff dff(q, Qbar, D, CLK, RESET); initial begin // these statements force value of 1 // on dff.q between time 50 and 100, // regardless of the actual output of // the edge_dff #50 force dff.q = 1 b1; #50 release dff.q; end endmodule module top; assign out = a & b & c; initial begin #50 force out = a b & c; #50 release; end endmodule pp. 51

52 Overriding Parameters Parameters can be defined in a module definition. However, during compilation of Verilog modules, parameter values can be altered separately for each module instance. this allows us to pass a distinct set of parameter values to each module during compilation regardless of predefined parameter values. Two ways to override parameter values: defparam statement module instance parameter value assignment. pp. 52

53 Example // Define a module hello_world module hello_world; parameter id_num = 0; // define a module identification number = 0 initial $display( Displaying hello_world id number = %d, id_num); endmodule // Define top-level module module top; // Change parameter values in the instantiated modules // Use defparam statement defparam w1.id_num = 1, w2.id_num = 2; // Instantiate two hello_world modules hello_world w1( ); hello_world w2( ); Displaying hello_world id number = 1 Displaying hello_world id number = 2 endmodule pp. 53

54 Condition Compilation and Execution A portion of Verilog might be suitable for one environment and not for the other. The designer does not wish to create two versions of Verlog design for the two environments. Instead, the designer can specify that the particular portion of the code be compiled only if certain flag is set. This is called conditional compilation. A designer might also want to execute certain parts of the Verilog design only when a flag is set at run time. This is called conditional execution. pp. 54

55 Conditional Compilation Conditional compilation can be accomplished by using compiler directives `ifdef, `else, and `endif. // Conditional Compilation // Example 1 `ifdef TEST // compile module test only if module test; // text marco TEXT is defined endmodule `else // compile the stimulus as default module stimulus; endmodule `endif // completion // Conditional Compilation // Example 2 module top; bus_master b1 ( ); `ifdef ADD_B2 bus_master b2 ( ); `endif endmodule pp. 55

56 Conditional Execution Conditional execution flags allow the designer to control statement execution flow at run time. All statements are compiled but executed conditionally. Conditional execution flags can be used only for behavioral statements. The system task keywork $test$plusargs is used for conditional execution. // Conditional Execution module test; initial begin end if ($test$plusargs( DISPLAY_VAR )) $display( Display = %b, {a, b, c} ); // display only if flag is set else endmoduel $display( No Display ); // otherwise no display pp. 56

57 File Output Files Open/Write/Close Opening a file integer filepointer; initial filepointer = $fopen( file.out ); Writing to file fdisplay(filepointer, Display ); fmonitior(filepointer, P1=%b, P1); Closing files $fclose(filepointer); pp. 57

58 Strobing Useful System Tasks The $strobe task is very similar to the $display task except for a slight difference The $strobe task provides a synchronization mechanism to ensure that data is displayed only after all other assignment statements. Random Number Generation $random; or $random(seed); returns a 32-bit random number. pp. 58

59 Useful System Tasks Initializing memory form file reg[7:0] memory[0:7]; initial begin $readmemb( init.dat, memory); // display contents of initialized memory for (i=0; i<8; i=i+1) $display( Memory[%0d] = %b, i, memory[i]); end Memory[0] = xxxxxxxx Memory[1] = xxxxxxxx Memory[2] = Memory[3] = Memory[4] = Memory[5] = Memory[6] = 1111zzzz Memory[7] = zzzz uninitialized locations default to x pp. 59

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

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

One and a half hours. Section A is COMPULSORY

One and a half hours. Section A is COMPULSORY One and a half hours Section A is COMPULSORY An additional answersheet is provided for Question 4. Please remember to complete the additional answersheet with your University ID number and attach it to

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

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

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

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

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

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

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

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

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

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

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

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

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

Outline. EECS Components and Design Techniques for Digital Systems. Lec 11 Putting it all together Where are we now?

Outline. EECS Components and Design Techniques for Digital Systems. Lec 11 Putting it all together Where are we now? Outline EECS 5 - Components and Design Techniques for Digital Systems Lec Putting it all together -5-4 David Culler Electrical Engineering and Computer Sciences University of California Berkeley Top-to-bottom

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

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

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

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

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

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

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

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

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

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

Course Topics - Outline

Course Topics - Outline Course Topics - Outline Lecture 1 - Introduction Lecture 2 - Lexical conventions Lecture 3 - Data types Lecture 4 - Operators Lecture 5 - Behavioral modeling A Lecture 6 Behavioral modeling B Lecture 7

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

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

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

Techniques for Digital Systems Lab. Verilog HDL. Tajana Simunic Rosing. Source: Eric Crabill, Xilinx

Techniques for Digital Systems Lab. Verilog HDL. Tajana Simunic Rosing. Source: Eric Crabill, Xilinx CSE140L: Components and Design Techniques for Digital Systems Lab Verilog HDL Tajana Simunic Rosing Source: Eric Crabill, Xilinx 1 More complex behavioral model module life (n0, n1, n2, n3, n4, n5, n6,

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

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

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

CSE140L: Components and Design Techniques for Digital Systems Lab. FSMs. Instructor: Mohsen Imani. Slides from Tajana Simunic Rosing

CSE140L: Components and Design Techniques for Digital Systems Lab. FSMs. Instructor: Mohsen Imani. Slides from Tajana Simunic Rosing CSE4L: Components and Design Techniques for Digital Systems La FSMs Instructor: Mohsen Imani Slides from Tajana Simunic Rosing Source: Vahid, Katz Flip-flops Hardware Description Languages and Sequential

More information

Parallel versus serial execution

Parallel versus serial execution Parallel versus serial execution F assign statements are implicitly parallel Ì = means continuous assignment Ì Example assign E = A & D; assign A = B & C; Ì A and E change if B changes F always blocks

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

EN164: Design of Computing Systems Lecture 07: Lab Foundations / Verilog 3

EN164: Design of Computing Systems Lecture 07: Lab Foundations / Verilog 3 EN164: Design of Computing Systems Lecture 07: Lab Foundations / Verilog 3 Professor Sherief Reda http://scaleenginbrownedu Electrical Sciences and Computer Engineering School of Engineering Brown University

More information

ECEN 468 Advanced Digital System Design

ECEN 468 Advanced Digital System Design ECEN 468 Advanced Digital System Design Lecture 23: Verilog Finite State Machines ECEN468 Lecture 23 Finite State Machines input Mealy Machine Next state and output Combinational logic Register output

More information

Digital Integrated Circuits

Digital Integrated Circuits Digital Integrated Circuits Lecture 4 Jaeyong Chung System-on-Chips (SoC) Laboratory Incheon National University BCD TO EXCESS-3 CODE CONVERTER 0100 0101 +0011 +0011 0111 1000 LSB received first Chung

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

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

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences Introductory Digital Systems Lab (6.111) uiz - Spring 2004 Prof. Anantha Chandrakasan Student Name: Problem

More information

RTL Design (Using ASM/SM Chart)

RTL Design (Using ASM/SM Chart) Digital Circuit Design and Language RTL Design (Using ASM/SM Chart) Chang, Ik Joon Kyunghee University Process of Logic Simulation and Synthesis Design Entry HDL Description Logic Simulation Functional

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

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

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

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

Verilog for Synthesis Ing. Pullini Antonio

Verilog for Synthesis Ing. Pullini Antonio Verilog for Synthesis Ing. Pullini Antonio antonio.pullini@epfl.ch Outline Introduction to Verilog HDL Describing combinational logic Inference of basic combinational blocks Describing sequential circuits

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

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

Speaker: Kayting Adviser: Prof. An-Yeu Wu Date: 2009/11/23

Speaker: Kayting Adviser: Prof. An-Yeu Wu Date: 2009/11/23 98-1 Under-Graduate Project Synthesis of Combinational Logic Speaker: Kayting Adviser: Prof. An-Yeu Wu Date: 2009/11/23 What is synthesis? Outline Behavior Description for Synthesis Write Efficient HDL

More information

Digital Design Using Digilent FPGA Boards -- Verilog / Active-HDL Edition

Digital Design Using Digilent FPGA Boards -- Verilog / Active-HDL Edition Digital Design Using Digilent FPGA Boards -- Verilog / Active-HDL Edition Table of Contents 1. Introduction to Digital Logic 1 1.1 Background 1 1.2 Digital Logic 5 1.3 Verilog 8 2. Basic Logic Gates 9

More information

Writing Circuit Descriptions 8

Writing Circuit Descriptions 8 8 Writing Circuit Descriptions 8 You can write many logically equivalent descriptions in Verilog to describe a circuit design. However, some descriptions are more efficient than others in terms of the

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

Verilog Sequential Logic. Verilog for Synthesis Rev C (module 3 and 4)

Verilog Sequential Logic. Verilog for Synthesis Rev C (module 3 and 4) Verilog Sequential Logic Verilog for Synthesis Rev C (module 3 and 4) Jim Duckworth, WPI 1 Sequential Logic Module 3 Latches and Flip-Flops Implemented by using signals in always statements with edge-triggered

More information

Synthesis of Language Constructs. 5/10/04 & 5/13/04 Hardware Description Languages and Synthesis

Synthesis of Language Constructs. 5/10/04 & 5/13/04 Hardware Description Languages and Synthesis Synthesis of Language Constructs 1 Nets Nets declared to be input or output ports are retained Internal nets may be eliminated due to logic optimization User may force a net to exist trireg, tri0, tri1

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

Mealy and Moore examples

Mealy and Moore examples CSE 37 Spring 26 Introduction to igital esign ecture 2: uential ogic Technologies ast ecture Moore and Mealy Machines Today uential logic technologies Ving machine: Moore to synch. Mealy OPEN = creates

More information

Problem Set 2 Solutions

Problem Set 2 Solutions Problem Set 2 Solutions ECE 551: Digital System Design and Synthesis Fall 2001 1. A tabular description and a known good behavioral specification is given for a priority encoder. x indicates don t care

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

EN164: Design of Computing Systems Lecture 06: Lab Foundations / Verilog 2

EN164: Design of Computing Systems Lecture 06: Lab Foundations / Verilog 2 EN164: Design of Computing Systems Lecture 06: Lab Foundations / Verilog 2 Professor Sherief Reda http://scaleenginbrownedu Electrical Sciences and Computer Engineering School of Engineering Brown University

More information

Finite State Machines

Finite State Machines Lab Workbook Introduction (FSM) are sequential circuit used in many digital systems to control the behavior of systems and dataflow paths. Examples of FSM include control units and sequencers. This lab

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

Course Topics - Outline

Course Topics - Outline Course Topics - Outline Lecture 1 - Introduction Lecture 2 - Lexical conventions Lecture 3 - Data types Lecture 4 - Operators Lecture 5 - Behavioral modeling A Lecture 6 Behavioral modeling B Lecture 7

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

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

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment Assignment 1. What is multiplexer? With logic circuit and function table explain the working of 4 to 1 line multiplexer. 2. Implement following Boolean function using 8: 1 multiplexer. F(A,B,C,D) = (2,3,5,7,8,9,12,13,14,15)

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

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

Injntu.com Injntu.com Injntu.com R16

Injntu.com Injntu.com Injntu.com R16 1. a) What are the three methods of obtaining the 2 s complement of a given binary (3M) number? b) What do you mean by K-map? Name it advantages and disadvantages. (3M) c) Distinguish between a half-adder

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

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE One and a half hours Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE Fundamentals of Computer Engineering Date: Thursday 21st January 2016 Time: 14:00-15:30 Answer BOTH Questions

More information

Federal Urdu University of Arts, Science and Technology, Islamabad VLSI SYSTEM DESIGN. Prepared By: Engr. Yousaf Hameed.

Federal Urdu University of Arts, Science and Technology, Islamabad VLSI SYSTEM DESIGN. Prepared By: Engr. Yousaf Hameed. VLSI SYSTEM DESIGN Prepared By: Engr. Yousaf Hameed Lab Engineer BASIC ELECTRICAL & DIGITAL SYSTEMS LAB DEPARTMENT OF ELECTRICAL ENGINEERING VLSI System Design 1 LAB 01 Schematic Introduction to DSCH and

More information

Modeling of Finite State Machines. Debdeep Mukhopadhyay

Modeling of Finite State Machines. Debdeep Mukhopadhyay Modeling of Finite State Machines Debdeep Mukhopadhyay Definition 5 Tuple: (Q,Σ,δ,q 0,F) Q: Finite set of states Σ: Finite set of alphabets δ: Transition function QχΣ Q q 0 is the start state F is a set

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

Finite State Machines

Finite State Machines Lab Workbook Introduction (FSM) are sequential circuit used in many digital systems to control the behavior of systems and dataflow paths. Examples of FSM include control units and sequencers. This lab

More information

B.10 Finite State Machines B.10

B.10 Finite State Machines B.10 B.10 Finite State Machines B-67 128-bit word needs 8. This type of code is called a Hamming code, after R. Hamming, who described a method for creating such codes. B.10 Finite State Machines B.10 As we

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

ECE 4514 Digital Design II. Spring Lecture 2: Hierarchical Design

ECE 4514 Digital Design II. Spring Lecture 2: Hierarchical Design ECE 4514 Digital Design II Spring 2007 Abstraction in Hardware Design Remember from last lecture that HDLs offer a textual description of a netlist. Through abstraction in the HDL, we can capture more

More information

Sequential Logic Implementation. Mealy vs. Moore Machines. Specifying Outputs for a Mealy Machine. Specifying Outputs for a Moore Machine

Sequential Logic Implementation. Mealy vs. Moore Machines. Specifying Outputs for a Mealy Machine. Specifying Outputs for a Moore Machine uential Logic Implementation! Models for representing sequential circuits " bstraction of sequential elements " Finite state machines and their state diagrams " Inputs/ " Mealy, Moore, and synchronous

More information

Topics. Midterm Finish Chapter 7

Topics. Midterm Finish Chapter 7 Lecture 9 Topics Midterm Finish Chapter 7 ROM (review) Memory device in which permanent binary information is stored. Example: 32 x 8 ROM Five input lines (2 5 = 32) 32 outputs, each representing a memory

More information

Registers and finite state machines

Registers and finite state machines Registers and finite state machines DAPA E.T.S.I. Informática Universidad de Sevilla /22 Jorge Juan 2, 2, 22 You are free to copy, distribute and communicate this work publicly and

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

problem maximum score 1 10pts 2 8pts 3 10pts 4 12pts 5 7pts 6 7pts 7 7pts 8 17pts 9 22pts total 100pts

problem maximum score 1 10pts 2 8pts 3 10pts 4 12pts 5 7pts 6 7pts 7 7pts 8 17pts 9 22pts total 100pts University of California at Berkeley College of Engineering epartment of Electrical Engineering and Computer Sciences EECS150 J. Wawrzynek Spring 2003 2/21/03 Exam I Solutions Name: I number: This is a

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

Laboratory Exercise 3

Laboratory Exercise 3 Laboratory Exercise 3 Latches, Flip-flops, and egisters The purpose of this exercise is to investigate latches, flip-flops, and registers. Part I Altera FPGAs include flip-flops that are available for

More information

Digital System Design with SystemVerilog

Digital System Design with SystemVerilog Digital System Design with SystemVerilog Mark Zwolinski AAddison-Wesley Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Paris Madrid Capetown Sydney Tokyo

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

Creating Safe State Machines

Creating Safe State Machines Creating Safe State Machines Definition & Overview Finite state machines are widely used in digital circuit designs. Generally, when designing a state machine using a hardware description language (HDL),

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

St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad-500 014 Subject: Digital Design Using Verilog Hdl Class : ECE-II Group A (Short Answer Questions) UNIT-I 1 Define verilog HDL? 2 List levels of

More information

Microcomputers. Outline. Number Systems and Digital Logic Review

Microcomputers. Outline. Number Systems and Digital Logic Review Microcomputers Number Systems and Digital Logic Review Lecture 1-1 Outline Number systems and formats Common number systems Base Conversion Integer representation Signed integer representation Binary coded

More information

Verilog Essentials Simulation & Synthesis

Verilog Essentials Simulation & Synthesis Verilog Essentials Simulation & Synthesis Course Description This course provides all necessary theoretical and practical know-how to design programmable logic devices using Verilog standard language.

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