Here is an example of a designing a finite state machine, worked out from start to
... Step 1: Describe the machine in words. ... In our example, the Output Sub-C.
State-based optimization c? GDM. FSM Specification. State Minimization. State
Encoding. Combinational Optimization. Formal finite-state machine model c?
Please note that the test and final exam will be based on: Gay, L. R., Mills, G. E.,
&. Airasian, P. (2009). Educational research. Competencies for analysis and ...
Testing and Materials (ASTM) and the International Standards Organization. (ISO
) ..... ISO 6508-1 Metallic Materials – Rockwell hardness test (scales A, B, C, D,.
... determining how force components affect the vibration of an individual
coordinate, etc.) ... numerically by generating a large random matrix in Matlab.
Make it.
1. Review: Computer Organization. Virtual Memory. 2. Contents. • Virtual memory
. • Page table and TLB. • Interaction of virtual memory with cache ...
Page 1 of 1. finite state machine examples pdf. Click here if your download doesn't start automatically. Page 1 of 1. fi
relationship between two discrete event system (DES) ... each directed arc from V1 to V2 represents the causal ..... belt transporting an object from X to Y to Z.
fitness functions were biased toward maximizing the number of faults detected and the number of fault effects propagated to flip-flops; increasing the circuit ...
simple mutational models, edit distance and string alignment in a biologi- .... are assigned labels rpS(|(h, w)|) where, h is the height and w is the corre- sponding ...
first—time textbook author David W Ball, associate professor of chemistry at
Cleve— land State ... organic chemistry for freshmen, physical chemistryg and ...
Nov 19, 2008 - Comparing finite state machine test ... test minimisation for each criterion to ensure that tests are obtained in ... Finite state machines (FSMs) are.
Feb 18, 2014 - Contributed by Charles M. Lieber, December 20, 2013 (sent for review ..... Sinder G, Kuekes P, Williams RS (2004) CMOS-like logic in defective ...
State Machine Model with Auto-Billing Features. Finite State ... schools and offices vending drinks and snacks , in banks as ATM machine and provides even.
State Machine Model with Auto-Billing Features. Finite State Machine (FSM) modelling is the most crucial part in developing .... and is coded in VHDL language.
[1], Mustang [2] and Armstrong [15] cost measures were investigated. It was found that all these measures weakly correlate with the actual literal savings ...
OJOS QUE NO VEN, CORAZÓN QUE NO SIENTE = Refrán que da a entender ...
lástimas que están lejos, se sienten menos que las que se tienen a la vista.
sources were framed in the coverage of gay marriage, based upon the
newspapers' perspectives ... human morality associated with the gay marriage
debate.
Documentation of a proposed methodology, February, 2005. ... she majored in
Psychology, with a focus on Consumer Behavior, and minored in Sociology.
essence. VCP'S animators admit that imitating muscular move- ments remains a
challenge. To create a "synthespian," they need to film a similarly built actor and.
Text: Calculus Concepts and Connections, Smith, Minton. Course Content:
Second semester calculus including: integration, differential equations,
applications ...
direct way to convert the visualized design to hardware de- scription languages ..... [1] Absint Inc., http://www.absint.com/index.html, 2003. [2] C. Pruteanu, âKiss ...
of Persio-Arabic script) with more vocabulary borrowed from Persian and Arabic.
In contrast to the transcriptional difference, Hindi and Urdu share grammar ...
academic institution, illustrated by an application. An efficiency of VM is ... improve the efficiency and design cost of the VM. General Terms. Automata theory and ...
ASM (algorithmic state machine) chart. – Flowchart-like diagram. – Provide the
same info as an FSM. – More descriptive, better for complex description.
Finite State Machine
RTL Hardware Design by P. Chu
Chapter 10
1
Outline 1. 2. 3. 4. 5. 6. 7. 8.
Overview FSM representation Timing and performance of an FSM Moore machine versus Mealy machine VHDL description of FSMs State assignment Moore output buffering FSM design examples
RTL Hardware Design by P. Chu
Chapter 10
2
1. Overview on FSM • Contain “random” logic in next-state logic • Used mainly used as a controller in a large system • Mealy vs Moore output
RTL Hardware Design by P. Chu
Chapter 10
3
2. Representation of FSM • State diagram
RTL Hardware Design by P. Chu
Chapter 10
4
• E.g. a memory controller
RTL Hardware Design by P. Chu
Chapter 10
5
• ASM (algorithmic state machine) chart – Flowchart-like diagram – Provide the same info as an FSM – More descriptive, better for complex description – ASM block • One state box • One ore more optional decision boxes: with T or F exit path • One or more conditional output boxes: for Mealy output
RTL Hardware Design by P. Chu
Chapter 10
6
RTL Hardware Design by P. Chu
Chapter 10
7
State diagram and ASM chart conversion • E.g. 1.
RTL Hardware Design by P. Chu
Chapter 10
8
• E.g. 2.
RTL Hardware Design by P. Chu
Chapter 10
9
• E.g. 3.
RTL Hardware Design by P. Chu
Chapter 10
10
• E.g. 4.
RTL Hardware Design by P. Chu
Chapter 10
11
• E.g. 6.
RTL Hardware Design by P. Chu
Chapter 10
12
• Difference between a regular flowchart and ASM chart: – Transition governed by clock – Transition done between ASM blocks
• Basic rules: – For a given input combination, there is one unique exit path from the current ASM block – The exit path of an ASM block must always lead to a state box. The state box can be the state box of the current ASM block or a state box of another ASM block. RTL Hardware Design by P. Chu
Chapter 10
13
• Incorrect ASM charts:
RTL Hardware Design by P. Chu
Chapter 10
14
RTL Hardware Design by P. Chu
Chapter 10
15
3. Performance of FSM • Similar to regular sequential circuit
RTL Hardware Design by P. Chu
Chapter 10
16
• Sample timing diagram
RTL Hardware Design by P. Chu
Chapter 10
17
RTL Hardware Design by P. Chu
Chapter 10
18
4. Moore vs Mealy output • Moore machine: – output is a function of state
• Mealy machine: – output function of state and output
• From theoretical point of view – Both machines have similar “computation capability”
• Implication of FSM as a controller? RTL Hardware Design by P. Chu
Chapter 10
19
• E.g., edge detection circuit – A circuit to detect the rising edge of a slow “strobe” input and generate a “short” (about 1-clock period) output pulse.
RTL Hardware Design by P. Chu
Chapter 10
20
• Three designs:
RTL Hardware Design by P. Chu
Chapter 10
21
RTL Hardware Design by P. Chu
Chapter 10
22
• Comparison – Mealy machine uses fewer states – Mealy machine responds faster – Mealy machine may be transparent to glitches
• Which one is better? • Types of control signal – Edge sensitive • E.g., enable signal of counter • Both can be used but Mealy is faster – Level sensitive • E.g., write enable signal of SRAM • Moore is preferred RTL Hardware Design by P. Chu
Chapter 10
23
VHDL Description of FSM • Follow the basic block diagram • Code the next-state/output logic according to the state diagram/ASM chart • Use enumerate data type for states
RTL Hardware Design by P. Chu
Chapter 10
24
• E.g. 6.
RTL Hardware Design by P. Chu
Chapter 10
25
RTL Hardware Design by P. Chu
Chapter 10
26
RTL Hardware Design by P. Chu
Chapter 10
27
RTL Hardware Design by P. Chu
Chapter 10
28
RTL Hardware Design by P. Chu
Chapter 10
29
RTL Hardware Design by P. Chu
Chapter 10
30
RTL Hardware Design by P. Chu
Chapter 10
31
• Combine next-state/output logic together
RTL Hardware Design by P. Chu
Chapter 10
32
RTL Hardware Design by P. Chu
Chapter 10
33
RTL Hardware Design by P. Chu
Chapter 10
34
6. State assignment • State assignment: assign binary representations to symbolic states • In a synchronous FSM – All assignments work – Good assignment reduce the complexity of next-state/output logic
• Typical assignment – Binary, Gray, one-hot, almost one-hot RTL Hardware Design by P. Chu
Chapter 10
35
RTL Hardware Design by P. Chu
Chapter 10
36
State assignment in VHDL • Implicit: use user attributes enum_encoding
• Explicit: use std_logic_vector for the register RTL Hardware Design by P. Chu
Chapter 10
37
RTL Hardware Design by P. Chu
Chapter 10
38
RTL Hardware Design by P. Chu
Chapter 10
39
Handling the unused state • Many binary representations are not used • What happens if the FSM enters an unused state? – Ignore the condition – Safe (Fault-tolerant) FSM: got to an error state or return to the initial state.
• Easy for the explicit state assignment • No portable code for the enumerated data type RTL Hardware Design by P. Chu
Chapter 10
40
6. Moore output buffering • FSM as control circuit – Sometimes fast, glitch-free signal is needed – An extra output buffer can be added, but introduce one-clock delay
• Special schemes can be used for Moore output – Clever state assignment – Look-ahead output circuit RTL Hardware Design by P. Chu
Chapter 10
41
• Potential problems of the Moore output logic: – Potential hazards introduce glitches – Increase the Tco delay (Tco = Tcq + Toutput)
• Can we get control signals directly from the register?
RTL Hardware Design by P. Chu
Chapter 10
42
Clever state assignment • Assigning state according to output signal patterns • Output can be obtained from register directly • Extra register bits may be needed • Must use explicit state assignment in VHDL code to access individual register bit • Difficult to revise and maintain RTL Hardware Design by P. Chu
Chapter 10
43
RTL Hardware Design by P. Chu
Chapter 10
44
• VHDL code
RTL Hardware Design by P. Chu
Chapter 10
45
Look-ahead output circuit • Output buffer introduces one-clock delay • The “next” value of Moore output can be obtained by using state_next signal • Buffer the next value cancel out the one-clock delay • More systematic and easier to revise and maintain RTL Hardware Design by P. Chu
Chapter 10
46
RTL Hardware Design by P. Chu
Chapter 10
47
• Modification over original VHDL code: – Add output buffer – Use state_next to replace state_reg in Moore output logic
RTL Hardware Design by P. Chu
Chapter 10
48
RTL Hardware Design by P. Chu
Chapter 10
49
7. FSM design examples • • • • •
Edge detector circuit Arbitrator (read) DRAM strobe signal generation Manchester encoding/decoding (read) FSM base binary counter
RTL Hardware Design by P. Chu
Chapter 10
50
Edge detecting circuit (Moore)
RTL Hardware Design by P. Chu
Chapter 10
51
RTL Hardware Design by P. Chu
Chapter 10
52
Use clever state assignment
RTL Hardware Design by P. Chu
Chapter 10
53
Use look-ahead output
RTL Hardware Design by P. Chu
Chapter 10
54
Edge detecting circuit (Mealy)
RTL Hardware Design by P. Chu
Chapter 10
55
RTL Hardware Design by P. Chu
Chapter 10
56
• Edge detecting circuit (direct implementation): – edge occurs when previous value is 0 and new value is 1 – Same as Mealy design with state assignment: zero => 0, one => 1
RTL Hardware Design by P. Chu
Chapter 10
57
RTL Hardware Design by P. Chu
Chapter 10
58
• DRAM strobe signal generation – E.g.,120ns DRAM (Trc=120ns): Tras=85ns, Tcas=20ns, Tpr=35ns
RTL Hardware Design by P. Chu
Chapter 10
59
• 3 intervals has to be at least 65ns, 20 ns, and 35 ns • A slow design: use a 65ns clock period – 195 ns (3*65ns) read cycle
• The control signal is level-sensitive
RTL Hardware Design by P. Chu
Chapter 10
60
RTL Hardware Design by P. Chu
Chapter 10
61
• Should revise the code to obtain glitch-free output RTL Hardware Design by P. Chu
Chapter 10
62
• A faster design: use a 20ns clock period – 140 ns (7*20ns) read cycle mem'