Sequential logic design principles Chapter 7 Sequential logic design principles Memory devices : Latch and Flip-flop Sequential logic : Pipeline and FSM Analysis and Synthesis for FSM
States analyze examples Design an “1s-counting machine : The output Z should be 1 if the number of 1 inputs on X and Y since reset is a multiple of 4, and 0 otherwise.
States analyze examples Step 1: set up enough state with different meaning ; State name state meaning S0 00 initial or four 1s, Z=1; S1 01 one 1s, Z=0; S2 11 two 1s, Z=0; S3 10 three 1s, Z=0;
States analyze examples Step 2: set up the state diagram and the state table ; S* XY Z State meaning 00 01 11 10 S0 S1 S2 1 Zero 1s S3 One 1s Two 1s Three 1s
States analyze examples Step 3: get the transition table according to the state coding;
States analyze examples Design a “simple state machine ”: The output Z should be 1 if : A had the same value at each of the two previous clock ticks or B is 1 and last Z was 1.
States analyze examples Step 1: set up enough state with different meaning ; State name state meaning S0 initial state; S1 A=0; S2 A=1; S3 A=00; Z=1; S4 A=11; Z=1; S5 A=01; Z=1; S6 A=01; Z=0; S7 A=10; Z=1; S8 A=10; Z=0;
States analyze examples Step 2: state / output table
States analyze examples Step 3: state minimization Equivalent state: the current output is the same; the transition states is the same on same inputs; The equivalent states should be replaced by a single state !
States analyze examples Step 3: state minimization Equivalent states pairs: S5—S4 S6—S2 S7—S3 S8—S1 S* AB Z 00 01 11 10 S0 S1 S2 S3 S4 1 The minimal state/output table
States analyze examples Step 3: state minimization The minimal state diagram
States analyze examples Step 4: state assignment Use decomposed assignment, output is Q2;
States analyze examples Step 4: transition table and minimal cost design
Transition list and minimization Step 4: transition list and minimal cost design
Transition list and minimization Step 4: transition list and minimal cost design