FSM Implementations. TIE Logic Synthesis Arto Perttula Tampere University of Technology Fall Output. Input. Next. State.

Size: px
Start display at page:

Download "FSM Implementations. TIE Logic Synthesis Arto Perttula Tampere University of Technology Fall Output. Input. Next. State."

Transcription

1 FSM Implementations TIE Logic Synthesis Arto Perttula Tampere University of Technology Fall 2016 Input Next State Current state Output Moore

2 Acknowledgements Prof. Pong P. Chu provided official slides for the book which is gratefully acknowledged See also: Most slides were originally made by Ari Kulmala and other previous lecturers (Teemu Pitkänen, Konsta Punkka, Mikko Alho, Erno Salminen ) M. Perkows, ECE 590. DIGITAL SYSTEM DESIGN USING HARDARE DESCRIPTION LANGUAGES, Portland State University, June 2008, Arto Perttula

3 Next_track y=z5 in=next in=pl in=others in=x2 Play x 2 y=z3 in=others always Prev_track y=z6 in=prev Stop y=z1 in=others in=st Play y=z2 in=x2 in=-x2 Rewplay x 2 y=z4 in=others in=-x2 All the previous teachings are still valid and just the description style changes FINITE STATE MACHINES Arto Perttula

4 Finite-State Machine (FSM) Application defines the set of correct state machines State machines are usually the hardest part of logic design You must be extra careful that actions happen on the correct clock cycle! Two basic flavors: Mealy and Moore In both cases, one must select whether to include the output registers or not Moreover, you decide the VHDL presentation of FSM Description style: how many processes Encoding of states, if not automated in synthesis Input Next State Current state Output Input Next State Current state Output Moore Mealy 4

5 FSM Implementation in VHDL General form: We define an own type for the state machine states ALWAYS use enumeration type for state machine states Synthesis software, e.g., Quartus II, does not recognize it otherwise Sometimes next state (NS) is separate VHDL signal but not always architecture rtl of traffic_light is type states_type is (red, yellow, green); Enumeration type for states -- init state explicitly defined in reset, not here signal present_state_r : states_type;... begin -- rtl Signal is the register for current state

6 At Least 5 Implementation Styles 1. 1 sequential process 2. 2 processes a) Seq: curr. state registers and output, Comb: next state logic b) Seq: curr state, Comb: next state, output c) Seq: next and curr state, Comb: output 3. 3 processes (Seq: curr state, Comb: output, Comb: next state logic separated) Input Next State Current state Output Input Next State Current state Output Moore Mealy 6

7 Coding Style: 1seg-Moore/Reg-Mealy One segment coding style uses 1 sequential process sync_all : process (clk, rst_n) begin if rst_n = '0' then <INIT STATE and OUTPUT OF THE FSM> elsif clk'event and clk = '1' then <Define new value of curr state> <Define output. All these outputs become registers!> end if; end process sync_all; Arto Perttula

8 Coding Style: 2seg-Moore/Mealy Moore, two segment coding style uses 1 sequential process and 1 combinatorial process/concurrent assignments sync_ps : process (clk, rst_n) begin if rst_n = '0' then <INIT STATE OF THE FSM> elsif clk'event and clk = '1' then <Synchronous part of the FSM; assign next state to curr state> end if; end process sync_ps; comb_output : process (ctrl_r, input) begin <Combinational part; define output> (Mealy looks same as Moore, but considers also the input when determining the output)> end process comb_output; Arto Perttula

9 Coding Style: 3seg-Moore/Mealy Three segment coding style uses 1 sequential process and 2 combinatorial processes sync_ps : process (clk, rst_n) begin if rst_n = '0' then <INIT STATE OF THE FSM> elsif clk'event and clk = '1' then <curr state assignment> end if; end process sync_ps; comb_ns : process (ctrl_r, input) begin <Combinational part; define next state> end process comb_ns; comb_output : process (ctrl_r, input) begin <Combinational part; define output> end process comb_output; Arto Perttula

10 Examples: Traffic Light FSM Implemented with Various Styles red Simple traffic light controller Two inputs: request green and request red One output: one-hot encoded color Implemented in various styles, Moore-Mealy, 1-3 segments VHDL at Output latency is larger for Moore and registered Mealy However, all the implementations keep yellow light on for the same amount of time Examples show also the usage of counter in state machine Acts as a timer for showing yellow light Sometimes designer must modify timer limit values, e.g., if counter_r = limit-1 instead of counter_r = limit) yellow green Arto Perttula

11 Timing of Traffic Light FSMs All versions show yellow light the same amount of time r_y_g = 010 for 5 cycles However, there is 1 cycle difference when yellow is ON Inside the DUV, state and counter values are aligned differently as well I. Mealy 2a,2b,3 react immediately II. III. No output register, only combinatorial delay from request to r_y_g (=0ns in RTL simulation) Mealy 1 needs 1 cycle Output register and curr_state_r change simultaneously VHDL code assigns them when the state changes Moore 2 needs 1 cycle Updating curr_state_r takes 1 cycle Output assigned combinatorially from curr_state_r (=0ns in RTL simulation) Arto Perttula

12 Comparison of Implementation Styles: Coding Style 1-segment: Just synchronous process Automatically inferred output registers Simple view to the design, everything at one place Safe, registered Mealy machine is easy to implement with this style Recommended (as opposite to some books!) 2-segment, 3-segment Only way to implement unregistered outputs to FSMs Modular Long ago synthesis tools did not recognize 1-segment FSMs correctly Not the case anymore Recommended style in many books, partially because of those limitations of the old tools Useful for quite simple control machines that do not have, e.g., delay counters included Complex state machines are cumbersome to read The code does not proceed smoothly, have to jump around the code The same condition may be repeated in many processes Arto Perttula

13 Quartus II design flow after you ve simulated and verified the design Generic gate-level representation, just gates and flip-flops Places and routes the logic into a device, logic elements, macros and routing cells Converts the post-fit netlist into a FPGA programming file (.sof) Analyzes and validates the timing performance of all logic in a design. Run on FPGA Arto Perttula

14 Examples: Extracted State Diagram Tool A Note the encoding: it s not basic binary nor one-hot. 14

15 RTL Synthesis Result: Tool A State register Register for output bit 2 Registers for output bits 1..0 Next state logic, incl. counter for showing yellow light long enough Comb path from input to output logic Combinatorial output logic Registered mealy machine, traffic light VHD Arto Perttula

16 Technology Schematic, Tool A Single flip-flops Look-up tables, max 6 inputs Logic on previous slide has been mapped to FPGA s primitives. Registered mealy machine, traffic light VHD

17 RTL Synthesis Result: Tool B Same VHDL, slightly different result # Info: [45144]: Extracted FSM in module work.traffic_light(rtl){generic map (n_colors_g => 3 yellow_length_g => 10)}, with state variable = ctrl_r[1:0], async set/reset state(s) = 00, number of states = 3. # Info: [45144]: Preserving the original encoding in 3 state FSM# Info: [45144]: FSM: State encoding table. # Info: [40000]: FSM: Index Literal Encoding # Info: [40000]: FSM: # Info: [40000]: FSM: # Info: [40000]: FSM: Note the different state encoding Registered mealy machine, traffic light VHD

18 Technology Schematic, Tool B LUTs Multi-bit registers Registered mealy machine, traffic light VHD Arto Perttula

19 Physical Placement On-Chip The traffic_light.vhd place and routed Stratix 2S180, ALUTs (~LUTs) Quite much unused resources

20 Implementation Area And Frequency Note that no strict generalization can be made about the betterness Tool A Total ALUTs 15 ALUTs with register 10 Tool B LUTs 16 Registers 9 The one register difference is due to the different state encoding The state encoding can be explicitly defined or left to the tool to choose (as in this case) Arto Perttula

21 Synthesis of Different VHDLs AREA [LUT] AREA [reg] Lines of Code mealy (single) mealy (output separated) mealy_2proc. (out+ns separated) mealy_3proc Moore Functionally equivalent Timing aspect vary Different max frequency Only the Mealy single has output registers (3 bit) Coding style has a minor effect here Readibility of the code is as crucial! Arto Perttula

22 Comparison of Implementation Styles: Moore and Mealy Number of processes does not affect HW area and speed deterministically. The differences are mainly in readability. Generally, we want that outputs are registers Traditionally Mealy machine is sometimes problematic due to possible combinatorial paths or loops For registered outputs, use a registered Mealy machine Outputs are registered, but has shorter latency than Moore machine with registered outputs Otherwise, opt Moore machine Arto Perttula

23 Notes on Finite State Machines Quite often datapath and control get mixed in HDL description Start with slow and simple FSM if neighbour blocks allow that Takes few extra cycles but has less branching and hence simpler conditions Easier to get working at all You can later reduce few clock cycles by skipping some state in certain conditions (e.g., adding red arc wait_ack -> write) Be careful with the timing of output register Always mark the 1st state clearly Draw also the self-loops Wait ack Wait data write Arto Perttula

24 Synthesis Observations Make sure that you are aware of what signals of the shown codes have been implemented as registers! In most cases, use enumeration and let the synthesis tool to decide the state encoding Not much difference in delay or area in realistic circuits One-hot encoding is easiest to debug! Different tools produce slightly different results in even small designs Synthesis tools are heuristic due to very large design space Modest effect (e.g., -10%-+10%) also achievable by tuning the tool settings Even a single tool may produce slightly different results on different runs! Optimization heuristics utilize randomness However, no tool can convert a bad design into a good one! Arto Perttula

25 Conclusions Finite state machines can be coded in a variety ways Prefer simplicity, according to TUT coding rules Synthesis tools create different but functionally equivalent netlists even for small designs Arto Perttula

Ryerson University Department of Electrical and Computer Engineering EES508 Digital Systems

Ryerson University Department of Electrical and Computer Engineering EES508 Digital Systems 1 P a g e Ryerson University Department of Electrical and Computer Engineering EES508 Digital Systems Lab 5 - VHDL for Sequential Circuits: Implementing a customized State Machine 15 Marks ( 2 weeks) Due

More information

California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 3220: Digital Design with VHDL Laboratory 7

California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 3220: Digital Design with VHDL Laboratory 7 California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 322: Digital Design with VHDL Laboratory 7 Rational: The purpose of this lab is to become familiar in using

More information

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath Objectives Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath In the previous chapters we have studied how to develop a specification from a given application, and

More information

Section 6.8 Synthesis of Sequential Logic Page 1 of 8

Section 6.8 Synthesis of Sequential Logic Page 1 of 8 Section 6.8 Synthesis of Sequential Logic Page of 8 6.8 Synthesis of Sequential Logic Steps:. Given a description (usually in words), develop the state diagram. 2. Convert the state diagram to a next-state

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

Faculty of Electrical & Electronics Engineering BEE3233 Electronics System Design. Laboratory 3: Finite State Machine (FSM)

Faculty of Electrical & Electronics Engineering BEE3233 Electronics System Design. Laboratory 3: Finite State Machine (FSM) Faculty of Electrical & Electronics Engineering BEE3233 Electronics System Design Laboratory 3: Finite State Machine (FSM) Mapping CO, PO, Domain, KI : CO2,PO3,P5,CTPS5 CO2: Construct logic circuit using

More information

ECSE-323 Digital System Design. Datapath/Controller Lecture #1

ECSE-323 Digital System Design. Datapath/Controller Lecture #1 1 ECSE-323 Digital System Design Datapath/Controller Lecture #1 2 Synchronous Digital Systems are often designed in a modular hierarchical fashion. The system consists of modular subsystems, each of which

More information

Experiment # 12. Traffic Light Controller

Experiment # 12. Traffic Light Controller Experiment # 12 Traffic Light Controller Objectives Practice on the design of clocked sequential circuits. Applications of sequential circuits. Overview In this lab you are going to develop a Finite State

More information

Combinational / Sequential Logic

Combinational / Sequential Logic Digital Circuit Design and Language Combinational / Sequential Logic Chang, Ik Joon Kyunghee University Combinational Logic + The outputs are determined by the present inputs + Consist of input/output

More information

Chapter 11 State Machine Design

Chapter 11 State Machine Design Chapter State Machine Design CHAPTER OBJECTIVES Upon successful completion of this chapter, you will be able to: Describe the components of a state machine. Distinguish between Moore and Mealy implementations

More information

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

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

More information

DEDICATED TO EMBEDDED SOLUTIONS

DEDICATED TO EMBEDDED SOLUTIONS DEDICATED TO EMBEDDED SOLUTIONS DESIGN SAFE FPGA INTERNAL CLOCK DOMAIN CROSSINGS ESPEN TALLAKSEN DATA RESPONS SCOPE Clock domain crossings (CDC) is probably the worst source for serious FPGA-bugs that

More information

Sequential Circuits. Output depends only and immediately on the inputs Have no memory (dependence on past values of the inputs)

Sequential Circuits. Output depends only and immediately on the inputs Have no memory (dependence on past values of the inputs) Sequential Circuits Combinational circuits Output depends only and immediately on the inputs Have no memory (dependence on past values of the inputs) Sequential circuits Combination circuits with memory

More information

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Final Exam review: chapter 4 and 5. Supplement 3 and 4 Final Exam review: chapter 4 and 5. Supplement 3 and 4 1. A new type of synchronous flip-flop has the following characteristic table. Find the corresponding excitation table with don t cares used as much

More information

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer 1 P a g e HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer Objectives: Develop the behavioural style VHDL code for D-Flip Flop using gated,

More information

Chapter 5 Synchronous Sequential Logic

Chapter 5 Synchronous Sequential Logic Chapter 5 Synchronous Sequential Logic Chih-Tsun Huang ( 黃稚存 ) http://nthucad.cs.nthu.edu.tw/~cthuang/ Department of Computer Science National Tsing Hua University Outline Introduction Storage Elements:

More information

FPGA Implementation of Sequential Logic

FPGA Implementation of Sequential Logic ECE 428 Programmable ASIC Design FPGA Implementation of Sequential Logic Haibo Wang ECE Department Southern Illinois University Carbondale, IL 62901 8-1 Sequential Circuit Model Combinational Circuit:

More information

LFSRs as Functional Blocks in Wireless Applications Author: Stephen Lim and Andy Miller

LFSRs as Functional Blocks in Wireless Applications Author: Stephen Lim and Andy Miller XAPP22 (v.) January, 2 R Application Note: Virtex Series, Virtex-II Series and Spartan-II family LFSRs as Functional Blocks in Wireless Applications Author: Stephen Lim and Andy Miller Summary Linear Feedback

More information

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences EECS150 J. Wawrzynek Spring 2002 4/5/02 Midterm Exam II Name: Solutions ID number:

More information

ELCT201: DIGITAL LOGIC DESIGN

ELCT201: DIGITAL LOGIC DESIGN ELCT201: DIGITAL LOGIC DESIGN Dr. Eng. Haitham Omran, haitham.omran@guc.edu.eg Dr. Eng. Wassim Alexan, wassim.joseph@guc.edu.eg Lecture 8 Following the slides of Dr. Ahmed H. Madian محرم 1439 ه Winter

More information

EE 101 Lab 7 Crosswalk

EE 101 Lab 7 Crosswalk EE 0 Lab 7 Crosswalk Introduction In this lab you will complete the control unit and datapath for a simple crosswalk controller that was discussed in class. You should work on this lab INDIVIDUALLY! 2

More information

CSE140L: Components and Design Techniques for Digital Systems Lab. FSMs. Tajana Simunic Rosing. Source: Vahid, Katz

CSE140L: Components and Design Techniques for Digital Systems Lab. FSMs. Tajana Simunic Rosing. Source: Vahid, Katz CSE140L: Components and Design Techniques for Digital Systems Lab FSMs Tajana Simunic Rosing Source: Vahid, Katz 1 Flip-flops Hardware Description Languages and Sequential Logic representation of clocks

More information

Modeling Latches and Flip-flops

Modeling Latches and Flip-flops Lab Workbook Introduction Sequential circuits are digital circuits in which the output depends not only on the present input (like combinatorial circuits), but also on the past sequence of inputs. In effect,

More information

Level and edge-sensitive behaviour

Level and edge-sensitive behaviour Level and edge-sensitive behaviour Asynchronous set/reset is level-sensitive Include set/reset in sensitivity list Put level-sensitive behaviour first: process (clock, reset) is begin if reset = '0' then

More information

CS 151 Final. Instructions: Student ID. (Last Name) (First Name) Signature

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

More information

Two types of state machine as classified by output formation

Two types of state machine as classified by output formation Two types of state machine as classified by output formation Moore: outputs formed by present state only Mealy: outputs formed by present state and input Also classified by state encoding Binary : 000,

More information

Lecture 11: Synchronous Sequential Logic

Lecture 11: Synchronous Sequential Logic Lecture 11: Synchronous Sequential Logic Syed M. Mahmud, Ph.D ECE Department Wayne State University Aby K George, ECE Department, Wayne State University Contents Characteristic equations Analysis of clocked

More information

Sequential Circuit Design: Principle

Sequential Circuit Design: Principle Sequential Circuit Design: Principle modified by L.Aamodt 1 Outline 1. 2. 3. 4. 5. 6. 7. 8. Overview on sequential circuits Synchronous circuits Danger of synthesizing asynchronous circuit Inference of

More information

Performance Evolution of 16 Bit Processor in FPGA using State Encoding Techniques

Performance Evolution of 16 Bit Processor in FPGA using State Encoding Techniques Performance Evolution of 16 Bit Processor in FPGA using State Encoding Techniques Madhavi Anupoju 1, M. Sunil Prakash 2 1 M.Tech (VLSI) Student, Department of Electronics & Communication Engineering, MVGR

More information

1. Convert the decimal number to binary, octal, and hexadecimal.

1. Convert the decimal number to binary, octal, and hexadecimal. 1. Convert the decimal number 435.64 to binary, octal, and hexadecimal. 2. Part A. Convert the circuit below into NAND gates. Insert or remove inverters as necessary. Part B. What is the propagation delay

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

ECE 301 Digital Electronics

ECE 301 Digital Electronics ECE 301 Digital Electronics Derivation of Flip-Flop Input Equations and State Assignment (Lecture #24) The slides included herein were taken from the materials accompanying Fundamentals of Logic Design,

More information

Previous Lecture Sequential Circuits. Slide Summary of contents covered in this lecture. (Refer Slide Time: 01:55)

Previous Lecture Sequential Circuits. Slide Summary of contents covered in this lecture. (Refer Slide Time: 01:55) Previous Lecture Sequential Circuits Digital VLSI System Design Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology, Madras Lecture No 7 Sequential Circuit Design Slide

More information

Logic Design ( Part 3) Sequential Logic- Finite State Machines (Chapter 3)

Logic Design ( Part 3) Sequential Logic- Finite State Machines (Chapter 3) Logic esign ( Part ) Sequential Logic- Finite State Machines (Chapter ) Based on slides McGraw-Hill Additional material 00/00/006 Lewis/Martin Additional material 008 Roth Additional material 00 Taylor

More information

EE178 Lecture Module 4. Eric Crabill SJSU / Xilinx Fall 2005

EE178 Lecture Module 4. Eric Crabill SJSU / Xilinx Fall 2005 EE178 Lecture Module 4 Eric Crabill SJSU / Xilinx Fall 2005 Lecture #9 Agenda Considerations for synchronizing signals. Clocks. Resets. Considerations for asynchronous inputs. Methods for crossing clock

More information

WEEK 10. Sequential Circuits: Analysis and Design. Page 1

WEEK 10. Sequential Circuits: Analysis and Design. Page 1 WEEK 10 Sequential Circuits: Analysis and Design Page 1 Analysis of Clocked (Synchronous) Sequential Circuits Now that we have flip-flops and the concept of memory in our circuit, we might want to determine

More information

Finite State Machine Design

Finite State Machine Design Finite State Machine Design One machine can do the work of fifty ordinary men; no machine can do the work of one extraordinary man. -E. Hubbard Nothing dignifies labor so much as the saving of it. -J.

More information

Microprocessor Design

Microprocessor Design Microprocessor Design Principles and Practices With VHDL Enoch O. Hwang Brooks / Cole 2004 To my wife and children Windy, Jonathan and Michelle Contents 1. Designing a Microprocessor... 2 1.1 Overview

More information

Using the Quartus II Chip Editor

Using the Quartus II Chip Editor Using the Quartus II Chip Editor June 2003, ver. 1.0 Application Note 310 Introduction Altera FPGAs have made tremendous advances in capacity and performance. Today, Altera Stratix and Stratix GX devices

More information

EE178 Spring 2018 Lecture Module 5. Eric Crabill

EE178 Spring 2018 Lecture Module 5. Eric Crabill EE178 Spring 2018 Lecture Module 5 Eric Crabill Goals Considerations for synchronizing signals Clocks Resets Considerations for asynchronous inputs Methods for crossing clock domains Clocks The academic

More information

Digital Electronics II 2016 Imperial College London Page 1 of 8

Digital Electronics II 2016 Imperial College London Page 1 of 8 Information for Candidates: The following notation is used in this paper: 1. Unless explicitly indicated otherwise, digital circuits are drawn with their inputs on the left and their outputs on the right.

More information

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors CSC258 Week 5 1 We are here Assembly Language Processors Arithmetic Logic Units Devices Finite State Machines Flip-flops Circuits Gates Transistors 2 Circuits using flip-flops Now that we know about flip-flops

More information

IE1204 Digital Design. F11: Programmable Logic, VHDL for Sequential Circuits. Masoumeh (Azin) Ebrahimi

IE1204 Digital Design. F11: Programmable Logic, VHDL for Sequential Circuits. Masoumeh (Azin) Ebrahimi IE1204 Digital Design F11: Programmable Logic, VHDL for Sequential Circuits Masoumeh (Azin) Ebrahimi (masebr@kth.se) Elena Dubrova (dubrova@kth.se) KTH / ICT / ES This lecture BV pp. 98-118, 418-426, 507-519

More information

ELCT 501: Digital System Design

ELCT 501: Digital System Design ELCT 5: Digital System Lecture 8: System Dr. Mohamed Abd El Ghany, Algorithmic State Machine (ASM) For large machines, the designers often use a different form of representation, called the algorithmic

More information

Chapter 3. Boolean Algebra and Digital Logic

Chapter 3. Boolean Algebra and Digital Logic Chapter 3 Boolean Algebra and Digital Logic Chapter 3 Objectives Understand the relationship between Boolean logic and digital computer circuits. Learn how to design simple logic circuits. Understand how

More information

EE 209 Lab 7 A Walk-Off

EE 209 Lab 7 A Walk-Off EE 209 Lab 7 A Walk-Off Introduction In this lab you will complete the control unit and datapath for a simple crosswalk controller that was discussed in class. You should work on this lab INDIVIDUALLY!

More information

CPS311 Lecture: Sequential Circuits

CPS311 Lecture: Sequential Circuits CPS311 Lecture: Sequential Circuits Last revised August 4, 2015 Objectives: 1. To introduce asynchronous and synchronous flip-flops (latches and pulsetriggered, plus asynchronous preset/clear) 2. To introduce

More information

IE1204 Digital Design F11: Programmable Logic, VHDL for Sequential Circuits

IE1204 Digital Design F11: Programmable Logic, VHDL for Sequential Circuits IE1204 Digital Design F11: Programmable Logic, VHDL for Sequential Circuits Elena Dubrova KTH/ICT/ES dubrova@kth.se This lecture BV pp. 98-118, 418-426, 507-519 IE1204 Digital Design, HT14 2 Programmable

More information

Universidad Carlos III de Madrid Digital Electronics Exercises

Universidad Carlos III de Madrid Digital Electronics Exercises 1. Complete the chronogram for the circuit given in the figure. inst7 NOT A INPUT VCC AND2 inst5 DFF D PRN Q CLRN inst XOR inst2 TFF PRN T Q CLRN inst8 OUTPUT OUTPUT Q Q1 CLK INPUT VCC CLEARN INPUT VCC

More information

2 Sequential Circuits

2 Sequential Circuits 2 2.1 State Diagrams and General Form 0/0 1/0 Start State 0 /0 1/1 State 1 /1 0/1 State Diagram of a Change Detector ( Mealy-machine). The output Y assumes 1 whenever the input X has changed. Otherwise

More information

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

CSCB58 - Lab 4. Prelab /3 Part I (in-lab) /1 Part II (in-lab) /1 Part III (in-lab) /2 TOTAL /8 CSCB58 - Lab 4 Clocks and Counters Learning Objectives The purpose of this lab is to learn how to create counters and to be able to control when operations occur when the actual clock rate is much faster.

More information

Administrative issues. Sequential logic

Administrative issues. Sequential logic Administrative issues Midterm #1 will be given Tuesday, October 29, at 9:30am. The entire class period (75 minutes) will be used. Open book, open notes. DDPP sections: 2.1 2.6, 2.10 2.13, 3.1 3.4, 3.7,

More information

Advanced Digital Logic Design EECS 303

Advanced Digital Logic Design EECS 303 Advanced Digital Logic Design EECS 303 http://ziyang.eecs.northwestern.edu/eecs303/ Teacher: Robert Dick Office: L477 Tech Email: dickrp@northwestern.edu Phone: 847 467 2298 Outline Introduction Reset/set

More information

Digital Logic Design ENEE x. Lecture 24

Digital Logic Design ENEE x. Lecture 24 Digital Logic Design ENEE 244-010x Lecture 24 Announcements Homework 9 due today Thursday Office Hours (12/10) from 2:30-4pm Course Evaluations at the end of class today. https://www.courseevalum.umd.edu/

More information

Traffic Light Controller

Traffic Light Controller Traffic Light Controller Four Way Intersection Traffic Light System Fall-2017 James Todd, Thierno Barry, Andrew Tamer, Gurashish Grewal Electrical and Computer Engineering Department School of Engineering

More information

Lecture 13: Clock and Synchronization. TIE Logic Synthesis Arto Perttula Tampere University of Technology Spring 2017

Lecture 13: Clock and Synchronization. TIE Logic Synthesis Arto Perttula Tampere University of Technology Spring 2017 Lecture 13: Clock and Synchronization TIE-50206 Logic Synthesis Arto Perttula Tampere University of Technology Spring 2017 Acknowledgements Most slides were prepared by Dr. Ari Kulmala The content of the

More information

Digital Circuit Engineering

Digital Circuit Engineering Digital Circuit Engineering 2nd Distributive ( + A)( + B) = + AB Circuits that work in a sequence of steps Absorption + A = + A A+= THESE CICUITS NEED STOAGE TO EMEMBE WHEE THEY AE STOAGE D MU G M MU S

More information

Debugging of Verilog Hardware Designs on Altera s DE-Series Boards. 1 Introduction. For Quartus Prime 15.1

Debugging of Verilog Hardware Designs on Altera s DE-Series Boards. 1 Introduction. For Quartus Prime 15.1 Debugging of Verilog Hardware Designs on Altera s DE-Series Boards For Quartus Prime 15.1 1 Introduction This tutorial presents some basic debugging concepts that can be helpful in creating Verilog designs

More information

2.6 Reset Design Strategy

2.6 Reset Design Strategy 2.6 Reset esign Strategy Many design issues must be considered before choosing a reset strategy for an ASIC design, such as whether to use synchronous or asynchronous resets, will every flipflop receive

More information

Synchronous Sequential Design

Synchronous Sequential Design Synchronous Sequential Design SMD098 Computation Structures Lecture 4 1 Synchronous sequential systems Almost all digital systems have some concept of state the outputs of a system depends on the past

More information

CS8803: Advanced Digital Design for Embedded Hardware

CS8803: Advanced Digital Design for Embedded Hardware CS883: Advanced Digital Design for Embedded Hardware Lecture 4: Latches, Flip-Flops, and Sequential Circuits Instructor: Sung Kyu Lim (limsk@ece.gatech.edu) Website: http://users.ece.gatech.edu/limsk/course/cs883

More information

Digital Fundamentals: A Systems Approach

Digital Fundamentals: A Systems Approach Digital Fundamentals: A Systems Approach Counters Chapter 8 A System: Digital Clock Digital Clock: Counter Logic Diagram Digital Clock: Hours Counter & Decoders Finite State Machines Moore machine: One

More information

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters Logic and Computer Design Fundamentals Chapter 7 Registers and Counters Registers Register a collection of binary storage elements In theory, a register is sequential logic which can be defined by a state

More information

Chapter 3 Unit Combinational

Chapter 3 Unit Combinational EE 200: Digital Logic Circuit Design Dr Radwan E Abdel-Aal, COE Logic and Computer Design Fundamentals Chapter 3 Unit Combinational 5 Registers Logic and Design Counters Part Implementation Technology

More information

hochschule fu r angewandte wissenschaften hamburg Prof. Dr. B. Schwarz FB Elektrotechnik/Informatik

hochschule fu r angewandte wissenschaften hamburg Prof. Dr. B. Schwarz FB Elektrotechnik/Informatik 8 Shift Registers A Johnson counter contains the basic structure of a shift register which is made up by a chain of D- FFs. Beginning with the LSB of a register (a number of D-FFs) each D-FF output can

More information

Lecture 8: Sequential Logic

Lecture 8: Sequential Logic Lecture 8: Sequential Logic Last lecture discussed how we can use digital electronics to do combinatorial logic we designed circuits that gave an immediate output when presented with a given set of inputs

More information

CHAPTER 6 DESIGN OF HIGH SPEED COUNTER USING PIPELINING

CHAPTER 6 DESIGN OF HIGH SPEED COUNTER USING PIPELINING 149 CHAPTER 6 DESIGN OF HIGH SPEED COUNTER USING PIPELINING 6.1 INTRODUCTION Counters act as important building blocks of fast arithmetic circuits used for frequency division, shifting operation, digital

More information

Design and Simulation of a Digital CMOS Synchronous 4-bit Up-Counter with Set and Reset

Design and Simulation of a Digital CMOS Synchronous 4-bit Up-Counter with Set and Reset Design and Simulation of a Digital CMOS Synchronous 4-bit Up-Counter with Set and Reset Course Number: ECE 533 Spring 2013 University of Tennessee Knoxville Instructor: Dr. Syed Kamrul Islam Prepared by

More information

UNIT 1 NUMBER SYSTEMS AND DIGITAL LOGIC FAMILIES 1. Briefly explain the stream lined method of converting binary to decimal number with example. 2. Give the Gray code for the binary number (111) 2. 3.

More information

EITF35: Introduction to Structured VLSI Design

EITF35: Introduction to Structured VLSI Design EITF35: Introduction to Structured VLSI Design Part 4.2.1: Learn More Liang Liu liang.liu@eit.lth.se 1 Outline Crossing clock domain Reset, synchronous or asynchronous? 2 Why two DFFs? 3 Crossing clock

More information

ECE 3401 Lecture 11. Sequential Circuits

ECE 3401 Lecture 11. Sequential Circuits EE 3401 Lecture 11 Sequential ircuits Overview of Sequential ircuits Storage Elements Sequential circuits Storage elements: Latches & Flip-flops Registers and counters ircuit and System Timing Sequential

More information

CSE 140 Exam #3 Tajana Simunic Rosing

CSE 140 Exam #3 Tajana Simunic Rosing CSE 140 Exam #3 Tajana Simunic Rosing Winter 2010 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. Do not separate the

More information

Clock Domain Crossing. Presented by Abramov B. 1

Clock Domain Crossing. Presented by Abramov B. 1 Clock Domain Crossing Presented by Abramov B. 1 Register Transfer Logic Logic R E G I S T E R Transfer Logic R E G I S T E R Presented by Abramov B. 2 RTL (cont) An RTL circuit is a digital circuit composed

More information

COE328 Course Outline. Fall 2007

COE328 Course Outline. Fall 2007 COE28 Course Outline Fall 2007 1 Objectives This course covers the basics of digital logic circuits and design. Through the basic understanding of Boolean algebra and number systems it introduces the student

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) Quiz #2 - Spring 2003 Prof. Anantha Chandrakasan and Prof. Don

More information

Chapter 5 Synchronous Sequential Logic

Chapter 5 Synchronous Sequential Logic Chapter 5 Synchronous Sequential Logic Sequential Circuits Latches and Flip-Flops Analysis of Clocked Sequential Circuits HDL Optimization Design Procedure Sequential Circuits Various definitions Combinational

More information

Flip-Flops and Registers

Flip-Flops and Registers The slides included herein were taken from the materials accompanying Fundamentals of Logic Design, 6 th Edition, by Roth and Kinney, and were used with permission from Cengage Learning. Flip-Flops and

More information

Asynchronous (Ripple) Counters

Asynchronous (Ripple) Counters Circuits for counting events are frequently used in computers and other digital systems. Since a counter circuit must remember its past states, it has to possess memory. The chapter about flip-flops introduced

More information

CHAPTER 4 RESULTS & DISCUSSION

CHAPTER 4 RESULTS & DISCUSSION CHAPTER 4 RESULTS & DISCUSSION 3.2 Introduction This project aims to prove that Modified Baugh-Wooley Two s Complement Signed Multiplier is one of the high speed multipliers. The schematic of the multiplier

More information

Synchronous Sequential Logic

Synchronous Sequential Logic Synchronous Sequential Logic Ranga Rodrigo August 2, 2009 1 Behavioral Modeling Behavioral modeling represents digital circuits at a functional and algorithmic level. It is used mostly to describe sequential

More information

Chapter 7 Counters and Registers

Chapter 7 Counters and Registers Chapter 7 Counters and Registers Chapter 7 Objectives Selected areas covered in this chapter: Operation & characteristics of synchronous and asynchronous counters. Analyzing and evaluating various types

More information

EECS150 - Digital Design Lecture 15 Finite State Machines. Announcements

EECS150 - Digital Design Lecture 15 Finite State Machines. Announcements EECS150 - Digital Design Lecture 15 Finite State Machines October 18, 2011 Elad Alon Electrical Engineering and Computer Sciences University of California, Berkeley http://www-inst.eecs.berkeley.edu/~cs150

More information

Copyright 2011 by Enoch Hwang, Ph.D. and Global Specialties. All rights reserved. Printed in Taiwan.

Copyright 2011 by Enoch Hwang, Ph.D. and Global Specialties. All rights reserved. Printed in Taiwan. Copyright 2011 by Enoch Hwang, Ph.D. and Global Specialties All rights reserved. Printed in Taiwan. No part of this publication may be reproduced, stored in a retrieval system or transmitted, in any form

More information

CS3350B Computer Architecture Winter 2015

CS3350B Computer Architecture Winter 2015 CS3350B Computer Architecture Winter 2015 Lecture 5.2: State Circuits: Circuits that Remember Marc Moreno Maza www.csd.uwo.ca/courses/cs3350b [Adapted from lectures on Computer Organization and Design,

More information

CSC258: Computer Organization. Combinational Logic

CSC258: Computer Organization. Combinational Logic CSC258: Computer Organization Combinational Logic 1 Anonymous: Quizzes and Fairness... A lot of students in earlier sections share the quiz question with students who have the tutorial later in the evening...

More information

EE292: Fundamentals of ECE

EE292: Fundamentals of ECE EE292: Fundamentals of ECE Fall 2012 TTh 10:00-11:15 SEB 1242 Lecture 23 121120 http://www.ee.unlv.edu/~b1morris/ee292/ 2 Outline Review Combinatorial Logic Sequential Logic 3 Combinatorial Logic Circuits

More information

Lecture #4: Clocking in Synchronous Circuits

Lecture #4: Clocking in Synchronous Circuits Lecture #4: Clocking in Synchronous Circuits Kunle Stanford EE183 January 15, 2003 Tutorial/Verilog Questions? Tutorial is done, right? Due at midnight (Fri 1/17/03) Turn in copies of all verilog, copy

More information

Sequential Logic Circuits

Sequential Logic Circuits Sequential Logic Circuits By Dr. M. Hebaishy Digital Logic Design Ch- Rem.!) Types of Logic Circuits Combinational Logic Memoryless Outputs determined by current values of inputs Sequential Logic Has memory

More information

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS COURSE / CODE DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS In the same way that logic gates are the building blocks of combinatorial circuits, latches

More information

Altera s Max+plus II Tutorial

Altera s Max+plus II Tutorial Altera s Max+plus II Tutorial Written by Kris Schindler To accompany Digital Principles and Design (by Donald D. Givone) 8/30/02 1 About Max+plus II Altera s Max+plus II is a powerful simulation package

More information

Design of Fault Coverage Test Pattern Generator Using LFSR

Design of Fault Coverage Test Pattern Generator Using LFSR Design of Fault Coverage Test Pattern Generator Using LFSR B.Saritha M.Tech Student, Department of ECE, Dhruva Institue of Engineering & Technology. Abstract: A new fault coverage test pattern generator

More information

Sequential Design Basics

Sequential Design Basics Sequential Design Basics Lecture 2 topics A review of devices that hold state A review of Latches A review of Flip-Flops Unit of text Set-Reset Latch/Flip-Flops/D latch/ Edge triggered D Flip-Flop 8/22/22

More information

PROCESSOR BASED TIMING SIGNAL GENERATOR FOR RADAR AND SENSOR APPLICATIONS

PROCESSOR BASED TIMING SIGNAL GENERATOR FOR RADAR AND SENSOR APPLICATIONS PROCESSOR BASED TIMING SIGNAL GENERATOR FOR RADAR AND SENSOR APPLICATIONS Application Note ABSTRACT... 3 KEYWORDS... 3 I. INTRODUCTION... 4 II. TIMING SIGNALS USAGE AND APPLICATION... 5 III. FEATURES AND

More information

Solar Power for Small Hall

Solar Power for Small Hall Solar Power for Small Hall [image from www.speedace.info] The university is interested in installing a Solar Power Generating Facility on the roof of Small Hall. Project not official at university level

More information

Introduction to Digital Logic Missouri S&T University CPE 2210 Exam 2 Logistics

Introduction to Digital Logic Missouri S&T University CPE 2210 Exam 2 Logistics Introduction to Digital Logic Missouri S&T University CPE 2210 Exam 2 Logistics Egemen K. Çetinkaya Egemen K. Çetinkaya Department of Electrical & Computer Engineering Missouri University of Science and

More information

ECE337 Lab 4 Introduction to State Machines in VHDL

ECE337 Lab 4 Introduction to State Machines in VHDL ECE337 Lab Introduction to State Machines in VHDL In this lab you will: Design, code, and test the functionality of the source version of a Moore model state machine of a sliding window average filter.

More information

1 Introduction to Finite-State Machines and State Diagrams for the Design of Electronic Circuits and Systems

1 Introduction to Finite-State Machines and State Diagrams for the Design of Electronic Circuits and Systems 1 Introduction to Finite-State Machines and State Diagrams for the Design of Electronic Circuits and Systems 1.1 INTRODUCTION This chapter, and Chapters 2 and 3, is written in the form of a linear frame,

More information

Chapter 5: Synchronous Sequential Logic

Chapter 5: Synchronous Sequential Logic Chapter 5: Synchronous Sequential Logic NCNU_2016_DD_5_1 Digital systems may contain memory for storing information. Combinational circuits contains no memory elements the outputs depends only on the inputs

More information

LAB 3 Verilog for Combinational Circuits

LAB 3 Verilog for Combinational Circuits Goals To Do LAB 3 Verilog for Combinational Circuits Learn how to implement combinational circuits using Verilog. Design and implement a simple circuit that controls the 7-segment display to show a 4-bit

More information

DIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

DIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 27.2.2. DIGITAL TECHNICS Dr. Bálint Pődör Óbuda University, Microelectronics and Technology Institute 6. LECTURE (ANALYSIS AND SYNTHESIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS) 26/27 6. LECTURE Analysis and

More information