Skip to content

Commit

Permalink
[regfile] Add countermeasure label
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Schaffner <[email protected]>
  • Loading branch information
msfschaffner committed Apr 13, 2022
1 parent cfd9b45 commit ccc9bef
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions rtl/ibex_register_file_ff.sv
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ module ibex_register_file_ff #(
end
end

// SEC_CM: DATA_REG_SW.GLITCH_DETECT
// This checks for spurious WE strobes on the regfile.
if (WrenCheck) begin : gen_wren_check
// Buffer the decoded write enable bits so that the checker
Expand Down
1 change: 1 addition & 0 deletions rtl/ibex_register_file_fpga.sv
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ module ibex_register_file_fpga #(
// we select
assign we = (waddr_a_i == '0) ? 1'b0 : we_a_i;

// SEC_CM: DATA_REG_SW.GLITCH_DETECT
// This checks for spurious WE strobes on the regfile.
if (WrenCheck) begin : gen_wren_check
// Since the FPGA uses a memory macro, there is only one write-enable strobe to check.
Expand Down
1 change: 1 addition & 0 deletions rtl/ibex_register_file_latch.sv
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ module ibex_register_file_latch #(
end
end

// SEC_CM: DATA_REG_SW.GLITCH_DETECT
// This checks for spurious WE strobes on the regfile.
if (WrenCheck) begin : gen_wren_check
// Buffer the decoded write enable bits so that the checker
Expand Down
3 changes: 3 additions & 0 deletions rtl/ibex_top.sv
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ module ibex_top import ibex_pkg::*; #(
.RV32E (RV32E),
.DataWidth (RegFileDataWidth),
.DummyInstructions(DummyInstructions),
// SEC_CM: DATA_REG_SW.GLITCH_DETECT
.WrenCheck (RegFileWrenCheck),
.WordZeroVal (RegFileDataWidth'(prim_secded_pkg::SecdedInv3932ZeroWord))
) register_file_i (
Expand All @@ -407,6 +408,7 @@ module ibex_top import ibex_pkg::*; #(
.RV32E (RV32E),
.DataWidth (RegFileDataWidth),
.DummyInstructions(DummyInstructions),
// SEC_CM: DATA_REG_SW.GLITCH_DETECT
.WrenCheck (RegFileWrenCheck),
.WordZeroVal (RegFileDataWidth'(prim_secded_pkg::SecdedInv3932ZeroWord))
) register_file_i (
Expand All @@ -430,6 +432,7 @@ module ibex_top import ibex_pkg::*; #(
.RV32E (RV32E),
.DataWidth (RegFileDataWidth),
.DummyInstructions(DummyInstructions),
// SEC_CM: DATA_REG_SW.GLITCH_DETECT
.WrenCheck (RegFileWrenCheck),
.WordZeroVal (RegFileDataWidth'(prim_secded_pkg::SecdedInv3932ZeroWord))
) register_file_i (
Expand Down

0 comments on commit ccc9bef

Please sign in to comment.