40 likes | 295 Vues
Lab 2 – Finite State Machine. Using the Digital State Machine Simulator, create five different machine configuration files that, with each successive clock cycle: Toggles both LEDs. (Turn both on then both off – 2-state machine.) Counts from 0 to 3 (binary) in the LEDs (4-state machine).
E N D
Lab 2 – Finite State Machine • Using the Digital State Machine Simulator, create five different machine configuration files that, with each successive clock cycle: • Toggles both LEDs. (Turn both on then both off – 2-state machine.) • Counts from 0 to 3 (binary) in the LEDs (4-state machine). • Alternates turning one LED on and off followed by the second LED turning on and off (4-state machine). • Turns one LED on followed by the other and then turns the first LED off followed by the other (4-state machine). • Flashes both LEDs on for one clock cycle then turns both off for the next two clock cycles (3-state machine). • Use the 2-in/4-out PAL and at least one master/slave flip-flop in each machine implementation. • Show the truth table used to implement each of your machines. • The LEDs are derived using combinational logic from the current state. • Clicking the 'Clock' button should step to the next state. • Use the 'Run' button to continuously clock your machine. Lab 2 - FSM Lab
Output (LEDs) Next State Current State Current State Next State FSM Digital State Machine Simulator Lab 2 - FSM Lab
Simple FSM Example Combinational Logic Sequential Logic FSM Example 1 Lab 2 - FSM Lab
FSM Example 2 Finite State Machine A B ¬A ¬B ¬B (¬A B) + (A ¬B) Lab 2 - FSM Lab