Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Synthesis WARNING:Xst:790 - How to deal ?

Status
Not open for further replies.

blooz

Advanced Member level 2
Joined
Dec 29, 2010
Messages
560
Helped
121
Reputation
242
Reaction score
116
Trophy points
1,343
Location
India
Activity points
4,985
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

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;
 

No habla vhdl senor, but it looks like a mismatch in length of bit-vectors.
 
  • Like
Reactions: blooz

    blooz

    Points: 2
    Helpful Answer Positive Rating
why not use temporary variables and do it in stages to make it more readiable?
 
  • Like
Reactions: blooz

    blooz

    Points: 2
    Helpful Answer Positive Rating
Solved
1.h**p://forums.xilinx.com/t5/Synthesis/I-don-t-understand-quot-Xst-790-Index-value-s-does-not-match/td-p/36347
 
Solved
1.h**p://forums.xilinx.com/t5/Synthesis/I-don-t-understand-quot-Xst-790-Index-value-s-does-not-match/td-p/36347

thanks for the followup! What does your working code look like now? (reference for future victims of the same error ;) )
 

here is the Declaration that Produced the Warning
Code:
type round_key is array [COLOR=#FF0000][B][U](51 downto 0)[/U][/B][/COLOR] of unsigned (31 downto 0);    
constant roundkey:round_key:=(




x"96C04816",
x"B2EC2BC0",                                    
x"4827C30B",
x"BA17DF4C",


x"92123943",
x"47A6F60D",
x"472A2FEF",
x"1AC76953",

x"7BACA230",
x"2281C107",
x"535659BC",
x"AE9E8525",


x"24933394",
x"8B76A68B",
x"8AFADC0A",
x"C9F40E8C",



x"6DE74109",
x"0978D5FD",
x"639A1315",
x"A6394AA4",



x"36358C4E",
x"6C45C11F",
x"0C21B2D1",
x"76147515",


x"BD98B7C5",
x"97C31DE2",
x"AB51DA7C",
x"13222BCC",



x"B80B1E73",
x"7EF22C42",
x"789E1CB6",
x"5CDB2A44",


x"86B854FC",
x"826B5F55",
x"1B691E0A",
x"D6AA4113",


x"5939A288",
x"ECF620C9",
x"31BF3C4F",
x"57F701F5",



x"64B714B2",
x"BC473DC5",
x"B7828528",
x"E1A1E737",



x"42A301B4",
x"58B91BAE",
x"80EB367C",
x"3D568BC1",


x"0028DE9E",
x"0028DE9E",
x"0028DE9E",
x"0028DE9E"

);--



Here is the Corrected Version


Code:
type round_key is array ([COLOR=#0000FF]63 downto 0)[/COLOR] of unsigned (31 downto 0);    
constant roundkey:round_key:=(


x"00000000",
x"00000000",
x"00000000",
x"00000000",



x"00000000",
x"00000000",
x"00000000",
x"00000000",


x"00000000",
x"00000000",
x"00000000",
x"00000000",

x"96C04816",
x"B2EC2BC0",                                    
x"4827C30B",
x"BA17DF4C",


x"92123943",
x"47A6F60D",
x"472A2FEF",
x"1AC76953",

x"7BACA230",
x"2281C107",
x"535659BC",
x"AE9E8525",


x"24933394",
x"8B76A68B",
x"8AFADC0A",
x"C9F40E8C",



x"6DE74109",
x"0978D5FD",
x"639A1315",
x"A6394AA4",



x"36358C4E",
x"6C45C11F",
x"0C21B2D1",
x"76147515",


x"BD98B7C5",
x"97C31DE2",
x"AB51DA7C",
x"13222BCC",



x"B80B1E73",
x"7EF22C42",
x"789E1CB6",
x"5CDB2A44",


x"86B854FC",
x"826B5F55",
x"1B691E0A",
x"D6AA4113",


x"5939A288",
x"ECF620C9",
x"31BF3C4F",
x"57F701F5",



x"64B714B2",
x"BC473DC5",
x"B7828528",
x"E1A1E737",



x"42A301B4",
x"58B91BAE",
x"80EB367C",
x"3D568BC1",


x"0028DE9E",
x"0028DE9E",
x"0028DE9E",
x"0028DE9E"

);--



type round_key is array (51 downto 0) of unsigned (31 downto 0) >>type round_key is array (63 downto 0) of unsigned (31 downto 0);

changed the array length from (51 downto 0 ) to (63 downto 0) so that array length is a power of two
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top