Engin112-F07-L29-fsm-verilog

Engin112-F07-L29-fsm-verilog - Engin112 Lecture 29 FSM...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Maciej Ciesielski Department of Electrical and Computer Engineering 11/16/2007 Engin112 – Lecture 29 FSM Design - Verilog
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
11/16/2007 Engin 112 - Intro to ECE 2 Recap from last lecture ± Sequential circuit design y Finite state machines (FSM) » Mealy » Moore y Design procedure y State reduction ± Today’s lecture y Sequential circuit design » FSM design in Verilog » Simulation
Background image of page 2
11/16/2007 Engin 112 - Intro to ECE 3 FSM Approach to Sequential Circuit Design ± Example 1 (review) – sequence detector y Design a circuit that outputs a 1 when a sequence “111” has been applied to input, and 0 otherwise.” ± Step 1: derive state diagram ± (Step 2: reduce number of states) ± Step 3: encode the state ± Step 4: create state table ± Step 6: derive and minimize FF and output equations (use D FFs) ± Step 7: construct circuit diagram
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
11/16/2007 Engin 112 - Intro to ECE 4 Sequence Detector: Verilog (functional) ± Verilog description (structural / functional) module seq3_detect_circuit(x,clk, y); input x, clk; output y; reg QA, QB; // two state DFFs wire DA, DB; always @(posedge clk) begin QA <= DA; QB <= DB; end assign DA = (QA & x) | (QB & x); assign DB = (QA & x) | (!QB & x); assign y = QA & QB; endmodule QB DA DB QA x y QB’
Background image of page 4
11/16/2007 Engin 112 - Intro to ECE 5 Sequence Detector: Synthesis + Simulation ± Synthesized circuit diagram (Quartus) QB D ENA PRE CLR DA~0 DA DB~0 DB~1 DB y~0 QA D ENA Q PRE CLR x clk y ± Simulation results (Quartus)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
11/16/2007 Engin 112 - Intro to ECE 6 Sequence Detector : Verilog (Moore FSM) module seq3_detect_moore(x,clk, y); // Moore machine for a three-1s sequence detection input x, clk; output y; reg [1:0] state; parameter S0=2'b00, S1=2'b01, S2=2'b10, S3=2'b11; // Define the sequential block always @ ( posedge clk) case (state) S0: if
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/16/2008 for the course ENGIN 112 taught by Professor Ciesielski during the Spring '08 term at UMass (Amherst).

Page1 / 19

Engin112-F07-L29-fsm-verilog - Engin112 Lecture 29 FSM...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online