VHDL Basics: Data Objects and Data Types
VHDL Basics: Data Objects and Data Types
0 0 1 1 1 0
1 1 1 1 1 0
1+d 1 1 1 0 0
(1+d)+d 1 1 1 0 1
Signals versus Variables (cont. 1)
ARCHITECTURE variables OF test IS
SIGNAL a, b, c: BIT;
VARIABLE out_3, out_4 : BIT;
BEGIN
PROCESS (a, b, c)
BEGIN
out_3 := a NAND b;
out_4 := out_3 XOR c;
END PROCESS;
END variables;
0 0 1 1 1 0
1 1 1 1 0 1
VHDL Objects
Scoping Rules
VHDL limits the visibility of the objects, depending on where
they are declared
10 ns
125
“101110001110001”
FALSE ‘1’ ‘A’ 13
Scalar Types
Integer Types
- Minimum range for any implementation as defined
by standard:
- 2,147,483,647 (i.e. -(231-1)) to 2,147,483,647 (i.e. 231-1).
SIGNAL X: data_bus;
SIGNAL Y: BIT;
Y <= X(12); -- Y gets value of 12th element
Composite Types (cntd.)
Another sample one-dimensional array
(using the DOWNTO order)
Signal X: register;
SIGNAL Y: BIT;
Y <= X(4); -- Y gets value of 4th element
Access