Alias

LRM §4.3.3.

An alternate name for an existing named item in the code.

Syntax:

alias alias_name [ : data_type ] is name [ signature ]; 
  
signature = [ type_name, ... ] return type_name

Description:

The alias declares an alternative name for any existing object: signal, variable, constant or file. It can also be used for "non-objects": virtually everything, which was previously declared, except for labels, loop parameters, and generate parameters.

If an alias denotes a subprogram (including an operator) or enumeration literal then a signature (matching the parameter and result type) is required.

Example:

signal Instruction: std_logic_vector(15 downto 0);
   
alias OpCode   : std_logic_vector(3 downto 0) is Instruction(15 downto 12); 
alias SrcAddr  : std_logic_vector(1 downto 0) is Instruction(11 downto 10); 
alias DestAddr : std_logic_vector(1 downto 0) is Instruction(9 downto 8); 
alias InstData : std_logic_vector(7 downto 0) is Instruction(7 downto 0);

Note:

See also:

Constant