Forum Discussion
Altera_Forum
Honored Contributor
9 years agoPlsease urgent help in VHDL arrays
red <= colour_schemes[{scheme,2'd3}][3:0] this is a peace of verilog code n i wanna know how to do this in vhdl ? note: red is std_logic_vector(3 downto 0) colour schemes is an ar...
Altera_Forum
Honored Contributor
9 years agoan array is accessed with (<range>) so in your case colour_schemes(scheme) where scheme is an int, an this returns a std_logic_vector, so to get the last four elements we do (3 downto 0).