Professional Documents
Culture Documents
VHDL Introduction :
VHDL (VHSIC hardware description language) is a hardware description language used in electronic design
automation to describe digital and mixed-signal systems such as field-programmable gate arrays and integrated
circuits.
VHDL is commonly used to write text models that describe a logic circuit. Such a model is processed by a
synthesis program, only if it is part of the logic design. A simulation program is used to test the logic design
using simulation models to represent the logic circuits that interface to the design. This collection of simulation
models is commonly called a testbench.
VHDL has file input and output capabilities, and can be used as a general-purpose language for text
processing, but files are more commonly used by a simulation testbench for stimulus or verification data. There
are some VHDL compilers which build executable binaries. In this case, it might be possible to use VHDL to
write a testbench to verify the functionality of the design using files on the host computer to define stimuli, to
interact with the user, and to compare results with those expected. However, most designers leave this job to
the simulator.
It is relatively easy for an inexperienced developer to produce code that simulates successfully but that cannot
be synthesized into a real device, or is too large to be practical. One particular pitfall is the accidental production
of transparent latches rather than D-type flip-flops as storage elements.[original research?]
A final point is that when a VHDL model is translated into the "gates and wires" that are mapped onto a
programmable logic device such as a CPLD or FPGA, then it is the actual hardware being configured, rather
than the VHDL code being "executed" as if on some form of a processor chip.
Features of the language :
§ 2.1 VHDL Background Information
1. What is a HDL?
A high level programming language that offers special constructs with which you can model
microelectronic circuits.
The special constructs allow you to:
a. Describe the operation of a circuit at various levels of
i. The behavior abstraction of a circuit
ii. The function abstraction of a circuit iii. The structure abstraction of a circuit
b. Timing of a circuit
c. Concurrency of circuit operation
2. Why HDL?
a. HDL facilitates a top-down design methodology using synthesis
i. Design at high implementation-independent level
ii. Delay decision on implementation details iii. Easily explore design alternatives
iv. Solve architecture problems before implementation
v. Automatic mapping of a high-level description to a technology specific implementation
b. Provide greater flexibility
i. Design reuse
ii. Move design between multiple vendors’ tools
c. Permits you to take advantage of mature software design practice
i. Quickly capture design intent
ii. Quickly manage design data
Or in other words, documenting a design and modeling it.
d. Prototyping of complicated system is extremely expensive
Replace the prototyping process with validation through simulation
HDLs can be used for both logic synthesis and test generation
3. HDLs
Early HDLs (CDL, ISP, AHPL), mainly in 70’s, primarily target at design architecture verification
Can’t model designs with high accuracy
Can’t provide precise timing
Language construct imply a certain hardware structureNewer HDLs (VHDL, Verilog) have universal
timing model and imply no particular hardware structure.
§ 2.2 VHDL Basic
Xilinx Software :
Xilinx ISE[1] is a software tool produced by Xilinx for synthesis and analysis of HDL designs, which enables the
developer to synthesize ("compile") their designs, perform timing analysis, examine RTL diagrams, simulate a
design's reaction to different stimuli, and configure the target device with the programmer.
Features of Xilinx :
Create a New Project
Create a new ISE project which will target the FPGA device on the Spartan-3 Startup Kit demo board.
To create a new project:
1. Select File New Project... The New Project Wizard appears.
2. Type tutorial in the Project Name field.
3. Enter or browse to a location (directory path) for the new project. A tutorial subdirectory is created
automatically.
4. Verify that HDL is selected from the Top-Level Source Type list.
5. Click Next to move to the device properties page.
6. Fill in the properties in the table as shown below: ♦ Product Category:
All
♦ Family: Spartan3
♦ Device: XC3S200 ♦ Package: FT256 ♦
Speed Grade: -4
♦ Top-Level Source Type: HDL
♦ Synthesis Tool: XST (VHDL/Verilog)
♦ Simulator: ISE Simulator (VHDL/Verilog)
♦ Preferred Language: Verilog (or VHDL)
♦ Verify that Enable Enhanced Design Summary is selected.
Leave the default values in the remaining fields.
When the table is complete, your project properties will look like the following:
Figure 2: Project Device Properties
7. Click Next, then Finish in the New Source Wizard - Summary dialog box to complete the new source file
template.
8. Click Next, then Next, then Finish.
The source file containing the entity/architecture pair displays in the Workspace, and the counter displays in the
Source tab, as shown below:
7. Click Next, then Finish in the New Source Information dialog box to complete the new source file template.
8. Click Next, then Next, then Finish.
Design Simulation
9. The blue shaded areas that precede the rising edge of the CLOCK correspond to the Input Setup Time
in the Initialize Timing dialog box. Toggle the DIRECTION port to define the input stimulus for the
counter design as follows:
♦ Click on the blue cell at approximately the 300 ns to assert DIRECTION high so that the counter will count up.
♦ Click on the blue cell at approximately the 900 ns to assert DIRECTION low so that the counter will count
down.