3 views

Uploaded by sreekanth

finite state vending machine for ME Applied ELectronics

save

- The-Timer
- Usage Automata
- Finite State Machines
- 87123 Manual Incl Umschlag
- Answer Chapter 5 Pda Exercises Ed 3
- IntroductiontoFiniteAutomata-2
- Optimization of the structure of diesel-generator units of ship power system.pdf
- Project Shikha
- DSD Model Paper 1
- Chapter 3
- VHDL Examples
- Notes 7
- NDFA Their Representation
- Final f03 Sol
- ARM_CONTROL
- scimakelatex.11108.Evander+Demata
- MELJUN CORTES AUTOMATA_LECTURE_Equivalence of Regular Expressions and Finite Automata_Part 2_1
- Global Built-In Self-Repair for 3D Memories with Redundancy Sharing and Parallel Testing.doc
- 0420_w13_ms_31
- INatuix Paper II
- DFA Minimisation Using the Myhill-Nerode Theorem
- Tutorial 12
- Program Embeded Decision Table
- AEM12579009244afa0b7cbe172
- Queue
- Foundations of Databases
- Reverse Engineering Tut
- MCS_232j
- Cooper_Form3A_Notes.pdf
- realtime object on badi
- TRB Engg. Prospucts 2016.pdf
- Excel2013 level1
- AccessEssen2013.pdf
- Desktop Support Interview-Questions.pdf
- MS Access 2013
- DSP SolutionsManual(Proakis)
- lecture notes mca
- built in logic block observer
- ME ADHOC unit 5
- Question Bank ADLSD

You are on page 1of 18

1

8. 9. 8. 8.1.1.2 2 . Dewey 9.5.2.Outline • Review of sequential machine design • Moore/Mealy Machines • FSM Word Problems – Finite string recognizer – Traffic light controller • READING: Katz 8.4.

g.. ALU) Busses Qualifiers Control Control FSM generating sequences of control signals Instructs datapath what to do next "Puppeteer who pulls the strings" State Control Signal Outputs Qualifiers and Inputs "Puppet" Datapath 3 .Concept of the State Machine Computer Hardware = Datapath + Control Registers Combinational Functional Units (e.

Example: Odd Parity Checker Assert output whenever input bit stream has odd # of 1's Reset 0 Even [0] 1 0 1 Odd [1] State Diagram Present State Even Even Odd Odd Input 0 1 0 1 Next State Even Odd Odd Even Output 0 0 1 1 Symbolic State Transition Table Present State 0 0 1 1 Input 0 1 0 1 Next State Output 0 0 1 0 1 1 0 1 Encoded State Transition Table 4 .

Odd Parity Checker Design Next State/Output Functions NS = PS xor PI. OUT = PS Input NS Input D Q CLK R CLK PS/Output Q 0 Q \Reset T FF Implementation D FF Implementation 1 Output Q R \Reset Input T 0 1 1 0 1 0 1 1 1 0 Clk Output 1 1 1 0 1 1 0 0 1 0 ECE C03 Lecture Timing Behavior: Input 1 0120 1 1 0 1 0 1 1 1 0 1 1 5 .

Timing of State Machines When are inputs sampled. based on inputs • For set-up/hold time considerations: Inputs should be stable before clocking event • After propagation delay..g. next state computed. Outputs are stable NOTE: Asynchronous signals take effect immediately Synchronous signals take effect at the next clocking event E. tri-state enable: effective immediately sync. Next State entered. outputs asserted? State Time: Time between clocking events • Clocking event causes state/outputs to transition. counter clear: effective at next clock event 6 .

inputs sampled outputs.Timing of State Machine Example: Positive Edge Triggered Synchronous System State Time Clock On rising edge. outputs and next state are stable Inputs Immediate Outputs: affect datapath immediately could cause inputs from datapath to change Outputs Delayed Outputs: take effect on next clock edge propagation delays must exceed hold times 7 . next state computed After propagation delay.

Implement the FSM 1. Understand the statement of the Specification 2.Basic Design Approach 1. Perform a state mininimization 4. 5 generalized from the counter design procedure 8 . 5 covered later. Obtain an abstract specification of the FSM 3. Perform state assignment 5. Choose FF types to implement FSM state register 6. 4. 4. 2 covered now. 3.

Example: Vending Machine FSM General Machine Concept: deliver package of gum after 15 cents deposited single coin slot for dimes. Understand the problem: Draw a picture! Block Diagram N Coin Sensor D Reset Vending Machine FSM Open Gum Release Mechanism Clk 9 . nickels no change Step 1.

nickel two dimes two nickels. dime Draw state diagram: N S1 N Inputs: N.Vending Machine Example Step 2. D. reset Output: open D D S2 N D S4 S5 S6 [open] [open] [open] S3 N S0 D S7 S8 [open] [open] 10 . dime dime. Map into more suitable abstract representation Reset Tabulate typical input sequences: three nickels nickel.

Vending Machine Example Step 3: State Minimization Present State Reset 0¢ 0¢ N 5¢ D 5¢ N 10¢ D 10¢ N. D 15¢ [open] 15¢ reuse states whenever possible Inputs D N 0 0 1 1 0 0 1 1 0 0 1 1 X 0 1 0 1 0 1 0 1 0 1 0 1 X Next State Output Open 0¢ 5¢ 10¢ X 5¢ 10¢ 15¢ X 10¢ 15¢ 15¢ X 15¢ 0 0 0 X 0 0 0 X 0 0 0 X 1 Symbolic State Table 11 .

Vending Machine Example Step 4: State Encoding Present State Inputs Q1 Q0 D N 0 0 0 1 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Next State D1 D0 Output Open 0 0 0 1 1 0 X X 0 1 1 0 1 1 X X 1 0 1 1 1 1 X X 1 1 1 1 1 1 X X 0 0 0 X 0 0 0 X 0 0 0 X 1 1 1 X 12 .

Choose FFs for implementation Q1 Q1 Q0 DN 0 D Q1 Q0 DN 0 1 1 0 1 1 1 X X X X 1 1 1 1 0 N D Q0 K-map for D1 Q1 D Q0 N N \ Q0 Q0 \N Q1 N Q1 D D1 D FF easiest to use Q1 1 1 0 1 0 1 1 X X X X 0 1 1 1 N D Q0 K-map for D0 D CLK R Q Q1 Q \ Q1 Q1 Q1 Q0 DN 0 0 1 0 0 0 1 0 X X X X 0 0 1 0 N Q0 K-map for Open D1 = Q1 + D + Q0 N \reset OPEN D0 D CLK \reset R Q Q0 Q \ Q0 D0 = N Q0 + Q0 N + Q1 N + Q1 D OPEN = Q1 Q0 8 Gates 13 .Vending Machine Example Step 5.

. VHDL) 14 .Alternative State Machine Representations Why State Diagrams Are Not Enough Not flexible enough for describing very complex finite state machines Not suitable for gradual refinement of finite state machine Do not obviously describe an algorithm: that is. well specified sequence of actions based on input data algorithm = sequencing + data manipulation separation of control and data Gradual shift towards program-like representations: • Algorithmic State Machine (ASM) Notation • Hardware Description Languages (e.g.

Immediate (I) or delayed til next clock State Entry Path State Code * State Name State Output List T *** State Box Condition Condition Box Conditional Output List F ASM Block Output Box Exits to other ASM Blocks 15 .H) or low (.Alternative State Machine Representations Algorithmic State Machine (ASM) Notation Three Primitive Elements: • State Box • Decision Box • Output Box State Machine in one state block per state time Single Entry Point Unambiguous Exit Path for each combination of inputs Outputs asserted high (.L).

ASM Notation Condition Boxes: Ordering has no effect on final outcome Equivalent ASM charts: A exits to B on (I0 • I1) else exit to C A A 010 I0 T 010 F I1 T F I1 F F I0 T T B C B C 16 .

Output Z Even 0 Nothing in output list implies Z not asserted Z asserted in State Odd F X T Odd 1 H.ASM Example: Parity Checker Input X.Z F X T Trace Tracepaths pathsto toderive derive state transition state transitiontables tables Symbolic State Table: Present Next Input State State Output F — Even Even T — Even Odd F A Odd Odd T A Odd Even Encoded State Table: Present Next Input State State Output 0 0 0 0 1 0 0 1 0 1 1 1 1 1 1 0 17 .

Open T N F F D Reset F T T 0¢ 18 .ASM Chart: Vending Machine 0¢ 00 10¢ T D 10 T D F F F F N N T 5¢ T 15¢ 01 11 H.

- The-TimerUploaded byVladimirCoello
- Usage AutomataUploaded byKamran Ahmad
- Finite State MachinesUploaded byadelmo60
- 87123 Manual Incl UmschlagUploaded bynammaris
- Answer Chapter 5 Pda Exercises Ed 3Uploaded byAnonymous XpakVbJYDS
- IntroductiontoFiniteAutomata-2Uploaded byshibru90
- Optimization of the structure of diesel-generator units of ship power system.pdfUploaded byYao Wei
- Project ShikhaUploaded byMohammad Shoeb
- DSD Model Paper 1Uploaded byVignesh
- Chapter 3Uploaded byx1y2z3q
- VHDL ExamplesUploaded byapi-3731978
- Notes 7Uploaded bySantanu Hazarika
- NDFA Their RepresentationUploaded byPranjal Rastogi
- Final f03 SolUploaded byhuyeb
- ARM_CONTROLUploaded byapi-3755266
- scimakelatex.11108.Evander+DemataUploaded byJohn
- MELJUN CORTES AUTOMATA_LECTURE_Equivalence of Regular Expressions and Finite Automata_Part 2_1Uploaded byMELJUN CORTES, MBA,MPA
- Global Built-In Self-Repair for 3D Memories with Redundancy Sharing and Parallel Testing.docUploaded byNsrc Nano Scientifc
- 0420_w13_ms_31Uploaded byAhadh12345
- INatuix Paper IIUploaded bysuganya004
- DFA Minimisation Using the Myhill-Nerode TheoremUploaded byTomás Hernández
- Tutorial 12Uploaded byVictoria Love
- Program Embeded Decision TableUploaded bypankajsharma2k3
- AEM12579009244afa0b7cbe172Uploaded byDumitrescu Luigi
- QueueUploaded byMansoor Ali
- Foundations of DatabasesUploaded byTedy Gherasim
- Reverse Engineering TutUploaded bySagar Rastogi
- MCS_232jUploaded byPooja Sinha
- Cooper_Form3A_Notes.pdfUploaded bysajedarefin
- realtime object on badiUploaded byKoneti Sumanth

- TRB Engg. Prospucts 2016.pdfUploaded bysreekanth
- Excel2013 level1Uploaded bysreekanth
- AccessEssen2013.pdfUploaded bysreekanth
- Desktop Support Interview-Questions.pdfUploaded bysreekanth
- MS Access 2013Uploaded bysreekanth
- DSP SolutionsManual(Proakis)Uploaded bysreekanth
- lecture notes mcaUploaded bysreekanth
- built in logic block observerUploaded bysreekanth
- ME ADHOC unit 5Uploaded bysreekanth
- Question Bank ADLSDUploaded bysreekanth