Hardware Representation for Arrays in VHDL

Using VHDL, I want to have several registers that store 16 bits in each of them. So I found that VHDL has a built-in array, and I want to use it to store 16 bits in each element in iy, so I want to know if VHDL maps this array to actual registers or not?

+5
source share
4 answers

The short answer is no, the type of the array does not map to the register.

Long answer: An

array type in VHDL is just an indexed collection of elements of the same type. In your case, you are probably using an array as the result of a register bank.

, , 8 , 16 . ( 8) 16- . :

 component reg8x16
  port(
   clock: in std_logic;
   reset: in std_logic;
   enable: in std_logic;
   rout : out r_array(0 to 7)
   );
 end component; 

rout - . , 0 rout(0), std_logic_vector(15 downto 0).

, - ( ). :

type r_array is array (integer range <>) of std_logic_vector(15 downto 0);

(integer range <>) - , (, ).

, . , reg8x16. , 16- , std_logic_vector(15 downto 0); ( , ... VHDL). 8 reg8x16.

+3

: , , , ( , ) .

+3

. - . - (3 downto 0) ( 1 0) 4x2 8 . , (3) (1), . , (3) (1) (7).

+1

, register vhdl

std_logic_vector

0

All Articles