Skip to content

Commit

Permalink
⚡ Fixed calculating extra key
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedSobhy01 committed Apr 21, 2024
1 parent d4734de commit a561d89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions KeyExpansion.v
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ endmodule

module KeyExpansion(keyIn, keysOut);
input [127:0] keyIn;
output [(12 * 128) - 1:0] keysOut;
output [(11 * 128) - 1:0] keysOut;

assign keysOut[127:0] = keyIn;

// Perform the key expansion rounds (KeyExpansionRound)
genvar i;
generate
for (i = 0; i < 11; i = i + 1) begin : KeyExpansionLoop
for (i = 0; i < 10; i = i + 1) begin : KeyExpansionLoop
KeyExpansionRound keyExpansionRound(i + 1, keysOut[127 + i * 128 -: 128], keysOut[255 + i * 128 -: 128]);
end
endgenerate
Expand Down

0 comments on commit a561d89

Please sign in to comment.