Binome
Full Member level 3
- Joined
- Nov 16, 2009
- Messages
- 152
- Helped
- 2
- Reputation
- 4
- Reaction score
- 2
- Trophy points
- 1,298
- Location
- Lyon, France
- Activity points
- 2,405
Hi,
here's a part of my code:
I hope you can understand the meaning of it. When compiling with Modelsim the error is "Range constraints cannot be applied to array types." for line 3 and I don't know what to do with that.
Can someone help me?
here's a part of my code:
Code:
wit_process: process(rst_n, s_done)
variable wit_addr : std_logic_vector(7 downto 0) := (others => '0');
variable ind : unsigned range 0 to 7 := 0;
begin
if rst_n = '0' then
wit <= (others => (others => '0'));
s_wit_addr <= (others => '0');
wit_addr := (others => '0');
else
for h in 1 to logl loop
for w in 0 to leaves_nbr-1 loop
for i in wit(w)'length-(h+1) to wit(w)'length-1 loop
wit_addr(i) := '0';
end loop;
for i in 1 to wit(w)'length-(h+1)-1 loop
ind := to_unsigned(w, wit(w)'length)
wit_addr(i) := std_logic_vector(ind)(i+h+1);
end loop;
wit_addr(0) := not(std_logic_vector(to_unsigned(w, witness(w)'length))(h+1));
s_wit_addr <= wit_addr;
end loop;
end loop;
end if;
end process;
Can someone help me?