Building Bigger Systems: Hardware Threads

Size: px
Start display at page:

Download "Building Bigger Systems: Hardware Threads"

Transcription

1 ! uilding igger Systems: Hardware Threads Lecture L dvanced igital esign ECE epartment Many elements on Thomas, 2014, used with permission with credit to G. Larson

2 Today We build on our knowledge of FSMs Want to make more complex systems - Stuff that "Computes" How should they be organized? How should we think about them? This material often not taught in igital esign Class 2

3 Sequential Systems Every synchronous sequential design can be classified as a finite-state machine - all that really means is that it has a finite number of flip-flop/ registers in the design Intel Itanium2 has more than 2 27 state bits and more than 2 (2^27) distinguishable states - No. There is not a gigantic state-transition diagram somewhere - Yes. There are control FSMs (the way you understand FSMs now) may be many tens of states in the largest ones more complicated control exists as many cooperating FSMs - The majority of the logic is in the datapath very stylistic usage of state and logic a very different way of design 3

4 Motivation: serial adder example dd two N-bit numbers in serial - unsigned numbers appear (i, i) - 1 bit per cycle (LS first) starting after reset - assert done, Cout and sum when the computation is finished Reset...i...i N done Cout sum Clk How many different states does this FSM need? 4

5 reset If you don t know any better init 1,1 "1+1" 0,0 1,0 0,1 "1+0" "0+0" "0+1" 0,0 0,1 1,1 "00+ 10" "01+ 01" 1,0 0,0 0,1 "01+ 00" "00+ 01" "00+ 00" 0,0 " " 1,1 "01+1 1" 1,0 "01+ 10" "00+1 1" 1, " 1,0 0, " " " This could work, but obviously not recommended

6 better idea: datapath + control Much of the functionality can be built with pieces you already know how to use (Full dder, FFs)..a i..b i ci co Full dder s sum Still need something to control the system Use a FSM for control - at reset, carry flip flop gets cleared (perhaps also the sum bits) - you need to count from 0 to N-1 after reset - when FSM is N-1, you need to signal done - only N states and log2 N state bits!! 6

7 These are called datapaths atapaths - ata is stored in the registers - Flows along the lines - Is transformed or selected by the combinational components e.g., adder, mux - Loaded into another register What can this datapath do? - increment: sum = sum + 1 ld_l=0, cl_l=1, sel=1 - add_input: sum = sum + input ld_l=0, cl_l=1, sel=0 - synchronous clear of sum, cl_l=0 Inputs sel, ld_l, cl_l are called control points ld_l clock cl_l sel Input dder Sum Q Mux 6 6'b1 6

8 Computations In combinational logic, (think oolean algebra here) - sum = a b cin, and - cout = a b + a cin + b cin - all the variables are 1-bit values In register-transfer level systems, we say - a = b + c (addition!) don t think oolean algebra here, think C or SystemVerilog - oh, and by the way: they re all 37-bit numbers, the add occurs in FSM state 17 the result is stored in a register containing a bunch of FFs collectively called a The difference: the level of abstraction - We re describing computations, the order and FSM state they occur in, what components registers, LUs they use - It looks a little like programming 8

9 What can this circuit do? Three supported RTs - sum = sum + input - sum = 0 - sum = sum What is sum in this case? The state of a computation dder Input With proper sequencing we can do a computation: sum=0; for (i=0, i<2; i++) sum += Input; ld_l clock cl_l Q 16 What provides the proper sequencing? - Finite State Machine 9

10 FSM sequencing reset_l ld_l = 1 cl_l = 0 16 Input ld_l = 0 cl_l = 1 control datapath dder 16 ld_l C ld_l = 0 cl_l = 1 clock cl_l Q 16 sum=0; for (i=0, i<2; i++) sum += Input; It clears Q to zero and then adds input in each successive state 10

11 Tracing the state changes C ld_l=1,cl_l=0 ld_l=0,cl_l=1 ld_l=0,cl_l=1 16 Input sum=0 sum += input sum += input reset_l dder C Q 16 ld_l = 1 cl_l = 0 Clk Clk Q ld_l clock cl_l Q 16 ld_l = 0 cl_l = 1 Clk Q C reset_l C ld_l = 0 cl_l = 1 11

12 Generalize on what we just did FSM- finite state machine with a datapath - The finite state machine is what we ve been studying - datapath is combinational logic and registers that can do computation (sometimes spelled data-path, or data path) - What senses and controls the computation? The FSM FSM- is often called a Hardware Thread inputs outputs FSM atapath clock reset 12

13 What s this Look Like in SysVerilog? module top #(parameter W = 16) (input logic [W-1:0] input, input logic clock, rst_l); no connection 16 Input logic cl_l, ld_l; logic [W-1:0] sum, addout; adder #(W) a1 (input, sum, 1'b0, addout, ); regload #(W) r1 (addout, ld_l, cl_l, clock, rst_l, sum); ld_l clock dder 16 fsm endmodule: top c1 (clock, rst_l, ld_l, cl_l); cl_l Q 16 The module def s: module regload (d, ld_l, cl_l, clk, reset_l, q); module adder (,, Cin, Sum, Cout); 13

14 How about the FSM Module? module fsm (input logic clk, rst_l, output logic ld_l, cl_l); enum logic [2:0] {=3'b100, =3'b010, C=3'b001} ns, cs; always_comb unique case (cs) : begin //load zero ns = ; cl_l = 0; ld_l = 1; end : begin //add input ns = C; cl_l = 1; ld_l = 0; end C: begin //add input ns = ; cl_l = 1; ld_l = 0; end endcase clk, negedge rst_l) if (~rst_l) cs <= ; else cs <= ns; reset_l ld_l = 1 cl_l = 0 ld_l = 0 cl_l = 1 C ld_l = 0 cl_l = 1 endmodule: fsm 14

15 Termination Our solution doesn't exactly match our specification - i.e. the code snippet sum=0; for (i=0, i<2; i++) sum += Input; When complete, our FSM loops to do it again If we care, then go to a "finish" state and stay there reset_l ld_l = 1 cl_l = 0 Computes eternally reset_l ld_l = 1 cl_l = 0 Computes once Holds answer eternally ld_l = 0 cl_l = 1 ld_l = 0 cl_l = 1 C ld_l = 0 cl_l = 1 C ld_l = 0 cl_l = 1 Stop ld_l = 1 cl_l = 1 1

16 Thorough Example Problem statement - When the d_in_ready signal is asserted, read the 30-bit input word (d_in), count the number of bits in it that are set to one, make this -bit number available at the d_out output, assert the d_out_ready signal, and wait for the next d_in_ready signal d_in_ready What components do we need? - To store the input word? 30-bit shift register d_in clock reset Ones Counter FSM atapath d_out_ready d_out - To count the number of ones? -bit up counter - To count the number of bits examined? -bit up-counter - To determine when we are done? Comparator (count to 30) 16

17 Example: atapath Components TW, this is but one approach to this datapath problem load_l shift_l 30 Shift Register lowbit We ll load this register when the d_in_ready signal is asserted. Then we ll shift it right 30 times, each time looking at the low-order output bit (bit 0) clr_l clr_l inc_l Shift Count Register inc_l Ones Count Register 'd30 This register will count the number of 1s we see on the low order bit of the shift register This register will count from zero to 30. The comparator will tell us when we re done comparator eq done 17

18 Start Piecing the System Together atapath inputs and outputs d_in 30 clr_l load_l inc_l Ones Count Register shift_l Shift Register d_in_ ready lowbit d_out clr_l clock reset FSM inc_l done Shift Count Register comparator 'd30 d_out_ ready 18

19 Start Piecing the System Together atapath control points - Inputs to the datapath used by FSM to control the datapath d_in 30 clr_l load_l inc_l Ones Count Register shift_l Shift Register d_in_ ready lowbit d_out clr_l clock reset FSM inc_l done Shift Count Register comparator 'd30 d_out_ ready 19

20 Start Piecing the System Together atapath status points - Values in datapath used by the FSM on state transitions d_in 30 clr_l load_l inc_l Ones Count Register shift_l Shift Register d_in_ ready lowbit d_out clr_l clock reset FSM inc_l done Shift Count Register comparator 'd30 d_out_ ready 20

21 Start Piecing the System Together Hook up the rest of the inputs and outputs d_in 30 clr_l load_l inc_l Ones Count Register shift_l Shift Register d_in_ ready lowbit d_out clr_l clock reset FSM inc_l done Shift Count Register comparator 'd30 d_out_ ready 21

22 The FSM state by state Reset ~ d_in_ready d_in_ready / Cclr_L, Sload_L, Oclr_L Cclr_L Cinc_L done Shift Count Register SC comparator 30 'd30 Sload_L Sshift_L Shift Register lowbit When we get to this state, what will be the values in the registers? Oclr_L Oinc_L Ones Count Register Note: we re only showing the output signals asserted in each state 22

23 FSM arc by arc Reset ~ d_in_ready d_in_ready / Cclr_L, Sload_L, Oclr_L Cclr_L Cinc_L done Shift Count Register SC comparator 30 'd30 lowit & (~ done) / Oinc_L, Cinc_L, Sshift_L Sload_L Sshift_L Shift Register lowbit If the low bit is 1, and the shift count is not 30, increment the counters and shift Oclr_L Oinc_L Ones Count Register 23

24 FSM arc by arc Reset ~ d_in_ready d_in_ready / Cclr_L, Sload_L, Oclr_L Cclr_L Cinc_L done Shift Count Register SC comparator 30 'd30 lowit & (~ done) / Oinc_L, Cinc_L, Sshift_L Sload_L Sshift_L Shift Register lowbit ~lowit & (~ done) / Cinc_L, Sshift_L Oclr_L Oinc_L Ones Count Register If the low bit is 0 and the shift count is not 30, inc the shift counter and shift. on t enable One s Count 24

25 nd a final arc Reset done / _out_ready ~ d_in_ready d_in_ready / Cclr_L, Sload_L, Oclr_L Cclr_L Cinc_L done Shift Count Register SC comparator 30 'd30 Sload_L Sshift_L Shift Register lowit & (~ done) / Oinc_L, Cinc_L, Sshift_L lowbit ~lowit & (~ done) / Cinc_L, Sshift_L When the shift count is 30, signal _out_ready Oclr_L Oinc_L Ones Count Register 2

26 Specify the Main Module module OnesCount #(parameter w = 30) (input logic input logic output logic d_in_ready, clock, reset, d_out_ready, d_in, input logic [w-1:0] output logic [$clog2(w)-1:0] d_out); // ceiling of log2 of w $clog2(i) is a system function (indicated by the $ ) that calculates the ceiling of log2(i) //instantiate FSM and atapath components here endmodule: OnesCount Ones Counter d_in_ready d_in d_out_ready d_out FSM atapath clock reset 26

27 FSM SystemVerilog: State module fsm #( ) (clock, reset, ); enum logic { = 1'b0, = 1'b1} cur_state, n_state; always_comb begin case (cur_state) : begin //State n_state = d_in_ready? : ; Cclr_L = d_in_ready? 0 : 1; Sload_L = d_in_ready? 0 : 1; Oclr_L = d_in_ready? 0 : 1; Sshift_L = 1; Cinc_L = 1; Oinc_L = 1; dor = 0; // _out_ready end : begin //State end endcase end clock, posedge reset) if (reset) cur_state <= ; else cur_state <= n_state; Reset done / _out_ready ~lowit & (~ done) / Cinc_L, Sshift_L ~ d_in_ready d_in_ready / Cclr_L, Sload_L, Oclr_L lowit & (~ done) / Oinc_L, Cinc_L, Sshift_L endmodule: fsm 27

28 FSM SystemVerilog: State module fsm #( ) (clock, reset, ); enum logic { = 1'b0, = 1'b1} cur_state, n_state; always_comb begin case (cur_state) : begin //State : begin //State n_state = (done)? : ; dor = (done)? 1 : 0; Cclr_L = 1; Sload_L = 1; Oclr_L = 1; Cinc_L = (done)? 1 : 0; Sshift_L = (done)? 1 : 0; Oinc_L = (done)? 1:~lowit; end endcase end endmodule: fsm Reset done / _out_ready ~lowit & (~ done) / Cinc_L, Sshift_L ~ d_in_ready d_in_ready / Cclr_L, Sload_L, Oclr_L lowit & (~ done) / Oinc_L, Cinc_L, Sshift_L 28

29 More module OnesCount #(parameter w = 30) (input logic d_in_ready, clock, reset, input logic [w-1:0] d_in, output logic dor, output logic [$clog2(w)-1:0] d_out); logic lowit, done, Cclr_L, Cinc_L; logic Sload_L, Sshift_L, Oclr_L; logic Oinc_L, dor; logic [$clog2(w)-1:0] SC; fsm #(w) control (.*); ShiftReg_PISO_Right #(w) sr (lowit, d_in, clk, Sload, Sshift); counter #($clog2(w)) sc (clock, Cclr_L, Cinc_L, SC); compare #($clog2(w)) cmp (, done,, SC, 'd30); counter #($clog2(w)) oct (clock, Oclr_L, Oinc_L, d_out); endmodule: OnesCount module fsm #(parameter w = 30) (input logic clock, reset, done, input logic d_in_ready, lowit, input logic [$clog2(w):0] SC, output logic Cclr_L, Cinc_L, Sload_L, Sshift_L, Oclr_L, Oinc_L, dor); enum logic { = 1'b0, = 1'b1} cur_state, n_state; always_comb begin case (cur_state) : begin //State endcase end clock, posedge reset) begin if (reset) cur_state <= ; else cur_state <= n_state; end endmodule: fsm

30 Trace a Transition CLK dinready Reset ~ d_in_ready Cclr_L Sload Oclr_L SC? 0 done / _out_ready d_in_ready / Cclr_L, Sload_L, Oclr_L OC? 0 ShiftReg? input lowit Oinc_L? lowit & (~ done) / Oinc_L, Cinc_L, Sshift_L ~lowit & (~ done) / Cinc_L, Sshift_L 30

31 n lternate pproach Reset d_in_ready / Cclr_L, Sload_L, Oclr_L ~ d_in_ready Lose the Shift Count Reg/Comp - Let s just have 30 states where we do the shifting and then just return to the state - I got tired, and didn t draw all 30 of them! 30 Sload_L Sshift_L Shift Register ~lowit / Sshift_L lowit / Oinc_L, Sshift_L lowbit C Oclr_L Oinc_L Ones Count Register ~lowit / Sshift_L lowit / Oinc_L, Sshift_L etc OC 31

32 How ifferent Will This e? Pick a state encoding - How about = 00000, = 00001, C = 00010, = 00011, E = 00100, - How would our design be different? 32

33 Two pproaches These two state transition diagrams suggest two ways of envisioning a controller - Exclude all of the states where you are just counting from the FSM Treat the counter as something else to control and monitor for when it s done - Include all of the states, i.e. ones where you re just counting, in the FSM This was our second approach Comparison - Excluding the counter states Smaller, simpler FSM to design functional partitioning Give the synthesis tool a smaller thing to design - Including all of the states igger, more complex FSM to design Let a synthesis tool wrestle with a state encoding 33

34 Cooperating FSMs Turns out, they re about the same One view: Cooperating FSMs - Control FSM + shift-count FSM two separate FSMs each with simple-to-think-about control sequences compose them to form the more elaborate control sequences 34

35 More lternates on t use a shift register - Use a register called IN to hold the input data - Put a 32-to-1 mux on the output of IN - Use the old shift count (now called Count) to select one of the bits to feed to the FSM Cclr_L Cinc_L it Count Register load_l Oclr_L Oinc_L 30 IN Register Ones Count Register OC 30 done 'd30 Count comparator sel 32-to-1 MUX selected bit to FSM lowit 3

36 Here s nother Who needs a state machine? - Just build up a big combinational network of adders - Load the IN register, and several gate delays later you ll have the answer Comparison - The all combinational version of these circuits are generally fewer cycles but require more gates (no reuse) - The all combinational may not be faster if clock frequency goes way down load_l IN Register big combinational circuit of adders to add up all of the bits

37 nd nother How might you write the loop in software? Sload_L Sshift_L 30 Shift Register for (Ocount = 0, ShiftReg = in; ShiftReg!= 0; ShiftReg >> 1) 30'd0 30 Q lowbit if (ShiftReg & 1) Ocount++; - Like before, no loop counter, but end when shift-reg has no 1 s left Observations - Many software alternates apply Some S/W, some H/W - Hardware faster, a two state machine - ut you couldn t have used the all combinational string of adders in software - Evaluation functions for hardware and software differ Oclr_L Oinc_L comparator eq ShiftReg!= 0 Ones Count Register OC 37

38 nother: 1-13 atalab Way V = d_in; for (onescount = 0; V; onescount++) { // clear the least significant bit set V &= V - 1; } 2-to-1 MUX 30 d_in load_l This one loops only once for each set bit value and that value -1 differ only from the least significant set bit down value That value -1 30'd0 comparator eq done Register 30 30'd1 Subtracter 30 N gates Only different here Sometimes known as "rian Kernighan's way" 38

39 n exercise for the student unsigned int v; // count the number of bits set in v unsigned int c; // c accumulates the total bits set in v // option 1, for at most 14-bit values in v: c = (v * 0x ULL & 0x ULL) % 0xf; // option 2, for at most 24-bit values in v: c = ((v & 0xfff) * 0x ULL & 0x ULL) % 0x1f; c += (((v & 0xfff000) >> 12) * 0x ULL & 0x ULL) % 0x1f; // option 3, for at most 32-bit values in v: c = ((v & 0xfff) * 0x ULL & 0x ULL) % 0x1f; c += (((v & 0xfff000) >> 12) * 0x ULL & 0x ULL) % 0x1f; c += ((v >> 24) * 0x ULL & 0x ULL) % 0x1f; Thanks to: graphics.stanford.edu/~seander/bithacks.html 39

40 Reviewing the Parts inputs outputs FSM atapath clock reset next state and output logic inputs outputs outputs inputs LUs, MUXes, comparators, etc. State FFs Registers clock reset clock reset 40

41 Notes on Hardware Thread esign esign the computational machinery (datapath) separate from the control (FSM) machinery - Keep control points and status points straight - Make sure the FSM inputs status points and outputs control points atapath should be structured as RTL - Registers hold values - t clock edges, values are transferred from a register, through combinational circuitry, into a (usually different) register - Might even list transformations during design as: Register Register Register C + Register Register C Think of transformations using standard components whenever possible When datapath definition is complete, then develop FSM to drive it

42 Summary RTL level systems - FSM- finite state machine and datapath - Hardware Thread - escribed in terms of the functional units datapath and controller(s) - Generally multibit ops we re describing computations We ve now seen Mealy and Moore implementations - Plenty of alternate implementations - Software background can help suggest alternates - ut software and hardware implementations are very different What s good for one isn t necessarily good for the other 42

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

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

Lecture 32: SystemVerilog

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

More information

ECE 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

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

Register Transfer Level

Register Transfer Level Register Transfer Level Something between the logic level and the architecture level A convenient way to describe synchronous sequential systems State diagrams for pros Hierarchy of Designs The design

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

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

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

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

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

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

More information

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

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

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

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

Sequential Circuits. inputs Comb FFs. Outputs. Comb CLK. Sequential logic examples. ! Another way to understand setup/hold/propagation time

Sequential Circuits. inputs Comb FFs. Outputs. Comb CLK. Sequential logic examples. ! Another way to understand setup/hold/propagation time Sequential Circuits! Another way to understand setup/hold/propagation time inputs Comb FFs Comb Outputs CLK CSE 37 Spring 2 - Sequential Logic - Sequential logic examples! Finite state machine concept

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

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

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

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

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering Final Examination ECE 241F - Digital Systems Examiners: S. Brown,

More information

Last Lecture: Divide by 3 FSM

Last Lecture: Divide by 3 FSM Last Lecture: Divide by 3 FSM Output should be 1 every 3 clock cycles S2 S0 S1 The double circle indicates the reset state Slide derived from slides by Harris & Harris from their book 1 Finite State Machines

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

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

Timing in synchronous systems

Timing in synchronous systems BO 1 esign of sequential logic Outline Timing in synchronous networks Synchronous processes in VHL VHL-code that introduces latches andf flip-flops Initialization of registers Mealy- and Moore machines

More information

Chapter 10. case studies in sequential logic design

Chapter 10. case studies in sequential logic design Chapter. case studies in sequential logic design This is the last chapter of this course. So far, we have designed several sequential systems. What is the general procedure? The most difficult part would

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

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

Chapter 5 Registers & Counters

Chapter 5 Registers & Counters University of Wisconsin - Madison ECE/Comp Sci 352 Digital Systems Fundamentals Kewal K. Saluja and Yu Hen Hu Spring 2002 Chapter 5 Registers & Counters Originals by: Charles R. Kime Modified for course

More information

Learning Outcomes. Spiral 3-3. Sorting: Software Implementation REVIEW

Learning Outcomes. Spiral 3-3. Sorting: Software Implementation REVIEW 3-3. Learning Outcomes 3-3. Spiral 3-3 Single Cycle CPU I understand how the single-cycle CPU datapath supports each type of instruction I understand why each mux is needed to select appropriate inputs

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

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

Digital Design with SystemVerilog

Digital Design with SystemVerilog Digital Design with SystemVerilog Prof. Stephen A. Edwards Columbia University Spring 25 Synchronous Digital Design Combinational Logic Sequential Logic Summary of Modeling Styles Testbenches Why HDLs?

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

Building Bigger Systems: Interfacing

Building Bigger Systems: Interfacing ! Building Bigger Systems: Interfacing Lecture L07 18-545 Advanced Digital Design ECE Department Many elements Don Thomas, 2014, used with permission with credit to G. Larson Basic Principles Reading:

More information

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences. Spring 2010 May 10, 2010

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences. Spring 2010 May 10, 2010 University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences EECS150 J. Wawrzynek Spring 2010 May 10, 2010 Final Exam Name: ID number: This is

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

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

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

More information

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

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

More information

ECE 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

Design Example: 4-bit Multiplier

Design Example: 4-bit Multiplier Design Example: 4-bit Multiplier Consider how we normally multiply numbers: 123 x 264 492 7380 24600 32472 Binary multiplication is similar. (Note that the product of two 4-bit numbers is potentially an

More information

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering Final Eamination ECE 4F - Digital Systems Eaminers: S. Brown, J.

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

CS61C : Machine Structures

CS61C : Machine Structures CS 61C L path (1) insteecsberkeleyedu/~cs61c/su6 CS61C : Machine Structures Lecture # path natomy: 5 components of any Computer Personal Computer -7-25 This week Computer Processor ( brain ) path ( brawn

More information

Debouncing a Switch. A Design Example. Page 1

Debouncing a Switch. A Design Example. Page 1 Debouncing a Switch A Design Example Page 1 Background and Motivation Page 2 When you throw a switch (button or two-pole switch) It often bounces Page 3 Another switch switch after inversion Page 4 Yet

More information

General FSM design procedure

General FSM design procedure Sequential logic examples Basic design approach: a 4-step design process Hardware description languages and finite state machines Implementation examples and case studies finite-string pattern recognizer

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

CS/EE Homework 7 Solutions

CS/EE Homework 7 Solutions CS/EE 260 - Homework 7 Solutions 4/2/2001 1. (20 points) A 4 bit twisted ring counter is a sequential circuit which produces the following sequence of output values: 0000, 1000, 1100, 1110, 1111, 0111,

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

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

CMPT 250 : Week 3 (Sept 19 to Sept 26)

CMPT 250 : Week 3 (Sept 19 to Sept 26) CMPT 250 : Week 3 (Sept 19 to Sept 26) 1. DESIGN FROM FINITE STATE MACHINES (Continued) 1.1. ONE FLIP-FLOP PER STATE METHOD From a state diagram specification, a sequencer can be constructed using the

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

Control and Datapath 8

Control and Datapath 8 Control and Datapath 8 Engineering attempts to develop design methods that break a problem up into separate steps to simplify the design and increase the likelihood of a correct solution. Digital system

More information

ECE 353 Lab 3 (Verilog Design Approach)

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

More information

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

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

More information

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

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

Real Digital Problem Set #6

Real Digital Problem Set #6 Real igital Problem et #6. (2 points) ketch a block diagram for a magnitude comparator bit-slice circuit. Create K-maps to define the bit-slice circuit, and use them to find optimal logic equations. ketch

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

Chapter 4. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 4 <1>

Chapter 4. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 4 <1> Chapter 4 Digital Design and Computer Architecture, 2 nd Edition David Money Harris and Sarah L. Harris Chapter 4 Chapter 4 :: Topics Introduction Combinational Logic Structural Modeling Sequential

More information

ﻪﺘﻓﺮﺸﻴﭘ ﺮﺗﻮﻴﭙﻣﺎﻛ يرﺎﻤﻌﻣ MIPS يرﺎﻤﻌﻣ data path and ontrol control

ﻪﺘﻓﺮﺸﻴﭘ ﺮﺗﻮﻴﭙﻣﺎﻛ يرﺎﻤﻌﻣ MIPS يرﺎﻤﻌﻣ data path and ontrol control معماري كامپيوتر پيشرفته معماري MIPS data path and control abbasi@basu.ac.ir Topics Building a datapath support a subset of the MIPS-I instruction-set A single cycle processor datapath all instruction actions

More information

Chapter 4. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 4 <1>

Chapter 4. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 4 <1> Chapter 4 Digital Design and Computer Architecture, 2 nd Edition David Money Harris and Sarah L. Harris Chapter 4 Chapter 4 :: Topics Introduction Combinational Logic Structural Modeling Sequential

More information

The Processor: Datapath & Control

The Processor: Datapath & Control Chapter Five 1 The Processor: Datapath & Control We're ready to look at an implementation of the MIPS Simplified to contain only: memory-reference instructions: lw, sw arithmetic-logical instructions:

More information

General FSM design procedure

General FSM design procedure Sequential logic examples Basic design approach: a 4-step design process Hardware description languages and finite state machines Implementation examples and case studies finite-string pattern recognizer

More information

Verilog Behavioral Modeling

Verilog Behavioral Modeling Verilog Behavioral Modeling Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Spring, 2017 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/ Source:

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

Digital Design (VIMIAA01) Introduction to the Verilog HDL

Digital Design (VIMIAA01) Introduction to the Verilog HDL BUDAPEST UNIVERSITY OF TECHNOLOGY AND ECONOMICS FACULTY OF ELECTRICAL ENGINEERING AND INFORMATICS DEPARTMENT OF MEASUREMENT AND INFORMATION SYSTEMS Digital Design (VIMIAA01) Introduction to the Verilog

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

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. Chapter 4. Instruction Execution. CPU Overview. University of the District of Columbia 30 September, Chapter 4 The Processor 1

Introduction. Chapter 4. Instruction Execution. CPU Overview. University of the District of Columbia 30 September, Chapter 4 The Processor 1 Chapter 4 The Processor Introduction CPU performance factors Instruction count etermined by IS and compiler CPI and Cycle time etermined by CPU hardware We will examine two MIPS implementations simplified

More information

Computer Organization

Computer Organization Computer Organization! Computer design as an application of digital logic design procedures! Computer = processing unit + memory system! Processing unit = control + datapath! Control = finite state machine

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

CSE 140L Final Exam. Prof. Tajana Simunic Rosing. Spring 2008

CSE 140L Final Exam. Prof. Tajana Simunic Rosing. Spring 2008 CSE 140L Final Exam Prof. Tajana Simunic Rosing Spring 2008 NAME: ID#: Do not start the exam until you are told to. Turn off any cell phones or pagers. Write your name and PID at the top of every page.

More information

Ch 5: Designing a Single Cycle Datapath

Ch 5: Designing a Single Cycle Datapath Ch 5: esigning a Single Cycle path Computer Systems Architecture CS 365 The Big Picture: Where are We Now? The Five Classic Components of a Computer Processor Control Memory path Input Output Today s Topic:

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

EECS150 - Digital Design Lecture 4 - Verilog Introduction. Outline

EECS150 - Digital Design Lecture 4 - Verilog Introduction. Outline EECS150 - Digital Design Lecture 4 - Verilog Introduction Feb 3, 2009 John Wawrzynek Spring 2009 EECS150 - Lec05-Verilog Page 1 Outline Background and History of Hardware Description Brief Introduction

More information

10/21/2016. ECE 120: Introduction to Computing. Let s Extend Our Keyless Entry FSM. FSM Designs Also Allow Use of Abstraction

10/21/2016. ECE 120: Introduction to Computing. Let s Extend Our Keyless Entry FSM. FSM Designs Also Allow Use of Abstraction University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Extending Keyless Entry Combinational Logic Design Allows Use of Abstraction Recall

More information

CSE 502: Computer Architecture

CSE 502: Computer Architecture CSE 502: Computer Architecture SystemVerilog More Resources Cannot cover everything in one day You will likely need to look up reference material: SystemVerilog for VHDL Users: http://www.systemverilog.org/techpapers/date04_systemverilog.pdf

More information

Computer Organization. Structure of a Computer. Registers. Register Transfer. Register Files. Memories

Computer Organization. Structure of a Computer. Registers. Register Transfer. Register Files. Memories Computer Organization Structure of a Computer Computer design as an application of digital logic design procedures Computer = processing unit + memory system Processing unit = control + Control = finite

More information

ECEU530. Schedule. ECE U530 Digital Hardware Synthesis. Datapath for the Calculator (HW 5) HW 5 Datapath Entity

ECEU530. Schedule. ECE U530 Digital Hardware Synthesis. Datapath for the Calculator (HW 5) HW 5 Datapath Entity ECE U530 Digital Hardware Synthesis Prof. Miriam Leeser mel@coe.neu.edu November 6, 2006 Classes November 6 and 8 are in 429 Dana! Lecture 15: Homework 5: Datapath How to write a testbench for synchronous

More information

CS 31: Intro to Systems Digital Logic

CS 31: Intro to Systems Digital Logic CS 3: Intro to Systems Digital Logic Martin Gagné Swarthmore College January 3, 27 You re going to want scratch papr today borrow some if needed. Quick nnouncements Late Policy Reminder 3 late days total

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

MCMASTER UNIVERSITY EMBEDDED SYSTEMS

MCMASTER UNIVERSITY EMBEDDED SYSTEMS MCMASTER UNIVERSITY EMBEDDED SYSTEMS Computer Engineering 4DS4 Lecture Revision of Digital Systems Amin Vali January 26 Course material belongs to DrNNicolici Field programmable gate arrays (FPGAs) x x

More information

Format. 10 multiple choice 8 points each. 1 short answer 20 points. Same basic principals as the midterm

Format. 10 multiple choice 8 points each. 1 short answer 20 points. Same basic principals as the midterm Final Review Format 10 multiple choice 8 points each Make sure to show your work Can write a description to the side as to why you think your answer is correct for possible partial credit 1 short answer

More information

Lecture 12 VHDL Synthesis

Lecture 12 VHDL Synthesis CPE 487: Digital System Design Spring 2018 Lecture 12 VHDL Synthesis Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030 1 What is Synthesis?

More information

COMP12111 Fundamentals of Computer Engineering Paul Nutter Vasilis Pavlidis Comments

COMP12111 Fundamentals of Computer Engineering Paul Nutter Vasilis Pavlidis Comments Fundamentals of Computer Engineering Paul Nutter Vasilis Pavlidis Comments Please see the attached report. 12 February 2016 Page 2 of 7 Exam Feedback 2015/16 Q1 set by Paul Nutter Q2 set by Vasilis Pavlidis

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

10/24/2016. We Can Perform Any Computation with an FSM. ECE 120: Introduction to Computing. Find the Minimum Value Among Ten Integers

10/24/2016. We Can Perform Any Computation with an FSM. ECE 120: Introduction to Computing. Find the Minimum Value Among Ten Integers University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing From FSM to Computer We Can Perform Any Computation with an FSM Let s build an

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

General FSM design procedure

General FSM design procedure Sequential logic examples Basic design approach: a 4-step design process Hardware description languages and finite state machines Implementation examples and case studies finite-string pattern recognizer

More information

Why Should I Learn This Language? VLSI HDL. Verilog-2

Why Should I Learn This Language? VLSI HDL. Verilog-2 Verilog Why Should I Learn This Language? VLSI HDL Verilog-2 Different Levels of Abstraction Algorithmic the function of the system RTL the data flow the control signals the storage element and clock Gate

More information

EE178 Spring 2018 Lecture Module 4. Eric Crabill

EE178 Spring 2018 Lecture Module 4. Eric Crabill EE178 Spring 2018 Lecture Module 4 Eric Crabill Goals Implementation tradeoffs Design variables: throughput, latency, area Pipelining for throughput Retiming for throughput and latency Interleaving for

More information

Verilog Lecture Gandhi Puvvada, USC always statements, Coding a Flip-Flop. blocking and non-blocking assignments. Copyright 2008 Gandhi Puvvada 1

Verilog Lecture Gandhi Puvvada, USC always statements, Coding a Flip-Flop. blocking and non-blocking assignments. Copyright 2008 Gandhi Puvvada 1 EE201L and EE560 Verilog Lecture by Gandhi Puvvada, USC always statements, t t Coding a Flip-Flop Counters, Basics of Data Path, blocking and non-blocking assignments Copyright 2008 Gandhi Puvvada 1 always

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

Mark Redekopp and Gandhi Puvvada, All rights reserved. EE 357 Unit 15. Single-Cycle CPU Datapath and Control

Mark Redekopp and Gandhi Puvvada, All rights reserved. EE 357 Unit 15. Single-Cycle CPU Datapath and Control EE 37 Unit Single-Cycle CPU path and Control CPU Organization Scope We will build a CPU to implement our subset of the MIPS ISA Memory Reference Instructions: Load Word (LW) Store Word (SW) Arithmetic

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

Controller Implementation--Part I. Cascading Edge-triggered Flip-Flops. Clock Skew. Cascading Edge-triggered Flip-Flops. Why Gating of Clocks is Bad!

Controller Implementation--Part I. Cascading Edge-triggered Flip-Flops. Clock Skew. Cascading Edge-triggered Flip-Flops. Why Gating of Clocks is Bad! Controller Implementation--Part I lternative controller FSM implementation approaches based on: Classical Moore and Mealy machines Time state: ivide and Jump counters Microprogramming (ROM) based approaches»

More information

CS 151 Midterm. (Last Name) (First Name)

CS 151 Midterm. (Last Name) (First Name) CS 151 Midterm Name Student ID Signature :, (Last Name) (First Name) : : Instructions: 1. Please verify that your paper contains 13 pages including this cover. 2. Write down your Student-Id on the top

More information