using multiple ranges

Joined
Oct 2, 2009
Messages
1
Reaction score
0
Hi..

I am trying to find an elegant method of concatenating multiple ranges.

Basically I have a signal

signal a is std_logic_vector(35 downto 00)
signal b is std_logic_vector(31 downto 00);

and I am doing the following remap:

b <= a(34 downto 27) & a(25 downto 18) & a(16 downto 9) & a(7 downto 0);

but for readability I would like to replace this statement with something like

b <= a(BYTE_MAP);

Does anyone know how to do this? It seems as though I need to define a subtype with multiple ranges.. is this possible?

ie.

SUBTYPE BYTE_MAP is range (34 downto 27) & range (25 downto 18) & range....


Thanks,

Paul
 

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,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top