blooz
Advanced Member level 2
Here is the Exact Message
>>
line 213: Index value(s) does not match array range, simulation mismatch.
--type round_key is array (51 downto 0) of unsigned (31 downto 0);
--constant roundkey:round_key
--s00 and s_00 are 7 downto 0 signal
the Dims Function
f
>>
line 213: Index value(s) does not match array range, simulation mismatch.
--type round_key is array (51 downto 0) of unsigned (31 downto 0);
--constant roundkey:round_key
--s00 and s_00 are 7 downto 0 signal
Code:
line 213>> s_00<=s00 xor roundkey ((dims(round)))(31 downto 24);
the Dims Function
f
Code:
unction dims(a: in std_logic_vector (7 downto 0))return
integer is
variable Z:integer ;
begin
case a is
when B"00000000"=>
z:=3;
when B"00000001"=>
z:=7;
when B"00000010"=>
z:=11;
when B"00000011"=>
z:=15;
when B"00000100"=>
z:=19;
when B"00000101"=>
z:=23;
when B"00000110"=>
z:=27;
when B"00000111"=>
z:=31;
when B"00001000"=>
z:=35;
when B"00001001"=>
z:=39;
when B"00001010"=>
z:=43;
when B"00001011" =>
z:=47;
when B"00001100" =>
z:=51;
when OTHERS =>
z:=0;
end case;
return(z);
end dims;