again i am stuck in an issue
i dont know why the Line 74: Index <159> is out of range [127:0] for signal <Out01>.
pls helpp ! just the final task to achieve
module AES(In, clk, reset, Key, Out32);
input [127:0] In;
input clk,reset;
input [127:0] Key;
output [127:0] Out32;
reg [127:0] Key1= 128'hd6aa74fdd2af72fadaa678f1d6ab76fe;
reg [127:0] Key2= 128'hb692cf0b643dbdf1be9bc5006830b3fe;
reg [127:0] Key3= 128'hb6ff744ed2c2c9bf6c590cbf0469bf41;
reg [127:0] Key4= 128'h47f7f7bc95353e03f96c32bcfd058dfd;
reg [127:0] Key5= 128'h3caaa3e8a99f9deb50f3af57adf622aa;
reg [127:0] Key6= 128'h5e390f7df7a69296a7553dc10aa31f6b;
reg [127:0] Key7= 128'h14f9701ae35fe28c440adf4d4ea9c026;
reg [127:0] Key8= 128'h47438735a41c65b9e016baf4aebf7ad2;
reg [127:0] Key9= 128'h549932d1f08557681093ed9cbe2c974e;
reg [127:0] Key10= 128'h13111d7fe3944a17f307a78b4d2b30c5;
wire [127:0] Out01, Out11, Out21, Out31;
wire [127:0] Out02, Out12, Out22, Out32;
wire [127:0] Out03, Out13, Out23, Out33;
wire [127:0] Out04;
wire [127:0] Out14;
wire [127:0] Out24;
wire [127:0] Out34;
wire [127:0] Out05;
wire [127:0] Out15;
wire [127:0] Out25;
wire [127:0] Out35;
wire [127:0] Out06;
wire [127:0] Out16;
wire [127:0] Out26;
wire [127:0] Out36;
wire [127:0] Out07;
wire [127:0] Out17;
wire [127:0] Out27;
wire [127:0] Out37;
wire [127:0] Out08;
wire [127:0] Out18;
wire [127:0] Out28;
wire [127:0] Out38;
wire [127:0] Out09;
wire [127:0] Out19;
wire [127:0] Out29;
wire [127:0] Out39;
wire [127:0] Out010;
wire [127:0] Out110;
wire [127:0] Out210;
genvar i;
generate
for (i=0;i<=3;i=i+1)
AddRoundKey ark(In[i*32+:32], clk, Key[i*32+:32], Out01[i*32+:32], reset);
ShiftRow sr1(Out01[i*32+:32], clk, Out32[i*32+:32], reset);
endgenerate
endmodule
module AddRoundKey(In, clk, Key, Out, reset);
input [31:0] In;
input clk,reset;
input [31:0] Key;
output reg [31:0] Out;
always@(posedge clk)
begin
if (reset)
begin
Out=32'h00000000;
Out = In[31:0] ^ Key[31:0];
end
else;
end
endmodule
module ShiftRow(In, clk, Out,reset);
input [127:0] In;
input clk,reset;
output reg [127:0] Out;
always@(posedge clk)
begin
if (reset)
begin
Out=128'd0;
Out[127-:8] = In[127-:8];
Out[119-:8] = In[87-:8];
Out[111-:8] = In[47-:8];
Out[103-:8] = In[7-:8];
Out[95-:8] = In[95-:8];
Out[87-:8] = In[55-:8];
Out[79-:8] = In[15-:8];
Out[71-:8] = In[103-:8];
Out[63-:8] = In[63-:8];
Out[55-:8] = In[23-:8];
Out[47-:8] = In[111-:8];
Out[39-:8] = In[71-:8];
Out[31-:8] = In[31-:8];
Out[23-:8] = In[119-:8];
Out[15-:8] = In[79-:8];
Out[7-:8] = In[39-:8];
end
end
endmodule