array problems

M

Matt North

Guest
Hi,

I have an array:

variable ram: array_t;

where:

type array_t is array (0 to 127, 0 to 127) of std_logic;

i now need to load an address of ram:

ram(to_integer(addr)) := data;

How do i get 'data' to be of a type that matches 'array_t',
std_logic_vector(0 to 127) or unsigned(0 to 127) does not work.

i cant change array_t to:

type array_t is array (0 to 127) of std_logic_vector(0 to 127);

because i need to index the array in the following form:

result(y,x):=ram(x,y);

Thanks,
Matt
 

Welcome to EDABoard.com

Sponsor

Back
Top