Transcription of Edge-triggered Flip-Flop, State Table, State Diagram
1 Edge-triggered flip -Flop, State Table, State Diagram Edge-triggered flip -Flop Contrast to Pulse- triggered SR flip -Flop Pulse- triggered : Read input while clock is 1, change output when the clock goes to 0. What happens during the entire HIGH part of clock can affect eventual output. Edge-triggered : Read input only on edge of clock cycle (positive or negative) Example below: Positive Edge-triggered D flip -Flop On the positive edge (while the clock is going from 0 to 1), the input D is read, and almost immediately propagated to the output Q.
2 Only the value of D at the positive edge matters. D C S C R D Clock Q Q Symbol Symbol of Edge-triggered D flip -flop D C D C Positive- edge triggered Negative- edge triggered flip -Flop Timing Set-up time: ts Input needs to be stable before trigger Hold time: th Input needs to be stable after trigger Propagation delay: tp Some delay from trigger to output change Example: Negative edge triggered flip - flip Clock ts th tp Sequential Circuit Description Input Equations State Table State Diagram We ll use the following example Sequential Circuit Description D C D C Clock X A A B B Y Sequential Circuit Description D C D C Clock X A A B B Y input output Next State Present State At the clock trigger, the next State will be read and transferred to the present State Input Equations Anext = ApresentX + BpresentX Bnext = A presentX Y = (Apresent + Bpresent)
3 X Next State in terms of input and present State Output in terms of input and present State State Table Present State Input Next State Output A B X A B Y 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 0 0 0 1 1 1 1 1 0 0 State Diagram 00 01 11 10 0/0 1/0 0/1 1/0 0/1 1/0 1/0 0/1 Mealy and Moore Models Preceding Example: Output depends on present State and input.
4 This is called the Mealy Model Another kind of circuit: Output only depends on present State . This is called the Moore Model Example of Moore Model X Y D C Clock A Z Anext = Apresent + XY Z = Apresent 0/0 1/1 X Y Apresent Anext 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 00,01,10 11 00,01,10,11 Moore Model Some Combinational Circuit Outputs Inputs Some Combinational Circuit flip -flops Mealy Model Some Combinational Circuit Outputs Inputs Some Combinational Circuit flip -flops Mealy and Moore Model State Diagrams 00 01 11 10 0/0 1/0 0/1 1/0 0/1 1/0 1/0 0/1 0/0 1/1 00,01,10 11 00,01,10,11 Moore input State output input output State How to Design a Sequential Circuit 1.
5 Specification 2. Formulation: Draw a State Diagram 3. Assign State number for each State 4. Draw State table 5. Derive input equations 5. One D flip -flop for each State bit Example Design a sequential circuit to recognize the input sequence 1101. That is, output 1 if the sequence 1101 has been read, output 0 otherwise. A B C D 0/0 1/0 1/0 1/0 0/0 0/0 1/1 0/0 Assign States 4 states, so we need 2 bits 00 01 10 11 0/0 1/0 1/0 1/0 0/0 0/0 1/1 0/0 State Table Present State Input Next State Output A B X A B Y 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 1 1 0 0 1
6 0 0 1 1 0 1 0 1 1 0 0 1 1 0 0 0 0 1 1 1 0 1 1 Input Equations Anext = A BX + AB Bnext = A B X + AB X + ABX Y = ABX Circuit Diagram D C D C Clock X A A B B Y Exercise: Fill in the input to flip -Flop B