From 71630d1426693724c949ccc02bbb2705493f9352 Mon Sep 17 00:00:00 2001 From: Pascal Nasahl Date: Thu, 14 Nov 2024 17:23:08 +0100 Subject: [PATCH] [rv_core_ibex, top_earlgrey] Enable SecureIbex for CW340 As the `SecureIbex` configuration is the one we use for the Earl Grey ASIC, we also should enable it for the FPGA boards. Due to resource constraints, this is only possible for the CW340 but not the CW310. Resource utilization stays still will below 70%. Closes lowRISC/opentitan#25137 Signed-off-by: Pascal Nasahl --- hw/top_earlgrey/rtl/autogen/chip_earlgrey_cw310.sv | 2 +- hw/top_earlgrey/rtl/autogen/chip_earlgrey_cw340.sv | 2 +- hw/top_earlgrey/templates/chiplevel.sv.tpl | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/top_earlgrey/rtl/autogen/chip_earlgrey_cw310.sv b/hw/top_earlgrey/rtl/autogen/chip_earlgrey_cw310.sv index bfd5bd5c4c4b8..23e42dd0bee1d 100644 --- a/hw/top_earlgrey/rtl/autogen/chip_earlgrey_cw310.sv +++ b/hw/top_earlgrey/rtl/autogen/chip_earlgrey_cw310.sv @@ -1079,9 +1079,9 @@ module chip_earlgrey_cw310 #( .KeymgrKmacEnMasking(0), .SecKmacCmdDelay(0), .SecKmacIdleAcceptSwMsg(1'b0), + .RvCoreIbexSecureIbex(0), .RomCtrlBootRomInitFile(BootRomInitFile), .RvCoreIbexRegFile(ibex_pkg::RegFileFPGA), - .RvCoreIbexSecureIbex(0), .SramCtrlMainInstrExec(1), .PinmuxAonTargetCfg(PinmuxTargetCfg) ) top_earlgrey ( diff --git a/hw/top_earlgrey/rtl/autogen/chip_earlgrey_cw340.sv b/hw/top_earlgrey/rtl/autogen/chip_earlgrey_cw340.sv index b8b6c1f55e83c..bfa1e2e05e367 100644 --- a/hw/top_earlgrey/rtl/autogen/chip_earlgrey_cw340.sv +++ b/hw/top_earlgrey/rtl/autogen/chip_earlgrey_cw340.sv @@ -1063,9 +1063,9 @@ module chip_earlgrey_cw340 #( .KmacEnMasking(1), .KmacSwKeyMasked(1), .KeymgrKmacEnMasking(1), + .RvCoreIbexSecureIbex(1), .RomCtrlBootRomInitFile(BootRomInitFile), .RvCoreIbexRegFile(ibex_pkg::RegFileFPGA), - .RvCoreIbexSecureIbex(0), .SramCtrlMainInstrExec(1), .PinmuxAonTargetCfg(PinmuxTargetCfg) ) top_earlgrey ( diff --git a/hw/top_earlgrey/templates/chiplevel.sv.tpl b/hw/top_earlgrey/templates/chiplevel.sv.tpl index 97d219c1d83f3..e07d3252e3d64 100644 --- a/hw/top_earlgrey/templates/chiplevel.sv.tpl +++ b/hw/top_earlgrey/templates/chiplevel.sv.tpl @@ -1148,6 +1148,7 @@ module chip_${top["name"]}_${target["name"]} #( .SecAesAllowForcingMasks(1'b1), .SecAesSkipPRNGReseeding(1'b1), .UsbdevStub(1'b1), + .RvCoreIbexSecureIbex(0), % else: .SecAesMasking(1'b0), .SecAesSBoxImpl(aes_pkg::SBoxImplLut), @@ -1168,16 +1169,17 @@ module chip_${top["name"]}_${target["name"]} #( .KmacEnMasking(1), .KmacSwKeyMasked(1), .KeymgrKmacEnMasking(1), + .RvCoreIbexSecureIbex(1), % elif target["name"] == "cw310": .KmacEnMasking(0), .KmacSwKeyMasked(1), .KeymgrKmacEnMasking(0), .SecKmacCmdDelay(0), .SecKmacIdleAcceptSwMsg(1'b0), + .RvCoreIbexSecureIbex(0), % endif .RomCtrlBootRomInitFile(BootRomInitFile), .RvCoreIbexRegFile(ibex_pkg::RegFileFPGA), - .RvCoreIbexSecureIbex(0), .SramCtrlMainInstrExec(1), .PinmuxAonTargetCfg(PinmuxTargetCfg) ) top_${top["name"]} (