2D array question

D

Divyang M

Hi,

How do I assign 8 bits of a 16-bit 2D array to an 8-bit 2D array:

I tried both the following and I get an error:

prim_out_n_re(9) <= prim_out_n(15 downto 8)(9);

AND

prim_out_n_re(9) <= prim_out_n(9)(15 downto 8);

where

prim_out_n_re is array(10 downto 0) of std_logic_vector(7 downto 0)
prim_out_n is array(10 downto 0) of std_logic_vector(15 downto 0)

Thanks,

Divyang M
 
D

Divyang M

I tried the following and it compiles..is it correct?

prim_out_n_re(i)(7 downto 0) <= prim_out_n(i)(15 downto 8);

Divyang M.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top