HDL-Based Digital Design: Part I: Introduction To VHDL (I)
HDL-Based Digital Design: Part I: Introduction To VHDL (I)
What is VHDL?
VHDL: VHSIC Hardware Description Language
VHSIC: Very High Speed Integrated Circuit Developed originally by DARPA for specifying digital systems International IEEE standard (IEEE 1076-1993) Hardware Description, Simulation, Synthesis
Practical benefits:
a mechanism for digital design and reusable design documentation Model interoperability among vendors Third party vendor support Design re-use.
VHDL:
a language to describe digital systems. Purposes: simulation and synthesis of digital systems.
Geometric
Geometric
Geometric
Floor Plan
Geometric
Entity-Architecture Pair
reserved words
4-bit Adder
Whenever one of the signals in the sensitivity list changes, the sequential statements are executed in sequence one time
D Flip-flop Model
Bit values are enclosed in single quotes
JK Flip-Flop Model
JK Flip-Flop Model
Sel represents the integer equivalent of a 2-bit binary number with bits A and B If a MUX model is used inside a process, the MUX can be modeled using a CASE statement (cannot use a concurrent statement):
Timing Model
VHDL uses the following simulation cycle to model the stimulus and response nature of digital hardware Start Simulation Delay
Update Signals
Execute Processes
End Simulation
Delay Types
All VHDL signal assignment statements prescribe an amount of time that must transpire before the signal assumes its new value This prescribed delay can be in one of three forms:
Transport -- prescribes propagation delay only Inertial -- prescribes propagation delay and minimum input pulse width Delta -- the default if no delay time is explicitly specified Input Output delay
Transport Delay
Transport delay must be explicitly specified
I.e. keyword TRANSPORT must be used
Input
Output
Input Output 0 5 10 15 20 25 30 35
Inertial Delay
Provides for specification propagation delay and input pulse width, i.e. inertia of output:
target <= [REJECT time_expression] INERTIAL waveform;
Input
Output
Input Output 0 5 10 15 20 25 30 35
Input Output 0 5 10 15 20 25 30 35
Delta Delay
Default signal assignment propagation delay if no delay is explicitly prescribed
VHDL signal assignments do not take place immediately Delta is an infinitesimal VHDL time unit so that all signal assignments can result in signals assuming their values at a future time E.g.
Output <= NOT Input; -- Output assumes new value in one delta cycle
Simulation Example
Problem #1
entity not_another_prob is
Using the labels, list the order in which the following signal assignments are evaluated if in2 changes from a '0' to a '1'. Assume in1 has been a '1' and in2 has been a '0' for a long time, and then at time t in2 changes from a '0' to a '1'.
architecture oh_behave of not_another_prob is signal b, c, d, e, f: bit; begin L1: d <= not(in1); L2: c<= not(in2); L3: f <= (d and in2) ; L4: e <= (c and in1) ; L5: a <= not b; L6: b <= e or f; end oh_behave;
Problem #2
Under what conditions do the two assignments below result in the same behavior? Different behavior? Draw waveforms to support your answers.
out <= reject 5 ns inertial (not a) after 20 ns; out <= transport (not a) after 20 ns;
Two processes: the first represents the combinational network; the second represents the state register
Waveforms:
Structural Model
Waveforms:
Wait Statements
... an alternative to a sensitivity list Note: a process cannot have both wait statement(s) and a sensitivity list Generic form of a process with wait statement(s)
process begin sequential-statements wait statement sequential-statements wait-statement ... end process;
How wait statements work? Execute seq. statement until a wait statement is encountered. Wait until the specified condition is satisfied. Then execute the next set of sequential statements until the next wait statement is encountered. ... When the end of the process is reached start over again at the beginning.
Wait on
until one of the signals in the sensitivity list changes
Wait until
the Boolean expression is evaluated whenever one of the signals in the expression changes, and the process continues execution when the expression evaluates to TRUE
Wait for
waits until the time specified by the time expression has elapsed
What is this:
wait for 0 ns;