mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
slight tweak of names
This commit is contained in:
parent
171da97fe3
commit
c8468e99c0
@ -49,12 +49,11 @@ module aes32dsi(input logic [1:0] bs,
|
||||
aes_inv_sbox inv_sbox(.in(sbox_in), .out(sbox_out));
|
||||
|
||||
// Pad output of inverse substitution box
|
||||
assign so = {24'h000000,sbox_out};
|
||||
assign so = {24'h0, sbox_out};
|
||||
|
||||
// Rotate the substitution box output left by shamt (bs * 8)
|
||||
rotate_left rol32(.input_data(so), .shamt(shamt), .rot_data(so_rotate));
|
||||
|
||||
// Set result to "X(rs1)[31..0] ^ rol32(so, unsigned(shamt));"
|
||||
assign data_out = rs1 ^ so_rotate;
|
||||
|
||||
endmodule
|
||||
|
@ -50,7 +50,7 @@ module aes32dsmi(input logic [1:0] bs,
|
||||
aes_inv_sbox inv_sbox(.in(sbox_in), .out(sbox_out));
|
||||
|
||||
// Pad output of inverse substitution box
|
||||
assign so = {24'h000000,sbox_out};
|
||||
assign so = {24'h0, sbox_out};
|
||||
|
||||
// Run so through the mixword AES function
|
||||
inv_mixword mix(.word(so), .mixed_word(mixed));
|
||||
@ -60,5 +60,4 @@ module aes32dsmi(input logic [1:0] bs,
|
||||
|
||||
// Set result to "X(rs1)[31..0] ^ rol32(so, unsigned(shamt));"
|
||||
assign data_out = rs1 ^ mixed_rotate;
|
||||
|
||||
endmodule
|
||||
|
@ -51,12 +51,11 @@ module aes32esi(input logic [1:0] bs,
|
||||
aes_sbox subbox(.in(sbox_in), .out(sbox_out));
|
||||
|
||||
// Pad sbox output
|
||||
assign so = {24'h000000,sbox_out};
|
||||
assign so = {24'h0, sbox_out};
|
||||
|
||||
// Rotate so left by shamt
|
||||
rotate_left rol32(.input_data(so), .shamt(shamt), .rot_data(so_rotate));
|
||||
|
||||
// Set result X(rs1)[31..0] ^ rol32(so, unsigned(shamt));
|
||||
assign data_out = rs1 ^ so_rotate;
|
||||
|
||||
endmodule
|
||||
|
@ -52,7 +52,7 @@ module aes32esmi(input logic [1:0] bs,
|
||||
aes_sbox sbox(.in(sbox_in), .out(sbox_out));
|
||||
|
||||
// Pad sbox output
|
||||
assign so = {24'h000000,sbox_out};
|
||||
assign so = {24'h0, sbox_out};
|
||||
|
||||
// Mix Word using aes_mixword component
|
||||
mixword mwd(.word(so), .mixed_word(mixed));
|
||||
@ -62,5 +62,4 @@ module aes32esmi(input logic [1:0] bs,
|
||||
|
||||
// Set result X(rs1)[31..0] ^ rol32(mixed, unsigned(shamt));
|
||||
assign data_out = rs1 ^ mixed_rotate;
|
||||
|
||||
endmodule
|
||||
|
@ -43,5 +43,4 @@ module aes64ds(input logic [63:0] rs1,
|
||||
|
||||
// Concatenate the two substitution outputs to get result
|
||||
assign data_out = {sbox_out_1, sbox_out_0};
|
||||
|
||||
endmodule
|
||||
|
@ -49,5 +49,4 @@ module aes64dsm(input logic [63:0] rs1,
|
||||
|
||||
// Concatenate mixed words for output
|
||||
assign data_out = {mixcol_out_1, mixcol_out_0};
|
||||
|
||||
endmodule
|
||||
|
@ -38,5 +38,4 @@ module aes64es(input logic [63:0] rs1,
|
||||
// Apply substitution box to 2 lower words
|
||||
aes_sbox_word sbox_0(.in(shiftRow_out[31:0]), .out(data_out[31:0]));
|
||||
aes_sbox_word sbox_1(.in(shiftRow_out[63:32]), .out(data_out[63:32]));
|
||||
|
||||
endmodule
|
||||
|
@ -43,5 +43,4 @@ module aes64esm(input logic [63:0] rs1,
|
||||
// Apply mix columns operations
|
||||
mixword mw0(.word(sbox_out[31:0]), .mixed_word(data_out[31:0]));
|
||||
mixword mw1(.word(sbox_out[63:32]), .mixed_word(data_out[63:32]));
|
||||
|
||||
endmodule
|
||||
|
@ -30,5 +30,4 @@ module aes64im(input logic [63:0] rs1,
|
||||
|
||||
inv_mixword inv_mw_0(.word(rs1[31:0]), .mixed_word(data_out[31:0]));
|
||||
inv_mixword inv_mw_1(.word(rs1[63:32]), .mixed_word(data_out[63:32]));
|
||||
|
||||
endmodule
|
||||
|
@ -36,5 +36,4 @@ module aes64ks2(input logic [63:0] rs2,
|
||||
assign w0 = rs1[63:32] ^ rs2[31:0];
|
||||
assign w1 = rs1[63:32] ^ rs2[31:0] ^ rs2[63:32];
|
||||
assign rd = {w1, w0};
|
||||
|
||||
endmodule
|
||||
|
Loading…
Reference in New Issue
Block a user