VHDL 2
VHDL 2
HDL Programming
-VHDL- 2
Textbook: Volnei A. Pedroni, “Circuit Design with
VHDL”, MIT Press London, England, 2004.
Concurrent Code:
WHEN,
GENERATE,
Assignments using only operators (AND, NOT, +, *, sll,
etc.),
A special kind of assignment, called BLOCK.
Sequential Code:
PROCESSES, FUNCTIONS, PROCEDURES.
IF, WAIT, CASE, and LOOP.
VARIABLES.
VHDL>Combinational vs Sequential Logic
Multiplexer #1
VHDL> Concurrent Code
Examples:
VHDL> Concurrent Code
Tri-state Buffer:
VHDL> Concurrent Code
Example:
VHDL> Concurrent Code
Vector Shifter:
the output vector must be a shifted version of the input
vector, with twice its width and an amount of shift
specified by another input.
VHDL> Concurrent Code
Vector Shifter:
VHDL> Concurrent Code
Vector Shifter:
VHDL> Concurrent Code
BLOCK:
Simple BLOCK
locally partitioning the code.
turning the overall code more readable (long
codes).
can be nested inside another BLOCK.
VHDL> Concurrent Code
Simple BLOCK:
VHDL> Concurrent Code
Nested BLOCK:
VHDL> Concurrent Code
Guarded BLOCK:
includes an additional expression, called
guard expression.
A guarded statement executed only when
the guard expression is TRUE.
sequential circuits can be constructed.
VHDL> Concurrent Code Example
DFF with Guarded BLOCK:
VHDL> Concurrent Code Example
Problem 5.2: Priority Encoder
din dout
First Binary
Second
Third 110
Fourth
Fifth
Sixth
Seventh
VHDL> Concurrent Code
Problem 5.2: Priority Encoder
VHDL> Concurrent Code
Problem 5.2: Priority Encoder
VHDL> Sequential Code
VHDL> Sequential Code
IF statement:
VHDL> IF statement
One-digit Counter #1
1-digit decimal counter (0 9 0).
VHDL> IF statement
One-digit Counter #1
1-digit decimal counter (0 9 0).
VHDL> IF statement
WAIT statement:
the PROCESS cannot have a sensitivity list when
WAIT is employed.
VHDL> WAIT statement
WAIT statement:
the PROCESS cannot have a sensitivity list when
WAIT is employed.
VHDL> WAIT statement
WAIT ON:
Home Works:
DFF with Asynchronous Reset #2, P99.
One-digit Counter #2, P99-100.
VHDL> CASE statement
CASE statement:
VHDL> CASE statement
CASE statement: