Disclaimer: the designs given are not guaranteed to be 100% correct. Only simulation and hardware test will tell!
AIM
Using the previous design examples for
guidance, create a VHDL source file that
implements the ASM chart for the basic version
of the alarm controller.
Guidelines
1. Identify the input-output requirements for the
design, and create an entity statement. A clock
signal will be required to clock the state
machine. Assume this will be a square wave
with a period of 0.5 seconds.
2. Create a behavioural architecture to match the
entity statement
3. Use a single process to implement a state
machine as for previous designs, using a
CASE statement.
4. Use 4 switches SW3-SW0 as ZONE sensors
5. Use a single LED to indicate alarm activated
6. Simulate, then create symbol, add to a NEW
alarm schematic with PIN detect and keypad,
and test the system.
AJW 9/12/08 1
Alarm Controller - Basic Version FSM
AJW 9/12/08 2
Alarm Controller – Basic Version ASM
RESET
IDLE
ALARM = OFF
ARM?
Y ARMED Y
DISARM?
N
TRIGGER?
Y
SET
ALARM = ON
DISARM?
AJW 9/12/08 3
Alarm Controller – Basic Version ASM
AJW 9/12/08 4
Alarm Controller with Exit – Entry Delay
AIM
Using the previous design examples for guidance,
create a VHDL source file that implements the ASM
chart for the more realistic version of the alarm
controller with exit and entry delays
Guidelines
1. Identify the input-output requirements for the
design, and create an entity statement. A clock
signal will be required to clock the state machine.
Assume this will be a square wave with a period of
0.5 seconds.
2. Create a behavioural architecture to match the
entity statement
3. Use a single process to implement a state machine
as for previous designs, using a CASE statement.
4. Use 4 switches SW3-SW0 as ZONE sensors
5. Use a single LED to indicate alarm activated.
6. Simulate, then create symbol, add to a NEW alarm
schematic with PIN detect and keypad, and test the
system.
7. Extend the design to add a second flashing LED to
indicate exit-entry delays.
AJW 9/12/08 5
Alarm Controller with Exit – Entry Delay
AJW 9/12/08 6
Alarm Controller with Exit – Entry Delay
AJW 9/12/08 7
Alarm Controller with Exit – Entry Delay
Hints
AJW 9/12/08 8
PIN-activated Alarm System
Assignment
AJW 9/12/08 9