diff --git a/src/ieu/kmu/zknde64.sv b/src/ieu/kmu/zknde64.sv index 51d997c12..2a6bed34a 100644 --- a/src/ieu/kmu/zknde64.sv +++ b/src/ieu/kmu/zknde64.sv @@ -38,12 +38,15 @@ module zknde64 import cvw::*; #(parameter cvw_t P) ( if (P.ZKND_SUPPORTED) // ZKND supports aes64ds, aes64dsm, aes64im aes64d aes64d(.rs1(A), .rs2(B), .finalround(ZKNSelect[2]), .aes64im(ZKNSelect[3]), .result(aes64dRes)); // decode AES + else assign aes64dRes = '0; if (P.ZKNE_SUPPORTED) begin // ZKNE supports aes64es, aes64esm aes64e aes64e(.rs1(A), .rs2(B), .finalround(ZKNSelect[2]), .Sbox0Out, .SboxEIn, .result(aes64eRes)); mux2 #(32) sboxmux(SboxEIn, SboxKIn, ZKNSelect[1], Sbox0In); - end else + end else begin + assign aes64dRes = '0; assign Sbox0In = SboxKIn; - + end + // One S Box is always needed for aes64ks1i and is also needed for aes64e if that is supported. Put it at the top level to allow sharing aessbox32 sbox(Sbox0In, Sbox0Out); // Substitute bytes of value obtained for tmp2 using Rijndael sbox