Operator on array slice

Joined
Nov 27, 2009
Messages
1
Reaction score
0
I'm trying to do this:

Code:
type enum1 is (None, Up, Down, Both);
type type1 is array (7 downto 0) of enum1;
signal ary1: type1 := (others => None);

remaining: for k in 7 downto 0 generate
	requests_up(k) <= '1' when ary1(ary1'high downto k) = (others => None) else '0';
end generate remaining;

Or more specifically, trying to see if a slice of my array of enum types is uniformly equal to a certain value.

I've tried these both:

Code:
ary1(7 downto 5) = (7 downto 5 => None)
ary1(7 downto 5) = (others => None)

But for some reason ary1(7 downto 5) always comes up with only single element.

What is the proper way to do this?? I can't seem to find much more information on array slices.
 

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

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top