Analysis of Clocked Sequential Circuits slide 0

Analysis of Clocked Sequential Circuits

  • Published on
    03-Jan-2016

  • View
    18

  • Download
    1

DESCRIPTION

Analysis of Clocked Sequential Circuits. Example of a Sequential Circuit. D flip-flops. Example: Start with A=0, B=0, x=0. A(next)=0 B(next)=0 Y(next)=0. What are A(next), B(next) and y(next) given that A=1, B=1 and X=1?. D flip-flops. Alternate State Table. State Diagram. - PowerPoint PPT Presentation

Transcript

Analysis of Clocked Sequential Circuits

Analysis of Clocked Sequential CircuitsExample of a Sequential CircuitD flip-flops

Example: Start with A=0, B=0, x=0.A(next)=0B(next)=0Y(next)=0What are A(next), B(next) and y(next) given that A=1, B=1 and X=1?

D flip-flopsAlternate State Table

State Diagram

Each circle is a state

When x=1, y=0.State Diagram

Each circle is a state

When x=0, y=1.Detects 0 in the bit stream of data

Output is a 0 as long as input is a 1. The first 0 after a string of 1 transfers the circuit back to 00.Summary

Model a Clocked Sequential Circuit with Verilog

Use parameter to define constantsForm the next state from x and the current stateForm the outputfork.....join construction

S0S1S2S3Parameter

S0S1S2S3

Define states with parameterUpdate States

S0S1S2S3

If reset is 0, set state to S0.

If reset is 1, update state with next_state.Implement the States Using State Diagram

S0S1S2S3

fork....join

Right click to add state and next_state to the waveform shown rightValid Mealy Output

S0S1S2S3Mealy Glitches

S0S1S2S3Glitiches occur because x changes before the next rising clock edgeGeneral Structure of a Mealy Machine

Output depends on input as well as the stateThe circuit is in. (variable: state)

Synchronize the input with clock when using Mealy machine.

Moore Machine

Output depends on the state, but not the input.Synthesis of Sequential CircuitStart with a state diagramAssign Binary Values to the StatesState Diagram for Sequence DetectorProblem statement:Design a circuit that detects a sequence of three or more consecutive 1s in a string of bits coming through an input lineState Diagram of the Word Description

Start with S0.if input is 0, stay in S0.if input is 1, go to S1.Once in S1if input is 1, go to S2.if input is 0, go to S0.Once in S2if input is 0, go to S0.if input is 1, go to S3.Once in S3,if input is 0, go to S0.if input is 1, stay in S3, set output to 1.

Output is 1 when the circuit is in S3, 0 otherwise.Assign Binary Value to the States

Use two flip-flops to represent states.Let x be the inputAnd y be the output

01234567Assign Binary Value to the States

01234567

Circuit Implementation

Sequence Detector Circuit

Random NumbergeneratorSequenceDetectorMeasurement Results

ABxyclk