Presentation is loading. Please wait.

Presentation is loading. Please wait.

University of Texas at Austin CS310 - Computer Organization Spring 2009 Don Fussell State Machines.

Similar presentations


Presentation on theme: "University of Texas at Austin CS310 - Computer Organization Spring 2009 Don Fussell State Machines."— Presentation transcript:

1 University of Texas at Austin CS310 - Computer Organization Spring 2009 Don Fussell State Machines

2 University of Texas at Austin CS310 - Computer Organization Spring 2009 Don Fussell 2 Another look at D latch/flip-flop q old Dq new 000 011 100 111 q new = D This is an example of a state diagram more specifically a Moore machine

3 University of Texas at Austin CS310 - Computer Organization Spring 2009 Don Fussell 3 Synchronous state machines If a system can both process and store information, then the values stored in the memory elements depend on both the inputs and the previous values in these elements. This is called a sequential system. Such a system is also called a finite-state machine (FSM). If all changes to memory values happen at the same time as determined by a global system clock, we have a synchronous FSM.

4 University of Texas at Austin CS310 - Computer Organization Spring 2009 Don Fussell 4 FSM definition An FSM has the following components: A set of states A set of inputs A set of outputs A state-transition function (of the states and inputs) An output function (of the states and maybe inputs) Moore machine - function of states only Mealy machine - function of states and inputs This can be represented by a state diagram States are circles Arcs show the state transition function Arcs are labeled with input values Outputs are labels on states (Moore) or arcs (Mealy)

5 University of Texas at Austin CS310 - Computer Organization Spring 2009 Don Fussell 5 Another example - 2-bit counter Counter starts at 0 (green) and increments each time the clock cycles, until it gets to 3 and then overflows back to 0. Only input is the clock, we don’t show that. H old L old H new L new 0001 0110 1011 1100

6 University of Texas at Austin CS310 - Computer Organization Spring 2009 Don Fussell 6 2-bit counter H old L old H new L new 0001 0110 1011 1100 H new = H old ’L old + H old L old ’ L new = H old ’L old ’ + H old L old ’ = L old ’

7 University of Texas at Austin CS310 - Computer Organization Spring 2009 Don Fussell 7 2-bit counter with reset RH old L old H new L new 00001 00110 01011 01100 1xx00 L new = R’H old ’L old ’ + R’H old L old ’ = R’L old ’ = (R + L old )’ H new = R’H old ’L old + R’H old L old ’ = R’(H old ’L old + H old L old ’)

8 University of Texas at Austin CS310 - Computer Organization Spring 2009 Don Fussell 8 2-bit counter with reset

9 University of Texas at Austin CS310 - Computer Organization Spring 2009 Don Fussell 9 Counter with 7-segment display Each segment in the display can be lit independently to allow all 10 decimal digits to be displayed (also hex) 2-bit counter will need to display digits 0-3, so will output a 1 for each segment to be lit for a given state

10 University of Texas at Austin CS310 - Computer Organization Spring 2009 Don Fussell 10 Counter with output functions RHoHo LoLo HnHn LnLn ABCDEFG 000011111110 001100110000 010111101101 011001111001 1xx000000000 A = D = R’H o ’L o ’+R’H o L o ’+R’H o L o = R’(H o ’L o )’ B = R’C = R’(H o L o ’)’E = R’L o ’ F = R’H o ’L o ’ = (R+H o +L o )’G = R’H o

11 University of Texas at Austin CS310 - Computer Organization Spring 2009 Don Fussell 11 7-segment output logic


Download ppt "University of Texas at Austin CS310 - Computer Organization Spring 2009 Don Fussell State Machines."

Similar presentations


Ads by Google