Basic Language Constructs of VHDL
Basic Language Constructs of VHDL
Data Types.
Type conversion.
VHLD guidelines.
1
Identifiers
Basic rules:
Valid examples:
A10, next_state, NextState, mem_addr_enable
2
Reserved words
Base 2: 2#101101#
Character:
A, Z, 1
Strings
Hello, 101101
Note
Objects
Signals
Variables
Constants
Alias
Signal
Signal declaration:
signal signal_name, signal_name, ... : data_type
Signal assignment:
signal_name <= projected_waveform;
ex : signal p : std_logic_vector (3 downto 0 );
Variable
Constant
Alias
Not a object
Ex :
signal word:std_logic_vector (15 downto 0);
alias upper :std_logic_vector(7 downto 0) is word (15 downto 8);
alias lower :std_logic_vector(7 downto 0) is word (7 downto 0);
10
VHDL Guidelines
Use the std-logic-vector and std-logic data types instead of the bit-vector.
Use the numeric-std package and the unsigned and signed data types for
synthesizing arithmetic operations.
Use only the descending range(i.e., downto) in the array specification of the
unsigned, signed and std-logic-vector data types.
Dont use immediate assignment (i.e., :=) to assign an initial value to a signal.
11