[ibex_top] Use correct ECC codeword for '0 reset in regfile

Signed-off-by: Michael Schaffner <msf@google.com>
This commit is contained in:
Michael Schaffner 2021-12-07 19:46:39 -08:00 committed by Greg Chadwick
parent 804c538db2
commit 5350c13ae3

View file

@ -308,16 +308,12 @@ module ibex_top import ibex_pkg::*; #(
// Register file Instantiation //
/////////////////////////////////
// We're using an inverted Hsiao code, hence we need to reset
// the regfile ECC bits to 1.
localparam logic [RegFileDataWidth-1:0] WordZeroVal = RegFileDataWidth'({7'h7f, 32'h0});
if (RegFile == RegFileFF) begin : gen_regfile_ff
ibex_register_file_ff #(
.RV32E (RV32E),
.DataWidth (RegFileDataWidth),
.DummyInstructions(DummyInstructions),
.WordZeroVal (WordZeroVal)
.WordZeroVal (RegFileDataWidth'(prim_secded_pkg::SecdedInv3932ZeroWord))
) register_file_i (
.clk_i (clk),
.rst_ni(rst_ni),
@ -338,7 +334,7 @@ module ibex_top import ibex_pkg::*; #(
.RV32E (RV32E),
.DataWidth (RegFileDataWidth),
.DummyInstructions(DummyInstructions),
.WordZeroVal (WordZeroVal)
.WordZeroVal (RegFileDataWidth'(prim_secded_pkg::SecdedInv3932ZeroWord))
) register_file_i (
.clk_i (clk),
.rst_ni(rst_ni),
@ -359,7 +355,7 @@ module ibex_top import ibex_pkg::*; #(
.RV32E (RV32E),
.DataWidth (RegFileDataWidth),
.DummyInstructions(DummyInstructions),
.WordZeroVal (WordZeroVal)
.WordZeroVal (RegFileDataWidth'(prim_secded_pkg::SecdedInv3932ZeroWord))
) register_file_i (
.clk_i (clk),
.rst_ni(rst_ni),