Embedded Systems Design Europe - February 2008 - (Page 22) feature stants, formulas, processes, and procedures that are used by multiple modules or submodules within their design, he or she can create a custom package. By doing this, the functions in the userdefined package can be shared with other designers and projects. A userdefined library/package is an easy way to repeatedly use specific HDL elements in multiple files with the luxury of only defining its elements once. Assuming a designer creates a package called my_package and stores this package in the library called Test, the following command would make the package visible, thereby allowing its contents to be used in the source file. LIBRARY Test; USE Test.my_package.ALL; User/designer-defined packages are similar to those supplies by vendors, such as Xilinx, whose packages contain elements such as RAMs, counters, and buffers. Xilinx’s “vcomponents” package contains constants, attributes, types, and components that become available once the library and package are visible to the design. The package contains components like AND3, which is a three-input AND gate, and NAND3, a three-input NAND gate. The “vcomponent” package provides timing information, the I/O port names (used to instantiate components in design), and other information used by synthesis and simulation tools. The vendor’s package becomes visible in the same manner as the standard and userdefined libraries. To use the elements in Xilinx’s “vcomponent” package, designers must make the library visible. For example, the following command makes the “Xilinx” library with vcomponent package visible to the design: LIBRARY Xilinx; USE Xilinx.vcomponents.ALL; diately follows the library declaration. Each entity has an assigned name; Monitor is the entity name of the VHLD code in Listing 1. Just as the library declaration section makes libraries and packages visible to the design, the entity section makes the I/Os visible to other source files and the design and can represent the I/Os as physical FPGA pins. VHDL designs can contain one source file or a hierarchy of multiple files. Hierarchical file structures consist of several files connected through the signals declared in their entities. Figure 2 shows a simplified hierarchical file structure for a home security system. On the other hand, if the design is only one file, the top-level entity declaration defines all of the I/O that represents physical FPGA pins. All I/O signals defined in this section must have unique names, indicated signal direction (input or output), and number of bits reserved for the signal. From Listing 1, reset is an input, only one data-bit wide and is a std_logic data type. The keyword END followed by the entity’s name signifies the end of the entity. All entities must be associated with an architecture section. Architecture section The architecture section, which contains the circuit description, is the body of the VHDL source code. The libraries, packages, and signals work together to develop the desired functions. Like the entity, each architecture must have an assigned name. The format for declaring the architecture is the reserved word Architecture followed by its name Door_monitor, then the reserved word Of, then the entity’s name Monitor. Signals not defined in the entity section are defined in this section. The signal assignment format consists of the reserved word Signal followed by the signal name and then the data type (such as std_logic and std_logic_vector), as in Listing 1. Like names defined in the entity, each signal name must be unique and have a data type. This section is also for declaring constants, variables, and other data types. Signals can be thought of as wires used to connect functions and store values. After defining all the design’s signals, the designer is ready to develop the code that describes the desired functions. The reserved word Begin signifies the start of the next subsection, which combines the concurrent and sequential statements. Concurrent statements update or change value at anytime. The signal assignment immediately following the first reserved word BEGIN in Listing 1 is an example of a concurrent statement. Sequential statements update or change value when signals in the sensitivity list (see Listing 1) change state. Signals in “processes” are sequential statements. Most processes have a sensitivity list, process name, and circuit description (HDL code) between reserve words BEGIN and END PROCESS. The process name precedes the reserved word Process, and the sensitivity list is enclosed in the parenthesis. Listing 1 contains two processes. The first is checking_door_status, which has a sensitivity list that contains three signals: reset, clock_20mhz, and reset_ start_timer. The second process is set_alarm_enable, which only has two signals, reset and clock_ 20mhz, in its sensitivity list. Signals in a process that update or change following a clock edge are called synchronous signals. Start_500ns_timer in the checking_door_status process is an example of a synchronous signal. The architecture section closes by using the reserved word END followed by the architecture’s name. SIMULATE OR SYNTHESIZE One or more designers may be responsible for a design. A number of factors influence the numbers designers needed, such as design complexity and size; the designers’ skill level; and the designers’ schedule and availability. Regardless of the number of designers, after the design is completed, there are a couple of options. He or she may choose to simulate or synthesize the Once all the libraries and packages are visible, this section is complete. Entity declaration The entity declaration section imme22 JANUARY – FEBRUARY 2008 | embedded systems design europe | www.embedded.com/europe 018-019-020-021-022-023-024-025-22 22 7/02/08 11:28:01 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.