Circuit Design
Physical Design
Manufacturing
2
VHDL History
VHDL Specifications
Components in VHDL
ENTITY Declaration
ENTITY entity_name IS
generic clause
port clause
END ENTITY entity_name ;
ENTITY and3 IS
GENERIC (delay: TIME := 5 ns);
PORT (a, b, c : IN BIT; z : OUT BIT);
END and3;
Ports
Standard Types
Standard Package Types:
Name
Mode
IN
: Input signals
OUT
: Output Signals
INOUT
: Bidirectional Signals
BUFFER : Like OUT from outside the
component &
INOUT from
Inside it
Type
BIT
BIT_VECTOR
BOOLEAN
INTEGER
REAL
TIME
CHARACTER
STRING
10
ARCHITECTURE Declaration
Concurrent Statements
13
conditional_waveforms ::=
{ waveform WHEN condition ELSE }
waveform [ WHEN condition]
waveform ::=
waveform_element {, waveform_element}
| UNAFFECTED
waveform_element ::=
value_expression [AFTER time_expression]
| NULL [AFTER time_expression]
14
2:1 MUX
ENTITY Mux2x1 IS
PORT (a0, a1, sel: IN BIT; z: OUT BIT);
END Mux2x1;
ARCHITECTURE conditional OF Mux2x1 IS
BEGIN
z <= a0 WHEN sel = 0 ELSE a1;
END conditional;
ENTITY nand3 IS
PORT (a, b, c: IN BIT; z: OUT BIT);
END nand3;
ARCHITECTURE no_delay OF nand3 IS
BEGIN
z <= NOT (a AND b AND c);
END no_delay;
18
17
VHDL Operators
XNOR
selected_waveforms ::=
{ waveform WHEN choices, }
waveform WHEN choices
choices ::= choice { | choice }
choice ::= expression | range | simple_name | OTHERS
19
20
Component Instantiation
Statement
2:1 MUX
label: instantiated_unit
[ GENERIC MAP (association_list) ]
[ PORT MAP (association_list) ] ;
instantiated_unit ::=
[COMPONENT] component_name
| ENTITY entity_name [ (architecture_name) ]
| CONFIGURATION configuration_name
association_list ::= association_element { ,
association_element }
association_element ::= [ formal_part => ] actual_part
22
21
ENTITY Mux4x1 IS
PORT (a : IN BIT_VECTOR(3 DOWNTO 0); sel: IN BIT_VECTOR(0 TO 1) ;
z: OUT BIT);
END Mux4x1;
ARCHITECTURE mux2x1_based OF Mux4x1 IS
SIGNAL im0, im1 : BIT;
BEGIN
m1: ENTITY WORK.Mux2x1(conditional) PORT MAP (a(0), a(1), sel(0),
im0);
m2: ENTITY WORK.Mux2x1(conditional) PORT MAP (a(2), a(3), sel(0),
im1);
m3: ENTITY WORK.Mux2x1(selected) PORT MAP (im0, im1, sel(1), z);
END mux2x1_based;
23
26