From bfb5a5bd6949d4a1b5d99fb24e07d885de7d472a Mon Sep 17 00:00:00 2001 From: Pirmin Vogel Date: Thu, 22 Aug 2024 13:27:11 +0200 Subject: [PATCH] [top_earlgrey] Reduce number of PRINCE half rounds for main SRAM This commit reduces the number of PRINCE half rounds for the scrambling of the main SRAM to 2 half rounds as used in the past. This is done to reduce timing pressure. Signed-off-by: Pirmin Vogel --- hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson | 3 ++- hw/top_earlgrey/data/top_earlgrey.hjson | 1 + hw/top_earlgrey/rtl/autogen/top_earlgrey.sv | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson b/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson index fb1d7c03d25bb..3428d20d4bf31 100644 --- a/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson +++ b/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson @@ -7265,6 +7265,7 @@ param_decl: { InstrExec: "1" + NumPrinceRoundsHalf: "2" } base_addrs: { @@ -7353,7 +7354,7 @@ name: NumPrinceRoundsHalf desc: Number of PRINCE half rounds for the SRAM scrambling feature type: int - default: "3" + default: "2" expose: "true" name_top: SramCtrlMainNumPrinceRoundsHalf } diff --git a/hw/top_earlgrey/data/top_earlgrey.hjson b/hw/top_earlgrey/data/top_earlgrey.hjson index 114208178c3ce..b2e8c38bb38a8 100644 --- a/hw/top_earlgrey/data/top_earlgrey.hjson +++ b/hw/top_earlgrey/data/top_earlgrey.hjson @@ -727,6 +727,7 @@ reset_connections: {rst_ni: "lc", rst_otp_ni: "lc_io_div4"}, param_decl: { InstrExec: "1", + NumPrinceRoundsHalf: "2", }, base_addrs: {regs: "0x411C0000", ram: "0x10000000"}, // Memory regions must be associated with a dedicated diff --git a/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv b/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv index c21b9b60e4db5..7bbfb7875374c 100644 --- a/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv +++ b/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv @@ -97,7 +97,7 @@ module top_earlgrey #( // parameters for edn1 // parameters for sram_ctrl_main parameter bit SramCtrlMainInstrExec = 1, - parameter int SramCtrlMainNumPrinceRoundsHalf = 3, + parameter int SramCtrlMainNumPrinceRoundsHalf = 2, // parameters for rom_ctrl parameter RomCtrlBootRomInitFile = "", parameter bit SecRomCtrlDisableScrambling = 1'b0,