Altera_Forum
Honored Contributor
14 years agoHelp with non-zero indexed signal vector/array
Not sure if this is the right posting site for general HDL queries, but here it goes: When declaring a scalar vector signal (e.g. bit_vector or std_logic_vector) or a multidimensional array in VHDL, I've seen both descending (downto) and ascending (to) syntax being used to constrain the range. Are there any restrictions on the upper or the lower bound of a signal/array? Is it perfectly legal to specify a signal that neither starts (for ascending) nor ends (for descending) with a zero index (i.e. zero-based numbering)?
E.g. port ( a : in std_logic_vector (32 downto 24); -- msb of data bus b : in std_logic_vector (5 to 7); etc... );