Lecture 27 Logistics Last lecture Today: HW8 due Friday

Slides:



Advertisements
Similar presentations
Finite State Machines (FSMs)
Advertisements

TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
CS 300 – Lecture 3 Intro to Computer Architecture / Assembly Language Sequential Circuits.
Dr. Turki F. Al-Somani VHDL synthesis and simulation – Part 3 Microcomputer Systems Design (Embedded Systems)
Digital Design – Optimizations and Tradeoffs
Give qualifications of instructors: DAP
Contemporary Logic Design Finite State Machine Design © R.H. Katz Transparency No Chapter #8: Finite State Machine Design Finite State.
Contemporary Logic Design FSM Optimization © R.H. Katz Transparency No Chapter #9: Finite State Machine 9.4 Choosing Flip-Flops 9.5 Machine Partitioning.
ENEE 408C Lab Capstone Project: Digital System Design Fall 2005 Sequential Circuit Design.
Sequential Circuit  It is a type of logic circuit whose output depends not only on the present value of its input signals but on the past history of its.
Clocked Synchronous State Machine Design
1 COMP541 State Machines Montek Singh Feb 8, 2012.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 21 Multiplier Example Example: (101 x 011) Base 2 Note that the partial product summation.
1 Lecture 22 State encoding  One-hot encoding  Output encoding State partitioning.
1 CSE370, Lecture 19 Lecture 19 u Logistics n Lab 8 this week to be done in pairs íFind a partner before your lab period íOtherwise you will have to wait.
Module : FSM Topic : types of FSM. Two types of FSM The instant of transition from the present to the next can be completely controlled by a clock; additionally,
1 Lecture 13 Overview of sequential logic  Basic concepts  An example.
DLD Lecture 26 Finite State Machine Design Procedure.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
CS151 Introduction to Digital Design Chapter 5: Sequential Circuits 5-1 : Sequential Circuit Definition 5-2: Latches 1Created by: Ms.Amany AlSaleh.
EMT 351/4 DIGITAL IC DESIGN Verilog Behavioral Modeling  Finite State Machine -Moore & Mealy Machine -State Encoding Techniques.
George Mason University Finite State Machines Refresher ECE 545 Lecture 11.
Controller Implementation
1 CSE370, Lecture 24 Lecture 26 u Logistics n HW8 due Friday n Ant extra credit due Friday n Final exam a week from today, 12/8 8:30am-10:20am here n Review.
Overview Logistics Last lecture Today HW5 due today
FLIP FLOPS Binary unit capable of storing one bit – 0 or 1
Computer Architecture: Intro Beginnings, cont.
Figure 8.1. The general form of a sequential circuit.
Computer Organization and Architecture + Networks
Chapter #6: Sequential Logic Design
© Copyright 2004, Gaetano Borriello and Randy H. Katz
Lecture 28 Logistics Today
Sequential logic design principles
Lecture 26 Logistics Last lecture Today HW8 due Friday
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
Lecture 27 Logistics Last lecture Today: HW8 due Friday
Pipelining and Retiming 1
EEL 3705 / 3705L Digital Logic Design
COMP541 Sequential Logic – 2: Finite State Machines
Typical Timing Specifications
Sequential logic examples
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
Instructor: Alexander Stoytchev
332:437 Lecture 12 Finite State Machine Design
Instructor: Alexander Stoytchev
Lecture 28 Logistics Today
EEL 3705 / 3705L Digital Logic Design
Lecture 25 Logistics Last lecture Today HW8 due today
CSE 370 – Winter Sequential Logic-2 - 1
CSE 370 – Winter Sequential Logic - 1
Lecture 15 Logistics Last lecture Today HW4 is due today
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Pipeline Principle A non-pipelined system of combination circuits (A, B, C) that computation requires total of 300 picoseconds. Comb. logic.
Lecture 24 Logistics Last lecture Today HW7 back today
Lecture 20 Logistics Last lecture Today HW6 due Wednesday
Lecture 23 Logistics Last lecture Today HW8 due Wednesday, March 11
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Lecture 18 Logistics Last Lecture Today HW6 due today Midterm 2
Lecture 18 Logistics Last lecture Today HW5 due today (with extra 10%)
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
CSE 370 – Winter Introduction -2- 1
EGR 2131 Unit 12 Synchronous Sequential Circuits
ECE 352 Digital System Fundamentals
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
CSE 370 – Winter Sequential Logic-2 - 1
Instructor: Michael Greenbaum
Presentation transcript:

Lecture 27 Logistics Last lecture Today: HW8 due Friday Ants problem due Friday Lab kit must be returned to Tony by Friday Review Sunday 12/7 3pm, Location TBD Last lecture State encoding One-hot encoding Output encoding Today: Optimizing FSMs Pipelining Retiming Partitioning 27

Example: Digital combination lock An output-encoded FSM Punch in 3 values in sequence and the door opens If there is an error the lock must be reset After the door opens the lock must be reset Inputs: sequence of number values, reset Outputs: door open/close reset value open/closed new clock 27 22

Design the datapath Choose simple control 3-wire mux for datapath comparator equal multiplexer mux control 4 value C1i C2i C3i mux control valuei equal Choose simple control 3-wire mux for datapath Control is 001, 010, 100 Open/closed bit for lock state Control is 0/1 27 22

Output encode the FSM FSM outputs State are: S0, S1, S2, S3, or ERR Mux control is 100, 010, 001 Lock control is 0/1 State are: S0, S1, S2, S3, or ERR Can use 3, 4, or 5 bits to encode Have 4 outputs, so choose 4 bits Encode mux control and lock control in state bits Lock control is first bit, mux control is last 3 bits S0 = 0001 (lock closed, mux first code) S1 = 0010 (lock closed, mux second code) S2 = 0100 (lock closed, mux third code) S3 = 1000 (lock open) ERR = 0000 (error, lock closed) 27 22

A clever way for ERR is to use Preset/reset in existing flipflops. Encode 4 state bits closed mux=C1 start equal & new not equal & new not new S0 S1 S2 S3 ERR mux=C2 mux=C3 open A clever way for ERR is to use Preset/reset in existing flipflops. Not equal & new S0+ = S0N’ S1+ = S0EN + S1N’ S2+ = S1EN + S2N’ S3+ = S2EN + S3 Preset0 = start Preset1,2,3 = 0 Reset0 = start’(E’N + (Q0+Q1+Q2+Q3)’) Reset1,2,3 = start + (E’N + (Q0+Q1+Q2+Q3)’) Already in ERR 27 26

Reset0 = start’(E’N + (Q0+Q1+Q2+Q3)’) D0 = Q0N’ D1 = Q0EN + Q1N’ D2 = Q1EN + Q2N’ D3 = Q2EN + Q3 S0 E N S1 N’ S1 Preset0 = start Preset1,2,3 = 0 Reset0 = start’(E’N + (Q0+Q1+Q2+Q3)’) Reset1,2,3 = start + (E’N + (Q0+Q1+Q2+Q3)’) S1 E N S2 N’ S2 S0 S1 S2 S3 S2 E N S3 27 26

FSM design FSM-design procedure State diagram state-transition table 3. State minimization 4. State encoding 5. Next-state logic minimization 6. Implement the design 27 26

Last topic: more FSM optimization techniques Want to optimize FSM for many reasons beyond state minimization and efficient encoding Additional techniques Pipelining --- allows faster clock speed Retiming --- can reduce registers or change delays Partitioning --- can divide to multiple devices, simpler logic 27

Pipelining related definitions Latency: Time to perform a computation Data input to data output Throughput: Input or output data rate Typically the clock rate Combinational delays drive performance Define d  delay through slowest combinational stage n  number of stages from input to output Latency  n * d (in sec) Throughput  1/d (in Hz) 27

Pipelining What? Why? Subdivide combinational logic Add registers between logic Why? Trade latency for throughput Increased throughput Reduce logic delays Increase clock speed May increased latency Increase circuit utilization Simultaneous computations Logic Reg Logic Reg Logic Reg 27

Pipelining When? Where? Need throughput more than latency Reg Logic Reg When? Need throughput more than latency Signal processing Logic delays > setup/hold times Acyclic logic Where? At natural breaks in the combinational logic Adding registers makes sense 27

Retiming Pipelining adds registers Retiming moves registers around To increase the clock speed Retiming moves registers around Reschedules computations to optimize performance Change delay patterns Reduce register count Without altering functionality 27

Retiming examples Reduce register count Change output delays a D Q a x b D Q x d d b D Q 27

FSM partitioning Break a large FSM into two or more smaller FSMs Rationale Less states in each partition Simpler minimization and state assignment Smaller combinational logic Shorter critical path But more logic overall Partitions are synchronous Same clock!!! 27

Example: Partition the machine Partition into two halves C1 C2 C3 C4 C5 S1 S3 S2 S6 S4 S5 27

Introduce idle states SA and SB handoff control between machines C1 C2 C1•S1 (C2•S6)’ C2•S6 C2 (C1•S1+ C3•S2+ C4•S3+ C5•S2)’ S2 SA SB C3•S2+ C4•S3 S5 C3+C5 S3 C4 S4 C5•S2 27

Partitioning rules Rule #1: Source-state transformation Replace by transition to idle state (SA) C1 C1 S1 S6 S1 SA Rule #2: Destination state transformation Replace with exit transition from idle state C2 C2•S6 S1 S6 S1 SA 27

Partitioning rules (con’t) Rule #3: Multiple transitions with same source or destination Source  Replace by transitions to idle state (SA) Destination  Replace with exit transitions from idle state C3 S2 C3+C5 C3•S2 + S5 S2 S5 C4•S3 SA SB C4 C5 C4 S3 S4 S3 C5•S2 S4 Rule #4: Hold condition for idle state OR exit conditions and invert C2•S6 C2•S6 S1 SA 27

Mealy versus Moore partitions Mealy machines undesirable Inputs can affect outputs immediately “output” can be a handoff to another machine!!! Moore machines desirable Input-to-output path always broken by a flip-flop But…may take several clocks for input to propagate to output 27

Example: Six-state up/down counter Break into 2 parts U  count up D  count down U S0 S5 U U D D D S1 S4 D D U D U S2 S3 U 27

Example: 6 state up/down counter (con’t) Count sequence S0, S1, S2, S3, S4, S5 S2 goes to SA and holds, leaves after S5 S5 goes to SB and holds, leaves after S2 Down sequence is similar S0 S5 U•S5 U U U D D SA (D•S3 + U•S5)’ (D•S0+ U•S2)’ D•S0 D SB S1 S4 D•S3 D D D U U U•S2 U S2 S3 27

Minimize communication between partitions Ideal world: Two machines handoff control Separate I/O, states, etc. Real world: Minimize handoffs and common I/O Minimize number of state bits that cross boundary Merge common outputs 27

Done! 27