Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
1f3240c
HMR: Add initial wrapper structure
micprog Dec 22, 2022
3fd6d90
Integrated ECC-protected Recovery RF.
micprog May 8, 2023
dd734c0
Fix TMR and DMR assignments
micprog Jan 27, 2023
e1cbb4b
Add RapidRecovery parameter to en-/disable backup RF
micprog Jan 27, 2023
c577999
Added clock gating to lock unfaulty cores during recovery routine.
Jan 27, 2023
256a2cb
Add parameter documentation
micprog Jan 27, 2023
28eb908
Update TMR signalling
micprog Jan 30, 2023
c8eada6
Update signal alignments
micprog Jan 31, 2023
ee3ede5
Add individual dmr controller (separated rapid-recovery)
micprog Jan 31, 2023
5fe050e
Add dmr and rapid-recovery configuration registers
micprog Jan 31, 2023
47240d9
Update header file generation
micprog Feb 1, 2023
97dfe42
Fix configurable rapid-recovery assignments
micprog Feb 1, 2023
1ec034f
Fix connections for rapid-recovery
micprog Feb 1, 2023
eefb04a
Generating correct offsets in RF address generator.
Feb 1, 2023
a13cb88
Properly connecting rapid recovery controller signals to recovery PC.
Feb 2, 2023
25ae502
Update shared_id selection for only TMR support
micprog Feb 2, 2023
460a50d
Add synch request signals
micprog Feb 3, 2023
aca5789
Move SP store reg from tmr to core registers
micprog Feb 3, 2023
452ecdf
Merged CSRs backup and recovery.
micprog May 8, 2023
dbe9aa5
Add multibit setback, enable ungroup setback
micprog Feb 6, 2023
4094c7e
Continually back up cores in interleaved mode
micprog Feb 6, 2023
48cd23b
Fix setback signals for proper ungrouping
micprog Feb 6, 2023
31fc34f
Making cleaner assignments for main_dmr_out bus.
micprog Feb 8, 2023
28440dc
Adding first support for TMR rapid recovery (to be fixed).
micprog Feb 8, 2023
5195870
Ensure sw_synch interrupt stays 0 before boot
micprog Feb 8, 2023
83c395c
Add response suppress module
micprog Feb 9, 2023
580d4d4
TMR: only trigger a single interrupt
micprog Feb 9, 2023
2496a6d
DMR: only trigger a single interrupt
micprog Feb 9, 2023
fe2324f
TMR: buffer cores_synch signal
micprog Feb 9, 2023
97bb5fc
Connect rapid recovery synch signals
micprog Feb 10, 2023
00e190c
HMR: fix minor DMR naming error
micprog Feb 13, 2023
1f35ee2
HMR: Fix DMR setback connections
micprog Feb 15, 2023
0d33467
Always backup when dmr/tmr is disabled
micprog Feb 16, 2023
0afd35d
Update response suppression to keep req until gnt
micprog Feb 18, 2023
7c2c616
Add modular hmr unit
micprog May 10, 2023
e259fae
Fix lint error
micprog May 11, 2023
2bd1e6e
Fix ECC Manager configuration
micprog Jun 22, 2023
c7aeb58
Add Corrector to generation script and update testbench
Dec 2, 2022
e516557
Simplify sram wrap and add optional cut to RMW path
micprog Jul 10, 2023
c2a42ef
WIP: integrated rapid recovery unit.
Jul 26, 2023
3bae186
Fix no-RR case
micprog Oct 2, 2023
f83e7d2
Fixed assignment for default status backup if cores are not grouped.
Oct 6, 2023
d349923
Made recovery RF FF-based.
Oct 10, 2023
6718ee5
Use pipelined checker for core's backup bus.
Oct 11, 2023
6a3d7e6
Store PR coming from IF stage if cores are in independent.
Oct 30, 2023
3cdeb86
[HMR] Fix mismatch count indexing
micprog Nov 15, 2023
1fd79fc
Create redundant groups only if redundant modes are supported.
Nov 23, 2023
8eb440b
Fix out-of-range indices when with a single DMR group.
Nov 30, 2023
0695567
Enable usage of checkpoint register for DMR synchronization.
Dec 12, 2023
e9d76f8
Properly rename DMR registers in hmr_dmr_ctrl.
Dec 12, 2023
b388363
Extend checker for separate AXI bus.
May 7, 2024
a947f51
Fix AXI DMR checker.
May 22, 2024
e0cdc31
Fix undefined assign if bus voters are not there.
May 29, 2024
99af292
Add output signal to manifest that redundancy enabled.
Jun 8, 2024
3e71f0b
Pipeline in independend backup bus whem Rapid Recovery is enabled.
Jun 8, 2024
cdb82da
Fix always comb.
Jun 9, 2024
d6b1345
Add ACE buses to DMR checkers.
Jun 19, 2024
0b18d31
Drive r/b_ready signals to default 1 for helper cores when DMR is ena…
Jun 19, 2024
13e6adb
Fix hmr_unit
micprog Aug 4, 2025
f587298
hmr_unit: remove custom AXI ports
micprog Aug 6, 2025
5c9cfbe
Add default output value parameters to allow non-zero defaults
micprog Aug 6, 2025
b6a5143
hmr_unit: Update doc, update status outputs
micprog Aug 7, 2025
7ebfd84
Update ECC correctors
micprog Aug 7, 2025
c41bfbe
Fix lint
micprog Aug 7, 2025
ac3ecaf
Fix lint
micprog Aug 7, 2025
7a5bf5b
Fix lint
micprog Aug 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/waiver.verible
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
# SPDX-License-Identifier: SHL-0.51

waive --rule=explicit-parameter-storage-type --location="./rtl/ecc_wrap/ecc_sram.sv"
waive --rule=module-filename --location="./rtl/HMR/recovery_rf_latch.sv"
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ jobs:
./rtl/ecc_wrap/ecc_manager_reg_top.sv
./rtl/ODRG_unit/odrg_manager_reg_pkg.sv
./rtl/ODRG_unit/odrg_manager_reg_top.sv
./rtl/HMR/hmr_core_regs_reg_pkg.sv
./rtl/HMR/hmr_core_regs_reg_top.sv
./rtl/HMR/hmr_dmr_regs_reg_pkg.sv
./rtl/HMR/hmr_dmr_regs_reg_top.sv
./rtl/HMR/hmr_registers_reg_pkg.sv
./rtl/HMR/hmr_registers_reg_top.sv
./rtl/HMR/hmr_tmr_regs_reg_pkg.sv
./rtl/HMR/hmr_tmr_regs_reg_top.sv
./rtl/pulpissimo_tcls/tcls_manager_reg_pkg.sv
./rtl/pulpissimo_tcls/tcls_manager_reg_top.sv
extra_args: "--rules=-interface-name-style --lint_fatal --parse_fatal --waiver_files .github/waiver.verible"
Expand Down
38 changes: 38 additions & 0 deletions Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ sources:
- rtl/ODRG_unit/odrg_manager_reg_pkg.sv
- rtl/ecc_wrap/ecc_manager_reg_pkg.sv
- rtl/pulpissimo_tcls/tcls_manager_reg_pkg.sv
- rtl/lowrisc_ecc/prim_secded_13_8_cor.sv
- rtl/lowrisc_ecc/prim_secded_13_8_dec.sv
- rtl/lowrisc_ecc/prim_secded_13_8_enc.sv
- rtl/lowrisc_ecc/prim_secded_22_16_cor.sv
- rtl/lowrisc_ecc/prim_secded_22_16_dec.sv
- rtl/lowrisc_ecc/prim_secded_22_16_enc.sv
- rtl/lowrisc_ecc/prim_secded_39_32_cor.sv
- rtl/lowrisc_ecc/prim_secded_39_32_dec.sv
- rtl/lowrisc_ecc/prim_secded_39_32_enc.sv
- rtl/lowrisc_ecc/prim_secded_72_64_cor.sv
- rtl/lowrisc_ecc/prim_secded_72_64_dec.sv
- rtl/lowrisc_ecc/prim_secded_72_64_enc.sv
- rtl/lowrisc_ecc/prim_secded_pkg.sv
- rtl/ODRG_unit/triple_core_barrier.sv
- rtl/hsiao_ecc/hsiao_ecc_pkg.sv
- rtl/hsiao_ecc/hsiao_ecc_enc.sv
Expand All @@ -28,6 +41,7 @@ sources:
- rtl/TMR_voter.sv
- rtl/TMR_voter_fail.sv
- rtl/TMR_word_voter.sv
- rtl/HMR/resp_suppress.sv
# Level 1
- rtl/ODRG_unit/odrg_manager_reg_top.sv
- rtl/ecc_wrap/ecc_manager_reg_top.sv
Expand Down Expand Up @@ -103,6 +117,30 @@ sources:
- test/tb_bitwise_tmr_voter_fail.sv
- test/tb_voter_macros.sv

- files:
- rtl/HMR/rapid_recovery_pkg.sv
- rtl/HMR/recovery_csr.sv
- rtl/HMR/recovery_pc.sv
- rtl/HMR/recovery_rf.sv
- rtl/HMR/rapid_recovery_unit.sv
- rtl/HMR/DMR_checker.sv
- rtl/HMR/DMR_CSR_checker.sv
- rtl/HMR/DMR_address_generator.sv
# - rtl/HMR/DMR_controller.sv
- rtl/HMR/hmr_rapid_recovery_ctrl.sv
- rtl/HMR/hmr_registers_reg_pkg.sv
- rtl/HMR/hmr_core_regs_reg_pkg.sv
- rtl/HMR/hmr_dmr_regs_reg_pkg.sv
- rtl/HMR/hmr_tmr_regs_reg_pkg.sv
- rtl/HMR/hmr_registers_reg_top.sv
- rtl/HMR/hmr_core_regs_reg_top.sv
- rtl/HMR/hmr_dmr_regs_reg_top.sv
- rtl/HMR/hmr_dmr_ctrl.sv
- rtl/HMR/hmr_tmr_regs_reg_top.sv
- rtl/HMR/hmr_tmr_ctrl.sv
- rtl/HMR/HMR_wrap.sv
- rtl/HMR/hmr_unit.sv

vendor_package:
- name: lowrisc_opentitan
target_dir: "util/lowrisc_opentitan"
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Replace vendor.py script with bender vendor for ECC modules
- Update `ecc_manager` for configurability
- Update secded testbench to use correctors and fix error injection

## 0.5.1 - 2023-04-12
### Added
Expand All @@ -29,11 +28,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Expose additional error logging signals
- Add scrubber to ECC SRAM wrap
- Add testing signals for tapeout
- Add secded ECC corrector

### Changed
- Expose `ecc_sram` ecc error signals
- Rename cTCLS to ODRG
- Hide bus ecc behind bender targets, remove related dependencies
- Update secded testbench to use correctors and fix error injection

## 0.4.0 - 2022-03-31

Expand Down
66 changes: 66 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,60 @@ REG_TOOL = $(REG_PATH)/vendor/lowrisc_opentitan/util/regtool.py

HJSON_ODRG = rtl/ODRG_unit/ODRG_unit.hjson
HJSON_TCLS = rtl/pulpissimo_tcls/TCLS_unit.hjson
HJSON_HMR = rtl/HMR/HMR_regs.hjson
HJSON_HMR_core = rtl/HMR/HMR_core_regs.hjson
HJSON_HMR_dmr = rtl/HMR/HMR_dmr_regs.hjson
HJSON_HMR_tmr = rtl/HMR/HMR_tmr_regs.hjson
HJSON_ECC = rtl/ecc_wrap/ecc_sram_wrapper.hjson

TARGET_DIR_ODRG = rtl/ODRG_unit
TARGET_DIR_TCLS = rtl/pulpissimo_tcls
TARGET_DIR_HMR = rtl/HMR
TARGET_DIR_ECC = rtl/ecc_wrap

define HMR_H_HEADER_STRING
/*
* Copyright (C) 2023 ETH Zurich and University of Bologna
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef __ARCHI_HMR_HMR_V1_H__
#define __ARCHI_HMR_HMR_V1_H__

#define HMR_IN_INTERLEAVED 1

#define HMR_TOP_OFFSET 0x000
#define HMR_CORE_OFFSET 0x100
#define HMR_DMR_OFFSET 0x200
#define HMR_TMR_OFFSET 0x300

#define HMR_CORE_INCREMENT 0x010
#define HMR_CORE_SLL 0x004
#define HMR_DMR_INCREMENT 0x010
#define HMR_DMR_SLL 0x004
#define HMR_TMR_INCREMENT 0x010
#define HMR_TMR_SLL 0x004
\n
endef
define HMR_H_FINAL_STRING
\n\n
#endif // __ARCHI_HMR_HMR_V1_H__

endef
export HMR_H_HEADER_STRING
export HMR_H_FINAL_STRING

.PHONY: gen_ODRG gen_TCLS gen_ecc_registers gen_ECC
gen_ODRG:
python $(REG_TOOL) $(HJSON_ODRG) -t $(TARGET_DIR_ODRG) -r
Expand All @@ -39,6 +87,24 @@ gen_TCLS:
python $(REG_TOOL) $(HJSON_TCLS) -d > $(TARGET_DIR_TCLS)/doc.md
python $(REG_TOOL) $(HJSON_TCLS) -D > $(TARGET_DIR_TCLS)/TCLS.h

gen_HMR:
python $(REG_TOOL) $(HJSON_HMR) -t $(TARGET_DIR_HMR) -r
python $(REG_TOOL) $(HJSON_HMR) -d > $(TARGET_DIR_HMR)/doc.html
python $(REG_TOOL) $(HJSON_HMR) --doc > $(TARGET_DIR_HMR)/doc.md
python $(REG_TOOL) $(HJSON_HMR_core) -t $(TARGET_DIR_HMR) -r
python $(REG_TOOL) $(HJSON_HMR_dmr) -t $(TARGET_DIR_HMR) -r
python $(REG_TOOL) $(HJSON_HMR_tmr) -t $(TARGET_DIR_HMR) -r

@printf "$$HMR_H_HEADER_STRING" > $(TARGET_DIR_HMR)/hmr_v1.h
python $(REG_TOOL) $(HJSON_HMR) -D >> $(TARGET_DIR_HMR)/hmr_v1.h
@printf "\n\n" >> $(TARGET_DIR_HMR)/hmr_v1.h
python $(REG_TOOL) $(HJSON_HMR_core) -D >> $(TARGET_DIR_HMR)/hmr_v1.h
@printf "\n\n" >> $(TARGET_DIR_HMR)/hmr_v1.h
python $(REG_TOOL) $(HJSON_HMR_dmr) -D >> $(TARGET_DIR_HMR)/hmr_v1.h
@printf "\n\n" >> $(TARGET_DIR_HMR)/hmr_v1.h
python $(REG_TOOL) $(HJSON_HMR_tmr) -D >> $(TARGET_DIR_HMR)/hmr_v1.h
@printf "$$HMR_H_FINAL_STRING" >> $(TARGET_DIR_HMR)/hmr_v1.h

gen_ecc_registers:
python $(REG_TOOL) $(HJSON_ECC) -t $(TARGET_DIR_ECC) -r
python $(REG_TOOL) $(HJSON_ECC) -d > $(TARGET_DIR_ECC)/doc.md
Expand Down
51 changes: 51 additions & 0 deletions rtl/HMR/DMR_CSR_checker.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/* Copyright 2020 ETH Zurich and University of Bologna.
* Copyright and related rights are licensed under the Solderpad Hardware
* License, Version 0.51 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law
* or agreed to in writing, software, hardware and materials distributed under
* this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* CS Registers Checker
*
*/

module DMR_CSR_checker
import rapid_recovery_pkg::*;
(
input csrs_intf_t csr_a_i,
input csrs_intf_t csr_b_i,
output csrs_intf_t check_o,
output logic error_o
);

logic compare_mstatus;
logic compare_mie;
logic compare_mtvec;
logic compare_mscratch;
logic compare_mip;
logic compare_mepc;
logic compare_mcause;
logic error;

assign compare_mstatus = |(csr_a_i.csr_mstatus ^ csr_b_i.csr_mstatus);
assign compare_mie = |(csr_a_i.csr_mie ^ csr_b_i.csr_mie);
assign compare_mtvec = |(csr_a_i.csr_mtvec ^ csr_b_i.csr_mtvec);
assign compare_mscratch = |(csr_a_i.csr_mscratch ^ csr_b_i.csr_mscratch);
assign compare_mip = |(csr_a_i.csr_mip ^ csr_b_i.csr_mip);
assign compare_mepc = |(csr_a_i.csr_mepc ^ csr_b_i.csr_mepc);
assign compare_mcause = |(csr_a_i.csr_mcause ^ csr_b_i.csr_mcause);

assign error = compare_mstatus |
compare_mie |
compare_mtvec |
compare_mscratch |
compare_mip |
compare_mepc |
compare_mcause;
assign check_o = (error) ? csr_a_i : '0;
assign error_o = error;

endmodule : DMR_CSR_checker
71 changes: 71 additions & 0 deletions rtl/HMR/DMR_address_generator.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/* Copyright 2020 ETH Zurich and University of Bologna.
* Copyright and related rights are licensed under the Solderpad Hardware
* License, Version 0.51 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law
* or agreed to in writing, software, hardware and materials distributed under
* this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* Dual Modular Address Generator
* Generates addresses for RF refill
*
*/

module DMR_address_generator #(
parameter int unsigned AddrWidth = 5
)(
input logic clk_i ,
input logic rst_ni ,
input logic clear_i ,
input logic enable_i ,
output logic done_o ,
output logic fatal_o ,
output logic [AddrWidth-1:0] address_o
);

localparam int unsigned NumAddr = 2 ** (AddrWidth - 1);
localparam int unsigned NumVotingSignals = 3;
localparam int unsigned NumTMRResults = 1;
localparam int unsigned ArrayWidth = NumVotingSignals + NumTMRResults;

logic addr_count_err;
logic [NumVotingSignals-1:0] addr_count_rst;
logic [ArrayWidth-1:0][AddrWidth-1:0] addr_count;

generate
for (genvar i = 0; i < NumVotingSignals; i++) begin : gen_addr_ffs
always_ff @(posedge clk_i, negedge rst_ni) begin : address_generator_counter
if (~rst_ni)
addr_count [i] <= '1;
else begin
if (clear_i || addr_count_rst [i])
addr_count [i] <= '1;
else if (enable_i)
addr_count [i] <= addr_count [i] + 1;
else
addr_count [i] <= addr_count [i];
end
end
assign addr_count_rst [i] = ( addr_count [i] == NumAddr/2 - 1) ? 1'b1 : 1'b0;
end
endgenerate

bitwise_TMR_voter #(
.DataWidth ( AddrWidth ),
.VoterType ( 0 )
) address_counter_voter (
.a_i ( addr_count [0] ),
.b_i ( addr_count [1] ),
.c_i ( addr_count [2] ),
.majority_o ( addr_count [3] ),
.error_o ( addr_count_err ),
.error_cba_o ( /* ... */ )
);

assign address_o = addr_count [3]; // Result of TMR address voter
assign fatal_o = addr_count_err; // Error from one of the two TMR voters
assign done_o = |addr_count_rst;

endmodule : DMR_address_generator
Loading