VHDL 2. Identifiers, Data Objects and Data Types Ver.0a 1
VHDL 2. Identifiers, Data Objects and Data Types Ver.0a 1
Chapter2
Data
Identifiers objects Data types
Used to represent
Chapter2
an object
(constant, signal
or variable)
Data
Identifiers objects Data types
1 entity eqcomp4 is
2 port (a, b: in std_logic_vector(3 downto 0);
3 equals: out std_logic);
4 end eqcomp4;
5
6 architecture dataflow1 of eqcomp4 is
7 begin
8 equals <= '1' when (a = b) else '0’;
9-- “comment” equals is active high
10 end dataflow1;
In entity declarations
Data
Identifiers objects Data types
Enumeration:
Red, blue Data
standard logic: Boolean: Identifiers objects Data types
Resolved, “TRUE”,
Unresolved ”FALSE”
Constants Signals Variables
(Global) (Global) (Local)
Float: Bit:
Data types
0.124 0,1
Integer: Character
13234,23 ‘a’,’b’
String:
“text”
Array or a bus
C1
??
C2
c1 b1
b1<=c1;
b1<=C1; ?? C1 b1
b1<=C2; illegal
??
C2
architecture
‘U’ Uninitialized
‘X’ Forcing Unknown
‘0’ Forcing 0
‘1’ Forcing 1
‘Z’ High Impedance=float ?
‘W’ Weak Unknown state
‘L’ Weak 0
‘H’ Weak 1
‘-’ Don’t care
library
libraryIEEE;
IEEE;
use
useIEEE.std_logic_1164.all;
IEEE.std_logic_1164.all; ----defines
definesstd_logic
std_logictypes
types
--library
--librarymetamor;
metamor;
entity
entityjcounter
jcounterisis
port
port((
clk
clk: :ininSTD_LOGIC;
STD_LOGIC;
qq: :buffer
bufferSTD_LOGIC_VECTOR
STD_LOGIC_VECTOR(7(7downto
downto0)0)
););
VHDL 2. Identifiers, data objects
and data types ver.0a 47
Quick Revision
You should have learnt
Identifier and usage
Different data objects (constant,
signals, variables)
Different data types (Boolean , integer
etc)
Resolved logic