hw/ip/aes/rtl/aes_sbox.sv Cov: 73%

   1: // Copyright lowRISC contributors.
   2: // Licensed under the Apache License, Version 2.0, see LICENSE for details.
   3: // SPDX-License-Identifier: Apache-2.0
   4: //
   5: // AES SBox
   6: 
   7: module aes_sbox #(
   8:   parameter SBoxImpl = "lut"
   9: ) (
  10:   input  aes_pkg::mode_e mode_i,
  11:   input  logic [7:0]     data_i,
  12:   output logic [7:0]     data_o
  13: );
  14: 
  15:   if (SBoxImpl == "lut") begin : gen_sbox_lut
  16:     aes_sbox_lut aes_sbox (
  17:       .mode_i,
  18:       .data_i,
  19:       .data_o
  20:     );
  21:   end else if (SBoxImpl == "canright") begin : gen_sbox_canright
  22:     aes_sbox_canright aes_sbox (
  23:       .mode_i,
  24:       .data_i,
  25:       .data_o
  26:     );
  27:   end
  28: 
  29: endmodule
  30: