Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for Scalar Cryptography Extensions (Zbkx, Zkne, Zknd) #27

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

munailwaqar
Copy link
Collaborator

@munailwaqar munailwaqar commented Dec 20, 2024

Introduction

This PR adds support for Zbkx, Zkne and Zknd extensions in the CVA6 core. It also adds the documentation and tests for these extensions. These changes have been tested with self-written single instruction tests and with the riscv-arch-tests. This PR is part of a series of PRs that will add the complete support for the Zkn - NIST Algorithm Suite extension.

Implementation

Zbkx Extension:
Added support for the Zbkx instruction set. It essentially expands the Bitmanip extension with additional instructions useful in cryptography. These instructions are xperm8, xperm4.

Zkne Extension:
Added support for the Zkne instruction set. It essentially adds AES encryption support for scalar cryptography. These instructions are aes32esi, aes32esmi, aes64es, aes64esm, aes64ks1i, aes64ks2.

Zknd Extension:
Added support for the Zknd instruction set. It adds AES decryption support for scalar cryptography. These instructions are aes32dsi, aes32dsmi, aes64ds, aes64dsm, aes64im, aes64ks1i, aes64ks2.

Note:
The aes64ks1i and aes64ks2 instructions are present in both the Zknd and Zkne extensions.

Modifications

The complete Zkn extension will be added under the ZKN bit for ease of use. This configuration will also require the RVB (bitmanip) bit to be set.
Updated the ALU and decoder to recognize and handle Zbkx instructions. The decoder will now select the AES unit for AES instructions instead of the ALU.

AES Functional Unit
A new functional unit was created inside the execute stage that will handle all AES instructions (Zkne, Zknd).

Documentation and Reference
The official RISC-V Cryptography Extensions Volume I was followed to ensure alignment with ratification. The relevant documentation for Zbkx, Zkne and Zknd instructions was also added.

Verification

Assembly Tests:
The instructions were tested and verified with the K module of both 32 bit and 64 bit versions of the riscv-arch-tests to ensure proper functionality. These tests check for ISA compliance, edge cases and use assertions to ensure expected behavior. The tests include:

xperm8-01.S
xperm4-01.S
aes32esi-01.S
aes32esmi-01.S
aes32dsi-01.S
aes32dsmi-01.S
aes64ds-01.S
aes64dsm-01.S
aes64es-01.S
aes64esm-01.S
aes64im-01.S
aes64ks1i-01.S
aes64ks2-01.S

core/decoder.sv Outdated
Comment on lines 785 to 786
{7'b001_0100, 3'b100} : if (CVA6Cfg.ZKN) instruction_o.op = ariane_pkg::XPERM8; else illegal_instr_bm = 1'b1; // xperm8
{7'b001_0100, 3'b010} : if (CVA6Cfg.ZKN) instruction_o.op = ariane_pkg::XPERM4; else illegal_instr_bm = 1'b1; // xperm4

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
{7'b001_0100, 3'b100} : if (CVA6Cfg.ZKN) instruction_o.op = ariane_pkg::XPERM8; else illegal_instr_bm = 1'b1; // xperm8
{7'b001_0100, 3'b010} : if (CVA6Cfg.ZKN) instruction_o.op = ariane_pkg::XPERM4; else illegal_instr_bm = 1'b1; // xperm4
{
7'b001_0100, 3'b100
} :
if (CVA6Cfg.ZKN) instruction_o.op = ariane_pkg::XPERM8;
else illegal_instr_bm = 1'b1; // xperm8
{
7'b001_0100, 3'b010
} :
if (CVA6Cfg.ZKN) instruction_o.op = ariane_pkg::XPERM4;
else illegal_instr_bm = 1'b1; // xperm4

core/alu.sv Outdated
Comment on lines 301 to 346
case (si)
8'h00: aes_sbox_fwd = 8'h63; 8'h01: aes_sbox_fwd = 8'h7C; 8'h02: aes_sbox_fwd = 8'h77; 8'h03: aes_sbox_fwd = 8'h7B; 8'h04: aes_sbox_fwd = 8'hF2; 8'h05: aes_sbox_fwd = 8'h6B;
8'h06: aes_sbox_fwd = 8'h6F; 8'h07: aes_sbox_fwd = 8'hC5; 8'h08: aes_sbox_fwd = 8'h30; 8'h09: aes_sbox_fwd = 8'h01; 8'h0A: aes_sbox_fwd = 8'h67; 8'h0B: aes_sbox_fwd = 8'h2B;
8'h0C: aes_sbox_fwd = 8'hFE; 8'h0D: aes_sbox_fwd = 8'hD7; 8'h0E: aes_sbox_fwd = 8'hAB; 8'h0F: aes_sbox_fwd = 8'h76; 8'h10: aes_sbox_fwd = 8'hCA; 8'h11: aes_sbox_fwd = 8'h82;
8'h12: aes_sbox_fwd = 8'hC9; 8'h13: aes_sbox_fwd = 8'h7D; 8'h14: aes_sbox_fwd = 8'hFA; 8'h15: aes_sbox_fwd = 8'h59; 8'h16: aes_sbox_fwd = 8'h47; 8'h17: aes_sbox_fwd = 8'hF0;
8'h18: aes_sbox_fwd = 8'hAD; 8'h19: aes_sbox_fwd = 8'hD4; 8'h1A: aes_sbox_fwd = 8'hA2; 8'h1B: aes_sbox_fwd = 8'hAF; 8'h1C: aes_sbox_fwd = 8'h9C; 8'h1D: aes_sbox_fwd = 8'hA4;
8'h1E: aes_sbox_fwd = 8'h72; 8'h1F: aes_sbox_fwd = 8'hC0; 8'h20: aes_sbox_fwd = 8'hB7; 8'h21: aes_sbox_fwd = 8'hFD; 8'h22: aes_sbox_fwd = 8'h93; 8'h23: aes_sbox_fwd = 8'h26;
8'h24: aes_sbox_fwd = 8'h36; 8'h25: aes_sbox_fwd = 8'h3F; 8'h26: aes_sbox_fwd = 8'hF7; 8'h27: aes_sbox_fwd = 8'hCC; 8'h28: aes_sbox_fwd = 8'h34; 8'h29: aes_sbox_fwd = 8'hA5;
8'h2A: aes_sbox_fwd = 8'hE5; 8'h2B: aes_sbox_fwd = 8'hF1; 8'h2C: aes_sbox_fwd = 8'h71; 8'h2D: aes_sbox_fwd = 8'hD8; 8'h2E: aes_sbox_fwd = 8'h31; 8'h2F: aes_sbox_fwd = 8'h15;
8'h30: aes_sbox_fwd = 8'h04; 8'h31: aes_sbox_fwd = 8'hC7; 8'h32: aes_sbox_fwd = 8'h23; 8'h33: aes_sbox_fwd = 8'hC3; 8'h34: aes_sbox_fwd = 8'h18; 8'h35: aes_sbox_fwd = 8'h96;
8'h36: aes_sbox_fwd = 8'h05; 8'h37: aes_sbox_fwd = 8'h9A; 8'h38: aes_sbox_fwd = 8'h07; 8'h39: aes_sbox_fwd = 8'h12; 8'h3A: aes_sbox_fwd = 8'h80; 8'h3B: aes_sbox_fwd = 8'hE2;
8'h3C: aes_sbox_fwd = 8'hEB; 8'h3D: aes_sbox_fwd = 8'h27; 8'h3E: aes_sbox_fwd = 8'hB2; 8'h3F: aes_sbox_fwd = 8'h75; 8'h40: aes_sbox_fwd = 8'h09; 8'h41: aes_sbox_fwd = 8'h83;
8'h42: aes_sbox_fwd = 8'h2C; 8'h43: aes_sbox_fwd = 8'h1A; 8'h44: aes_sbox_fwd = 8'h1B; 8'h45: aes_sbox_fwd = 8'h6E; 8'h46: aes_sbox_fwd = 8'h5A; 8'h47: aes_sbox_fwd = 8'hA0;
8'h48: aes_sbox_fwd = 8'h52; 8'h49: aes_sbox_fwd = 8'h3B; 8'h4A: aes_sbox_fwd = 8'hD6; 8'h4B: aes_sbox_fwd = 8'hB3; 8'h4C: aes_sbox_fwd = 8'h29; 8'h4D: aes_sbox_fwd = 8'hE3;
8'h4E: aes_sbox_fwd = 8'h2F; 8'h4F: aes_sbox_fwd = 8'h84; 8'h50: aes_sbox_fwd = 8'h53; 8'h51: aes_sbox_fwd = 8'hD1; 8'h52: aes_sbox_fwd = 8'h00; 8'h53: aes_sbox_fwd = 8'hED;
8'h54: aes_sbox_fwd = 8'h20; 8'h55: aes_sbox_fwd = 8'hFC; 8'h56: aes_sbox_fwd = 8'hB1; 8'h57: aes_sbox_fwd = 8'h5B; 8'h58: aes_sbox_fwd = 8'h6A; 8'h59: aes_sbox_fwd = 8'hCB;
8'h5A: aes_sbox_fwd = 8'hBE; 8'h5B: aes_sbox_fwd = 8'h39; 8'h5C: aes_sbox_fwd = 8'h4A; 8'h5D: aes_sbox_fwd = 8'h4C; 8'h5E: aes_sbox_fwd = 8'h58; 8'h5F: aes_sbox_fwd = 8'hCF;
8'h60: aes_sbox_fwd = 8'hD0; 8'h61: aes_sbox_fwd = 8'hEF; 8'h62: aes_sbox_fwd = 8'hAA; 8'h63: aes_sbox_fwd = 8'hFB; 8'h64: aes_sbox_fwd = 8'h43; 8'h65: aes_sbox_fwd = 8'h4D;
8'h66: aes_sbox_fwd = 8'h33; 8'h67: aes_sbox_fwd = 8'h85; 8'h68: aes_sbox_fwd = 8'h45; 8'h69: aes_sbox_fwd = 8'hF9; 8'h6A: aes_sbox_fwd = 8'h02; 8'h6B: aes_sbox_fwd = 8'h7F;
8'h6C: aes_sbox_fwd = 8'h50; 8'h6D: aes_sbox_fwd = 8'h3C; 8'h6E: aes_sbox_fwd = 8'h9F; 8'h6F: aes_sbox_fwd = 8'hA8; 8'h70: aes_sbox_fwd = 8'h51; 8'h71: aes_sbox_fwd = 8'hA3;
8'h72: aes_sbox_fwd = 8'h40; 8'h73: aes_sbox_fwd = 8'h8F; 8'h74: aes_sbox_fwd = 8'h92; 8'h75: aes_sbox_fwd = 8'h9D; 8'h76: aes_sbox_fwd = 8'h38; 8'h77: aes_sbox_fwd = 8'hF5;
8'h78: aes_sbox_fwd = 8'hBC; 8'h79: aes_sbox_fwd = 8'hB6; 8'h7A: aes_sbox_fwd = 8'hDA; 8'h7B: aes_sbox_fwd = 8'h21; 8'h7C: aes_sbox_fwd = 8'h10; 8'h7D: aes_sbox_fwd = 8'hFF;
8'h7E: aes_sbox_fwd = 8'hF3; 8'h7F: aes_sbox_fwd = 8'hD2; 8'h80: aes_sbox_fwd = 8'hCD; 8'h81: aes_sbox_fwd = 8'h0C; 8'h82: aes_sbox_fwd = 8'h13; 8'h83: aes_sbox_fwd = 8'hEC;
8'h84: aes_sbox_fwd = 8'h5F; 8'h85: aes_sbox_fwd = 8'h97; 8'h86: aes_sbox_fwd = 8'h44; 8'h87: aes_sbox_fwd = 8'h17; 8'h88: aes_sbox_fwd = 8'hC4; 8'h89: aes_sbox_fwd = 8'hA7;
8'h8A: aes_sbox_fwd = 8'h7E; 8'h8B: aes_sbox_fwd = 8'h3D; 8'h8C: aes_sbox_fwd = 8'h64; 8'h8D: aes_sbox_fwd = 8'h5D; 8'h8E: aes_sbox_fwd = 8'h19; 8'h8F: aes_sbox_fwd = 8'h73;
8'h90: aes_sbox_fwd = 8'h60; 8'h91: aes_sbox_fwd = 8'h81; 8'h92: aes_sbox_fwd = 8'h4F; 8'h93: aes_sbox_fwd = 8'hDC; 8'h94: aes_sbox_fwd = 8'h22; 8'h95: aes_sbox_fwd = 8'h2A;
8'h96: aes_sbox_fwd = 8'h90; 8'h97: aes_sbox_fwd = 8'h88; 8'h98: aes_sbox_fwd = 8'h46; 8'h99: aes_sbox_fwd = 8'hEE; 8'h9A: aes_sbox_fwd = 8'hB8; 8'h9B: aes_sbox_fwd = 8'h14;
8'h9C: aes_sbox_fwd = 8'hDE; 8'h9D: aes_sbox_fwd = 8'h5E; 8'h9E: aes_sbox_fwd = 8'h0B; 8'h9F: aes_sbox_fwd = 8'hDB; 8'hA0: aes_sbox_fwd = 8'hE0; 8'hA1: aes_sbox_fwd = 8'h32;
8'hA2: aes_sbox_fwd = 8'h3A; 8'hA3: aes_sbox_fwd = 8'h0A; 8'hA4: aes_sbox_fwd = 8'h49; 8'hA5: aes_sbox_fwd = 8'h06; 8'hA6: aes_sbox_fwd = 8'h24; 8'hA7: aes_sbox_fwd = 8'h5C;
8'hA8: aes_sbox_fwd = 8'hC2; 8'hA9: aes_sbox_fwd = 8'hD3; 8'hAA: aes_sbox_fwd = 8'hAC; 8'hAB: aes_sbox_fwd = 8'h62; 8'hAC: aes_sbox_fwd = 8'h91; 8'hAD: aes_sbox_fwd = 8'h95;
8'hAE: aes_sbox_fwd = 8'hE4; 8'hAF: aes_sbox_fwd = 8'h79; 8'hB0: aes_sbox_fwd = 8'hE7; 8'hB1: aes_sbox_fwd = 8'hC8; 8'hB2: aes_sbox_fwd = 8'h37; 8'hB3: aes_sbox_fwd = 8'h6D;
8'hB4: aes_sbox_fwd = 8'h8D; 8'hB5: aes_sbox_fwd = 8'hD5; 8'hB6: aes_sbox_fwd = 8'h4E; 8'hB7: aes_sbox_fwd = 8'hA9; 8'hB8: aes_sbox_fwd = 8'h6C; 8'hB9: aes_sbox_fwd = 8'h56;
8'hBA: aes_sbox_fwd = 8'hF4; 8'hBB: aes_sbox_fwd = 8'hEA; 8'hBC: aes_sbox_fwd = 8'h65; 8'hBD: aes_sbox_fwd = 8'h7A; 8'hBE: aes_sbox_fwd = 8'hAE; 8'hBF: aes_sbox_fwd = 8'h08;
8'hC0: aes_sbox_fwd = 8'hBA; 8'hC1: aes_sbox_fwd = 8'h78; 8'hC2: aes_sbox_fwd = 8'h25; 8'hC3: aes_sbox_fwd = 8'h2E; 8'hC4: aes_sbox_fwd = 8'h1C; 8'hC5: aes_sbox_fwd = 8'hA6;
8'hC6: aes_sbox_fwd = 8'hB4; 8'hC7: aes_sbox_fwd = 8'hC6; 8'hC8: aes_sbox_fwd = 8'hE8; 8'hC9: aes_sbox_fwd = 8'hDD; 8'hCA: aes_sbox_fwd = 8'h74; 8'hCB: aes_sbox_fwd = 8'h1F;
8'hCC: aes_sbox_fwd = 8'h4B; 8'hCD: aes_sbox_fwd = 8'hBD; 8'hCE: aes_sbox_fwd = 8'h8B; 8'hCF: aes_sbox_fwd = 8'h8A; 8'hD0: aes_sbox_fwd = 8'h70; 8'hD1: aes_sbox_fwd = 8'h3E;
8'hD2: aes_sbox_fwd = 8'hB5; 8'hD3: aes_sbox_fwd = 8'h66; 8'hD4: aes_sbox_fwd = 8'h48; 8'hD5: aes_sbox_fwd = 8'h03; 8'hD6: aes_sbox_fwd = 8'hF6; 8'hD7: aes_sbox_fwd = 8'h0E;
8'hD8: aes_sbox_fwd = 8'h61; 8'hD9: aes_sbox_fwd = 8'h35; 8'hDA: aes_sbox_fwd = 8'h57; 8'hDB: aes_sbox_fwd = 8'hB9; 8'hDC: aes_sbox_fwd = 8'h86; 8'hDD: aes_sbox_fwd = 8'hC1;
8'hDE: aes_sbox_fwd = 8'h1D; 8'hDF: aes_sbox_fwd = 8'h9E; 8'hE0: aes_sbox_fwd = 8'hE1; 8'hE1: aes_sbox_fwd = 8'hF8; 8'hE2: aes_sbox_fwd = 8'h98; 8'hE3: aes_sbox_fwd = 8'h11;
8'hE4: aes_sbox_fwd = 8'h69; 8'hE5: aes_sbox_fwd = 8'hD9; 8'hE6: aes_sbox_fwd = 8'h8E; 8'hE7: aes_sbox_fwd = 8'h94; 8'hE8: aes_sbox_fwd = 8'h9B; 8'hE9: aes_sbox_fwd = 8'h1E;
8'hEA: aes_sbox_fwd = 8'h87; 8'hEB: aes_sbox_fwd = 8'hE9; 8'hEC: aes_sbox_fwd = 8'hCE; 8'hED: aes_sbox_fwd = 8'h55; 8'hEE: aes_sbox_fwd = 8'h28; 8'hEF: aes_sbox_fwd = 8'hDF; 8'hF0: aes_sbox_fwd = 8'h8C;
8'hF1: aes_sbox_fwd = 8'hA1; 8'hF2: aes_sbox_fwd = 8'h89; 8'hF3: aes_sbox_fwd = 8'h0D; 8'hF4: aes_sbox_fwd = 8'hBF; 8'hF5: aes_sbox_fwd = 8'hE6; 8'hF6: aes_sbox_fwd = 8'h42;
8'hF7: aes_sbox_fwd = 8'h68; 8'hF8: aes_sbox_fwd = 8'h41; 8'hF9: aes_sbox_fwd = 8'h99; 8'hFA: aes_sbox_fwd = 8'h2D; 8'hFB: aes_sbox_fwd = 8'h0F; 8'hFC: aes_sbox_fwd = 8'hB0;
8'hFD: aes_sbox_fwd = 8'h54; 8'hFE: aes_sbox_fwd = 8'hBB; 8'hFF: aes_sbox_fwd = 8'h16;
default: aes_sbox_fwd = 8'h00;
endcase
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
case (si)
8'h00: aes_sbox_fwd = 8'h63; 8'h01: aes_sbox_fwd = 8'h7C; 8'h02: aes_sbox_fwd = 8'h77; 8'h03: aes_sbox_fwd = 8'h7B; 8'h04: aes_sbox_fwd = 8'hF2; 8'h05: aes_sbox_fwd = 8'h6B;
8'h06: aes_sbox_fwd = 8'h6F; 8'h07: aes_sbox_fwd = 8'hC5; 8'h08: aes_sbox_fwd = 8'h30; 8'h09: aes_sbox_fwd = 8'h01; 8'h0A: aes_sbox_fwd = 8'h67; 8'h0B: aes_sbox_fwd = 8'h2B;
8'h0C: aes_sbox_fwd = 8'hFE; 8'h0D: aes_sbox_fwd = 8'hD7; 8'h0E: aes_sbox_fwd = 8'hAB; 8'h0F: aes_sbox_fwd = 8'h76; 8'h10: aes_sbox_fwd = 8'hCA; 8'h11: aes_sbox_fwd = 8'h82;
8'h12: aes_sbox_fwd = 8'hC9; 8'h13: aes_sbox_fwd = 8'h7D; 8'h14: aes_sbox_fwd = 8'hFA; 8'h15: aes_sbox_fwd = 8'h59; 8'h16: aes_sbox_fwd = 8'h47; 8'h17: aes_sbox_fwd = 8'hF0;
8'h18: aes_sbox_fwd = 8'hAD; 8'h19: aes_sbox_fwd = 8'hD4; 8'h1A: aes_sbox_fwd = 8'hA2; 8'h1B: aes_sbox_fwd = 8'hAF; 8'h1C: aes_sbox_fwd = 8'h9C; 8'h1D: aes_sbox_fwd = 8'hA4;
8'h1E: aes_sbox_fwd = 8'h72; 8'h1F: aes_sbox_fwd = 8'hC0; 8'h20: aes_sbox_fwd = 8'hB7; 8'h21: aes_sbox_fwd = 8'hFD; 8'h22: aes_sbox_fwd = 8'h93; 8'h23: aes_sbox_fwd = 8'h26;
8'h24: aes_sbox_fwd = 8'h36; 8'h25: aes_sbox_fwd = 8'h3F; 8'h26: aes_sbox_fwd = 8'hF7; 8'h27: aes_sbox_fwd = 8'hCC; 8'h28: aes_sbox_fwd = 8'h34; 8'h29: aes_sbox_fwd = 8'hA5;
8'h2A: aes_sbox_fwd = 8'hE5; 8'h2B: aes_sbox_fwd = 8'hF1; 8'h2C: aes_sbox_fwd = 8'h71; 8'h2D: aes_sbox_fwd = 8'hD8; 8'h2E: aes_sbox_fwd = 8'h31; 8'h2F: aes_sbox_fwd = 8'h15;
8'h30: aes_sbox_fwd = 8'h04; 8'h31: aes_sbox_fwd = 8'hC7; 8'h32: aes_sbox_fwd = 8'h23; 8'h33: aes_sbox_fwd = 8'hC3; 8'h34: aes_sbox_fwd = 8'h18; 8'h35: aes_sbox_fwd = 8'h96;
8'h36: aes_sbox_fwd = 8'h05; 8'h37: aes_sbox_fwd = 8'h9A; 8'h38: aes_sbox_fwd = 8'h07; 8'h39: aes_sbox_fwd = 8'h12; 8'h3A: aes_sbox_fwd = 8'h80; 8'h3B: aes_sbox_fwd = 8'hE2;
8'h3C: aes_sbox_fwd = 8'hEB; 8'h3D: aes_sbox_fwd = 8'h27; 8'h3E: aes_sbox_fwd = 8'hB2; 8'h3F: aes_sbox_fwd = 8'h75; 8'h40: aes_sbox_fwd = 8'h09; 8'h41: aes_sbox_fwd = 8'h83;
8'h42: aes_sbox_fwd = 8'h2C; 8'h43: aes_sbox_fwd = 8'h1A; 8'h44: aes_sbox_fwd = 8'h1B; 8'h45: aes_sbox_fwd = 8'h6E; 8'h46: aes_sbox_fwd = 8'h5A; 8'h47: aes_sbox_fwd = 8'hA0;
8'h48: aes_sbox_fwd = 8'h52; 8'h49: aes_sbox_fwd = 8'h3B; 8'h4A: aes_sbox_fwd = 8'hD6; 8'h4B: aes_sbox_fwd = 8'hB3; 8'h4C: aes_sbox_fwd = 8'h29; 8'h4D: aes_sbox_fwd = 8'hE3;
8'h4E: aes_sbox_fwd = 8'h2F; 8'h4F: aes_sbox_fwd = 8'h84; 8'h50: aes_sbox_fwd = 8'h53; 8'h51: aes_sbox_fwd = 8'hD1; 8'h52: aes_sbox_fwd = 8'h00; 8'h53: aes_sbox_fwd = 8'hED;
8'h54: aes_sbox_fwd = 8'h20; 8'h55: aes_sbox_fwd = 8'hFC; 8'h56: aes_sbox_fwd = 8'hB1; 8'h57: aes_sbox_fwd = 8'h5B; 8'h58: aes_sbox_fwd = 8'h6A; 8'h59: aes_sbox_fwd = 8'hCB;
8'h5A: aes_sbox_fwd = 8'hBE; 8'h5B: aes_sbox_fwd = 8'h39; 8'h5C: aes_sbox_fwd = 8'h4A; 8'h5D: aes_sbox_fwd = 8'h4C; 8'h5E: aes_sbox_fwd = 8'h58; 8'h5F: aes_sbox_fwd = 8'hCF;
8'h60: aes_sbox_fwd = 8'hD0; 8'h61: aes_sbox_fwd = 8'hEF; 8'h62: aes_sbox_fwd = 8'hAA; 8'h63: aes_sbox_fwd = 8'hFB; 8'h64: aes_sbox_fwd = 8'h43; 8'h65: aes_sbox_fwd = 8'h4D;
8'h66: aes_sbox_fwd = 8'h33; 8'h67: aes_sbox_fwd = 8'h85; 8'h68: aes_sbox_fwd = 8'h45; 8'h69: aes_sbox_fwd = 8'hF9; 8'h6A: aes_sbox_fwd = 8'h02; 8'h6B: aes_sbox_fwd = 8'h7F;
8'h6C: aes_sbox_fwd = 8'h50; 8'h6D: aes_sbox_fwd = 8'h3C; 8'h6E: aes_sbox_fwd = 8'h9F; 8'h6F: aes_sbox_fwd = 8'hA8; 8'h70: aes_sbox_fwd = 8'h51; 8'h71: aes_sbox_fwd = 8'hA3;
8'h72: aes_sbox_fwd = 8'h40; 8'h73: aes_sbox_fwd = 8'h8F; 8'h74: aes_sbox_fwd = 8'h92; 8'h75: aes_sbox_fwd = 8'h9D; 8'h76: aes_sbox_fwd = 8'h38; 8'h77: aes_sbox_fwd = 8'hF5;
8'h78: aes_sbox_fwd = 8'hBC; 8'h79: aes_sbox_fwd = 8'hB6; 8'h7A: aes_sbox_fwd = 8'hDA; 8'h7B: aes_sbox_fwd = 8'h21; 8'h7C: aes_sbox_fwd = 8'h10; 8'h7D: aes_sbox_fwd = 8'hFF;
8'h7E: aes_sbox_fwd = 8'hF3; 8'h7F: aes_sbox_fwd = 8'hD2; 8'h80: aes_sbox_fwd = 8'hCD; 8'h81: aes_sbox_fwd = 8'h0C; 8'h82: aes_sbox_fwd = 8'h13; 8'h83: aes_sbox_fwd = 8'hEC;
8'h84: aes_sbox_fwd = 8'h5F; 8'h85: aes_sbox_fwd = 8'h97; 8'h86: aes_sbox_fwd = 8'h44; 8'h87: aes_sbox_fwd = 8'h17; 8'h88: aes_sbox_fwd = 8'hC4; 8'h89: aes_sbox_fwd = 8'hA7;
8'h8A: aes_sbox_fwd = 8'h7E; 8'h8B: aes_sbox_fwd = 8'h3D; 8'h8C: aes_sbox_fwd = 8'h64; 8'h8D: aes_sbox_fwd = 8'h5D; 8'h8E: aes_sbox_fwd = 8'h19; 8'h8F: aes_sbox_fwd = 8'h73;
8'h90: aes_sbox_fwd = 8'h60; 8'h91: aes_sbox_fwd = 8'h81; 8'h92: aes_sbox_fwd = 8'h4F; 8'h93: aes_sbox_fwd = 8'hDC; 8'h94: aes_sbox_fwd = 8'h22; 8'h95: aes_sbox_fwd = 8'h2A;
8'h96: aes_sbox_fwd = 8'h90; 8'h97: aes_sbox_fwd = 8'h88; 8'h98: aes_sbox_fwd = 8'h46; 8'h99: aes_sbox_fwd = 8'hEE; 8'h9A: aes_sbox_fwd = 8'hB8; 8'h9B: aes_sbox_fwd = 8'h14;
8'h9C: aes_sbox_fwd = 8'hDE; 8'h9D: aes_sbox_fwd = 8'h5E; 8'h9E: aes_sbox_fwd = 8'h0B; 8'h9F: aes_sbox_fwd = 8'hDB; 8'hA0: aes_sbox_fwd = 8'hE0; 8'hA1: aes_sbox_fwd = 8'h32;
8'hA2: aes_sbox_fwd = 8'h3A; 8'hA3: aes_sbox_fwd = 8'h0A; 8'hA4: aes_sbox_fwd = 8'h49; 8'hA5: aes_sbox_fwd = 8'h06; 8'hA6: aes_sbox_fwd = 8'h24; 8'hA7: aes_sbox_fwd = 8'h5C;
8'hA8: aes_sbox_fwd = 8'hC2; 8'hA9: aes_sbox_fwd = 8'hD3; 8'hAA: aes_sbox_fwd = 8'hAC; 8'hAB: aes_sbox_fwd = 8'h62; 8'hAC: aes_sbox_fwd = 8'h91; 8'hAD: aes_sbox_fwd = 8'h95;
8'hAE: aes_sbox_fwd = 8'hE4; 8'hAF: aes_sbox_fwd = 8'h79; 8'hB0: aes_sbox_fwd = 8'hE7; 8'hB1: aes_sbox_fwd = 8'hC8; 8'hB2: aes_sbox_fwd = 8'h37; 8'hB3: aes_sbox_fwd = 8'h6D;
8'hB4: aes_sbox_fwd = 8'h8D; 8'hB5: aes_sbox_fwd = 8'hD5; 8'hB6: aes_sbox_fwd = 8'h4E; 8'hB7: aes_sbox_fwd = 8'hA9; 8'hB8: aes_sbox_fwd = 8'h6C; 8'hB9: aes_sbox_fwd = 8'h56;
8'hBA: aes_sbox_fwd = 8'hF4; 8'hBB: aes_sbox_fwd = 8'hEA; 8'hBC: aes_sbox_fwd = 8'h65; 8'hBD: aes_sbox_fwd = 8'h7A; 8'hBE: aes_sbox_fwd = 8'hAE; 8'hBF: aes_sbox_fwd = 8'h08;
8'hC0: aes_sbox_fwd = 8'hBA; 8'hC1: aes_sbox_fwd = 8'h78; 8'hC2: aes_sbox_fwd = 8'h25; 8'hC3: aes_sbox_fwd = 8'h2E; 8'hC4: aes_sbox_fwd = 8'h1C; 8'hC5: aes_sbox_fwd = 8'hA6;
8'hC6: aes_sbox_fwd = 8'hB4; 8'hC7: aes_sbox_fwd = 8'hC6; 8'hC8: aes_sbox_fwd = 8'hE8; 8'hC9: aes_sbox_fwd = 8'hDD; 8'hCA: aes_sbox_fwd = 8'h74; 8'hCB: aes_sbox_fwd = 8'h1F;
8'hCC: aes_sbox_fwd = 8'h4B; 8'hCD: aes_sbox_fwd = 8'hBD; 8'hCE: aes_sbox_fwd = 8'h8B; 8'hCF: aes_sbox_fwd = 8'h8A; 8'hD0: aes_sbox_fwd = 8'h70; 8'hD1: aes_sbox_fwd = 8'h3E;
8'hD2: aes_sbox_fwd = 8'hB5; 8'hD3: aes_sbox_fwd = 8'h66; 8'hD4: aes_sbox_fwd = 8'h48; 8'hD5: aes_sbox_fwd = 8'h03; 8'hD6: aes_sbox_fwd = 8'hF6; 8'hD7: aes_sbox_fwd = 8'h0E;
8'hD8: aes_sbox_fwd = 8'h61; 8'hD9: aes_sbox_fwd = 8'h35; 8'hDA: aes_sbox_fwd = 8'h57; 8'hDB: aes_sbox_fwd = 8'hB9; 8'hDC: aes_sbox_fwd = 8'h86; 8'hDD: aes_sbox_fwd = 8'hC1;
8'hDE: aes_sbox_fwd = 8'h1D; 8'hDF: aes_sbox_fwd = 8'h9E; 8'hE0: aes_sbox_fwd = 8'hE1; 8'hE1: aes_sbox_fwd = 8'hF8; 8'hE2: aes_sbox_fwd = 8'h98; 8'hE3: aes_sbox_fwd = 8'h11;
8'hE4: aes_sbox_fwd = 8'h69; 8'hE5: aes_sbox_fwd = 8'hD9; 8'hE6: aes_sbox_fwd = 8'h8E; 8'hE7: aes_sbox_fwd = 8'h94; 8'hE8: aes_sbox_fwd = 8'h9B; 8'hE9: aes_sbox_fwd = 8'h1E;
8'hEA: aes_sbox_fwd = 8'h87; 8'hEB: aes_sbox_fwd = 8'hE9; 8'hEC: aes_sbox_fwd = 8'hCE; 8'hED: aes_sbox_fwd = 8'h55; 8'hEE: aes_sbox_fwd = 8'h28; 8'hEF: aes_sbox_fwd = 8'hDF; 8'hF0: aes_sbox_fwd = 8'h8C;
8'hF1: aes_sbox_fwd = 8'hA1; 8'hF2: aes_sbox_fwd = 8'h89; 8'hF3: aes_sbox_fwd = 8'h0D; 8'hF4: aes_sbox_fwd = 8'hBF; 8'hF5: aes_sbox_fwd = 8'hE6; 8'hF6: aes_sbox_fwd = 8'h42;
8'hF7: aes_sbox_fwd = 8'h68; 8'hF8: aes_sbox_fwd = 8'h41; 8'hF9: aes_sbox_fwd = 8'h99; 8'hFA: aes_sbox_fwd = 8'h2D; 8'hFB: aes_sbox_fwd = 8'h0F; 8'hFC: aes_sbox_fwd = 8'hB0;
8'hFD: aes_sbox_fwd = 8'h54; 8'hFE: aes_sbox_fwd = 8'hBB; 8'hFF: aes_sbox_fwd = 8'h16;
default: aes_sbox_fwd = 8'h00;
endcase
case (si)
8'h00: aes_sbox_fwd = 8'h63;
8'h01: aes_sbox_fwd = 8'h7C;
8'h02: aes_sbox_fwd = 8'h77;
8'h03: aes_sbox_fwd = 8'h7B;
8'h04: aes_sbox_fwd = 8'hF2;
8'h05: aes_sbox_fwd = 8'h6B;
8'h06: aes_sbox_fwd = 8'h6F;
8'h07: aes_sbox_fwd = 8'hC5;
8'h08: aes_sbox_fwd = 8'h30;
8'h09: aes_sbox_fwd = 8'h01;
8'h0A: aes_sbox_fwd = 8'h67;
8'h0B: aes_sbox_fwd = 8'h2B;
8'h0C: aes_sbox_fwd = 8'hFE;
8'h0D: aes_sbox_fwd = 8'hD7;
8'h0E: aes_sbox_fwd = 8'hAB;
8'h0F: aes_sbox_fwd = 8'h76;
8'h10: aes_sbox_fwd = 8'hCA;
8'h11: aes_sbox_fwd = 8'h82;
8'h12: aes_sbox_fwd = 8'hC9;
8'h13: aes_sbox_fwd = 8'h7D;
8'h14: aes_sbox_fwd = 8'hFA;
8'h15: aes_sbox_fwd = 8'h59;
8'h16: aes_sbox_fwd = 8'h47;
8'h17: aes_sbox_fwd = 8'hF0;
8'h18: aes_sbox_fwd = 8'hAD;
8'h19: aes_sbox_fwd = 8'hD4;
8'h1A: aes_sbox_fwd = 8'hA2;
8'h1B: aes_sbox_fwd = 8'hAF;
8'h1C: aes_sbox_fwd = 8'h9C;
8'h1D: aes_sbox_fwd = 8'hA4;
8'h1E: aes_sbox_fwd = 8'h72;
8'h1F: aes_sbox_fwd = 8'hC0;
8'h20: aes_sbox_fwd = 8'hB7;
8'h21: aes_sbox_fwd = 8'hFD;
8'h22: aes_sbox_fwd = 8'h93;
8'h23: aes_sbox_fwd = 8'h26;
8'h24: aes_sbox_fwd = 8'h36;
8'h25: aes_sbox_fwd = 8'h3F;
8'h26: aes_sbox_fwd = 8'hF7;
8'h27: aes_sbox_fwd = 8'hCC;
8'h28: aes_sbox_fwd = 8'h34;
8'h29: aes_sbox_fwd = 8'hA5;
8'h2A: aes_sbox_fwd = 8'hE5;
8'h2B: aes_sbox_fwd = 8'hF1;
8'h2C: aes_sbox_fwd = 8'h71;
8'h2D: aes_sbox_fwd = 8'hD8;
8'h2E: aes_sbox_fwd = 8'h31;
8'h2F: aes_sbox_fwd = 8'h15;
8'h30: aes_sbox_fwd = 8'h04;
8'h31: aes_sbox_fwd = 8'hC7;
8'h32: aes_sbox_fwd = 8'h23;
8'h33: aes_sbox_fwd = 8'hC3;
8'h34: aes_sbox_fwd = 8'h18;
8'h35: aes_sbox_fwd = 8'h96;
8'h36: aes_sbox_fwd = 8'h05;
8'h37: aes_sbox_fwd = 8'h9A;
8'h38: aes_sbox_fwd = 8'h07;
8'h39: aes_sbox_fwd = 8'h12;
8'h3A: aes_sbox_fwd = 8'h80;
8'h3B: aes_sbox_fwd = 8'hE2;
8'h3C: aes_sbox_fwd = 8'hEB;
8'h3D: aes_sbox_fwd = 8'h27;
8'h3E: aes_sbox_fwd = 8'hB2;
8'h3F: aes_sbox_fwd = 8'h75;
8'h40: aes_sbox_fwd = 8'h09;
8'h41: aes_sbox_fwd = 8'h83;
8'h42: aes_sbox_fwd = 8'h2C;
8'h43: aes_sbox_fwd = 8'h1A;
8'h44: aes_sbox_fwd = 8'h1B;
8'h45: aes_sbox_fwd = 8'h6E;
8'h46: aes_sbox_fwd = 8'h5A;
8'h47: aes_sbox_fwd = 8'hA0;
8'h48: aes_sbox_fwd = 8'h52;
8'h49: aes_sbox_fwd = 8'h3B;
8'h4A: aes_sbox_fwd = 8'hD6;
8'h4B: aes_sbox_fwd = 8'hB3;
8'h4C: aes_sbox_fwd = 8'h29;
8'h4D: aes_sbox_fwd = 8'hE3;
8'h4E: aes_sbox_fwd = 8'h2F;
8'h4F: aes_sbox_fwd = 8'h84;
8'h50: aes_sbox_fwd = 8'h53;
8'h51: aes_sbox_fwd = 8'hD1;
8'h52: aes_sbox_fwd = 8'h00;
8'h53: aes_sbox_fwd = 8'hED;
8'h54: aes_sbox_fwd = 8'h20;
8'h55: aes_sbox_fwd = 8'hFC;
8'h56: aes_sbox_fwd = 8'hB1;
8'h57: aes_sbox_fwd = 8'h5B;
8'h58: aes_sbox_fwd = 8'h6A;
8'h59: aes_sbox_fwd = 8'hCB;
8'h5A: aes_sbox_fwd = 8'hBE;
8'h5B: aes_sbox_fwd = 8'h39;
8'h5C: aes_sbox_fwd = 8'h4A;
8'h5D: aes_sbox_fwd = 8'h4C;
8'h5E: aes_sbox_fwd = 8'h58;
8'h5F: aes_sbox_fwd = 8'hCF;
8'h60: aes_sbox_fwd = 8'hD0;
8'h61: aes_sbox_fwd = 8'hEF;
8'h62: aes_sbox_fwd = 8'hAA;
8'h63: aes_sbox_fwd = 8'hFB;
8'h64: aes_sbox_fwd = 8'h43;
8'h65: aes_sbox_fwd = 8'h4D;
8'h66: aes_sbox_fwd = 8'h33;
8'h67: aes_sbox_fwd = 8'h85;
8'h68: aes_sbox_fwd = 8'h45;
8'h69: aes_sbox_fwd = 8'hF9;
8'h6A: aes_sbox_fwd = 8'h02;
8'h6B: aes_sbox_fwd = 8'h7F;
8'h6C: aes_sbox_fwd = 8'h50;
8'h6D: aes_sbox_fwd = 8'h3C;
8'h6E: aes_sbox_fwd = 8'h9F;
8'h6F: aes_sbox_fwd = 8'hA8;
8'h70: aes_sbox_fwd = 8'h51;
8'h71: aes_sbox_fwd = 8'hA3;
8'h72: aes_sbox_fwd = 8'h40;
8'h73: aes_sbox_fwd = 8'h8F;
8'h74: aes_sbox_fwd = 8'h92;
8'h75: aes_sbox_fwd = 8'h9D;
8'h76: aes_sbox_fwd = 8'h38;
8'h77: aes_sbox_fwd = 8'hF5;
8'h78: aes_sbox_fwd = 8'hBC;
8'h79: aes_sbox_fwd = 8'hB6;
8'h7A: aes_sbox_fwd = 8'hDA;
8'h7B: aes_sbox_fwd = 8'h21;
8'h7C: aes_sbox_fwd = 8'h10;
8'h7D: aes_sbox_fwd = 8'hFF;
8'h7E: aes_sbox_fwd = 8'hF3;
8'h7F: aes_sbox_fwd = 8'hD2;
8'h80: aes_sbox_fwd = 8'hCD;
8'h81: aes_sbox_fwd = 8'h0C;
8'h82: aes_sbox_fwd = 8'h13;
8'h83: aes_sbox_fwd = 8'hEC;
8'h84: aes_sbox_fwd = 8'h5F;
8'h85: aes_sbox_fwd = 8'h97;
8'h86: aes_sbox_fwd = 8'h44;
8'h87: aes_sbox_fwd = 8'h17;
8'h88: aes_sbox_fwd = 8'hC4;
8'h89: aes_sbox_fwd = 8'hA7;
8'h8A: aes_sbox_fwd = 8'h7E;
8'h8B: aes_sbox_fwd = 8'h3D;
8'h8C: aes_sbox_fwd = 8'h64;
8'h8D: aes_sbox_fwd = 8'h5D;
8'h8E: aes_sbox_fwd = 8'h19;
8'h8F: aes_sbox_fwd = 8'h73;
8'h90: aes_sbox_fwd = 8'h60;
8'h91: aes_sbox_fwd = 8'h81;
8'h92: aes_sbox_fwd = 8'h4F;
8'h93: aes_sbox_fwd = 8'hDC;
8'h94: aes_sbox_fwd = 8'h22;
8'h95: aes_sbox_fwd = 8'h2A;
8'h96: aes_sbox_fwd = 8'h90;
8'h97: aes_sbox_fwd = 8'h88;
8'h98: aes_sbox_fwd = 8'h46;
8'h99: aes_sbox_fwd = 8'hEE;
8'h9A: aes_sbox_fwd = 8'hB8;
8'h9B: aes_sbox_fwd = 8'h14;
8'h9C: aes_sbox_fwd = 8'hDE;
8'h9D: aes_sbox_fwd = 8'h5E;
8'h9E: aes_sbox_fwd = 8'h0B;
8'h9F: aes_sbox_fwd = 8'hDB;
8'hA0: aes_sbox_fwd = 8'hE0;
8'hA1: aes_sbox_fwd = 8'h32;
8'hA2: aes_sbox_fwd = 8'h3A;
8'hA3: aes_sbox_fwd = 8'h0A;
8'hA4: aes_sbox_fwd = 8'h49;
8'hA5: aes_sbox_fwd = 8'h06;
8'hA6: aes_sbox_fwd = 8'h24;
8'hA7: aes_sbox_fwd = 8'h5C;
8'hA8: aes_sbox_fwd = 8'hC2;
8'hA9: aes_sbox_fwd = 8'hD3;
8'hAA: aes_sbox_fwd = 8'hAC;
8'hAB: aes_sbox_fwd = 8'h62;
8'hAC: aes_sbox_fwd = 8'h91;
8'hAD: aes_sbox_fwd = 8'h95;
8'hAE: aes_sbox_fwd = 8'hE4;
8'hAF: aes_sbox_fwd = 8'h79;
8'hB0: aes_sbox_fwd = 8'hE7;
8'hB1: aes_sbox_fwd = 8'hC8;
8'hB2: aes_sbox_fwd = 8'h37;
8'hB3: aes_sbox_fwd = 8'h6D;
8'hB4: aes_sbox_fwd = 8'h8D;
8'hB5: aes_sbox_fwd = 8'hD5;
8'hB6: aes_sbox_fwd = 8'h4E;
8'hB7: aes_sbox_fwd = 8'hA9;
8'hB8: aes_sbox_fwd = 8'h6C;
8'hB9: aes_sbox_fwd = 8'h56;
8'hBA: aes_sbox_fwd = 8'hF4;
8'hBB: aes_sbox_fwd = 8'hEA;
8'hBC: aes_sbox_fwd = 8'h65;
8'hBD: aes_sbox_fwd = 8'h7A;
8'hBE: aes_sbox_fwd = 8'hAE;
8'hBF: aes_sbox_fwd = 8'h08;
8'hC0: aes_sbox_fwd = 8'hBA;
8'hC1: aes_sbox_fwd = 8'h78;
8'hC2: aes_sbox_fwd = 8'h25;
8'hC3: aes_sbox_fwd = 8'h2E;
8'hC4: aes_sbox_fwd = 8'h1C;
8'hC5: aes_sbox_fwd = 8'hA6;
8'hC6: aes_sbox_fwd = 8'hB4;
8'hC7: aes_sbox_fwd = 8'hC6;
8'hC8: aes_sbox_fwd = 8'hE8;
8'hC9: aes_sbox_fwd = 8'hDD;
8'hCA: aes_sbox_fwd = 8'h74;
8'hCB: aes_sbox_fwd = 8'h1F;
8'hCC: aes_sbox_fwd = 8'h4B;
8'hCD: aes_sbox_fwd = 8'hBD;
8'hCE: aes_sbox_fwd = 8'h8B;
8'hCF: aes_sbox_fwd = 8'h8A;
8'hD0: aes_sbox_fwd = 8'h70;
8'hD1: aes_sbox_fwd = 8'h3E;
8'hD2: aes_sbox_fwd = 8'hB5;
8'hD3: aes_sbox_fwd = 8'h66;
8'hD4: aes_sbox_fwd = 8'h48;
8'hD5: aes_sbox_fwd = 8'h03;
8'hD6: aes_sbox_fwd = 8'hF6;
8'hD7: aes_sbox_fwd = 8'h0E;
8'hD8: aes_sbox_fwd = 8'h61;
8'hD9: aes_sbox_fwd = 8'h35;
8'hDA: aes_sbox_fwd = 8'h57;
8'hDB: aes_sbox_fwd = 8'hB9;
8'hDC: aes_sbox_fwd = 8'h86;
8'hDD: aes_sbox_fwd = 8'hC1;
8'hDE: aes_sbox_fwd = 8'h1D;
8'hDF: aes_sbox_fwd = 8'h9E;
8'hE0: aes_sbox_fwd = 8'hE1;
8'hE1: aes_sbox_fwd = 8'hF8;
8'hE2: aes_sbox_fwd = 8'h98;
8'hE3: aes_sbox_fwd = 8'h11;
8'hE4: aes_sbox_fwd = 8'h69;
8'hE5: aes_sbox_fwd = 8'hD9;
8'hE6: aes_sbox_fwd = 8'h8E;
8'hE7: aes_sbox_fwd = 8'h94;
8'hE8: aes_sbox_fwd = 8'h9B;
8'hE9: aes_sbox_fwd = 8'h1E;
8'hEA: aes_sbox_fwd = 8'h87;
8'hEB: aes_sbox_fwd = 8'hE9;
8'hEC: aes_sbox_fwd = 8'hCE;
8'hED: aes_sbox_fwd = 8'h55;
8'hEE: aes_sbox_fwd = 8'h28;
8'hEF: aes_sbox_fwd = 8'hDF;
8'hF0: aes_sbox_fwd = 8'h8C;
8'hF1: aes_sbox_fwd = 8'hA1;
8'hF2: aes_sbox_fwd = 8'h89;
8'hF3: aes_sbox_fwd = 8'h0D;
8'hF4: aes_sbox_fwd = 8'hBF;
8'hF5: aes_sbox_fwd = 8'hE6;
8'hF6: aes_sbox_fwd = 8'h42;
8'hF7: aes_sbox_fwd = 8'h68;
8'hF8: aes_sbox_fwd = 8'h41;
8'hF9: aes_sbox_fwd = 8'h99;
8'hFA: aes_sbox_fwd = 8'h2D;
8'hFB: aes_sbox_fwd = 8'h0F;
8'hFC: aes_sbox_fwd = 8'hB0;
8'hFD: aes_sbox_fwd = 8'h54;
8'hFE: aes_sbox_fwd = 8'hBB;
8'hFF: aes_sbox_fwd = 8'h16;
default: aes_sbox_fwd = 8'h00;
endcase

core/alu.sv Outdated
Comment on lines 378 to 314
end
else if (CVA6Cfg.IS_XLEN64) begin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
end
else if (CVA6Cfg.IS_XLEN64) begin
end else if (CVA6Cfg.IS_XLEN64) begin

core/alu.sv Outdated
Comment on lines 381 to 320
assign sr = {fu_data_i.operand_a[31:24], fu_data_i.operand_b[55:48], fu_data_i.operand_b[15:8], fu_data_i.operand_a[39:32], fu_data_i.operand_b[63:56], fu_data_i.operand_b[23:16], fu_data_i.operand_a[47:40], fu_data_i.operand_a[7:0]};
assign aes64es_gen = {aes_sbox_fwd(sr[63:56]), aes_sbox_fwd(sr[55:48]), aes_sbox_fwd(sr[47:40]), aes_sbox_fwd(sr[39:32]), aes_sbox_fwd(sr[31:24]), aes_sbox_fwd(sr[23:16]), aes_sbox_fwd(sr[15:8]), aes_sbox_fwd(sr[7:0])};
assign aes64esm_gen = {aes_mixcolumn_fwd(aes64es_gen[63:32]), aes_mixcolumn_fwd(aes64es_gen[31:0])};
assign aes64ks2_gen = {(fu_data_i.operand_a[63:32] ^ fu_data_i.operand_b[31:0] ^ fu_data_i.operand_b[63:32]), (fu_data_i.operand_a[63:32] ^ fu_data_i.operand_b[31:0])};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
assign sr = {fu_data_i.operand_a[31:24], fu_data_i.operand_b[55:48], fu_data_i.operand_b[15:8], fu_data_i.operand_a[39:32], fu_data_i.operand_b[63:56], fu_data_i.operand_b[23:16], fu_data_i.operand_a[47:40], fu_data_i.operand_a[7:0]};
assign aes64es_gen = {aes_sbox_fwd(sr[63:56]), aes_sbox_fwd(sr[55:48]), aes_sbox_fwd(sr[47:40]), aes_sbox_fwd(sr[39:32]), aes_sbox_fwd(sr[31:24]), aes_sbox_fwd(sr[23:16]), aes_sbox_fwd(sr[15:8]), aes_sbox_fwd(sr[7:0])};
assign aes64esm_gen = {aes_mixcolumn_fwd(aes64es_gen[63:32]), aes_mixcolumn_fwd(aes64es_gen[31:0])};
assign aes64ks2_gen = {(fu_data_i.operand_a[63:32] ^ fu_data_i.operand_b[31:0] ^ fu_data_i.operand_b[63:32]), (fu_data_i.operand_a[63:32] ^ fu_data_i.operand_b[31:0])};
assign sr = {
fu_data_i.operand_a[31:24],
fu_data_i.operand_b[55:48],
fu_data_i.operand_b[15:8],
fu_data_i.operand_a[39:32],
fu_data_i.operand_b[63:56],
fu_data_i.operand_b[23:16],
fu_data_i.operand_a[47:40],
fu_data_i.operand_a[7:0]
};
assign aes64es_gen = {
aes_sbox_fwd(sr[63:56]),
aes_sbox_fwd(sr[55:48]),
aes_sbox_fwd(sr[47:40]),
aes_sbox_fwd(sr[39:32]),
aes_sbox_fwd(sr[31:24]),
aes_sbox_fwd(sr[23:16]),
aes_sbox_fwd(sr[15:8]),
aes_sbox_fwd(sr[7:0])
};
assign aes64esm_gen = {
aes_mixcolumn_fwd(aes64es_gen[63:32]), aes_mixcolumn_fwd(aes64es_gen[31:0])
};
assign aes64ks2_gen = {
(fu_data_i.operand_a[63:32] ^ fu_data_i.operand_b[31:0] ^ fu_data_i.operand_b[63:32]),
(fu_data_i.operand_a[63:32] ^ fu_data_i.operand_b[31:0])
};

core/decoder.sv Outdated
@@ -921,6 +963,8 @@ module decoder
else if (instr.instr[31:26] == 6'b001010) instruction_o.op = ariane_pkg::BSETI;
else if (CVA6Cfg.ZKN && instr.instr[31:20] == 12'b000010001111)
instruction_o.op = ariane_pkg::ZIP;
// else if (CVA6Cfg.ZKN && instr.instr[31:24] == 8'b00110001)
// instruction_o.op = ariane_pkg::AES64KS1I;
else illegal_instr_bm = 1'b1;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
else illegal_instr_bm = 1'b1;
else
illegal_instr_bm = 1'b1;

core/cva6.sv Outdated
@@ -879,7 +880,8 @@ module cva6
.stall_issue_o (stall_issue),
//RVFI
.rvfi_issue_pointer_o (rvfi_issue_pointer),
.rvfi_commit_pointer_o(rvfi_commit_pointer)
.rvfi_commit_pointer_o(rvfi_commit_pointer),
.orig_instr_aes_bits(orig_instr_aes)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
.orig_instr_aes_bits(orig_instr_aes)
.orig_instr_aes_bits (orig_instr_aes)

core/decoder.sv Outdated
if (CVA6Cfg.ZKN) instruction_o.op = ariane_pkg::AES64KS2; // aes64ks2
else illegal_instr_bm = 1'b1;
end
{7'b0010001, 3'b000}, {7'b0110001, 3'b000}, {7'b1010001, 3'b000}, {7'b1110001, 3'b000}: begin

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
{7'b0010001, 3'b000}, {7'b0110001, 3'b000}, {7'b1010001, 3'b000}, {7'b1110001, 3'b000}: begin
{
7'b0010001, 3'b000
}, {
7'b0110001, 3'b000
}, {
7'b1010001, 3'b000
}, {
7'b1110001, 3'b000
} : begin

core/decoder.sv Outdated
if (CVA6Cfg.ZKN) instruction_o.op = ariane_pkg::AES32ESI; // aes32esi
else illegal_instr_bm = 1'b1;
end
{7'b0010011, 3'b000}, {7'b0110011, 3'b000}, {7'b1010011, 3'b000}, {7'b1110011, 3'b000}: begin

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
{7'b0010011, 3'b000}, {7'b0110011, 3'b000}, {7'b1010011, 3'b000}, {7'b1110011, 3'b000}: begin
{
7'b0010011, 3'b000
}, {
7'b0110011, 3'b000
}, {
7'b1010011, 3'b000
}, {
7'b1110011, 3'b000
} : begin

core/ex_stage.sv Outdated
@@ -301,7 +303,8 @@ module ex_stage
.rst_ni,
.fu_data_i (one_cycle_data),
.result_o (alu_result),
.alu_branch_res_o(alu_branch_res)
.alu_branch_res_o(alu_branch_res),
.orig_instr_aes(orig_instr_aes_i)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
.orig_instr_aes(orig_instr_aes_i)
.orig_instr_aes (orig_instr_aes_i)

core/ex_stage.sv Outdated
@@ -468,7 +471,8 @@
.rst_ni,
.fu_data_i (alu2_data),
.result_o (alu2_result),
.alu_branch_res_o( /* this ALU does not handle branching */)
.alu_branch_res_o( /* this ALU does not handle branching */),
.orig_instr_aes()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
.orig_instr_aes()
.orig_instr_aes ()

Comment on lines 841 to 884
8'h00: aes_sbox_fwd = 8'h63; 8'h01: aes_sbox_fwd = 8'h7C; 8'h02: aes_sbox_fwd = 8'h77; 8'h03: aes_sbox_fwd = 8'h7B; 8'h04: aes_sbox_fwd = 8'hF2; 8'h05: aes_sbox_fwd = 8'h6B;
8'h06: aes_sbox_fwd = 8'h6F; 8'h07: aes_sbox_fwd = 8'hC5; 8'h08: aes_sbox_fwd = 8'h30; 8'h09: aes_sbox_fwd = 8'h01; 8'h0A: aes_sbox_fwd = 8'h67; 8'h0B: aes_sbox_fwd = 8'h2B;
8'h0C: aes_sbox_fwd = 8'hFE; 8'h0D: aes_sbox_fwd = 8'hD7; 8'h0E: aes_sbox_fwd = 8'hAB; 8'h0F: aes_sbox_fwd = 8'h76; 8'h10: aes_sbox_fwd = 8'hCA; 8'h11: aes_sbox_fwd = 8'h82;
8'h12: aes_sbox_fwd = 8'hC9; 8'h13: aes_sbox_fwd = 8'h7D; 8'h14: aes_sbox_fwd = 8'hFA; 8'h15: aes_sbox_fwd = 8'h59; 8'h16: aes_sbox_fwd = 8'h47; 8'h17: aes_sbox_fwd = 8'hF0;
8'h18: aes_sbox_fwd = 8'hAD; 8'h19: aes_sbox_fwd = 8'hD4; 8'h1A: aes_sbox_fwd = 8'hA2; 8'h1B: aes_sbox_fwd = 8'hAF; 8'h1C: aes_sbox_fwd = 8'h9C; 8'h1D: aes_sbox_fwd = 8'hA4;
8'h1E: aes_sbox_fwd = 8'h72; 8'h1F: aes_sbox_fwd = 8'hC0; 8'h20: aes_sbox_fwd = 8'hB7; 8'h21: aes_sbox_fwd = 8'hFD; 8'h22: aes_sbox_fwd = 8'h93; 8'h23: aes_sbox_fwd = 8'h26;
8'h24: aes_sbox_fwd = 8'h36; 8'h25: aes_sbox_fwd = 8'h3F; 8'h26: aes_sbox_fwd = 8'hF7; 8'h27: aes_sbox_fwd = 8'hCC; 8'h28: aes_sbox_fwd = 8'h34; 8'h29: aes_sbox_fwd = 8'hA5;
8'h2A: aes_sbox_fwd = 8'hE5; 8'h2B: aes_sbox_fwd = 8'hF1; 8'h2C: aes_sbox_fwd = 8'h71; 8'h2D: aes_sbox_fwd = 8'hD8; 8'h2E: aes_sbox_fwd = 8'h31; 8'h2F: aes_sbox_fwd = 8'h15;
8'h30: aes_sbox_fwd = 8'h04; 8'h31: aes_sbox_fwd = 8'hC7; 8'h32: aes_sbox_fwd = 8'h23; 8'h33: aes_sbox_fwd = 8'hC3; 8'h34: aes_sbox_fwd = 8'h18; 8'h35: aes_sbox_fwd = 8'h96;
8'h36: aes_sbox_fwd = 8'h05; 8'h37: aes_sbox_fwd = 8'h9A; 8'h38: aes_sbox_fwd = 8'h07; 8'h39: aes_sbox_fwd = 8'h12; 8'h3A: aes_sbox_fwd = 8'h80; 8'h3B: aes_sbox_fwd = 8'hE2;
8'h3C: aes_sbox_fwd = 8'hEB; 8'h3D: aes_sbox_fwd = 8'h27; 8'h3E: aes_sbox_fwd = 8'hB2; 8'h3F: aes_sbox_fwd = 8'h75; 8'h40: aes_sbox_fwd = 8'h09; 8'h41: aes_sbox_fwd = 8'h83;
8'h42: aes_sbox_fwd = 8'h2C; 8'h43: aes_sbox_fwd = 8'h1A; 8'h44: aes_sbox_fwd = 8'h1B; 8'h45: aes_sbox_fwd = 8'h6E; 8'h46: aes_sbox_fwd = 8'h5A; 8'h47: aes_sbox_fwd = 8'hA0;
8'h48: aes_sbox_fwd = 8'h52; 8'h49: aes_sbox_fwd = 8'h3B; 8'h4A: aes_sbox_fwd = 8'hD6; 8'h4B: aes_sbox_fwd = 8'hB3; 8'h4C: aes_sbox_fwd = 8'h29; 8'h4D: aes_sbox_fwd = 8'hE3;
8'h4E: aes_sbox_fwd = 8'h2F; 8'h4F: aes_sbox_fwd = 8'h84; 8'h50: aes_sbox_fwd = 8'h53; 8'h51: aes_sbox_fwd = 8'hD1; 8'h52: aes_sbox_fwd = 8'h00; 8'h53: aes_sbox_fwd = 8'hED;
8'h54: aes_sbox_fwd = 8'h20; 8'h55: aes_sbox_fwd = 8'hFC; 8'h56: aes_sbox_fwd = 8'hB1; 8'h57: aes_sbox_fwd = 8'h5B; 8'h58: aes_sbox_fwd = 8'h6A; 8'h59: aes_sbox_fwd = 8'hCB;
8'h5A: aes_sbox_fwd = 8'hBE; 8'h5B: aes_sbox_fwd = 8'h39; 8'h5C: aes_sbox_fwd = 8'h4A; 8'h5D: aes_sbox_fwd = 8'h4C; 8'h5E: aes_sbox_fwd = 8'h58; 8'h5F: aes_sbox_fwd = 8'hCF;
8'h60: aes_sbox_fwd = 8'hD0; 8'h61: aes_sbox_fwd = 8'hEF; 8'h62: aes_sbox_fwd = 8'hAA; 8'h63: aes_sbox_fwd = 8'hFB; 8'h64: aes_sbox_fwd = 8'h43; 8'h65: aes_sbox_fwd = 8'h4D;
8'h66: aes_sbox_fwd = 8'h33; 8'h67: aes_sbox_fwd = 8'h85; 8'h68: aes_sbox_fwd = 8'h45; 8'h69: aes_sbox_fwd = 8'hF9; 8'h6A: aes_sbox_fwd = 8'h02; 8'h6B: aes_sbox_fwd = 8'h7F;
8'h6C: aes_sbox_fwd = 8'h50; 8'h6D: aes_sbox_fwd = 8'h3C; 8'h6E: aes_sbox_fwd = 8'h9F; 8'h6F: aes_sbox_fwd = 8'hA8; 8'h70: aes_sbox_fwd = 8'h51; 8'h71: aes_sbox_fwd = 8'hA3;
8'h72: aes_sbox_fwd = 8'h40; 8'h73: aes_sbox_fwd = 8'h8F; 8'h74: aes_sbox_fwd = 8'h92; 8'h75: aes_sbox_fwd = 8'h9D; 8'h76: aes_sbox_fwd = 8'h38; 8'h77: aes_sbox_fwd = 8'hF5;
8'h78: aes_sbox_fwd = 8'hBC; 8'h79: aes_sbox_fwd = 8'hB6; 8'h7A: aes_sbox_fwd = 8'hDA; 8'h7B: aes_sbox_fwd = 8'h21; 8'h7C: aes_sbox_fwd = 8'h10; 8'h7D: aes_sbox_fwd = 8'hFF;
8'h7E: aes_sbox_fwd = 8'hF3; 8'h7F: aes_sbox_fwd = 8'hD2; 8'h80: aes_sbox_fwd = 8'hCD; 8'h81: aes_sbox_fwd = 8'h0C; 8'h82: aes_sbox_fwd = 8'h13; 8'h83: aes_sbox_fwd = 8'hEC;
8'h84: aes_sbox_fwd = 8'h5F; 8'h85: aes_sbox_fwd = 8'h97; 8'h86: aes_sbox_fwd = 8'h44; 8'h87: aes_sbox_fwd = 8'h17; 8'h88: aes_sbox_fwd = 8'hC4; 8'h89: aes_sbox_fwd = 8'hA7;
8'h8A: aes_sbox_fwd = 8'h7E; 8'h8B: aes_sbox_fwd = 8'h3D; 8'h8C: aes_sbox_fwd = 8'h64; 8'h8D: aes_sbox_fwd = 8'h5D; 8'h8E: aes_sbox_fwd = 8'h19; 8'h8F: aes_sbox_fwd = 8'h73;
8'h90: aes_sbox_fwd = 8'h60; 8'h91: aes_sbox_fwd = 8'h81; 8'h92: aes_sbox_fwd = 8'h4F; 8'h93: aes_sbox_fwd = 8'hDC; 8'h94: aes_sbox_fwd = 8'h22; 8'h95: aes_sbox_fwd = 8'h2A;
8'h96: aes_sbox_fwd = 8'h90; 8'h97: aes_sbox_fwd = 8'h88; 8'h98: aes_sbox_fwd = 8'h46; 8'h99: aes_sbox_fwd = 8'hEE; 8'h9A: aes_sbox_fwd = 8'hB8; 8'h9B: aes_sbox_fwd = 8'h14;
8'h9C: aes_sbox_fwd = 8'hDE; 8'h9D: aes_sbox_fwd = 8'h5E; 8'h9E: aes_sbox_fwd = 8'h0B; 8'h9F: aes_sbox_fwd = 8'hDB; 8'hA0: aes_sbox_fwd = 8'hE0; 8'hA1: aes_sbox_fwd = 8'h32;
8'hA2: aes_sbox_fwd = 8'h3A; 8'hA3: aes_sbox_fwd = 8'h0A; 8'hA4: aes_sbox_fwd = 8'h49; 8'hA5: aes_sbox_fwd = 8'h06; 8'hA6: aes_sbox_fwd = 8'h24; 8'hA7: aes_sbox_fwd = 8'h5C;
8'hA8: aes_sbox_fwd = 8'hC2; 8'hA9: aes_sbox_fwd = 8'hD3; 8'hAA: aes_sbox_fwd = 8'hAC; 8'hAB: aes_sbox_fwd = 8'h62; 8'hAC: aes_sbox_fwd = 8'h91; 8'hAD: aes_sbox_fwd = 8'h95;
8'hAE: aes_sbox_fwd = 8'hE4; 8'hAF: aes_sbox_fwd = 8'h79; 8'hB0: aes_sbox_fwd = 8'hE7; 8'hB1: aes_sbox_fwd = 8'hC8; 8'hB2: aes_sbox_fwd = 8'h37; 8'hB3: aes_sbox_fwd = 8'h6D;
8'hB4: aes_sbox_fwd = 8'h8D; 8'hB5: aes_sbox_fwd = 8'hD5; 8'hB6: aes_sbox_fwd = 8'h4E; 8'hB7: aes_sbox_fwd = 8'hA9; 8'hB8: aes_sbox_fwd = 8'h6C; 8'hB9: aes_sbox_fwd = 8'h56;
8'hBA: aes_sbox_fwd = 8'hF4; 8'hBB: aes_sbox_fwd = 8'hEA; 8'hBC: aes_sbox_fwd = 8'h65; 8'hBD: aes_sbox_fwd = 8'h7A; 8'hBE: aes_sbox_fwd = 8'hAE; 8'hBF: aes_sbox_fwd = 8'h08;
8'hC0: aes_sbox_fwd = 8'hBA; 8'hC1: aes_sbox_fwd = 8'h78; 8'hC2: aes_sbox_fwd = 8'h25; 8'hC3: aes_sbox_fwd = 8'h2E; 8'hC4: aes_sbox_fwd = 8'h1C; 8'hC5: aes_sbox_fwd = 8'hA6;
8'hC6: aes_sbox_fwd = 8'hB4; 8'hC7: aes_sbox_fwd = 8'hC6; 8'hC8: aes_sbox_fwd = 8'hE8; 8'hC9: aes_sbox_fwd = 8'hDD; 8'hCA: aes_sbox_fwd = 8'h74; 8'hCB: aes_sbox_fwd = 8'h1F;
8'hCC: aes_sbox_fwd = 8'h4B; 8'hCD: aes_sbox_fwd = 8'hBD; 8'hCE: aes_sbox_fwd = 8'h8B; 8'hCF: aes_sbox_fwd = 8'h8A; 8'hD0: aes_sbox_fwd = 8'h70; 8'hD1: aes_sbox_fwd = 8'h3E;
8'hD2: aes_sbox_fwd = 8'hB5; 8'hD3: aes_sbox_fwd = 8'h66; 8'hD4: aes_sbox_fwd = 8'h48; 8'hD5: aes_sbox_fwd = 8'h03; 8'hD6: aes_sbox_fwd = 8'hF6; 8'hD7: aes_sbox_fwd = 8'h0E;
8'hD8: aes_sbox_fwd = 8'h61; 8'hD9: aes_sbox_fwd = 8'h35; 8'hDA: aes_sbox_fwd = 8'h57; 8'hDB: aes_sbox_fwd = 8'hB9; 8'hDC: aes_sbox_fwd = 8'h86; 8'hDD: aes_sbox_fwd = 8'hC1;
8'hDE: aes_sbox_fwd = 8'h1D; 8'hDF: aes_sbox_fwd = 8'h9E; 8'hE0: aes_sbox_fwd = 8'hE1; 8'hE1: aes_sbox_fwd = 8'hF8; 8'hE2: aes_sbox_fwd = 8'h98; 8'hE3: aes_sbox_fwd = 8'h11;
8'hE4: aes_sbox_fwd = 8'h69; 8'hE5: aes_sbox_fwd = 8'hD9; 8'hE6: aes_sbox_fwd = 8'h8E; 8'hE7: aes_sbox_fwd = 8'h94; 8'hE8: aes_sbox_fwd = 8'h9B; 8'hE9: aes_sbox_fwd = 8'h1E;
8'hEA: aes_sbox_fwd = 8'h87; 8'hEB: aes_sbox_fwd = 8'hE9; 8'hEC: aes_sbox_fwd = 8'hCE; 8'hED: aes_sbox_fwd = 8'h55; 8'hEE: aes_sbox_fwd = 8'h28; 8'hEF: aes_sbox_fwd = 8'hDF; 8'hF0: aes_sbox_fwd = 8'h8C;
8'hF1: aes_sbox_fwd = 8'hA1; 8'hF2: aes_sbox_fwd = 8'h89; 8'hF3: aes_sbox_fwd = 8'h0D; 8'hF4: aes_sbox_fwd = 8'hBF; 8'hF5: aes_sbox_fwd = 8'hE6; 8'hF6: aes_sbox_fwd = 8'h42;
8'hF7: aes_sbox_fwd = 8'h68; 8'hF8: aes_sbox_fwd = 8'h41; 8'hF9: aes_sbox_fwd = 8'h99; 8'hFA: aes_sbox_fwd = 8'h2D; 8'hFB: aes_sbox_fwd = 8'h0F; 8'hFC: aes_sbox_fwd = 8'hB0;
8'hFD: aes_sbox_fwd = 8'h54; 8'hFE: aes_sbox_fwd = 8'hBB; 8'hFF: aes_sbox_fwd = 8'h16;
default: aes_sbox_fwd = 8'h00;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
8'h00: aes_sbox_fwd = 8'h63; 8'h01: aes_sbox_fwd = 8'h7C; 8'h02: aes_sbox_fwd = 8'h77; 8'h03: aes_sbox_fwd = 8'h7B; 8'h04: aes_sbox_fwd = 8'hF2; 8'h05: aes_sbox_fwd = 8'h6B;
8'h06: aes_sbox_fwd = 8'h6F; 8'h07: aes_sbox_fwd = 8'hC5; 8'h08: aes_sbox_fwd = 8'h30; 8'h09: aes_sbox_fwd = 8'h01; 8'h0A: aes_sbox_fwd = 8'h67; 8'h0B: aes_sbox_fwd = 8'h2B;
8'h0C: aes_sbox_fwd = 8'hFE; 8'h0D: aes_sbox_fwd = 8'hD7; 8'h0E: aes_sbox_fwd = 8'hAB; 8'h0F: aes_sbox_fwd = 8'h76; 8'h10: aes_sbox_fwd = 8'hCA; 8'h11: aes_sbox_fwd = 8'h82;
8'h12: aes_sbox_fwd = 8'hC9; 8'h13: aes_sbox_fwd = 8'h7D; 8'h14: aes_sbox_fwd = 8'hFA; 8'h15: aes_sbox_fwd = 8'h59; 8'h16: aes_sbox_fwd = 8'h47; 8'h17: aes_sbox_fwd = 8'hF0;
8'h18: aes_sbox_fwd = 8'hAD; 8'h19: aes_sbox_fwd = 8'hD4; 8'h1A: aes_sbox_fwd = 8'hA2; 8'h1B: aes_sbox_fwd = 8'hAF; 8'h1C: aes_sbox_fwd = 8'h9C; 8'h1D: aes_sbox_fwd = 8'hA4;
8'h1E: aes_sbox_fwd = 8'h72; 8'h1F: aes_sbox_fwd = 8'hC0; 8'h20: aes_sbox_fwd = 8'hB7; 8'h21: aes_sbox_fwd = 8'hFD; 8'h22: aes_sbox_fwd = 8'h93; 8'h23: aes_sbox_fwd = 8'h26;
8'h24: aes_sbox_fwd = 8'h36; 8'h25: aes_sbox_fwd = 8'h3F; 8'h26: aes_sbox_fwd = 8'hF7; 8'h27: aes_sbox_fwd = 8'hCC; 8'h28: aes_sbox_fwd = 8'h34; 8'h29: aes_sbox_fwd = 8'hA5;
8'h2A: aes_sbox_fwd = 8'hE5; 8'h2B: aes_sbox_fwd = 8'hF1; 8'h2C: aes_sbox_fwd = 8'h71; 8'h2D: aes_sbox_fwd = 8'hD8; 8'h2E: aes_sbox_fwd = 8'h31; 8'h2F: aes_sbox_fwd = 8'h15;
8'h30: aes_sbox_fwd = 8'h04; 8'h31: aes_sbox_fwd = 8'hC7; 8'h32: aes_sbox_fwd = 8'h23; 8'h33: aes_sbox_fwd = 8'hC3; 8'h34: aes_sbox_fwd = 8'h18; 8'h35: aes_sbox_fwd = 8'h96;
8'h36: aes_sbox_fwd = 8'h05; 8'h37: aes_sbox_fwd = 8'h9A; 8'h38: aes_sbox_fwd = 8'h07; 8'h39: aes_sbox_fwd = 8'h12; 8'h3A: aes_sbox_fwd = 8'h80; 8'h3B: aes_sbox_fwd = 8'hE2;
8'h3C: aes_sbox_fwd = 8'hEB; 8'h3D: aes_sbox_fwd = 8'h27; 8'h3E: aes_sbox_fwd = 8'hB2; 8'h3F: aes_sbox_fwd = 8'h75; 8'h40: aes_sbox_fwd = 8'h09; 8'h41: aes_sbox_fwd = 8'h83;
8'h42: aes_sbox_fwd = 8'h2C; 8'h43: aes_sbox_fwd = 8'h1A; 8'h44: aes_sbox_fwd = 8'h1B; 8'h45: aes_sbox_fwd = 8'h6E; 8'h46: aes_sbox_fwd = 8'h5A; 8'h47: aes_sbox_fwd = 8'hA0;
8'h48: aes_sbox_fwd = 8'h52; 8'h49: aes_sbox_fwd = 8'h3B; 8'h4A: aes_sbox_fwd = 8'hD6; 8'h4B: aes_sbox_fwd = 8'hB3; 8'h4C: aes_sbox_fwd = 8'h29; 8'h4D: aes_sbox_fwd = 8'hE3;
8'h4E: aes_sbox_fwd = 8'h2F; 8'h4F: aes_sbox_fwd = 8'h84; 8'h50: aes_sbox_fwd = 8'h53; 8'h51: aes_sbox_fwd = 8'hD1; 8'h52: aes_sbox_fwd = 8'h00; 8'h53: aes_sbox_fwd = 8'hED;
8'h54: aes_sbox_fwd = 8'h20; 8'h55: aes_sbox_fwd = 8'hFC; 8'h56: aes_sbox_fwd = 8'hB1; 8'h57: aes_sbox_fwd = 8'h5B; 8'h58: aes_sbox_fwd = 8'h6A; 8'h59: aes_sbox_fwd = 8'hCB;
8'h5A: aes_sbox_fwd = 8'hBE; 8'h5B: aes_sbox_fwd = 8'h39; 8'h5C: aes_sbox_fwd = 8'h4A; 8'h5D: aes_sbox_fwd = 8'h4C; 8'h5E: aes_sbox_fwd = 8'h58; 8'h5F: aes_sbox_fwd = 8'hCF;
8'h60: aes_sbox_fwd = 8'hD0; 8'h61: aes_sbox_fwd = 8'hEF; 8'h62: aes_sbox_fwd = 8'hAA; 8'h63: aes_sbox_fwd = 8'hFB; 8'h64: aes_sbox_fwd = 8'h43; 8'h65: aes_sbox_fwd = 8'h4D;
8'h66: aes_sbox_fwd = 8'h33; 8'h67: aes_sbox_fwd = 8'h85; 8'h68: aes_sbox_fwd = 8'h45; 8'h69: aes_sbox_fwd = 8'hF9; 8'h6A: aes_sbox_fwd = 8'h02; 8'h6B: aes_sbox_fwd = 8'h7F;
8'h6C: aes_sbox_fwd = 8'h50; 8'h6D: aes_sbox_fwd = 8'h3C; 8'h6E: aes_sbox_fwd = 8'h9F; 8'h6F: aes_sbox_fwd = 8'hA8; 8'h70: aes_sbox_fwd = 8'h51; 8'h71: aes_sbox_fwd = 8'hA3;
8'h72: aes_sbox_fwd = 8'h40; 8'h73: aes_sbox_fwd = 8'h8F; 8'h74: aes_sbox_fwd = 8'h92; 8'h75: aes_sbox_fwd = 8'h9D; 8'h76: aes_sbox_fwd = 8'h38; 8'h77: aes_sbox_fwd = 8'hF5;
8'h78: aes_sbox_fwd = 8'hBC; 8'h79: aes_sbox_fwd = 8'hB6; 8'h7A: aes_sbox_fwd = 8'hDA; 8'h7B: aes_sbox_fwd = 8'h21; 8'h7C: aes_sbox_fwd = 8'h10; 8'h7D: aes_sbox_fwd = 8'hFF;
8'h7E: aes_sbox_fwd = 8'hF3; 8'h7F: aes_sbox_fwd = 8'hD2; 8'h80: aes_sbox_fwd = 8'hCD; 8'h81: aes_sbox_fwd = 8'h0C; 8'h82: aes_sbox_fwd = 8'h13; 8'h83: aes_sbox_fwd = 8'hEC;
8'h84: aes_sbox_fwd = 8'h5F; 8'h85: aes_sbox_fwd = 8'h97; 8'h86: aes_sbox_fwd = 8'h44; 8'h87: aes_sbox_fwd = 8'h17; 8'h88: aes_sbox_fwd = 8'hC4; 8'h89: aes_sbox_fwd = 8'hA7;
8'h8A: aes_sbox_fwd = 8'h7E; 8'h8B: aes_sbox_fwd = 8'h3D; 8'h8C: aes_sbox_fwd = 8'h64; 8'h8D: aes_sbox_fwd = 8'h5D; 8'h8E: aes_sbox_fwd = 8'h19; 8'h8F: aes_sbox_fwd = 8'h73;
8'h90: aes_sbox_fwd = 8'h60; 8'h91: aes_sbox_fwd = 8'h81; 8'h92: aes_sbox_fwd = 8'h4F; 8'h93: aes_sbox_fwd = 8'hDC; 8'h94: aes_sbox_fwd = 8'h22; 8'h95: aes_sbox_fwd = 8'h2A;
8'h96: aes_sbox_fwd = 8'h90; 8'h97: aes_sbox_fwd = 8'h88; 8'h98: aes_sbox_fwd = 8'h46; 8'h99: aes_sbox_fwd = 8'hEE; 8'h9A: aes_sbox_fwd = 8'hB8; 8'h9B: aes_sbox_fwd = 8'h14;
8'h9C: aes_sbox_fwd = 8'hDE; 8'h9D: aes_sbox_fwd = 8'h5E; 8'h9E: aes_sbox_fwd = 8'h0B; 8'h9F: aes_sbox_fwd = 8'hDB; 8'hA0: aes_sbox_fwd = 8'hE0; 8'hA1: aes_sbox_fwd = 8'h32;
8'hA2: aes_sbox_fwd = 8'h3A; 8'hA3: aes_sbox_fwd = 8'h0A; 8'hA4: aes_sbox_fwd = 8'h49; 8'hA5: aes_sbox_fwd = 8'h06; 8'hA6: aes_sbox_fwd = 8'h24; 8'hA7: aes_sbox_fwd = 8'h5C;
8'hA8: aes_sbox_fwd = 8'hC2; 8'hA9: aes_sbox_fwd = 8'hD3; 8'hAA: aes_sbox_fwd = 8'hAC; 8'hAB: aes_sbox_fwd = 8'h62; 8'hAC: aes_sbox_fwd = 8'h91; 8'hAD: aes_sbox_fwd = 8'h95;
8'hAE: aes_sbox_fwd = 8'hE4; 8'hAF: aes_sbox_fwd = 8'h79; 8'hB0: aes_sbox_fwd = 8'hE7; 8'hB1: aes_sbox_fwd = 8'hC8; 8'hB2: aes_sbox_fwd = 8'h37; 8'hB3: aes_sbox_fwd = 8'h6D;
8'hB4: aes_sbox_fwd = 8'h8D; 8'hB5: aes_sbox_fwd = 8'hD5; 8'hB6: aes_sbox_fwd = 8'h4E; 8'hB7: aes_sbox_fwd = 8'hA9; 8'hB8: aes_sbox_fwd = 8'h6C; 8'hB9: aes_sbox_fwd = 8'h56;
8'hBA: aes_sbox_fwd = 8'hF4; 8'hBB: aes_sbox_fwd = 8'hEA; 8'hBC: aes_sbox_fwd = 8'h65; 8'hBD: aes_sbox_fwd = 8'h7A; 8'hBE: aes_sbox_fwd = 8'hAE; 8'hBF: aes_sbox_fwd = 8'h08;
8'hC0: aes_sbox_fwd = 8'hBA; 8'hC1: aes_sbox_fwd = 8'h78; 8'hC2: aes_sbox_fwd = 8'h25; 8'hC3: aes_sbox_fwd = 8'h2E; 8'hC4: aes_sbox_fwd = 8'h1C; 8'hC5: aes_sbox_fwd = 8'hA6;
8'hC6: aes_sbox_fwd = 8'hB4; 8'hC7: aes_sbox_fwd = 8'hC6; 8'hC8: aes_sbox_fwd = 8'hE8; 8'hC9: aes_sbox_fwd = 8'hDD; 8'hCA: aes_sbox_fwd = 8'h74; 8'hCB: aes_sbox_fwd = 8'h1F;
8'hCC: aes_sbox_fwd = 8'h4B; 8'hCD: aes_sbox_fwd = 8'hBD; 8'hCE: aes_sbox_fwd = 8'h8B; 8'hCF: aes_sbox_fwd = 8'h8A; 8'hD0: aes_sbox_fwd = 8'h70; 8'hD1: aes_sbox_fwd = 8'h3E;
8'hD2: aes_sbox_fwd = 8'hB5; 8'hD3: aes_sbox_fwd = 8'h66; 8'hD4: aes_sbox_fwd = 8'h48; 8'hD5: aes_sbox_fwd = 8'h03; 8'hD6: aes_sbox_fwd = 8'hF6; 8'hD7: aes_sbox_fwd = 8'h0E;
8'hD8: aes_sbox_fwd = 8'h61; 8'hD9: aes_sbox_fwd = 8'h35; 8'hDA: aes_sbox_fwd = 8'h57; 8'hDB: aes_sbox_fwd = 8'hB9; 8'hDC: aes_sbox_fwd = 8'h86; 8'hDD: aes_sbox_fwd = 8'hC1;
8'hDE: aes_sbox_fwd = 8'h1D; 8'hDF: aes_sbox_fwd = 8'h9E; 8'hE0: aes_sbox_fwd = 8'hE1; 8'hE1: aes_sbox_fwd = 8'hF8; 8'hE2: aes_sbox_fwd = 8'h98; 8'hE3: aes_sbox_fwd = 8'h11;
8'hE4: aes_sbox_fwd = 8'h69; 8'hE5: aes_sbox_fwd = 8'hD9; 8'hE6: aes_sbox_fwd = 8'h8E; 8'hE7: aes_sbox_fwd = 8'h94; 8'hE8: aes_sbox_fwd = 8'h9B; 8'hE9: aes_sbox_fwd = 8'h1E;
8'hEA: aes_sbox_fwd = 8'h87; 8'hEB: aes_sbox_fwd = 8'hE9; 8'hEC: aes_sbox_fwd = 8'hCE; 8'hED: aes_sbox_fwd = 8'h55; 8'hEE: aes_sbox_fwd = 8'h28; 8'hEF: aes_sbox_fwd = 8'hDF; 8'hF0: aes_sbox_fwd = 8'h8C;
8'hF1: aes_sbox_fwd = 8'hA1; 8'hF2: aes_sbox_fwd = 8'h89; 8'hF3: aes_sbox_fwd = 8'h0D; 8'hF4: aes_sbox_fwd = 8'hBF; 8'hF5: aes_sbox_fwd = 8'hE6; 8'hF6: aes_sbox_fwd = 8'h42;
8'hF7: aes_sbox_fwd = 8'h68; 8'hF8: aes_sbox_fwd = 8'h41; 8'hF9: aes_sbox_fwd = 8'h99; 8'hFA: aes_sbox_fwd = 8'h2D; 8'hFB: aes_sbox_fwd = 8'h0F; 8'hFC: aes_sbox_fwd = 8'hB0;
8'hFD: aes_sbox_fwd = 8'h54; 8'hFE: aes_sbox_fwd = 8'hBB; 8'hFF: aes_sbox_fwd = 8'h16;
default: aes_sbox_fwd = 8'h00;
8'h00: aes_sbox_fwd = 8'h63;
8'h01: aes_sbox_fwd = 8'h7C;
8'h02: aes_sbox_fwd = 8'h77;
8'h03: aes_sbox_fwd = 8'h7B;
8'h04: aes_sbox_fwd = 8'hF2;
8'h05: aes_sbox_fwd = 8'h6B;
8'h06: aes_sbox_fwd = 8'h6F;
8'h07: aes_sbox_fwd = 8'hC5;
8'h08: aes_sbox_fwd = 8'h30;
8'h09: aes_sbox_fwd = 8'h01;
8'h0A: aes_sbox_fwd = 8'h67;
8'h0B: aes_sbox_fwd = 8'h2B;
8'h0C: aes_sbox_fwd = 8'hFE;
8'h0D: aes_sbox_fwd = 8'hD7;
8'h0E: aes_sbox_fwd = 8'hAB;
8'h0F: aes_sbox_fwd = 8'h76;
8'h10: aes_sbox_fwd = 8'hCA;
8'h11: aes_sbox_fwd = 8'h82;
8'h12: aes_sbox_fwd = 8'hC9;
8'h13: aes_sbox_fwd = 8'h7D;
8'h14: aes_sbox_fwd = 8'hFA;
8'h15: aes_sbox_fwd = 8'h59;
8'h16: aes_sbox_fwd = 8'h47;
8'h17: aes_sbox_fwd = 8'hF0;
8'h18: aes_sbox_fwd = 8'hAD;
8'h19: aes_sbox_fwd = 8'hD4;
8'h1A: aes_sbox_fwd = 8'hA2;
8'h1B: aes_sbox_fwd = 8'hAF;
8'h1C: aes_sbox_fwd = 8'h9C;
8'h1D: aes_sbox_fwd = 8'hA4;
8'h1E: aes_sbox_fwd = 8'h72;
8'h1F: aes_sbox_fwd = 8'hC0;
8'h20: aes_sbox_fwd = 8'hB7;
8'h21: aes_sbox_fwd = 8'hFD;
8'h22: aes_sbox_fwd = 8'h93;
8'h23: aes_sbox_fwd = 8'h26;
8'h24: aes_sbox_fwd = 8'h36;
8'h25: aes_sbox_fwd = 8'h3F;
8'h26: aes_sbox_fwd = 8'hF7;
8'h27: aes_sbox_fwd = 8'hCC;
8'h28: aes_sbox_fwd = 8'h34;
8'h29: aes_sbox_fwd = 8'hA5;
8'h2A: aes_sbox_fwd = 8'hE5;
8'h2B: aes_sbox_fwd = 8'hF1;
8'h2C: aes_sbox_fwd = 8'h71;
8'h2D: aes_sbox_fwd = 8'hD8;
8'h2E: aes_sbox_fwd = 8'h31;
8'h2F: aes_sbox_fwd = 8'h15;
8'h30: aes_sbox_fwd = 8'h04;
8'h31: aes_sbox_fwd = 8'hC7;
8'h32: aes_sbox_fwd = 8'h23;
8'h33: aes_sbox_fwd = 8'hC3;
8'h34: aes_sbox_fwd = 8'h18;
8'h35: aes_sbox_fwd = 8'h96;
8'h36: aes_sbox_fwd = 8'h05;
8'h37: aes_sbox_fwd = 8'h9A;
8'h38: aes_sbox_fwd = 8'h07;
8'h39: aes_sbox_fwd = 8'h12;
8'h3A: aes_sbox_fwd = 8'h80;
8'h3B: aes_sbox_fwd = 8'hE2;
8'h3C: aes_sbox_fwd = 8'hEB;
8'h3D: aes_sbox_fwd = 8'h27;
8'h3E: aes_sbox_fwd = 8'hB2;
8'h3F: aes_sbox_fwd = 8'h75;
8'h40: aes_sbox_fwd = 8'h09;
8'h41: aes_sbox_fwd = 8'h83;
8'h42: aes_sbox_fwd = 8'h2C;
8'h43: aes_sbox_fwd = 8'h1A;
8'h44: aes_sbox_fwd = 8'h1B;
8'h45: aes_sbox_fwd = 8'h6E;
8'h46: aes_sbox_fwd = 8'h5A;
8'h47: aes_sbox_fwd = 8'hA0;
8'h48: aes_sbox_fwd = 8'h52;
8'h49: aes_sbox_fwd = 8'h3B;
8'h4A: aes_sbox_fwd = 8'hD6;
8'h4B: aes_sbox_fwd = 8'hB3;
8'h4C: aes_sbox_fwd = 8'h29;
8'h4D: aes_sbox_fwd = 8'hE3;
8'h4E: aes_sbox_fwd = 8'h2F;
8'h4F: aes_sbox_fwd = 8'h84;
8'h50: aes_sbox_fwd = 8'h53;
8'h51: aes_sbox_fwd = 8'hD1;
8'h52: aes_sbox_fwd = 8'h00;
8'h53: aes_sbox_fwd = 8'hED;
8'h54: aes_sbox_fwd = 8'h20;
8'h55: aes_sbox_fwd = 8'hFC;
8'h56: aes_sbox_fwd = 8'hB1;
8'h57: aes_sbox_fwd = 8'h5B;
8'h58: aes_sbox_fwd = 8'h6A;
8'h59: aes_sbox_fwd = 8'hCB;
8'h5A: aes_sbox_fwd = 8'hBE;
8'h5B: aes_sbox_fwd = 8'h39;
8'h5C: aes_sbox_fwd = 8'h4A;
8'h5D: aes_sbox_fwd = 8'h4C;
8'h5E: aes_sbox_fwd = 8'h58;
8'h5F: aes_sbox_fwd = 8'hCF;
8'h60: aes_sbox_fwd = 8'hD0;
8'h61: aes_sbox_fwd = 8'hEF;
8'h62: aes_sbox_fwd = 8'hAA;
8'h63: aes_sbox_fwd = 8'hFB;
8'h64: aes_sbox_fwd = 8'h43;
8'h65: aes_sbox_fwd = 8'h4D;
8'h66: aes_sbox_fwd = 8'h33;
8'h67: aes_sbox_fwd = 8'h85;
8'h68: aes_sbox_fwd = 8'h45;
8'h69: aes_sbox_fwd = 8'hF9;
8'h6A: aes_sbox_fwd = 8'h02;
8'h6B: aes_sbox_fwd = 8'h7F;
8'h6C: aes_sbox_fwd = 8'h50;
8'h6D: aes_sbox_fwd = 8'h3C;
8'h6E: aes_sbox_fwd = 8'h9F;
8'h6F: aes_sbox_fwd = 8'hA8;
8'h70: aes_sbox_fwd = 8'h51;
8'h71: aes_sbox_fwd = 8'hA3;
8'h72: aes_sbox_fwd = 8'h40;
8'h73: aes_sbox_fwd = 8'h8F;
8'h74: aes_sbox_fwd = 8'h92;
8'h75: aes_sbox_fwd = 8'h9D;
8'h76: aes_sbox_fwd = 8'h38;
8'h77: aes_sbox_fwd = 8'hF5;
8'h78: aes_sbox_fwd = 8'hBC;
8'h79: aes_sbox_fwd = 8'hB6;
8'h7A: aes_sbox_fwd = 8'hDA;
8'h7B: aes_sbox_fwd = 8'h21;
8'h7C: aes_sbox_fwd = 8'h10;
8'h7D: aes_sbox_fwd = 8'hFF;
8'h7E: aes_sbox_fwd = 8'hF3;
8'h7F: aes_sbox_fwd = 8'hD2;
8'h80: aes_sbox_fwd = 8'hCD;
8'h81: aes_sbox_fwd = 8'h0C;
8'h82: aes_sbox_fwd = 8'h13;
8'h83: aes_sbox_fwd = 8'hEC;
8'h84: aes_sbox_fwd = 8'h5F;
8'h85: aes_sbox_fwd = 8'h97;
8'h86: aes_sbox_fwd = 8'h44;
8'h87: aes_sbox_fwd = 8'h17;
8'h88: aes_sbox_fwd = 8'hC4;
8'h89: aes_sbox_fwd = 8'hA7;
8'h8A: aes_sbox_fwd = 8'h7E;
8'h8B: aes_sbox_fwd = 8'h3D;
8'h8C: aes_sbox_fwd = 8'h64;
8'h8D: aes_sbox_fwd = 8'h5D;
8'h8E: aes_sbox_fwd = 8'h19;
8'h8F: aes_sbox_fwd = 8'h73;
8'h90: aes_sbox_fwd = 8'h60;
8'h91: aes_sbox_fwd = 8'h81;
8'h92: aes_sbox_fwd = 8'h4F;
8'h93: aes_sbox_fwd = 8'hDC;
8'h94: aes_sbox_fwd = 8'h22;
8'h95: aes_sbox_fwd = 8'h2A;
8'h96: aes_sbox_fwd = 8'h90;
8'h97: aes_sbox_fwd = 8'h88;
8'h98: aes_sbox_fwd = 8'h46;
8'h99: aes_sbox_fwd = 8'hEE;
8'h9A: aes_sbox_fwd = 8'hB8;
8'h9B: aes_sbox_fwd = 8'h14;
8'h9C: aes_sbox_fwd = 8'hDE;
8'h9D: aes_sbox_fwd = 8'h5E;
8'h9E: aes_sbox_fwd = 8'h0B;
8'h9F: aes_sbox_fwd = 8'hDB;
8'hA0: aes_sbox_fwd = 8'hE0;
8'hA1: aes_sbox_fwd = 8'h32;
8'hA2: aes_sbox_fwd = 8'h3A;
8'hA3: aes_sbox_fwd = 8'h0A;
8'hA4: aes_sbox_fwd = 8'h49;
8'hA5: aes_sbox_fwd = 8'h06;
8'hA6: aes_sbox_fwd = 8'h24;
8'hA7: aes_sbox_fwd = 8'h5C;
8'hA8: aes_sbox_fwd = 8'hC2;
8'hA9: aes_sbox_fwd = 8'hD3;
8'hAA: aes_sbox_fwd = 8'hAC;
8'hAB: aes_sbox_fwd = 8'h62;
8'hAC: aes_sbox_fwd = 8'h91;
8'hAD: aes_sbox_fwd = 8'h95;
8'hAE: aes_sbox_fwd = 8'hE4;
8'hAF: aes_sbox_fwd = 8'h79;
8'hB0: aes_sbox_fwd = 8'hE7;
8'hB1: aes_sbox_fwd = 8'hC8;
8'hB2: aes_sbox_fwd = 8'h37;
8'hB3: aes_sbox_fwd = 8'h6D;
8'hB4: aes_sbox_fwd = 8'h8D;
8'hB5: aes_sbox_fwd = 8'hD5;
8'hB6: aes_sbox_fwd = 8'h4E;
8'hB7: aes_sbox_fwd = 8'hA9;
8'hB8: aes_sbox_fwd = 8'h6C;
8'hB9: aes_sbox_fwd = 8'h56;
8'hBA: aes_sbox_fwd = 8'hF4;
8'hBB: aes_sbox_fwd = 8'hEA;
8'hBC: aes_sbox_fwd = 8'h65;
8'hBD: aes_sbox_fwd = 8'h7A;
8'hBE: aes_sbox_fwd = 8'hAE;
8'hBF: aes_sbox_fwd = 8'h08;
8'hC0: aes_sbox_fwd = 8'hBA;
8'hC1: aes_sbox_fwd = 8'h78;
8'hC2: aes_sbox_fwd = 8'h25;
8'hC3: aes_sbox_fwd = 8'h2E;
8'hC4: aes_sbox_fwd = 8'h1C;
8'hC5: aes_sbox_fwd = 8'hA6;
8'hC6: aes_sbox_fwd = 8'hB4;
8'hC7: aes_sbox_fwd = 8'hC6;
8'hC8: aes_sbox_fwd = 8'hE8;
8'hC9: aes_sbox_fwd = 8'hDD;
8'hCA: aes_sbox_fwd = 8'h74;
8'hCB: aes_sbox_fwd = 8'h1F;
8'hCC: aes_sbox_fwd = 8'h4B;
8'hCD: aes_sbox_fwd = 8'hBD;
8'hCE: aes_sbox_fwd = 8'h8B;
8'hCF: aes_sbox_fwd = 8'h8A;
8'hD0: aes_sbox_fwd = 8'h70;
8'hD1: aes_sbox_fwd = 8'h3E;
8'hD2: aes_sbox_fwd = 8'hB5;
8'hD3: aes_sbox_fwd = 8'h66;
8'hD4: aes_sbox_fwd = 8'h48;
8'hD5: aes_sbox_fwd = 8'h03;
8'hD6: aes_sbox_fwd = 8'hF6;
8'hD7: aes_sbox_fwd = 8'h0E;
8'hD8: aes_sbox_fwd = 8'h61;
8'hD9: aes_sbox_fwd = 8'h35;
8'hDA: aes_sbox_fwd = 8'h57;
8'hDB: aes_sbox_fwd = 8'hB9;
8'hDC: aes_sbox_fwd = 8'h86;
8'hDD: aes_sbox_fwd = 8'hC1;
8'hDE: aes_sbox_fwd = 8'h1D;
8'hDF: aes_sbox_fwd = 8'h9E;
8'hE0: aes_sbox_fwd = 8'hE1;
8'hE1: aes_sbox_fwd = 8'hF8;
8'hE2: aes_sbox_fwd = 8'h98;
8'hE3: aes_sbox_fwd = 8'h11;
8'hE4: aes_sbox_fwd = 8'h69;
8'hE5: aes_sbox_fwd = 8'hD9;
8'hE6: aes_sbox_fwd = 8'h8E;
8'hE7: aes_sbox_fwd = 8'h94;
8'hE8: aes_sbox_fwd = 8'h9B;
8'hE9: aes_sbox_fwd = 8'h1E;
8'hEA: aes_sbox_fwd = 8'h87;
8'hEB: aes_sbox_fwd = 8'hE9;
8'hEC: aes_sbox_fwd = 8'hCE;
8'hED: aes_sbox_fwd = 8'h55;
8'hEE: aes_sbox_fwd = 8'h28;
8'hEF: aes_sbox_fwd = 8'hDF;
8'hF0: aes_sbox_fwd = 8'h8C;
8'hF1: aes_sbox_fwd = 8'hA1;
8'hF2: aes_sbox_fwd = 8'h89;
8'hF3: aes_sbox_fwd = 8'h0D;
8'hF4: aes_sbox_fwd = 8'hBF;
8'hF5: aes_sbox_fwd = 8'hE6;
8'hF6: aes_sbox_fwd = 8'h42;
8'hF7: aes_sbox_fwd = 8'h68;
8'hF8: aes_sbox_fwd = 8'h41;
8'hF9: aes_sbox_fwd = 8'h99;
8'hFA: aes_sbox_fwd = 8'h2D;
8'hFB: aes_sbox_fwd = 8'h0F;
8'hFC: aes_sbox_fwd = 8'hB0;
8'hFD: aes_sbox_fwd = 8'h54;
8'hFE: aes_sbox_fwd = 8'hBB;
8'hFF: aes_sbox_fwd = 8'h16;
default: aes_sbox_fwd = 8'h00;

8'hFD: aes_sbox_fwd = 8'h54; 8'hFE: aes_sbox_fwd = 8'hBB; 8'hFF: aes_sbox_fwd = 8'h16;
default: aes_sbox_fwd = 8'h00;
endcase
endfunction

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
endfunction
endfunction

Comment on lines 888 to 908
function [31:0] aes_decode_rcon(input [3:0] r);
case (r)
4'h0: aes_decode_rcon = 32'h00000001;
4'h1: aes_decode_rcon = 32'h00000002;
4'h2: aes_decode_rcon = 32'h00000004;
4'h3: aes_decode_rcon = 32'h00000008;
4'h4: aes_decode_rcon = 32'h00000010;
4'h5: aes_decode_rcon = 32'h00000020;
4'h6: aes_decode_rcon = 32'h00000040;
4'h7: aes_decode_rcon = 32'h00000080;
4'h8: aes_decode_rcon = 32'h0000001b;
4'h9: aes_decode_rcon = 32'h00000036;
4'hA: aes_decode_rcon = 32'h00000000;
4'hB: aes_decode_rcon = 32'h00000000;
4'hC: aes_decode_rcon = 32'h00000000;
4'hD: aes_decode_rcon = 32'h00000000;
4'hE: aes_decode_rcon = 32'h00000000;
4'hF: aes_decode_rcon = 32'h00000000;
default: aes_decode_rcon = 32'h00000000;
endcase
endfunction

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
function [31:0] aes_decode_rcon(input [3:0] r);
case (r)
4'h0: aes_decode_rcon = 32'h00000001;
4'h1: aes_decode_rcon = 32'h00000002;
4'h2: aes_decode_rcon = 32'h00000004;
4'h3: aes_decode_rcon = 32'h00000008;
4'h4: aes_decode_rcon = 32'h00000010;
4'h5: aes_decode_rcon = 32'h00000020;
4'h6: aes_decode_rcon = 32'h00000040;
4'h7: aes_decode_rcon = 32'h00000080;
4'h8: aes_decode_rcon = 32'h0000001b;
4'h9: aes_decode_rcon = 32'h00000036;
4'hA: aes_decode_rcon = 32'h00000000;
4'hB: aes_decode_rcon = 32'h00000000;
4'hC: aes_decode_rcon = 32'h00000000;
4'hD: aes_decode_rcon = 32'h00000000;
4'hE: aes_decode_rcon = 32'h00000000;
4'hF: aes_decode_rcon = 32'h00000000;
default: aes_decode_rcon = 32'h00000000;
endcase
endfunction
function [31:0] aes_decode_rcon(input [3:0] r);
case (r)
4'h0: aes_decode_rcon = 32'h00000001;
4'h1: aes_decode_rcon = 32'h00000002;
4'h2: aes_decode_rcon = 32'h00000004;
4'h3: aes_decode_rcon = 32'h00000008;
4'h4: aes_decode_rcon = 32'h00000010;
4'h5: aes_decode_rcon = 32'h00000020;
4'h6: aes_decode_rcon = 32'h00000040;
4'h7: aes_decode_rcon = 32'h00000080;
4'h8: aes_decode_rcon = 32'h0000001b;
4'h9: aes_decode_rcon = 32'h00000036;
4'hA: aes_decode_rcon = 32'h00000000;
4'hB: aes_decode_rcon = 32'h00000000;
4'hC: aes_decode_rcon = 32'h00000000;
4'hD: aes_decode_rcon = 32'h00000000;
4'hE: aes_decode_rcon = 32'h00000000;
4'hF: aes_decode_rcon = 32'h00000000;
default: aes_decode_rcon = 32'h00000000;
endcase
endfunction

@@ -1106,6 +1107,9 @@ module issue_read_operands
x_transaction_rejected_o <= 1'b0;
end else begin
fu_data_q <= fu_data_n;
if (CVA6Cfg.ZKN) begin
orig_instr_aes_bits <= {orig_instr_i[0][31:30], orig_instr_i[0][23:20]};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
orig_instr_aes_bits <= {orig_instr_i[0][31:30], orig_instr_i[0][23:20]};
orig_instr_aes_bits <= {orig_instr_i[0][31:30], orig_instr_i[0][23:20]};

@@ -299,7 +300,8 @@ module issue_stage
.wdata_i,
.we_gpr_i,
.we_fpr_i,
.stall_issue_o
.stall_issue_o,
.orig_instr_aes_bits(orig_instr_aes_bits)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
.orig_instr_aes_bits(orig_instr_aes_bits)
.orig_instr_aes_bits (orig_instr_aes_bits)

core/decoder.sv Outdated
if (CVA6Cfg.ZKN) instruction_o.op = ariane_pkg::AES32ESMI; // aes32esmi
else illegal_instr_bm = 1'b1;
end
{7'b0010101, 3'b000}, {7'b0110101, 3'b000}, {7'b1010101, 3'b000}, {7'b1110101, 3'b000}: begin

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
{7'b0010101, 3'b000}, {7'b0110101, 3'b000}, {7'b1010101, 3'b000}, {7'b1110101, 3'b000}: begin
{
7'b0010101, 3'b000
}, {
7'b0110101, 3'b000
}, {
7'b1010101, 3'b000
}, {
7'b1110101, 3'b000
} : begin

core/decoder.sv Outdated
if (CVA6Cfg.ZKN) instruction_o.op = ariane_pkg::AES32DSI; // aes32dsi
else illegal_instr_bm = 1'b1;
end
{7'b0010111, 3'b000}, {7'b0110111, 3'b000}, {7'b1010111, 3'b000}, {7'b1110111, 3'b000}: begin

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
{7'b0010111, 3'b000}, {7'b0110111, 3'b000}, {7'b1010111, 3'b000}, {7'b1110111, 3'b000}: begin
{
7'b0010111, 3'b000
}, {
7'b0110111, 3'b000
}, {
7'b1010111, 3'b000
}, {
7'b1110111, 3'b000
} : begin

endcase
endfunction
// AES Sbox Inverse
function [7:0] aes_sbox_inv(input [7:0] si);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
function [7:0] aes_sbox_inv(input [7:0] si);
function [7:0] aes_sbox_inv(input [7:0] si);

Comment on lines 918 to 961
8'h00: aes_sbox_inv = 8'h52; 8'h01: aes_sbox_inv = 8'h09; 8'h02: aes_sbox_inv = 8'h6a; 8'h03: aes_sbox_inv = 8'hd5; 8'h04: aes_sbox_inv = 8'h30; 8'h05: aes_sbox_inv = 8'h36;
8'h06: aes_sbox_inv = 8'ha5; 8'h07: aes_sbox_inv = 8'h38; 8'h08: aes_sbox_inv = 8'hbf; 8'h09: aes_sbox_inv = 8'h40; 8'h0a: aes_sbox_inv = 8'ha3; 8'h0b: aes_sbox_inv = 8'h9e;
8'h0c: aes_sbox_inv = 8'h81; 8'h0d: aes_sbox_inv = 8'hf3; 8'h0e: aes_sbox_inv = 8'hd7; 8'h0f: aes_sbox_inv = 8'hfb; 8'h10: aes_sbox_inv = 8'h7c; 8'h11: aes_sbox_inv = 8'he3;
8'h12: aes_sbox_inv = 8'h39; 8'h13: aes_sbox_inv = 8'h82; 8'h14: aes_sbox_inv = 8'h9b; 8'h15: aes_sbox_inv = 8'h2f; 8'h16: aes_sbox_inv = 8'hff; 8'h17: aes_sbox_inv = 8'h87;
8'h18: aes_sbox_inv = 8'h34; 8'h19: aes_sbox_inv = 8'h8e; 8'h1a: aes_sbox_inv = 8'h43; 8'h1b: aes_sbox_inv = 8'h44; 8'h1c: aes_sbox_inv = 8'hc4; 8'h1d: aes_sbox_inv = 8'hde;
8'h1e: aes_sbox_inv = 8'he9; 8'h1f: aes_sbox_inv = 8'hcb; 8'h20: aes_sbox_inv = 8'h54; 8'h21: aes_sbox_inv = 8'h7b; 8'h22: aes_sbox_inv = 8'h94; 8'h23: aes_sbox_inv = 8'h32;
8'h24: aes_sbox_inv = 8'ha6; 8'h25: aes_sbox_inv = 8'hc2; 8'h26: aes_sbox_inv = 8'h23; 8'h27: aes_sbox_inv = 8'h3d; 8'h28: aes_sbox_inv = 8'hee; 8'h29: aes_sbox_inv = 8'h4c;
8'h2a: aes_sbox_inv = 8'h95; 8'h2b: aes_sbox_inv = 8'h0b; 8'h2c: aes_sbox_inv = 8'h42; 8'h2d: aes_sbox_inv = 8'hfa; 8'h2e: aes_sbox_inv = 8'hc3; 8'h2f: aes_sbox_inv = 8'h4e;
8'h30: aes_sbox_inv = 8'h08; 8'h31: aes_sbox_inv = 8'h2e; 8'h32: aes_sbox_inv = 8'ha1; 8'h33: aes_sbox_inv = 8'h66; 8'h34: aes_sbox_inv = 8'h28; 8'h35: aes_sbox_inv = 8'hd9;
8'h36: aes_sbox_inv = 8'h24; 8'h37: aes_sbox_inv = 8'hb2; 8'h38: aes_sbox_inv = 8'h76; 8'h39: aes_sbox_inv = 8'h5b; 8'h3a: aes_sbox_inv = 8'ha2; 8'h3b: aes_sbox_inv = 8'h49;
8'h3c: aes_sbox_inv = 8'h6d; 8'h3d: aes_sbox_inv = 8'h8b; 8'h3e: aes_sbox_inv = 8'hd1; 8'h3f: aes_sbox_inv = 8'h25; 8'h40: aes_sbox_inv = 8'h72; 8'h41: aes_sbox_inv = 8'hf8;
8'h42: aes_sbox_inv = 8'hf6; 8'h43: aes_sbox_inv = 8'h64; 8'h44: aes_sbox_inv = 8'h86; 8'h45: aes_sbox_inv = 8'h68; 8'h46: aes_sbox_inv = 8'h98; 8'h47: aes_sbox_inv = 8'h16;
8'h48: aes_sbox_inv = 8'hd4; 8'h49: aes_sbox_inv = 8'ha4; 8'h4a: aes_sbox_inv = 8'h5c; 8'h4b: aes_sbox_inv = 8'hcc; 8'h4c: aes_sbox_inv = 8'h5d; 8'h4d: aes_sbox_inv = 8'h65;
8'h4e: aes_sbox_inv = 8'hb6; 8'h4f: aes_sbox_inv = 8'h92; 8'h50: aes_sbox_inv = 8'h6c; 8'h51: aes_sbox_inv = 8'h70; 8'h52: aes_sbox_inv = 8'h48; 8'h53: aes_sbox_inv = 8'h50;
8'h54: aes_sbox_inv = 8'hfd; 8'h55: aes_sbox_inv = 8'hed; 8'h56: aes_sbox_inv = 8'hb9; 8'h57: aes_sbox_inv = 8'hda; 8'h58: aes_sbox_inv = 8'h5e; 8'h59: aes_sbox_inv = 8'h15;
8'h5a: aes_sbox_inv = 8'h46; 8'h5b: aes_sbox_inv = 8'h57; 8'h5c: aes_sbox_inv = 8'ha7; 8'h5d: aes_sbox_inv = 8'h8d; 8'h5e: aes_sbox_inv = 8'h9d; 8'h5f: aes_sbox_inv = 8'h84;
8'h60: aes_sbox_inv = 8'h90; 8'h61: aes_sbox_inv = 8'hd8; 8'h62: aes_sbox_inv = 8'hab; 8'h63: aes_sbox_inv = 8'h00; 8'h64: aes_sbox_inv = 8'h8c; 8'h65: aes_sbox_inv = 8'hbc;
8'h66: aes_sbox_inv = 8'hd3; 8'h67: aes_sbox_inv = 8'h0a; 8'h68: aes_sbox_inv = 8'hf7; 8'h69: aes_sbox_inv = 8'he4; 8'h6a: aes_sbox_inv = 8'h58; 8'h6b: aes_sbox_inv = 8'h05;
8'h6c: aes_sbox_inv = 8'hb8; 8'h6d: aes_sbox_inv = 8'hb3; 8'h6e: aes_sbox_inv = 8'h45; 8'h6f: aes_sbox_inv = 8'h06; 8'h70: aes_sbox_inv = 8'hd0; 8'h71: aes_sbox_inv = 8'h2c;
8'h72: aes_sbox_inv = 8'h1e; 8'h73: aes_sbox_inv = 8'h8f; 8'h74: aes_sbox_inv = 8'hca; 8'h75: aes_sbox_inv = 8'h3f; 8'h76: aes_sbox_inv = 8'h0f; 8'h77: aes_sbox_inv = 8'h02;
8'h78: aes_sbox_inv = 8'hc1; 8'h79: aes_sbox_inv = 8'haf; 8'h7a: aes_sbox_inv = 8'hbd; 8'h7b: aes_sbox_inv = 8'h03; 8'h7c: aes_sbox_inv = 8'h01; 8'h7d: aes_sbox_inv = 8'h13;
8'h7e: aes_sbox_inv = 8'h8a; 8'h7f: aes_sbox_inv = 8'h6b; 8'h80: aes_sbox_inv = 8'h3a; 8'h81: aes_sbox_inv = 8'h91; 8'h82: aes_sbox_inv = 8'h11; 8'h83: aes_sbox_inv = 8'h41;
8'h84: aes_sbox_inv = 8'h4f; 8'h85: aes_sbox_inv = 8'h67; 8'h86: aes_sbox_inv = 8'hdc; 8'h87: aes_sbox_inv = 8'hea; 8'h88: aes_sbox_inv = 8'h97; 8'h89: aes_sbox_inv = 8'hf2;
8'h8a: aes_sbox_inv = 8'hcf; 8'h8b: aes_sbox_inv = 8'hce; 8'h8c: aes_sbox_inv = 8'hf0; 8'h8d: aes_sbox_inv = 8'hb4; 8'h8e: aes_sbox_inv = 8'he6; 8'h8f: aes_sbox_inv = 8'h73;
8'h90: aes_sbox_inv = 8'h96; 8'h91: aes_sbox_inv = 8'hac; 8'h92: aes_sbox_inv = 8'h74; 8'h93: aes_sbox_inv = 8'h22; 8'h94: aes_sbox_inv = 8'he7; 8'h95: aes_sbox_inv = 8'had; 8'h96: aes_sbox_inv = 8'h35; 8'h97: aes_sbox_inv = 8'h85;
8'h98: aes_sbox_inv = 8'he2; 8'h99: aes_sbox_inv = 8'hf9; 8'h9a: aes_sbox_inv = 8'h37; 8'h9b: aes_sbox_inv = 8'he8; 8'h9c: aes_sbox_inv = 8'h1c; 8'h9d: aes_sbox_inv = 8'h75;
8'h9e: aes_sbox_inv = 8'hdf; 8'h9f: aes_sbox_inv = 8'h6e; 8'ha0: aes_sbox_inv = 8'h47; 8'ha1: aes_sbox_inv = 8'hf1; 8'ha2: aes_sbox_inv = 8'h1a; 8'ha3: aes_sbox_inv = 8'h71;
8'ha4: aes_sbox_inv = 8'h1d; 8'ha5: aes_sbox_inv = 8'h29; 8'ha6: aes_sbox_inv = 8'hc5; 8'ha7: aes_sbox_inv = 8'h89; 8'ha8: aes_sbox_inv = 8'h6f; 8'ha9: aes_sbox_inv = 8'hb7;
8'haa: aes_sbox_inv = 8'h62; 8'hab: aes_sbox_inv = 8'h0e; 8'hac: aes_sbox_inv = 8'haa; 8'had: aes_sbox_inv = 8'h18; 8'hae: aes_sbox_inv = 8'hbe; 8'haf: aes_sbox_inv = 8'h1b;
8'hb0: aes_sbox_inv = 8'hfc; 8'hb1: aes_sbox_inv = 8'h56; 8'hb2: aes_sbox_inv = 8'h3e; 8'hb3: aes_sbox_inv = 8'h4b; 8'hb4: aes_sbox_inv = 8'hc6; 8'hb5: aes_sbox_inv = 8'hd2;
8'hb6: aes_sbox_inv = 8'h79; 8'hb7: aes_sbox_inv = 8'h20; 8'hb8: aes_sbox_inv = 8'h9a; 8'hb9: aes_sbox_inv = 8'hdb; 8'hba: aes_sbox_inv = 8'hc0; 8'hbb: aes_sbox_inv = 8'hfe;
8'hbc: aes_sbox_inv = 8'h78; 8'hbd: aes_sbox_inv = 8'hcd; 8'hbe: aes_sbox_inv = 8'h5a; 8'hbf: aes_sbox_inv = 8'hf4; 8'hc0: aes_sbox_inv = 8'h1f; 8'hc1: aes_sbox_inv = 8'hdd;
8'hc2: aes_sbox_inv = 8'ha8; 8'hc3: aes_sbox_inv = 8'h33; 8'hc4: aes_sbox_inv = 8'h88; 8'hc5: aes_sbox_inv = 8'h07; 8'hc6: aes_sbox_inv = 8'hc7; 8'hc7: aes_sbox_inv = 8'h31;
8'hc8: aes_sbox_inv = 8'hb1; 8'hc9: aes_sbox_inv = 8'h12; 8'hca: aes_sbox_inv = 8'h10; 8'hcb: aes_sbox_inv = 8'h59; 8'hcc: aes_sbox_inv = 8'h27; 8'hcd: aes_sbox_inv = 8'h80;
8'hce: aes_sbox_inv = 8'hec; 8'hcf: aes_sbox_inv = 8'h5f; 8'hd0: aes_sbox_inv = 8'h60; 8'hd1: aes_sbox_inv = 8'h51; 8'hd2: aes_sbox_inv = 8'h7f; 8'hd3: aes_sbox_inv = 8'ha9;
8'hd4: aes_sbox_inv = 8'h19; 8'hd5: aes_sbox_inv = 8'hb5; 8'hd6: aes_sbox_inv = 8'h4a; 8'hd7: aes_sbox_inv = 8'h0d; 8'hd8: aes_sbox_inv = 8'h2d; 8'hd9: aes_sbox_inv = 8'he5;
8'hda: aes_sbox_inv = 8'h7a; 8'hdb: aes_sbox_inv = 8'h9f; 8'hdc: aes_sbox_inv = 8'h93; 8'hdd: aes_sbox_inv = 8'hc9; 8'hde: aes_sbox_inv = 8'h9c; 8'hdf: aes_sbox_inv = 8'hef;
8'he0: aes_sbox_inv = 8'ha0; 8'he1: aes_sbox_inv = 8'he0; 8'he2: aes_sbox_inv = 8'h3b; 8'he3: aes_sbox_inv = 8'h4d; 8'he4: aes_sbox_inv = 8'hae; 8'he5: aes_sbox_inv = 8'h2a;
8'he6: aes_sbox_inv = 8'hf5; 8'he7: aes_sbox_inv = 8'hb0; 8'he8: aes_sbox_inv = 8'hc8; 8'he9: aes_sbox_inv = 8'heb; 8'hea: aes_sbox_inv = 8'hbb; 8'heb: aes_sbox_inv = 8'h3c;
8'hec: aes_sbox_inv = 8'h83; 8'hed: aes_sbox_inv = 8'h53; 8'hee: aes_sbox_inv = 8'h99; 8'hef: aes_sbox_inv = 8'h61; 8'hf0: aes_sbox_inv = 8'h17; 8'hf1: aes_sbox_inv = 8'h2b;
8'hf2: aes_sbox_inv = 8'h04; 8'hf3: aes_sbox_inv = 8'h7e; 8'hf4: aes_sbox_inv = 8'hba; 8'hf5: aes_sbox_inv = 8'h77; 8'hf6: aes_sbox_inv = 8'hd6; 8'hf7: aes_sbox_inv = 8'h26;
8'hf8: aes_sbox_inv = 8'he1; 8'hf9: aes_sbox_inv = 8'h69; 8'hfa: aes_sbox_inv = 8'h14; 8'hfb: aes_sbox_inv = 8'h63; 8'hfc: aes_sbox_inv = 8'h55; 8'hfd: aes_sbox_inv = 8'h21;
8'hfe: aes_sbox_inv = 8'h0c; 8'hff: aes_sbox_inv = 8'h7d;
default: aes_sbox_inv = 8'h00;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
8'h00: aes_sbox_inv = 8'h52; 8'h01: aes_sbox_inv = 8'h09; 8'h02: aes_sbox_inv = 8'h6a; 8'h03: aes_sbox_inv = 8'hd5; 8'h04: aes_sbox_inv = 8'h30; 8'h05: aes_sbox_inv = 8'h36;
8'h06: aes_sbox_inv = 8'ha5; 8'h07: aes_sbox_inv = 8'h38; 8'h08: aes_sbox_inv = 8'hbf; 8'h09: aes_sbox_inv = 8'h40; 8'h0a: aes_sbox_inv = 8'ha3; 8'h0b: aes_sbox_inv = 8'h9e;
8'h0c: aes_sbox_inv = 8'h81; 8'h0d: aes_sbox_inv = 8'hf3; 8'h0e: aes_sbox_inv = 8'hd7; 8'h0f: aes_sbox_inv = 8'hfb; 8'h10: aes_sbox_inv = 8'h7c; 8'h11: aes_sbox_inv = 8'he3;
8'h12: aes_sbox_inv = 8'h39; 8'h13: aes_sbox_inv = 8'h82; 8'h14: aes_sbox_inv = 8'h9b; 8'h15: aes_sbox_inv = 8'h2f; 8'h16: aes_sbox_inv = 8'hff; 8'h17: aes_sbox_inv = 8'h87;
8'h18: aes_sbox_inv = 8'h34; 8'h19: aes_sbox_inv = 8'h8e; 8'h1a: aes_sbox_inv = 8'h43; 8'h1b: aes_sbox_inv = 8'h44; 8'h1c: aes_sbox_inv = 8'hc4; 8'h1d: aes_sbox_inv = 8'hde;
8'h1e: aes_sbox_inv = 8'he9; 8'h1f: aes_sbox_inv = 8'hcb; 8'h20: aes_sbox_inv = 8'h54; 8'h21: aes_sbox_inv = 8'h7b; 8'h22: aes_sbox_inv = 8'h94; 8'h23: aes_sbox_inv = 8'h32;
8'h24: aes_sbox_inv = 8'ha6; 8'h25: aes_sbox_inv = 8'hc2; 8'h26: aes_sbox_inv = 8'h23; 8'h27: aes_sbox_inv = 8'h3d; 8'h28: aes_sbox_inv = 8'hee; 8'h29: aes_sbox_inv = 8'h4c;
8'h2a: aes_sbox_inv = 8'h95; 8'h2b: aes_sbox_inv = 8'h0b; 8'h2c: aes_sbox_inv = 8'h42; 8'h2d: aes_sbox_inv = 8'hfa; 8'h2e: aes_sbox_inv = 8'hc3; 8'h2f: aes_sbox_inv = 8'h4e;
8'h30: aes_sbox_inv = 8'h08; 8'h31: aes_sbox_inv = 8'h2e; 8'h32: aes_sbox_inv = 8'ha1; 8'h33: aes_sbox_inv = 8'h66; 8'h34: aes_sbox_inv = 8'h28; 8'h35: aes_sbox_inv = 8'hd9;
8'h36: aes_sbox_inv = 8'h24; 8'h37: aes_sbox_inv = 8'hb2; 8'h38: aes_sbox_inv = 8'h76; 8'h39: aes_sbox_inv = 8'h5b; 8'h3a: aes_sbox_inv = 8'ha2; 8'h3b: aes_sbox_inv = 8'h49;
8'h3c: aes_sbox_inv = 8'h6d; 8'h3d: aes_sbox_inv = 8'h8b; 8'h3e: aes_sbox_inv = 8'hd1; 8'h3f: aes_sbox_inv = 8'h25; 8'h40: aes_sbox_inv = 8'h72; 8'h41: aes_sbox_inv = 8'hf8;
8'h42: aes_sbox_inv = 8'hf6; 8'h43: aes_sbox_inv = 8'h64; 8'h44: aes_sbox_inv = 8'h86; 8'h45: aes_sbox_inv = 8'h68; 8'h46: aes_sbox_inv = 8'h98; 8'h47: aes_sbox_inv = 8'h16;
8'h48: aes_sbox_inv = 8'hd4; 8'h49: aes_sbox_inv = 8'ha4; 8'h4a: aes_sbox_inv = 8'h5c; 8'h4b: aes_sbox_inv = 8'hcc; 8'h4c: aes_sbox_inv = 8'h5d; 8'h4d: aes_sbox_inv = 8'h65;
8'h4e: aes_sbox_inv = 8'hb6; 8'h4f: aes_sbox_inv = 8'h92; 8'h50: aes_sbox_inv = 8'h6c; 8'h51: aes_sbox_inv = 8'h70; 8'h52: aes_sbox_inv = 8'h48; 8'h53: aes_sbox_inv = 8'h50;
8'h54: aes_sbox_inv = 8'hfd; 8'h55: aes_sbox_inv = 8'hed; 8'h56: aes_sbox_inv = 8'hb9; 8'h57: aes_sbox_inv = 8'hda; 8'h58: aes_sbox_inv = 8'h5e; 8'h59: aes_sbox_inv = 8'h15;
8'h5a: aes_sbox_inv = 8'h46; 8'h5b: aes_sbox_inv = 8'h57; 8'h5c: aes_sbox_inv = 8'ha7; 8'h5d: aes_sbox_inv = 8'h8d; 8'h5e: aes_sbox_inv = 8'h9d; 8'h5f: aes_sbox_inv = 8'h84;
8'h60: aes_sbox_inv = 8'h90; 8'h61: aes_sbox_inv = 8'hd8; 8'h62: aes_sbox_inv = 8'hab; 8'h63: aes_sbox_inv = 8'h00; 8'h64: aes_sbox_inv = 8'h8c; 8'h65: aes_sbox_inv = 8'hbc;
8'h66: aes_sbox_inv = 8'hd3; 8'h67: aes_sbox_inv = 8'h0a; 8'h68: aes_sbox_inv = 8'hf7; 8'h69: aes_sbox_inv = 8'he4; 8'h6a: aes_sbox_inv = 8'h58; 8'h6b: aes_sbox_inv = 8'h05;
8'h6c: aes_sbox_inv = 8'hb8; 8'h6d: aes_sbox_inv = 8'hb3; 8'h6e: aes_sbox_inv = 8'h45; 8'h6f: aes_sbox_inv = 8'h06; 8'h70: aes_sbox_inv = 8'hd0; 8'h71: aes_sbox_inv = 8'h2c;
8'h72: aes_sbox_inv = 8'h1e; 8'h73: aes_sbox_inv = 8'h8f; 8'h74: aes_sbox_inv = 8'hca; 8'h75: aes_sbox_inv = 8'h3f; 8'h76: aes_sbox_inv = 8'h0f; 8'h77: aes_sbox_inv = 8'h02;
8'h78: aes_sbox_inv = 8'hc1; 8'h79: aes_sbox_inv = 8'haf; 8'h7a: aes_sbox_inv = 8'hbd; 8'h7b: aes_sbox_inv = 8'h03; 8'h7c: aes_sbox_inv = 8'h01; 8'h7d: aes_sbox_inv = 8'h13;
8'h7e: aes_sbox_inv = 8'h8a; 8'h7f: aes_sbox_inv = 8'h6b; 8'h80: aes_sbox_inv = 8'h3a; 8'h81: aes_sbox_inv = 8'h91; 8'h82: aes_sbox_inv = 8'h11; 8'h83: aes_sbox_inv = 8'h41;
8'h84: aes_sbox_inv = 8'h4f; 8'h85: aes_sbox_inv = 8'h67; 8'h86: aes_sbox_inv = 8'hdc; 8'h87: aes_sbox_inv = 8'hea; 8'h88: aes_sbox_inv = 8'h97; 8'h89: aes_sbox_inv = 8'hf2;
8'h8a: aes_sbox_inv = 8'hcf; 8'h8b: aes_sbox_inv = 8'hce; 8'h8c: aes_sbox_inv = 8'hf0; 8'h8d: aes_sbox_inv = 8'hb4; 8'h8e: aes_sbox_inv = 8'he6; 8'h8f: aes_sbox_inv = 8'h73;
8'h90: aes_sbox_inv = 8'h96; 8'h91: aes_sbox_inv = 8'hac; 8'h92: aes_sbox_inv = 8'h74; 8'h93: aes_sbox_inv = 8'h22; 8'h94: aes_sbox_inv = 8'he7; 8'h95: aes_sbox_inv = 8'had; 8'h96: aes_sbox_inv = 8'h35; 8'h97: aes_sbox_inv = 8'h85;
8'h98: aes_sbox_inv = 8'he2; 8'h99: aes_sbox_inv = 8'hf9; 8'h9a: aes_sbox_inv = 8'h37; 8'h9b: aes_sbox_inv = 8'he8; 8'h9c: aes_sbox_inv = 8'h1c; 8'h9d: aes_sbox_inv = 8'h75;
8'h9e: aes_sbox_inv = 8'hdf; 8'h9f: aes_sbox_inv = 8'h6e; 8'ha0: aes_sbox_inv = 8'h47; 8'ha1: aes_sbox_inv = 8'hf1; 8'ha2: aes_sbox_inv = 8'h1a; 8'ha3: aes_sbox_inv = 8'h71;
8'ha4: aes_sbox_inv = 8'h1d; 8'ha5: aes_sbox_inv = 8'h29; 8'ha6: aes_sbox_inv = 8'hc5; 8'ha7: aes_sbox_inv = 8'h89; 8'ha8: aes_sbox_inv = 8'h6f; 8'ha9: aes_sbox_inv = 8'hb7;
8'haa: aes_sbox_inv = 8'h62; 8'hab: aes_sbox_inv = 8'h0e; 8'hac: aes_sbox_inv = 8'haa; 8'had: aes_sbox_inv = 8'h18; 8'hae: aes_sbox_inv = 8'hbe; 8'haf: aes_sbox_inv = 8'h1b;
8'hb0: aes_sbox_inv = 8'hfc; 8'hb1: aes_sbox_inv = 8'h56; 8'hb2: aes_sbox_inv = 8'h3e; 8'hb3: aes_sbox_inv = 8'h4b; 8'hb4: aes_sbox_inv = 8'hc6; 8'hb5: aes_sbox_inv = 8'hd2;
8'hb6: aes_sbox_inv = 8'h79; 8'hb7: aes_sbox_inv = 8'h20; 8'hb8: aes_sbox_inv = 8'h9a; 8'hb9: aes_sbox_inv = 8'hdb; 8'hba: aes_sbox_inv = 8'hc0; 8'hbb: aes_sbox_inv = 8'hfe;
8'hbc: aes_sbox_inv = 8'h78; 8'hbd: aes_sbox_inv = 8'hcd; 8'hbe: aes_sbox_inv = 8'h5a; 8'hbf: aes_sbox_inv = 8'hf4; 8'hc0: aes_sbox_inv = 8'h1f; 8'hc1: aes_sbox_inv = 8'hdd;
8'hc2: aes_sbox_inv = 8'ha8; 8'hc3: aes_sbox_inv = 8'h33; 8'hc4: aes_sbox_inv = 8'h88; 8'hc5: aes_sbox_inv = 8'h07; 8'hc6: aes_sbox_inv = 8'hc7; 8'hc7: aes_sbox_inv = 8'h31;
8'hc8: aes_sbox_inv = 8'hb1; 8'hc9: aes_sbox_inv = 8'h12; 8'hca: aes_sbox_inv = 8'h10; 8'hcb: aes_sbox_inv = 8'h59; 8'hcc: aes_sbox_inv = 8'h27; 8'hcd: aes_sbox_inv = 8'h80;
8'hce: aes_sbox_inv = 8'hec; 8'hcf: aes_sbox_inv = 8'h5f; 8'hd0: aes_sbox_inv = 8'h60; 8'hd1: aes_sbox_inv = 8'h51; 8'hd2: aes_sbox_inv = 8'h7f; 8'hd3: aes_sbox_inv = 8'ha9;
8'hd4: aes_sbox_inv = 8'h19; 8'hd5: aes_sbox_inv = 8'hb5; 8'hd6: aes_sbox_inv = 8'h4a; 8'hd7: aes_sbox_inv = 8'h0d; 8'hd8: aes_sbox_inv = 8'h2d; 8'hd9: aes_sbox_inv = 8'he5;
8'hda: aes_sbox_inv = 8'h7a; 8'hdb: aes_sbox_inv = 8'h9f; 8'hdc: aes_sbox_inv = 8'h93; 8'hdd: aes_sbox_inv = 8'hc9; 8'hde: aes_sbox_inv = 8'h9c; 8'hdf: aes_sbox_inv = 8'hef;
8'he0: aes_sbox_inv = 8'ha0; 8'he1: aes_sbox_inv = 8'he0; 8'he2: aes_sbox_inv = 8'h3b; 8'he3: aes_sbox_inv = 8'h4d; 8'he4: aes_sbox_inv = 8'hae; 8'he5: aes_sbox_inv = 8'h2a;
8'he6: aes_sbox_inv = 8'hf5; 8'he7: aes_sbox_inv = 8'hb0; 8'he8: aes_sbox_inv = 8'hc8; 8'he9: aes_sbox_inv = 8'heb; 8'hea: aes_sbox_inv = 8'hbb; 8'heb: aes_sbox_inv = 8'h3c;
8'hec: aes_sbox_inv = 8'h83; 8'hed: aes_sbox_inv = 8'h53; 8'hee: aes_sbox_inv = 8'h99; 8'hef: aes_sbox_inv = 8'h61; 8'hf0: aes_sbox_inv = 8'h17; 8'hf1: aes_sbox_inv = 8'h2b;
8'hf2: aes_sbox_inv = 8'h04; 8'hf3: aes_sbox_inv = 8'h7e; 8'hf4: aes_sbox_inv = 8'hba; 8'hf5: aes_sbox_inv = 8'h77; 8'hf6: aes_sbox_inv = 8'hd6; 8'hf7: aes_sbox_inv = 8'h26;
8'hf8: aes_sbox_inv = 8'he1; 8'hf9: aes_sbox_inv = 8'h69; 8'hfa: aes_sbox_inv = 8'h14; 8'hfb: aes_sbox_inv = 8'h63; 8'hfc: aes_sbox_inv = 8'h55; 8'hfd: aes_sbox_inv = 8'h21;
8'hfe: aes_sbox_inv = 8'h0c; 8'hff: aes_sbox_inv = 8'h7d;
default: aes_sbox_inv = 8'h00;
8'h00: aes_sbox_inv = 8'h52;
8'h01: aes_sbox_inv = 8'h09;
8'h02: aes_sbox_inv = 8'h6a;
8'h03: aes_sbox_inv = 8'hd5;
8'h04: aes_sbox_inv = 8'h30;
8'h05: aes_sbox_inv = 8'h36;
8'h06: aes_sbox_inv = 8'ha5;
8'h07: aes_sbox_inv = 8'h38;
8'h08: aes_sbox_inv = 8'hbf;
8'h09: aes_sbox_inv = 8'h40;
8'h0a: aes_sbox_inv = 8'ha3;
8'h0b: aes_sbox_inv = 8'h9e;
8'h0c: aes_sbox_inv = 8'h81;
8'h0d: aes_sbox_inv = 8'hf3;
8'h0e: aes_sbox_inv = 8'hd7;
8'h0f: aes_sbox_inv = 8'hfb;
8'h10: aes_sbox_inv = 8'h7c;
8'h11: aes_sbox_inv = 8'he3;
8'h12: aes_sbox_inv = 8'h39;
8'h13: aes_sbox_inv = 8'h82;
8'h14: aes_sbox_inv = 8'h9b;
8'h15: aes_sbox_inv = 8'h2f;
8'h16: aes_sbox_inv = 8'hff;
8'h17: aes_sbox_inv = 8'h87;
8'h18: aes_sbox_inv = 8'h34;
8'h19: aes_sbox_inv = 8'h8e;
8'h1a: aes_sbox_inv = 8'h43;
8'h1b: aes_sbox_inv = 8'h44;
8'h1c: aes_sbox_inv = 8'hc4;
8'h1d: aes_sbox_inv = 8'hde;
8'h1e: aes_sbox_inv = 8'he9;
8'h1f: aes_sbox_inv = 8'hcb;
8'h20: aes_sbox_inv = 8'h54;
8'h21: aes_sbox_inv = 8'h7b;
8'h22: aes_sbox_inv = 8'h94;
8'h23: aes_sbox_inv = 8'h32;
8'h24: aes_sbox_inv = 8'ha6;
8'h25: aes_sbox_inv = 8'hc2;
8'h26: aes_sbox_inv = 8'h23;
8'h27: aes_sbox_inv = 8'h3d;
8'h28: aes_sbox_inv = 8'hee;
8'h29: aes_sbox_inv = 8'h4c;
8'h2a: aes_sbox_inv = 8'h95;
8'h2b: aes_sbox_inv = 8'h0b;
8'h2c: aes_sbox_inv = 8'h42;
8'h2d: aes_sbox_inv = 8'hfa;
8'h2e: aes_sbox_inv = 8'hc3;
8'h2f: aes_sbox_inv = 8'h4e;
8'h30: aes_sbox_inv = 8'h08;
8'h31: aes_sbox_inv = 8'h2e;
8'h32: aes_sbox_inv = 8'ha1;
8'h33: aes_sbox_inv = 8'h66;
8'h34: aes_sbox_inv = 8'h28;
8'h35: aes_sbox_inv = 8'hd9;
8'h36: aes_sbox_inv = 8'h24;
8'h37: aes_sbox_inv = 8'hb2;
8'h38: aes_sbox_inv = 8'h76;
8'h39: aes_sbox_inv = 8'h5b;
8'h3a: aes_sbox_inv = 8'ha2;
8'h3b: aes_sbox_inv = 8'h49;
8'h3c: aes_sbox_inv = 8'h6d;
8'h3d: aes_sbox_inv = 8'h8b;
8'h3e: aes_sbox_inv = 8'hd1;
8'h3f: aes_sbox_inv = 8'h25;
8'h40: aes_sbox_inv = 8'h72;
8'h41: aes_sbox_inv = 8'hf8;
8'h42: aes_sbox_inv = 8'hf6;
8'h43: aes_sbox_inv = 8'h64;
8'h44: aes_sbox_inv = 8'h86;
8'h45: aes_sbox_inv = 8'h68;
8'h46: aes_sbox_inv = 8'h98;
8'h47: aes_sbox_inv = 8'h16;
8'h48: aes_sbox_inv = 8'hd4;
8'h49: aes_sbox_inv = 8'ha4;
8'h4a: aes_sbox_inv = 8'h5c;
8'h4b: aes_sbox_inv = 8'hcc;
8'h4c: aes_sbox_inv = 8'h5d;
8'h4d: aes_sbox_inv = 8'h65;
8'h4e: aes_sbox_inv = 8'hb6;
8'h4f: aes_sbox_inv = 8'h92;
8'h50: aes_sbox_inv = 8'h6c;
8'h51: aes_sbox_inv = 8'h70;
8'h52: aes_sbox_inv = 8'h48;
8'h53: aes_sbox_inv = 8'h50;
8'h54: aes_sbox_inv = 8'hfd;
8'h55: aes_sbox_inv = 8'hed;
8'h56: aes_sbox_inv = 8'hb9;
8'h57: aes_sbox_inv = 8'hda;
8'h58: aes_sbox_inv = 8'h5e;
8'h59: aes_sbox_inv = 8'h15;
8'h5a: aes_sbox_inv = 8'h46;
8'h5b: aes_sbox_inv = 8'h57;
8'h5c: aes_sbox_inv = 8'ha7;
8'h5d: aes_sbox_inv = 8'h8d;
8'h5e: aes_sbox_inv = 8'h9d;
8'h5f: aes_sbox_inv = 8'h84;
8'h60: aes_sbox_inv = 8'h90;
8'h61: aes_sbox_inv = 8'hd8;
8'h62: aes_sbox_inv = 8'hab;
8'h63: aes_sbox_inv = 8'h00;
8'h64: aes_sbox_inv = 8'h8c;
8'h65: aes_sbox_inv = 8'hbc;
8'h66: aes_sbox_inv = 8'hd3;
8'h67: aes_sbox_inv = 8'h0a;
8'h68: aes_sbox_inv = 8'hf7;
8'h69: aes_sbox_inv = 8'he4;
8'h6a: aes_sbox_inv = 8'h58;
8'h6b: aes_sbox_inv = 8'h05;
8'h6c: aes_sbox_inv = 8'hb8;
8'h6d: aes_sbox_inv = 8'hb3;
8'h6e: aes_sbox_inv = 8'h45;
8'h6f: aes_sbox_inv = 8'h06;
8'h70: aes_sbox_inv = 8'hd0;
8'h71: aes_sbox_inv = 8'h2c;
8'h72: aes_sbox_inv = 8'h1e;
8'h73: aes_sbox_inv = 8'h8f;
8'h74: aes_sbox_inv = 8'hca;
8'h75: aes_sbox_inv = 8'h3f;
8'h76: aes_sbox_inv = 8'h0f;
8'h77: aes_sbox_inv = 8'h02;
8'h78: aes_sbox_inv = 8'hc1;
8'h79: aes_sbox_inv = 8'haf;
8'h7a: aes_sbox_inv = 8'hbd;
8'h7b: aes_sbox_inv = 8'h03;
8'h7c: aes_sbox_inv = 8'h01;
8'h7d: aes_sbox_inv = 8'h13;
8'h7e: aes_sbox_inv = 8'h8a;
8'h7f: aes_sbox_inv = 8'h6b;
8'h80: aes_sbox_inv = 8'h3a;
8'h81: aes_sbox_inv = 8'h91;
8'h82: aes_sbox_inv = 8'h11;
8'h83: aes_sbox_inv = 8'h41;
8'h84: aes_sbox_inv = 8'h4f;
8'h85: aes_sbox_inv = 8'h67;
8'h86: aes_sbox_inv = 8'hdc;
8'h87: aes_sbox_inv = 8'hea;
8'h88: aes_sbox_inv = 8'h97;
8'h89: aes_sbox_inv = 8'hf2;
8'h8a: aes_sbox_inv = 8'hcf;
8'h8b: aes_sbox_inv = 8'hce;
8'h8c: aes_sbox_inv = 8'hf0;
8'h8d: aes_sbox_inv = 8'hb4;
8'h8e: aes_sbox_inv = 8'he6;
8'h8f: aes_sbox_inv = 8'h73;
8'h90: aes_sbox_inv = 8'h96;
8'h91: aes_sbox_inv = 8'hac;
8'h92: aes_sbox_inv = 8'h74;
8'h93: aes_sbox_inv = 8'h22;
8'h94: aes_sbox_inv = 8'he7;
8'h95: aes_sbox_inv = 8'had;
8'h96: aes_sbox_inv = 8'h35;
8'h97: aes_sbox_inv = 8'h85;
8'h98: aes_sbox_inv = 8'he2;
8'h99: aes_sbox_inv = 8'hf9;
8'h9a: aes_sbox_inv = 8'h37;
8'h9b: aes_sbox_inv = 8'he8;
8'h9c: aes_sbox_inv = 8'h1c;
8'h9d: aes_sbox_inv = 8'h75;
8'h9e: aes_sbox_inv = 8'hdf;
8'h9f: aes_sbox_inv = 8'h6e;
8'ha0: aes_sbox_inv = 8'h47;
8'ha1: aes_sbox_inv = 8'hf1;
8'ha2: aes_sbox_inv = 8'h1a;
8'ha3: aes_sbox_inv = 8'h71;
8'ha4: aes_sbox_inv = 8'h1d;
8'ha5: aes_sbox_inv = 8'h29;
8'ha6: aes_sbox_inv = 8'hc5;
8'ha7: aes_sbox_inv = 8'h89;
8'ha8: aes_sbox_inv = 8'h6f;
8'ha9: aes_sbox_inv = 8'hb7;
8'haa: aes_sbox_inv = 8'h62;
8'hab: aes_sbox_inv = 8'h0e;
8'hac: aes_sbox_inv = 8'haa;
8'had: aes_sbox_inv = 8'h18;
8'hae: aes_sbox_inv = 8'hbe;
8'haf: aes_sbox_inv = 8'h1b;
8'hb0: aes_sbox_inv = 8'hfc;
8'hb1: aes_sbox_inv = 8'h56;
8'hb2: aes_sbox_inv = 8'h3e;
8'hb3: aes_sbox_inv = 8'h4b;
8'hb4: aes_sbox_inv = 8'hc6;
8'hb5: aes_sbox_inv = 8'hd2;
8'hb6: aes_sbox_inv = 8'h79;
8'hb7: aes_sbox_inv = 8'h20;
8'hb8: aes_sbox_inv = 8'h9a;
8'hb9: aes_sbox_inv = 8'hdb;
8'hba: aes_sbox_inv = 8'hc0;
8'hbb: aes_sbox_inv = 8'hfe;
8'hbc: aes_sbox_inv = 8'h78;
8'hbd: aes_sbox_inv = 8'hcd;
8'hbe: aes_sbox_inv = 8'h5a;
8'hbf: aes_sbox_inv = 8'hf4;
8'hc0: aes_sbox_inv = 8'h1f;
8'hc1: aes_sbox_inv = 8'hdd;
8'hc2: aes_sbox_inv = 8'ha8;
8'hc3: aes_sbox_inv = 8'h33;
8'hc4: aes_sbox_inv = 8'h88;
8'hc5: aes_sbox_inv = 8'h07;
8'hc6: aes_sbox_inv = 8'hc7;
8'hc7: aes_sbox_inv = 8'h31;
8'hc8: aes_sbox_inv = 8'hb1;
8'hc9: aes_sbox_inv = 8'h12;
8'hca: aes_sbox_inv = 8'h10;
8'hcb: aes_sbox_inv = 8'h59;
8'hcc: aes_sbox_inv = 8'h27;
8'hcd: aes_sbox_inv = 8'h80;
8'hce: aes_sbox_inv = 8'hec;
8'hcf: aes_sbox_inv = 8'h5f;
8'hd0: aes_sbox_inv = 8'h60;
8'hd1: aes_sbox_inv = 8'h51;
8'hd2: aes_sbox_inv = 8'h7f;
8'hd3: aes_sbox_inv = 8'ha9;
8'hd4: aes_sbox_inv = 8'h19;
8'hd5: aes_sbox_inv = 8'hb5;
8'hd6: aes_sbox_inv = 8'h4a;
8'hd7: aes_sbox_inv = 8'h0d;
8'hd8: aes_sbox_inv = 8'h2d;
8'hd9: aes_sbox_inv = 8'he5;
8'hda: aes_sbox_inv = 8'h7a;
8'hdb: aes_sbox_inv = 8'h9f;
8'hdc: aes_sbox_inv = 8'h93;
8'hdd: aes_sbox_inv = 8'hc9;
8'hde: aes_sbox_inv = 8'h9c;
8'hdf: aes_sbox_inv = 8'hef;
8'he0: aes_sbox_inv = 8'ha0;
8'he1: aes_sbox_inv = 8'he0;
8'he2: aes_sbox_inv = 8'h3b;
8'he3: aes_sbox_inv = 8'h4d;
8'he4: aes_sbox_inv = 8'hae;
8'he5: aes_sbox_inv = 8'h2a;
8'he6: aes_sbox_inv = 8'hf5;
8'he7: aes_sbox_inv = 8'hb0;
8'he8: aes_sbox_inv = 8'hc8;
8'he9: aes_sbox_inv = 8'heb;
8'hea: aes_sbox_inv = 8'hbb;
8'heb: aes_sbox_inv = 8'h3c;
8'hec: aes_sbox_inv = 8'h83;
8'hed: aes_sbox_inv = 8'h53;
8'hee: aes_sbox_inv = 8'h99;
8'hef: aes_sbox_inv = 8'h61;
8'hf0: aes_sbox_inv = 8'h17;
8'hf1: aes_sbox_inv = 8'h2b;
8'hf2: aes_sbox_inv = 8'h04;
8'hf3: aes_sbox_inv = 8'h7e;
8'hf4: aes_sbox_inv = 8'hba;
8'hf5: aes_sbox_inv = 8'h77;
8'hf6: aes_sbox_inv = 8'hd6;
8'hf7: aes_sbox_inv = 8'h26;
8'hf8: aes_sbox_inv = 8'he1;
8'hf9: aes_sbox_inv = 8'h69;
8'hfa: aes_sbox_inv = 8'h14;
8'hfb: aes_sbox_inv = 8'h63;
8'hfc: aes_sbox_inv = 8'h55;
8'hfd: aes_sbox_inv = 8'h21;
8'hfe: aes_sbox_inv = 8'h0c;
8'hff: aes_sbox_inv = 8'h7d;
default: aes_sbox_inv = 8'h00;

8'hfe: aes_sbox_inv = 8'h0c; 8'hff: aes_sbox_inv = 8'h7d;
default: aes_sbox_inv = 8'h00;
endcase
endfunction

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
endfunction
endfunction

(gfmul(x[7:0], 4'hE) ^ gfmul(x[15:8], 4'hB) ^ gfmul(x[23:16], 4'hD) ^ gfmul(x[31:24], 4'h9))};
endfunction
// GF multiplication
function logic [7:0] gfmul(input logic [7:0] x, input logic [3:0] y);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
function logic [7:0] gfmul(input logic [7:0] x, input logic [3:0] y);
function logic [7:0] gfmul(input logic [7:0] x, input logic [3:0] y);

Comment on lines 977 to 978
temp = (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);
result ^= (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
temp = (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);
result ^= (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);
temp = (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);
result ^= (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);

Comment on lines 981 to 983
temp = (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);
temp = (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);
result ^= temp;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
temp = (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);
temp = (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);
result ^= temp;
temp = (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);
temp = (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);
result ^= temp;

Comment on lines 986 to 989
temp = (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);
temp = (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);
temp = (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);
result ^= temp;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
temp = (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);
temp = (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);
temp = (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);
result ^= temp;
temp = (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);
temp = (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);
temp = (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);
result ^= temp;

result ^= temp;
end
return result;
endfunction

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
endfunction
endfunction

result = 8'h00;
if (y[0]) result ^= x;
if (y[1]) begin
result ^= ((x << 1) ^ ((x[7]) ? 8'h1B : 8'h00));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
result ^= ((x << 1) ^ ((x[7]) ? 8'h1B : 8'h00));
result ^= ((x << 1) ^ ((x[7]) ? 8'h1B : 8'h00));

Comment on lines 882 to 883
temp = (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);
result ^= (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
temp = (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);
result ^= (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);
temp = (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);
result ^= (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);

Comment on lines 886 to 888
temp = (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);
temp = (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);
result ^= (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
temp = (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);
temp = (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);
result ^= (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);
temp = (x << 1) ^ ((x[7]) ? 8'h1B : 8'h00);
temp = (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);
result ^= (temp << 1) ^ ((temp[7]) ? 8'h1B : 8'h00);

return result;
endfunction
// AES Sbox Forward
function automatic logic [7:0] aes_sbox_fwd(input logic [7:0] in_byte);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
function automatic logic [7:0] aes_sbox_fwd(input logic [7:0] in_byte);
function automatic logic [7:0] aes_sbox_fwd(input logic [7:0] in_byte);

Comment on lines 896 to 897
logic [7:0] compressed;
expanded = linear_top_layer(in_byte);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
logic [7:0] compressed;
expanded = linear_top_layer(in_byte);
logic [ 7:0] compressed;
expanded = linear_top_layer(in_byte);

non_linear = non_linear_layer(expanded);
compressed = linear_bottom_layer(non_linear);
aes_sbox_fwd = compressed;
endfunction

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
endfunction
endfunction

Comment on lines 955 to 957
endfunction
// AES Sbox Forward Bottom Layer
function automatic logic [7:0] linear_bottom_layer(input logic [17:0] x);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
endfunction
// AES Sbox Forward Bottom Layer
function automatic logic [7:0] linear_bottom_layer(input logic [17:0] x);
endfunction
// AES Sbox Forward Bottom Layer
function automatic logic [7:0] linear_bottom_layer(input logic [17:0] x);

Comment on lines 962 to 963
y[3] = (((x[11] ^ x[12]) ^ (x[0] ^ x[6])) ^ ((x[15] ^ x[5]) ^ (x[16] ^ x[1])));
y[4] = ((x[12] ^ (x[17] ^ x[11])) ^ ((x[0] ^ x[6]) ^ (x[14] ^ (x[15] ^ x[5]))));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
y[3] = (((x[11] ^ x[12]) ^ (x[0] ^ x[6])) ^ ((x[15] ^ x[5]) ^ (x[16] ^ x[1])));
y[4] = ((x[12] ^ (x[17] ^ x[11])) ^ ((x[0] ^ x[6]) ^ (x[14] ^ (x[15] ^ x[5]))));
y[3] = (((x[11] ^ x[12]) ^ (x[0] ^ x[6])) ^ ((x[15] ^ x[5]) ^ (x[16] ^ x[1])));
y[4] = ((x[12] ^ (x[17] ^ x[11])) ^ ((x[0] ^ x[6]) ^ (x[14] ^ (x[15] ^ x[5]))));

y[4] = ((x[12] ^ (x[17] ^ x[11])) ^ ((x[0] ^ x[6]) ^ (x[14] ^ (x[15] ^ x[5]))));
y[5] = ((x[13] ^ (x[4] ^ x[8])) ^~ ((x[10] ^ (x[14] ^ x[16])) ^ (x[2] ^ x[11])));
y[6] = ((x[6] ^ (x[11] ^ x[12])) ^~ ((x[14] ^ (x[15] ^ x[5])) ^ (x[2] ^ x[3])));
y[7] = ((x[12] ^ (x[17] ^ x[11])) ^ ((x[5] ^ (x[0] ^ x[6])) ^ (x[2] ^ x[3])));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
y[7] = ((x[12] ^ (x[17] ^ x[11])) ^ ((x[5] ^ (x[0] ^ x[6])) ^ (x[2] ^ x[3])));
y[7] = ((x[12] ^ (x[17] ^ x[11])) ^ ((x[5] ^ (x[0] ^ x[6])) ^ (x[2] ^ x[3])));

Comment on lines 968 to 981
endfunction
// AES Sbox Inverse Top Layer
function automatic logic [20:0] aes_sbox_inv_top(input logic [7:0] x);
return { ((x[4] ^ x[3]) ^ (x[2] ^~ x[1])), (x[5] ^~ (x[4] ^ x[3])), (x[3] ^~ x[0]),
(x[7] ^ x[4]), (x[6] ^~ x[4]), ((x[3] ^~ x[0]) ^ (x[6] ^ x[1])), ((x[6] ^~ x[4]) ^ (x[1] ^ x[0])),
(x[5] ^~ ((x[6] ^~ x[4]) ^ (x[1] ^ x[0]))), ((x[6] ^ x[1]) ^ (x[5] ^~ x[3])),
(((x[7] ^~ x[6]) ^ (x[3] ^~ x[0])) ^ ((x[4] ^ x[3]) ^ (x[2] ^~ x[1]))),
(((x[7] ^~ x[6]) ^ (x[3] ^~ x[0])) ^ (x[2] ^~ x[1])),
((x[7] ^~ x[6]) ^ (x[1] ^ x[0])), ((x[7] ^~ x[6]) ^ (x[3] ^~ x[0])), (x[0] ^~ (x[4] ^ x[3])),
(x[6] ^~ (x[7] ^ x[4])), ((x[6] ^~ x[4]) ^ (x[5] ^~ x[2])), (x[3] ^ (x[6] ^~ (x[7] ^ x[4]))),
((x[4] ^ x[3]) ^ (x[1] ^ x[0])), (x[7] ^~ x[6]), (x[4] ^ x[3]), (x[7] ^ (x[5] ^~ x[2])) };
endfunction
// AES Sbox Inverse Bottom Layer
function automatic logic [7:0] aes_sbox_inv_out(input logic [17:0] x);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
endfunction
// AES Sbox Inverse Top Layer
function automatic logic [20:0] aes_sbox_inv_top(input logic [7:0] x);
return { ((x[4] ^ x[3]) ^ (x[2] ^~ x[1])), (x[5] ^~ (x[4] ^ x[3])), (x[3] ^~ x[0]),
(x[7] ^ x[4]), (x[6] ^~ x[4]), ((x[3] ^~ x[0]) ^ (x[6] ^ x[1])), ((x[6] ^~ x[4]) ^ (x[1] ^ x[0])),
(x[5] ^~ ((x[6] ^~ x[4]) ^ (x[1] ^ x[0]))), ((x[6] ^ x[1]) ^ (x[5] ^~ x[3])),
(((x[7] ^~ x[6]) ^ (x[3] ^~ x[0])) ^ ((x[4] ^ x[3]) ^ (x[2] ^~ x[1]))),
(((x[7] ^~ x[6]) ^ (x[3] ^~ x[0])) ^ (x[2] ^~ x[1])),
((x[7] ^~ x[6]) ^ (x[1] ^ x[0])), ((x[7] ^~ x[6]) ^ (x[3] ^~ x[0])), (x[0] ^~ (x[4] ^ x[3])),
(x[6] ^~ (x[7] ^ x[4])), ((x[6] ^~ x[4]) ^ (x[5] ^~ x[2])), (x[3] ^ (x[6] ^~ (x[7] ^ x[4]))),
((x[4] ^ x[3]) ^ (x[1] ^ x[0])), (x[7] ^~ x[6]), (x[4] ^ x[3]), (x[7] ^ (x[5] ^~ x[2])) };
endfunction
// AES Sbox Inverse Bottom Layer
function automatic logic [7:0] aes_sbox_inv_out(input logic [17:0] x);
endfunction
// AES Sbox Inverse Top Layer
function automatic logic [20:0] aes_sbox_inv_top(input logic [7:0] x);
return {
((x[4] ^ x[3]) ^ (x[2] ^~ x[1])),
(x[5] ^~ (x[4] ^ x[3])),
(x[3] ^~ x[0]),
(x[7] ^ x[4]),
(x[6] ^~ x[4]),
((x[3] ^~ x[0]) ^ (x[6] ^ x[1])),
((x[6] ^~ x[4]) ^ (x[1] ^ x[0])),
(x[5] ^~ ((x[6] ^~ x[4]) ^ (x[1] ^ x[0]))),
((x[6] ^ x[1]) ^ (x[5] ^~ x[3])),
(((x[7] ^~ x[6]) ^ (x[3] ^~ x[0])) ^ ((x[4] ^ x[3]) ^ (x[2] ^~ x[1]))),
(((x[7] ^~ x[6]) ^ (x[3] ^~ x[0])) ^ (x[2] ^~ x[1])),
((x[7] ^~ x[6]) ^ (x[1] ^ x[0])),
((x[7] ^~ x[6]) ^ (x[3] ^~ x[0])),
(x[0] ^~ (x[4] ^ x[3])),
(x[6] ^~ (x[7] ^ x[4])),
((x[6] ^~ x[4]) ^ (x[5] ^~ x[2])),
(x[3] ^ (x[6] ^~ (x[7] ^ x[4]))),
((x[4] ^ x[3]) ^ (x[1] ^ x[0])),
(x[7] ^~ x[6]),
(x[4] ^ x[3]),
(x[7] ^ (x[5] ^~ x[2]))
};
endfunction
// AES Sbox Inverse Bottom Layer
function automatic logic [7:0] aes_sbox_inv_out(input logic [17:0] x);

y[6] = (((x[5] ^ x[13]) ^ ((x[2] ^ x[11]) ^ (x[15] ^ x[0]))) ^ ((x[4] ^ x[9]) ^ ((x[16] ^ x[6]) ^ (x[17] ^ x[10]))));
y[7] = ((x[17] ^ x[1]) ^ ((x[4] ^ x[12]) ^ ((x[2] ^ x[11]) ^ (x[8] ^ x[9]))));
return y;
endfunction

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
endfunction
endfunction

@munailwaqar munailwaqar changed the title Adding support for Scalar Cryptography Extension (Crossbar permutation instructions, Zbkx) Adding support for Scalar Cryptography Extensions (Zbkx, Zkne, Zknd) Feb 10, 2025
core/cva6.sv Outdated
@@ -823,6 +825,7 @@ module cva6
.flu_ready_i (flu_ready_ex_id),
// ALU
.alu_valid_o (alu_valid_id_ex),
.aes_valid_o (aes_valid_id_ex),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
.aes_valid_o (aes_valid_id_ex),
.aes_valid_o (aes_valid_id_ex),

core/decoder.sv Outdated
Comment on lines 812 to 813
end
else illegal_instr_bm = 1'b1;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
end
else illegal_instr_bm = 1'b1;
end else illegal_instr_bm = 1'b1;

core/decoder.sv Outdated
Comment on lines 821 to 822
end
else illegal_instr_bm = 1'b1;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
end
else illegal_instr_bm = 1'b1;
end else illegal_instr_bm = 1'b1;

core/decoder.sv Outdated
Comment on lines 830 to 831
end
else illegal_instr_bm = 1'b1;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
end
else illegal_instr_bm = 1'b1;
end else illegal_instr_bm = 1'b1;

core/decoder.sv Outdated
Comment on lines 845 to 846
end
else illegal_instr_bm = 1'b1;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
end
else illegal_instr_bm = 1'b1;
end else illegal_instr_bm = 1'b1;

core/ex_stage.sv Outdated
Comment on lines 724 to 733
aes_fu #(
.CVA6Cfg (CVA6Cfg),
.fu_data_t(fu_data_t)
) aes_fu_i (
.clk_i,
.rst_ni,
.fu_data_i (one_cycle_data),
.result_o (aes_result),
.orig_instr_aes (orig_instr_aes_i)
);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
aes_fu #(
.CVA6Cfg (CVA6Cfg),
.fu_data_t(fu_data_t)
) aes_fu_i (
.clk_i,
.rst_ni,
.fu_data_i (one_cycle_data),
.result_o (aes_result),
.orig_instr_aes (orig_instr_aes_i)
);
aes_fu #(
.CVA6Cfg (CVA6Cfg),
.fu_data_t(fu_data_t)
) aes_fu_i (
.clk_i,
.rst_ni,
.fu_data_i (one_cycle_data),
.result_o (aes_result),
.orig_instr_aes(orig_instr_aes_i)
);

@@ -196,7 +196,8 @@ package ariane_pkg;
FPU, // 7
FPU_VEC, // 8
CVXIF, // 9
ACCEL // 10
ACCEL, // 10
AES // 11

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
AES // 11
AES // 11

@@ -781,6 +786,7 @@ module issue_read_operands
always_ff @(posedge clk_i or negedge rst_ni) begin
if (!rst_ni) begin
alu_valid_q <= '0;
aes_valid_q <= '0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
aes_valid_q <= '0;
aes_valid_q <= '0;

@@ -791,6 +797,7 @@ module issue_read_operands
branch_valid_q <= '0;
end else begin
alu_valid_q <= '0;
aes_valid_q <= '0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
aes_valid_q <= '0;
aes_valid_q <= '0;

@@ -266,6 +269,7 @@ module issue_stage
.is_compressed_instr_o,
.flu_ready_i (flu_ready_i),
.alu_valid_o (alu_valid_o),
.aes_valid_o (aes_valid_o),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
.aes_valid_o (aes_valid_o),
.aes_valid_o (aes_valid_o),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant