Designing State Machines SQRT controller Lecture L9.2a Section 9.2.

Slides:



Advertisements
Similar presentations
Modulo-N Counters Module M10.4 Section 7.2.
Advertisements

VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
Lecture #24 Page 1 EE 367 – Logic Design Lecture #24 Agenda 1.State Machines Review Announcements 1.n/a.
Sequential Circuits Storage elements
Encoders Module M9.3 Section 6.3. Encoders Priority Encoders TTL Encoders.
Demultiplexers Module M6.4 Section 6.4. Demultiplexers YIN 1 x 4 DeMUX d0d1 Y0 Y1 Y2 Y3 Y0 Y1 Y2 Y3 d1d0 0 0 YIN YIN YIN
Shift Registers Module M11.1 Section 7.3.
7-Segment Displays Lecture L6.1 Section 6.3. Turning on an LED.
© 1998, Peter J. AshendenVHDL Quick Start1 Basic VHDL Concepts Interfaces Behavior Structure Test Benches Analysis, elaboration, simulation Synthesis.
CS 140 Lecture 10 Sequential Networks: Implementation Professor CK Cheng CSE Dept. UC San Diego 1.
Analysis of Clocked Sequential Circuits
1 EE121 John Wakerly Lecture #10 Some shift-register stuff Sequential-circuit analysis.
Binary Counters Module M10.3 Section 7.2. Counters 3-Bit Up Counter 3-Bit Down Counter Up-Down Counter.
7-Segment Displays Lecture L6.7 Section 6.5. Turning on an LED.
Binary-to-BCD Converter Lecture L6.2 Section 6.5 pp
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
Using State Machines as Control Circuits Lecture L9.4.
Multiplexers Lecture L6.4 Section 6.4.
Integer Square Root.
CS 140 Lecture 9 Professor CK Cheng 4/30/02. Part II. Sequential Network 1.Memory 2.Specification 3.Implementation S XY s i t+1 = g i (S t, x t )
6/27/20061 Sequence Detectors Lecture Notes – Lab 5 Sequence detection is the act of recognizing a predefined series of inputs A sequence detector is a.
Subtractors Module M8.2 Section 6.2. Subtractors Half Subtractor Full Subtractor Adder/Subtractor - 1 Adder/Subtractor - 2.
6/12/20151 Sequence Detectors Lecture Notes – Lab 4 Sequence detection is the act of recognizing a predefined series of inputs A sequence detector is a.
Designing State Machines Lecture L9.2 Handout Section 9.2.
Datapaths Lecture L10.2 Sections 10.2, ALU (Sect. 7.5 and Lab 6)
Arbitrary Waveforms Lecture L8.5 Section 7.2. CLK DQ !Q CLK DQ !Q CLK DQ !Q Q0Q0.D Q1 Q2 Q1.D Q2.D s s s s3 0 1.
Counters as State Machines Lecture L9.1 Handout Section 9.1.
Equality Detector Lecture L6.1 Section 6.1. Equality Detector XNOR X Y Z Z = !(X $ Y) X Y Z
Flip-Flops Module M10.2 Section 7.1. D Latch Q !Q CLK D !S !R S R X 0 Q 0 !Q 0 D CLK Q !Q Note that Q follows D when the clock in high, and.
Binary Counters Lecture L8.3 Section 8.2. Counters 3-Bit Up Counter 3-Bit Down Counter Up-Down Counter.
Shifter Lecture L7.4 Group HW #4 Section 10.3.
A/D Converter Control Discussion D8.6 Rev. B – 3/14/2006.
Modulo-N Counters Lecture L8.4 Section 7.2. Counters Modulo-5 Counter 3-Bit Down Counter with Load and Timeout Modulo-N Down Counter.
Codes and Code Converters
Code Converters Module M7.1 Section 6.5. Code Converters Binary-to-BCD Converters ABEL TRUTH_TABLE Command.
Logic Design Review – 3 Basic Sequential Circuits Lecture L14.3 Verilog.
Arbitrary Waveforms Module M10.5 Section 7.2. CLK DQ !Q CLK DQ !Q CLK DQ !Q Q0Q0.D Q1 Q2 Q1.D Q2.D s s s s3 0 1.
Arithmetic Logic Unit (ALU) Lecture L7.5 Section 7.5.
Pulse-Width Modulated DAC Lecture 11.3 Section 11.5.
Multiplexers Module M6.1 Section 6.4. Multiplexers A 4-to-1 MUX TTL Multiplexer A 2-to-1 MUX.
Adders Lecture L7.1 Section 6.2 Section 10.4 (pp )
Shifters Lecture L7.4 Section 7.4. MODULE shift TITLE 'shifter' DECLARATIONS " INPUT PINS " D3..D0 PIN 11,7,6,5; D = [D3..D0]; s2..s0 PIN 3,2,1; S.
Flip-Flops Lecture L8.2 Section 8.1. Recall the !S-!R Latch !S !R Q !Q !S !R Q !Q X Y nand 1 0 Set 1 0.
Arithmetic Logic Unit (ALU) Lecture L9.3 Lab 10. ALU CB = carry_borrow flag Z = zero flag (Z = 1 if Y = 0)
CS 140L Lecture 7 Professor CK Cheng 11/12/02. Transformation between Mealy and Moore Machines Algorithm: 1) For each NS, z = S i, j create a state S.
Shift Registers Lecture L6.6 Section Bit Shift Register.
Equality Detector Lecture L6.3 Section 6.1. Equality Detector XNOR X Y Z Z = !(X $ Y) X Y Z
7-Segment Displays Module M7.2 Section 6.5. Turning on an LED Common Anode.
Flip-Flops Lecture L8.2 Section 7.1 – Book Sect. 8.1– Handout.
CS 140L Lecture 7 Transformation between Mealy and Moore Machines Professor CK Cheng CSE Dept. UC San Diego.
State Machines.
Review of Digital Logic Design Concepts OR: What I Need to Know from Digital Logic Design (EEL3705)
DLD Lecture 26 Finite State Machine Design Procedure.
A Greatest Common Divisor (GCD) Processor Lecture L10.3 Sections 10.4, 10.5.
Registers; State Machines Analysis Section 7-1 Section 5-4.
EE121 John Wakerly Lecture #9
Lab5-1 張明峰 交大資工系 Lab 5: FSM and BCD counters Implement the vending machine of lab 2 A two-digit BCD counter –two BCD counters –can load data in parallel.
Mealy and Moore Machines Lecture 8 Overview Moore Machines Mealy Machines Sequential Circuits.
Digital Logic & Design Dr. Waseem Ikram Lecture No. 35.
Exp#7 Finite State Machine Design in Verilog COE203 Digital Logic Laboratory Dr. Ahmad Almulhem KFUPM Spring 2009.
Digital Logic & Design Dr. Waseem Ikram Lecture 37.
Supplement on Verilog for Algorithm State Machine Chart
Lecture L5.1 Mealy and Moore Machines
Counters as State Machines
Shift Registers Lecture L8.6 Section 8.3.
ECE 3130 – Digital Electronics and Design
Analog-to-Digital Converters
ECE 3130 – Digital Electronics and Design
Digital Logic & Design Dr. Waseem Ikram Lecture No. 36.
The Verilog Hardware Description Language
Presentation transcript:

Designing State Machines SQRT controller Lecture L9.2a Section 9.2

SQRT Controller Mealy and Moore Machines SQRT Controller

A canonical sequential network

A Mealy state machine

A Moore state machine

SQRTctl

Lab 8

MODULE SQRTctl interface(Clk, Clear, lteflg, strt -> ald, sqld, dld, outld); TITLE 'Control Unit for square root algorithm' DECLARATIONS " INPUT PINS " Clk PIN; " clock lteflg PIN;" <= flag Clear PIN;" clear start PIN;" GCD starts when start = 1 " OUTPUT PINS " ald, sqld, dld, outld PIN;" reg load signals

A Moore state machine

Q1..Q0 NODE ISTYPE 'reg buffer'; Q = [Q1..Q0]; " 2-bit state vector " Definitions QSTATE = [Q1, Q0]; start = [0, 0]; test = [0, 1]; update = [1, 0]; done = [1, 1]; state_diagram QSTATE state start: if strt then test else start; state test: if lteflg then update else done; state update:goto test; state done:goto done;

A Moore state machine

EQUATIONS WHEN QSTATE == start then" a <- SW {ald = 1; sqld = 0; dld = 0; outld = 0;} WHEN QSTATE == test then {ald = 0; sqld = 0; dld = 0; outld = 0;} WHEN QSTATE == update then" sq <- sq + del; del <- del + 2 {ald = 0; sqld = 1; dld = 1; outld = 0;} WHEN QSTATE == done then " out <- (del - 1)/2 {ald = 0; sqld = 0; dld = 0; outld = 1;} Q.C = Clk; Q.AR = Clear; END SQRTctl

Lab 8