Anda di halaman 1dari 9

Alarm Controller – Basic Version ASM

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

PIN entry sets arms the alarm


ANY zone triggered causes alarm to sound
PIN entry resets ALARM

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

PIN entry starts exit delay


Exit delay allows time to exit premises before alarm is armed
Zone 1 triggered gives entry delay
Any other zone triggered causes alarm to sound immediately
PIN entry resets ALARM

AJW 9/12/08 6
Alarm Controller with Exit – Entry Delay

AJW 9/12/08 7
Alarm Controller with Exit – Entry Delay

Hints

Analyse the design carefully – not all zones will


immediately trigger the alarm.
The entry and exit delays should be implemented as
down-counters. The entry/exit indicator LED can be
toggled on each decrement of the counter.

AJW 9/12/08 8
PIN-activated Alarm System

Assignment

BASIC:The basic version of the alarm controller, fully


documented with LED display discussed but not
implemented, is the minimum requirement for the
assignment.

INTERMEDIATE: The advanced version of the alarm


controller with exit/entry delay, fully documented with
LED display discussed but not implemented, is the
expected requirement for the assignment.

ADVANCED: Individual extensions to the controller,


e.g. indication of entry by flashing leds prior to the
alarm sounding, and/or the addition of the 7-segment
LED display, will potentially lead to bonus marks.

AJW 9/12/08 9

Anda mungkin juga menyukai