General FSM design procedure

Similar documents
General FSM design procedure

Chapter 10. case studies in sequential logic design

General FSM design procedure

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

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

Data paths and control logic

Mealy and Moore examples

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

EECS Components and Design Techniques for Digital Systems. Lec 07 PLAs and FSMs 9/ Big Idea: boolean functions <> gates.

Verilog Tutorial. Introduction. T. A.: Hsueh-Yi Lin. 2008/3/12 VLSI Digital Signal Processing 2

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited

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

EE178 Lecture Verilog FSM Examples. Eric Crabill SJSU / Xilinx Fall 2007

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

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

ECE 2300 Digital Logic & Computer Organization. More Verilog Finite State Machines

ECE 2300 Digital Logic & Computer Organization. More Finite State Machines

Finite State Machines

Introduction to Verilog and ModelSim. (Part 6 State Machines)

Quick Introduction to SystemVerilog: Sequental Logic

I 3 I 2. ! Language of logic design " Logic optimization, state, timing, CAD tools

The VHDL Hardware Description Language

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

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

Sequential Logic Design

ECE 2300 Digital Logic & Computer Organization. More Verilog Finite State Machines

Digital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University

RTL Design (Using ASM/SM Chart)

Course Topics - Outline

Finite-State Machine (FSM) Design

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

Homework deadline extended to next friday

Verilog introduction. Embedded and Ambient Systems Lab

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

Computer Organization

Digital Integrated Circuits

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

B.10 Finite State Machines B.10

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

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

DIGITAL SYSTEM DESIGN

History: Combinational Logic! single FSM! Hierarchy. Facilities for managing networks of FSMs MISII. Facilities for handling latches

Finite State Machines

ECEN 468 Advanced Logic Design

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

Digital Design with SystemVerilog

Control in Digital Systems

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

PDHonline Course G349. State Machines. Mark A. Strain, P.E. PDH Online PDH Center

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

R07

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

EEL 4783: HDL in Digital System Design

Laboratory Exercise 7

EECS 151/251A: SRPING 2017 MIDTERM 1

Digital Design with FPGAs. By Neeraj Kulkarni

EECS150, Fall 2004, Midterm 1, Prof. Culler. Problem 1 (15 points) 1.a. Circle the gate-level circuits that DO NOT implement a Boolean AND function.

Blocking(=) vs Nonblocking (<=) Assignment. Lecture 3: Modeling Sequential Logic in Verilog HDL. Procedural assignments

Laboratory Exercise 3 Davide Rossi DEI University of Bologna AA

Chap 6 Introduction to HDL (d)

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

In this lecture, we will focus on two very important digital building blocks: counters which can either count events or keep time information, and

ECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog

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

R a) Simplify the logic functions from binary to seven segment display code converter (8M) b) Simplify the following using Tabular method

CSE140L: Components and Design Techniques for Digital Systems Lab

6.111 Lecture # 8. Topics for Today: (as time permits)

Hardware Description Language (HDL)

History: Combinational Logic! single FSM! Hierarchy. Facilities for managing networks of FSMs MISII. Facilities for handling latches

CS 151 Final. Q1 Q2 Q3 Q4 Q5 Total Credit Score. Instructions: Student ID. (Last Name) (First Name) Signature

Exp#8: Designing a Programmable Sequence Detector

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

CSE140L: Components and Design

PART B. 3. Minimize the following function using K-map and also verify through tabulation method. F (A, B, C, D) = +d (0, 3, 6, 10).

FSM and Efficient Synthesizable FSM Design using Verilog

VHDL: RTL Synthesis Basics. 1 of 59

Written exam for IE1204/5 Digital Design Thursday 29/

Programming in Esterel

Registers and finite state machines

Verilog for High Performance

This Lecture. Some components (useful for the homework) Verilog HDL (will continue next lecture)

Verilog Coding Guideline

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis

ARM 64-bit Register File

Lecture 15: System Modeling and Verilog

Register Transfer Level

Contents. Chapter 9 Datapaths Page 1 of 28

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

Graduate Institute of Electronics Engineering, NTU Design of Datapath Controllers

EECS 150 Homework 7 Solutions Fall (a) 4.3 The functions for the 7 segment display decoder given in Section 4.3 are:

Injntu.com Injntu.com Injntu.com R16

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

RealDigital. Problem Set #7 S1 S2 S3 Y Z X Y + Y Z X Z

Problem Set # 6 (Assigned 27 February, Due 9 March)

Block diagram view. Datapath = functional units + registers

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

EECS 270 Midterm Exam

Chapter 5 Registers & Counters

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

Transcription:

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 complex counter traffic light controller door combination lock Autumn 2 CSE37 - XVII - Sequential Logic Examples General FSM design procedure () Determine inputs and outputs (2) Determine possible states of machine state minimization (3) Encode states and outputs into a binary code state assignment or state encoding output encoding possibly input encoding (if under our control) (4) Realize logic to implement functions for states and outputs combinational logic implementation and optimization choices in steps 2 and 3 can have large effect on resulting logic Autumn 2 CSE37 - XVII - Sequential Logic Examples 2

Finite string pattern recognizer (step ) Finite string pattern recognizer one input (X) and one output (Z) output is asserted whenever the input sequence has been observed, as long as the sequence has never been seen Step : understanding the problem statement sample input/output behavior: X: Z: X: Z: Autumn 2 CSE37 - XVII - Sequential Logic Examples 3 Finite string pattern recognizer (step 2) Step 2: draw state diagram for the strings that must be recognized, i.e., and a Moore implementation S Autumn 2 CSE37 - XVII - Sequential Logic Examples 4

Finite string pattern recognizer (step 2) Step 2: draw state diagram for the strings that must be recognized, i.e., and a Moore implementation S S S2 S3 [] Autumn 2 CSE37 - XVII - Sequential Logic Examples 5 Finite string pattern recognizer (step 2) Step 2: draw state diagram for the strings that must be recognized, i.e., and a Moore implementation S S2 S S4 S5 S3 [] S6 or Autumn 2 CSE37 - XVII - Sequential Logic Examples 6

Activity: complete state diagram Consider all cases not already in diagram and reuse states S S2 S S4 S5 S3 [] S6 or Autumn 2 CSE37 - XVII - Sequential Logic Examples 7 Finite string pattern recognizer (step 2, cont d) Exit conditions from state S3: have recognized if next input is then have =... (state S6) if next input is then have = (state S2) Exit conditions from S: recognizes strings of form (no seen) loop back to S if input is Exit conditions from S4: recognizes strings of form (no seen) loop back to S4 if input is... S S2... S... S4 S5 S3 S6... []... or Autumn 2 CSE37 - XVII - Sequential Logic Examples 8

Finite string pattern recognizer (step 2, cont d) S2 and S5 still have incomplete transitions S2 = ; If next input is, then string could be prefix of ()() S4 handles just this case S5 = ; If next input is, then string could be prefix of ()() S2 handles just this case Reuse states as much as possible look for same meaning state minimization leads to smaller number of bits to represent states Once all states have a complete set of transitions we have a final state diagram... S S2... S... S4 S5... S3 S6... []... or Autumn 2 CSE37 - XVII - Sequential Logic Examples 9 Finite string pattern recognizer (step 3) Verilog description including state assignment (or state encoding) module string (clk, X, rst, Q, Q, Q2, Z); input clk, X, rst; output Q, Q, Q2, Z; parameter S = [,,]; // state parameter S = [,,]; //strings ending in... parameter S2 = [,,]; //strings ending in... parameter S3 = [,,]; //strings ending in... parameter S4 = [,,]; //strings ending in... parameter S5 = [,,]; //strings ending in... parameter S6 = [,,]; //strings ending in... reg state[:2]; assign Q = state; assign Q = state[]; assign Q2 = state[2]; assign Z = (state == S3); always @(posedge clk) begin if (rst) state = S; else case (state) S: if (X) state = S4 else state = S; S: if (X) state = S2 else state = S; S2: if (X) state = S4 else state = S3; S3: if (X) state = S2 else state = S6; S4: if (X) state = S4 else state = S5; S5: if (X) state = S2 else state = S6; S6: state = S6; default: begin $display ( invalid state reached ); state = 3 bxxx; end endcase end endmodule Autumn 2 CSE37 - XVII - Sequential Logic Examples

Finite string pattern recognizer Review of process understanding problem write down sample inputs and outputs to understand specification derive a state diagram write down sequences of states and transitions for sequences to be recognized minimize number of states add missing transitions; reuse states as much as possible state assignment or encoding encode states with unique patterns simulate realization verify I/O behavior of your state diagram to ensure it matches specification Autumn 2 CSE37 - XVII - Sequential Logic Examples Complex counter A synchronous 3-bit counter has a mode control M when M =, the counter counts up in the binary sequence when M =, the counter advances through the Gray code sequence binary:,,,,,,, Gray:,,,,,,, Valid I/O behavior (partial) Mode Input M Current State Next State Autumn 2 CSE37 - XVII - Sequential Logic Examples 2

Complex counter (state diagram) Deriving state diagram one state for each output combination add appropriate arcs for the mode control S [] S [] S2 [] S3 [] S4 S5 S6 [] [] [] S7 [] Autumn 2 CSE37 - XVII - Sequential Logic Examples 3 Complex counter (state encoding) Verilog description including state encoding module string (clk, M, rst, Z, Z, Z2); input clk, X, rst; output Z, Z, Z2; parameter S = [,,]; parameter S = [,,]; parameter S2 = [,,]; parameter S3 = [,,]; parameter S4 = [,,]; parameter S5 = [,,]; parameter S6 = [,,]; parameter S7 = [,,]; reg state[:2]; assign Z = state; assign Z = state[]; assign Z2 = state[2]; always @(posedge clk) begin if rst state = S; else case (state) S: state = S; S: if (M) state = S3 else state = S2; S2: if (M) state = S6 else state = S3; S3: if (M) state = S2 else state = S4; S4: if (M) state = S else state = S5; S5: if (M) state = S4 else state = S6; S6: if (M) state = S7 else state = S7; S7: if (M) state = S5 else state = S; endcase end endmodule Autumn 2 CSE37 - XVII - Sequential Logic Examples 4

Example: traffic light controller A busy highway is intersected by a little used farmroad Detectors C sense the presence of cars waiting on the farmroad with no car on farmroad, light remain green in highway direction if vehicle on farmroad, highway lights go from Green to Yellow to Red, allowing the farmroad lights to become green these stay green only as long as a farmroad car is detected but never longer than a set interval when these are met, farm lights transition from Green to Yellow to Red, allowing highway to return to green even if farmroad vehicles are waiting, highway gets at least a set interval as green Assume you have an interval timer that generates: a short time pulse (TS) and a long time pulse (TL), in response to a set (ST) signal. TS is to be used for timing yellow lights and TL for green lights Autumn 2 CSE37 - XVII - Sequential Logic Examples 5 Example: traffic light controller (cont ) Highway/farm road intersection farm road car sensors highway Autumn 2 CSE37 - XVII - Sequential Logic Examples 6

Example: traffic light controller (cont ) Tabulation of inputs and outputs inputs description outputs description place FSM in initial state HG, HY, HR assert green/yellow/red highway lights C detect vehicle on the farm road FG, FY, FR assert green/yellow/red highway lights TS short time interval expired ST start timing a short or long interval TL long time interval expired Tabulation of unique states some light configurations imply others state description HG highway green (farm road red) HY highway yellow (farm road red) FG farm road green (highway red) FY farm road yellow (highway red) Autumn 2 CSE37 - XVII - Sequential Logic Examples 7 Activity: add inputs/outputs to arcs Inputs: C, TS, TL Output (Mealy): ST Reset HG HY FY FG Autumn 2 CSE37 - XVII - Sequential Logic Examples 8

Example: traffic light controller (cont d) Completed state diagram (TL C)' Reset HG TL C / ST TS / ST TS' HY FY TS' TS / ST FG TL+C' / ST (TL+C')' Autumn 2 CSE37 - XVII - Sequential Logic Examples 9 Example: traffic light controller (cont ) Generate state table with symbolic states Consider state assignments output encoding similar problem to state assignment (Green =, Yellow =, Red = ) Inputs Present State Next State Outputs C TL TS ST H F HG HG Green Red HG HG Green Red HG HY Green Red HY HY Yellow Red HY FG Yellow Red FG FG Red Green FG FY Red Green FG FY Red Green FY FY Red Yellow FY HG Red Yellow SA: HG = HY = FG = FY = SA2: HG = HY = FG = FY = SA3: HG = HY = FG = FY = (one-hot) Autumn 2 CSE37 - XVII - Sequential Logic Examples 2

Logic for different state assignments SA SA2 NS = C TL' PS PS + TS PS' PS + TS PS PS' + C' PS PS + TL PS PS NS = C TL PS' PS' + C TL' PS PS + PS' PS ST = C TL PS' PS' + TS PS' PS + TS PS PS' + C' PS PS + TL PS PS H = PS H = PS' PS F = PS' F = PS PS NS = C TL PS' + TS' PS + C' PS' PS NS = TS PS PS' + PS' PS + TS' PS PS ST = C TL PS' + C' PS' PS + TS PS H = PS F = PS' H = PS PS' F = PS PS SA3 NS3 = C' PS2 + TL PS2 + TS' PS3 NS2 = TS PS + C TL' PS2 NS = C TL PS + TS' PS NS = C' PS + TL' PS + TS PS3 ST = C TL PS + TS PS + C' PS2 + TL PS2 + TS PS3 H = PS3 + PS2 H = PS F = PS + PS F = PS3 Autumn 2 CSE37 - XVII - Sequential Logic Examples 2 Traffic light controller as two communicating FSMs Without separate timer TS' S would require 7 states S would require 3 states S S2 would require 7 states S3 would require 3 states S and S3 have simple transformation S and S2 would require many more arcs C could change in any of seven states By factoring out timer greatly reduce number of states 4 instead of 2 counter only requires seven or eight states 2 total instead of 2 TS/ST Sa ST Sb traffic light controller TS Sc TL /ST timer Autumn 2 CSE37 - XVII - Sequential Logic Examples 22

Traffic light controller FSM Specification of inputs, outputs, and state elements module FSM(HR, HY, HG, FR, FY, FG, ST, TS, TL, C,, Clk); output HR; output HY; output HG; output FR; output FY; output FG; output ST; input TS; input TL; input C; input ; input Clk; reg [6:] state; reg ST; parameter highwaygreen = 6'b; parameter highwayyellow = 6'b; parameter farmroadgreen = 6'b; parameter farmroadyellow = 6'b; assign HR = state[6]; assign HY = state[5]; assign HG = state[4]; assign FR = state[3]; assign FY = state[2]; assign FG = state[]; specify state bits and codes for each state as well as connections to outputs Autumn 2 CSE37 - XVII - Sequential Logic Examples 23 Traffic light controller FSM (cont d) initial begin state = highwaygreen; ST = ; end always @(posedge Clk) begin if () begin state = highwaygreen; ST = ; end else begin ST = ; case (state) highwaygreen: case statement triggerred by clock edge if (TL & C) begin state = highwayyellow; ST = ; end highwayyellow: if (TS) begin state = farmroadgreen; ST = ; end farmroadgreen: if (TL!C) begin state = farmroadyellow; ST = ; end farmroadyellow: if (TS) begin state = highwaygreen; ST = ; end endcase end end endmodule Autumn 2 CSE37 - XVII - Sequential Logic Examples 24

Timer for traffic light controller Another FSM module Timer(TS, TL, ST, Clk); output TS; output TL; input ST; input Clk; integer value; assign TS = (value >= 4); // 5 cycles after assign TL = (value >= 4); // 5 cycles after always @(posedge ST) value = ; // async always @(posedge Clk) value = value + ; endmodule Autumn 2 CSE37 - XVII - Sequential Logic Examples 25 Complete traffic light controller Tying it all together (FSM + timer) structural Verilog (same as a schematic drawing) module main(hr, HY, HG, FR, FY, FG,, C, Clk); output HR, HY, HG, FR, FY, FG; input, C, Clk; Timer part(ts, TL, ST, Clk); FSM part2(hr, HY, HG, FR, FY, FG, ST, TS, TL, C,, Clk); endmodule traffic light controller ST timer TS TL Autumn 2 CSE37 - XVII - Sequential Logic Examples 26

Communicating finite state machines One machine's output is another machine's input X FSM FSM 2 Y CLK FSM X A A B Y== A [] B Y== Y== X== X== C D [] X== X== X== FSM2 Y C D D machines advance in lock step initial inputs/outputs: X =, Y = Autumn 2 CSE37 - XVII - Sequential Logic Examples 27 Data-path and control Digital hardware systems = data-path + control datapath: registers, counters, combinational functional units (e.g., ALU), communication (e.g., busses) control: FSM generating sequences of control signals that instructs datapath what to do next control "puppeteer who pulls the strings" status info and inputs state control signal outputs data-path "puppet" Autumn 2 CSE37 - XVII - Sequential Logic Examples 28

Digital combinational lock Door combination lock: punch in 3 values in sequence and the door opens; if there is an error the lock must be ; once the door opens the lock must be inputs: sequence of input values, outputs: door open/close memory: must remember combination or always have it available open questions: how do you set the internal combination? stored in registers (how loaded?) hardwired via switches set by user Autumn 2 CSE37 - XVII - Sequential Logic Examples 29 Implementation in software integer combination_lock ( ) { integer v, v2, v3; integer error = ; static integer c[3] = 3, 4, 2; while (!new_value( )); v = read_value( ); if (v!= c[]) then error = ; while (!new_value( )); v2 = read_value( ); if (v2!= c[2]) then error = ; while (!new_value( )); v3 = read_value( ); if (v2!= c[3]) then error = ; } if (error == ) then return(); else return (); Autumn 2 CSE37 - XVII - Sequential Logic Examples 3

Determining details of the specification How many bits per input value? How many values in sequence? How do we know a new input value is entered? What are the states and state transitions of the system? new value clock open/closed Autumn 2 CSE37 - XVII - Sequential Logic Examples 3 Digital combination lock state diagram States: 5 states represent point in execution of machine each state has outputs Transitions: 6 from state to state, 5 self transitions, global changes of state occur when clock says its ok based on value of inputs Inputs:, new, results of comparisons Output: open/closed closed C!=value C2!=value C3!=value & new & new & new S S2 S3 OPEN C==value & new closed C2==value & new closed C3==value & new closed open ERR not new not new not new Autumn 2 CSE37 - XVII - Sequential Logic Examples 32

Data-path and control structure Data-path storage registers for combination values multiplexer comparator Control finite-state machine controller control for data-path (which value to compare) value C C2 C3 4 4 4 multiplexer 4 4 comparator mux control equal new controller clock open/closed Autumn 2 CSE37 - XVII - Sequential Logic Examples 33 State table for combination lock Finite-state machine refine state diagram to take internal structure into account state table ready for encoding next new equal state state mux open/closed S C closed S S C closed S ERR closed S S2 C2 closed... S3 OPEN open... Autumn 2 CSE37 - XVII - Sequential Logic Examples 34

Encodings for combination lock Encode state table state can be: S, S2, S3, OPEN, or ERR needs at least 3 bits to encode:,,,, and as many as 5:,,,, choose 4 bits:,,,, output mux can be: C, C2, or C3 needs 2 to 3 bits to encode choose 3 bits:,, mux control output open/closed can be: open or closed controller needs or 2 bits to encode equal clock choose bit:, next open/closed new equal state state mux open/closed mux is identical to last 3 bits of state open/closed is identical to first bit of state therefore, we do not even need to implement... FFs to hold state, just use outputs... Autumn 2 CSE37 - XVII - Sequential Logic Examples 35 new Data-path implementation for combination lock Multiplexer easy to implement as combinational logic when few inputs logic can easily get too big for most PLDs value Ci C2i C3i mux control value C C2 C3 4 4 4 multiplexer 4 comparator 4 mux control equal equal Autumn 2 CSE37 - XVII - Sequential Logic Examples 36

Data-path implementation (cont d) Tri-state logic utilize a third output state: no connection or float connect outputs together as long as only one is enabled open-collector gates can only output, not value Ci C2i C3i can be used to implement logical AND with only wires mux control + oc C C2 C3 4 4 4 mux control multiplexer tri-state driver (can disconnect 4 equal from output) value comparator 4 equal open-collector connection (zero whenever one connection is zero, one otherwise wired AND) Autumn 2 CSE37 - XVII - Sequential Logic Examples 37 Tri-state gates The third value logic values:, don't care: X (must be or in real circuit!) third value or state: Z high impedance, infinite R, no connection Tri-state gates OE additional input output enable (OE) output values are,, and Z In Out when OE is high, the gate functions normally when OE is low, the gate is disconnected from wire at output allows more than one gate to be connected to the same output wire as long as only one has its output enabled at any one time (otherwise, sparks could fly) non-inverting tri-state buffer In OE Out X Z In OE Out Autumn 2 CSE37 - XVII - Sequential Logic Examples 38

Tri-state and multiplexing When using tri-state logic () make sure never more than one "driver" for a wire at any one time (pulling high and low at the same time can severely damage circuits) (2) make sure to only use value on wire when its being driven (using a floating value may cause failures) Using tri-state gates to implement an economical multiplexer Input F Input OE OE when Select is high Input is connected to F when Select is low Input is connected to F this is essentially a 2: mux Select Autumn 2 CSE37 - XVII - Sequential Logic Examples 39 Open-collector gates and wired-and Open collector: another way to connect gate outputs to the same wire gate only has the ability to pull its output low it cannot actively drive the wire high (default pulled high through resistor) Wired-AND can be implemented with open collector logic if A and B are "", output is actively pulled low if C and D are "", output is actively pulled low if one gate output is low and the other high, then low wins if both gate outputs are "", the wire value "floats", pulled high by resistor low to high transition usually slower than it would have been with a gate pulling high hence, the two NAND functions are ANDed together open-collector NAND gates with ouputs wired together using "wired-and" to form (AB)'(CD)' Autumn 2 CSE37 - XVII - Sequential Logic Examples 4

Digital combination lock (new data-path) Decrease number of inputs Remove 3 code digits as inputs use code registers make them loadable from value need 3 load signal inputs (net gain in input ( 4 * 3 ) 3 = 9) could be done with 2 signals and decoder (ld, ld2, ld3, hold) ld ld2 ld3 value 4 C C2 C3 4 4 4 multiplexer 4 comparator mux control equal Autumn 2 CSE37 - XVII - Sequential Logic Examples 4 Sequential logic case studies summary FSM design understanding the problem generating state diagram communicating state machines implementation using PLDs Four case studies understand I/O behavior draw diagrams enumerate states for the "goal" expand with error conditions reuse states whenever possible Autumn 2 CSE37 - XVII - Sequential Logic Examples 42