Embedded Systems Design Europe - February 2008 - (Page 20) feature Listing 1 The various sections of a VHDL source file are illustrated here. Header Section -- Name : Beckie Smith -- Date : January 28, 2005 -- Filename : Door_monitor.vhd Description: -- This circuit is responsible for enabling an external door chime circuit 10 clock -- cycles or about 500ns after door_status goes high. Revision History -- Date Initials Description -- 2-17-05 BCS Changed chime delay from 1 minute to 500ns. LIBRARY IEEE; USE IEEE.std_logic_1164.ALL; USE ieee.std_logic_signed.all; ENTITY monitor IS PORT( reset door_status clock_20mhz door_chime_en END monitor; ARCHITECTURE door_monitor OF SIGNAL start_500ns_timer SIGNAL reset_start_timer SIGNAL timer_500ns SIGNAL chime_enable BEGIN door_chime_en : : : : IN std_logic; IN std_logic; IN std_logic; OUT std_logic); Library declaration Optional heading section Entity declaration set internal gates to initial state closed = low input clock_20mHz 20Hz signal used to sound door chime monitor IS : std_logic; : std_logic; : std_logic_vector(3 DOWNTO 0); : std_logic; <= chime_enable; enables 500ns timer reset 500ns timer 500ns counter sets external door chime Concurrent statement -- signal used to sound door chime Architecture section checking_door_status: PROCESS (reset, clock_20mhz, reset_start_timer) Sensitivity -- This process detects when the door has been opened and then starts the -- 500ns timer. BEGIN IF (reset = ‘1’) OR (reset_start_timer = ‘1’) THEN start_500ns_timer <= ‘0’; -- clear 500ns timer ELSIF(rising_edge (clock_20mhz)) THEN IF door_status = ‘1’ THEN -- door is opened start_500ns_timer <= ‘1’ after 2 ns; -- enable 500ns timer END IF; END IF; END PROCESS; set_alarm_enable: PROCESS (reset, clock_20mhz) -- This process set the alarm enable 500ns after the door has BEGIN IF reset = ‘1’ THEN chime_enable <= ‘0’; reset_start_timer <= ‘0’; timer_500ns (‘0’)); ELSIF (rising_edge (clock_20mhz)) THEN IF start_500ns_timer = ‘1’ THEN timer_500ns <= timer_500ns + ‘1’ after 2 ns; IF timer_500ns = “1010” THEN Sequential chime_enable <= ‘1’ after 2 ns; statements reset_start_timer <= ‘1’ after 2 ns; END IF; Injected delay ELSE chime_enable <= ‘0’ after 2 ns; END IF; END IF; END PROCESS; END door_monitor; been opened -- clear chime enable -- clear timer reset signal -- clear chime timer door has been opened start counting 500nsec test for 500ns set door chime enable reset door chime timer list -- don’t set door chime circuit 20 JANUARY – FEBRUARY 2008 | embedded systems design europe | www.embedded.com/europe 018-019-020-021-022-023-024-025-20 20 6/02/08 11:49:05 http://www.embedded.com/europe
Table of Contents Feed for the Digital Edition of Embedded Systems Design Europe - February 2008 Embedded Systems Design Europe - February 2008 Contents ARTEMIS and ENIAC Get Parlimentary Approval Product Teardown Videos Come On Screen Esterel and Abslnt Integrate Products Microsoft Opens Windows to Networked Embedded Applications Trango Embeds Virtualization Tool in Cavium's Multicore CPUs MindTree - ADI Develop Security DVR Platform NXP Extends Deal with ARM to Cover MCUs Automotive and Embedded to Dominate DATE 08 ZigBee Spec Gets Smart On Energy Updated Card Spec Provides for Power-On Boot The Basics of Embedded Multitasking On a PIC Cover Feature: The Art of FPGA Construction Is Symmetric Multiprocessing For You? Accelerating MATLAB Using MEX-Files ARM Provides the Microcontroller Solution Embedded World Advertising Contracts Embedded Systems Design Europe - February 2008 Embedded Systems Design Europe - February 2008 - Embedded Systems Design Europe - February 2008 (Page Cover1) Embedded Systems Design Europe - February 2008 - Embedded Systems Design Europe - February 2008 (Page Cover2) Embedded Systems Design Europe - February 2008 - Contents (Page 3) Embedded Systems Design Europe - February 2008 - Contents (Page 4) Embedded Systems Design Europe - February 2008 - Contents (Page 5) Embedded Systems Design Europe - February 2008 - Esterel and Abslnt Integrate Products (Page 6) Embedded Systems Design Europe - February 2008 - Esterel and Abslnt Integrate Products (Page 7) Embedded Systems Design Europe - February 2008 - Microsoft Opens Windows to Networked Embedded Applications (Page 8) Embedded Systems Design Europe - February 2008 - Microsoft Opens Windows to Networked Embedded Applications (Page 9) Embedded Systems Design Europe - February 2008 - NXP Extends Deal with ARM to Cover MCUs (Page 10) Embedded Systems Design Europe - February 2008 - NXP Extends Deal with ARM to Cover MCUs (Page 11) Embedded Systems Design Europe - February 2008 - Updated Card Spec Provides for Power-On Boot (Page 12) Embedded Systems Design Europe - February 2008 - The Basics of Embedded Multitasking On a PIC (Page 13) Embedded Systems Design Europe - February 2008 - The Basics of Embedded Multitasking On a PIC (Page 14) Embedded Systems Design Europe - February 2008 - The Basics of Embedded Multitasking On a PIC (Page 15) Embedded Systems Design Europe - February 2008 - The Basics of Embedded Multitasking On a PIC (Page 16) Embedded Systems Design Europe - February 2008 - The Basics of Embedded Multitasking On a PIC (Page 17) Embedded Systems Design Europe - February 2008 - Cover Feature: The Art of FPGA Construction (Page 18) Embedded Systems Design Europe - February 2008 - Cover Feature: The Art of FPGA Construction (Page 19) Embedded Systems Design Europe - February 2008 - Cover Feature: The Art of FPGA Construction (Page 20) Embedded Systems Design Europe - February 2008 - Cover Feature: The Art of FPGA Construction (Page 21) Embedded Systems Design Europe - February 2008 - Cover Feature: The Art of FPGA Construction (Page 22) Embedded Systems Design Europe - February 2008 - Cover Feature: The Art of FPGA Construction (Page 23) Embedded Systems Design Europe - February 2008 - Cover Feature: The Art of FPGA Construction (Page 24) Embedded Systems Design Europe - February 2008 - Cover Feature: The Art of FPGA Construction (Page 25) Embedded Systems Design Europe - February 2008 - Cover Feature: The Art of FPGA Construction (Page 26) Embedded Systems Design Europe - February 2008 - Cover Feature: The Art of FPGA Construction (Page 27) Embedded Systems Design Europe - February 2008 - Is Symmetric Multiprocessing For You? (Page 28) Embedded Systems Design Europe - February 2008 - Is Symmetric Multiprocessing For You? (Page 29) Embedded Systems Design Europe - February 2008 - Is Symmetric Multiprocessing For You? (Page 30) Embedded Systems Design Europe - February 2008 - Is Symmetric Multiprocessing For You? (Page 31) Embedded Systems Design Europe - February 2008 - Accelerating MATLAB Using MEX-Files (Page 32) Embedded Systems Design Europe - February 2008 - Accelerating MATLAB Using MEX-Files (Page 33) Embedded Systems Design Europe - February 2008 - Accelerating MATLAB Using MEX-Files (Page 34) Embedded Systems Design Europe - February 2008 - ARM Provides the Microcontroller Solution (Page 35) Embedded Systems Design Europe - February 2008 - ARM Provides the Microcontroller Solution (Page 36) Embedded Systems Design Europe - February 2008 - ARM Provides the Microcontroller Solution (Page 37) Embedded Systems Design Europe - February 2008 - Embedded World (Page 38) Embedded Systems Design Europe - February 2008 - Embedded World (Page 39) Embedded Systems Design Europe - February 2008 - Embedded World (Page 40) Embedded Systems Design Europe - February 2008 - Embedded World (Page 41) Embedded Systems Design Europe - February 2008 - Embedded World (Page 42) Embedded Systems Design Europe - February 2008 - Advertising Contracts (Page 43) Embedded Systems Design Europe - February 2008 - Advertising Contracts (Page Cover4)
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.