Lecture 2 - Types of State Machines - Design and Analysis
-
Upload
satishbojjawar1484 -
Category
Documents
-
view
8.131 -
download
1
Transcript of Lecture 2 - Types of State Machines - Design and Analysis
![Page 1: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/1.jpg)
Fundamentals of State Machines
Satish kashyap. B
www.satishkashyap.com
![Page 2: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/2.jpg)
Every finite-state machine, therefore, contains a finite numberof memory devices, which store the information regarding the past input history.
![Page 3: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/3.jpg)
![Page 4: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/4.jpg)
![Page 5: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/5.jpg)
General Model for Mealy CircuitUsing Clocked D Flip-Flops
![Page 6: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/6.jpg)
General Model for Moore CircuitUsing Clocked D Flip-Flops
![Page 7: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/7.jpg)
Mealy vs. Moore Machines
• MEALY MACHINE
• Outputs depend on current state and present inputs
• Outputs have immediate reaction to inputs
• As inputs change, so does next state, doesn’t commit until clocking event
• Tend to have less states
• Less hardware
• May not be safer, when interconnecting state machines in asynchronous manner.
• Delay is less
• MOORE MACHINE
• Outputs depend on current state only
• Outputs have no immediate reaction to inputs , they always change one cycle later
• As inputs change, so does next state, doesn’t commit until clocking event
• Tend to have more states
• More logic (hardware) may be necessary to decode state into outputs
• Moore Machines are safer to use, when two machines are interconnected – asynchronous feedback
• Delay is more
![Page 8: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/8.jpg)
• Recognize– Mealy or Moore ?
D Q
QB
A
clock
out D Q
Q
D Q
Qclock
outA
B
D Q
Q
D Q
Q
A
B
clock
out
D Q
Q
D Q
Q
D Q
Q
D Q
Q
A
B
clock
out
![Page 9: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/9.jpg)
• Recognize– Mealy or Moore ?
![Page 10: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/10.jpg)
the output value of the serial adder cannot be specified merely in terms of theexternal input values
![Page 11: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/11.jpg)
Let A designate the state of the adder at ti if a carry 0 is generated at ti−1,and let B designate the state of the adder at ti if a carry 1 is generated at ti−1.
Each row of the state table corresponds to a state of the adder, and eachcolumn to a particular combination of the external input values x1 and x2. Eachentry of the table denotes the state to which a transition is made and the outputvalue associated with this transition.
![Page 12: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/12.jpg)
state diagram (or state graph)
alternate to the state table.
Clearly, both the state diagram and state table provide the same information regarding the operation of the adder, and one can be obtained directly from the other.
![Page 13: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/13.jpg)
The state of the delay element is specified by the value of its output y, which may assume either of two values, namely, y = 0 or y = 1.
Since the current input value Y of the delay is equal to its next output value, the input value is referred to as the next state of the delay, i.e, Y (t ) = y(t + 1).
y = 0 is assigned to A and y = 1 to B, the value of y at ti will correspond tothe value of the carry generated at ti−1.
The process of assigning the states of a physical device to the states of the serial adder is known as state assignment.
The output value y is referred to as the state variable , to distinguish it from the external primary input variables.
![Page 14: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/14.jpg)
A transition table is derived from a state table by the replacement of eachnext-state entry with the corresponding state of memory elements.
![Page 15: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/15.jpg)
![Page 16: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/16.jpg)
Design a one-input one-output sequence detector that produces anoutput value 1 every time the sequence 0101 is detected and an output value0 at all other times.
State diagram for a sequence (0101) detector.
![Page 17: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/17.jpg)
State diagram for a sequence (0101) detector.
![Page 18: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/18.jpg)
Output and excitation K-maps.
![Page 19: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/19.jpg)
Logic diagram of a sequence detector.
![Page 20: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/20.jpg)
The state assignment employed in Table 9.8 is not the only possible one.
![Page 21: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/21.jpg)
CIRCUIT DIAGRAM ….. ?
![Page 22: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/22.jpg)
![Page 23: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/23.jpg)
![Page 24: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/24.jpg)
Schematic diagram of a modulo-8 binary counter with T flip-flops.
![Page 25: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/25.jpg)
![Page 26: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/26.jpg)
Some more Examples
• Parity bit generator from ( kohavi )• Parity checker ( Roth )• Analyze different state machine block diagrams to draw their state
table or state diagram ( Roth )
![Page 27: Lecture 2 - Types of State Machines - Design and Analysis](https://reader034.fdocuments.in/reader034/viewer/2022051411/543ed33fb1af9f880b8b497d/html5/thumbnails/27.jpg)