Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
216106f
HMR: Add initial wrapper structure
micprog Dec 22, 2022
30c420c
Integrated ECC-protected Recovery RF.
micprog May 8, 2023
37e0583
Fix TMR and DMR assignments
micprog Jan 27, 2023
93c99eb
Add RapidRecovery parameter to en-/disable backup RF
micprog Jan 27, 2023
1215c43
Added clock gating to lock unfaulty cores during recovery routine.
Jan 27, 2023
dff93e4
Add parameter documentation
micprog Jan 27, 2023
a994fe5
Update TMR signalling
micprog Jan 30, 2023
ed98b47
Update signal alignments
micprog Jan 31, 2023
200a2df
Add individual dmr controller (separated rapid-recovery)
micprog Jan 31, 2023
95f94af
Add dmr and rapid-recovery configuration registers
micprog Jan 31, 2023
ea03582
Update header file generation
micprog Feb 1, 2023
f6170d3
Fix configurable rapid-recovery assignments
micprog Feb 1, 2023
60bbf12
Fix connections for rapid-recovery
micprog Feb 1, 2023
e7f7920
Generating correct offsets in RF address generator.
Feb 1, 2023
d455d37
Properly connecting rapid recovery controller signals to recovery PC.
Feb 2, 2023
ca1c5ed
Update shared_id selection for only TMR support
micprog Feb 2, 2023
f5785a6
Add synch request signals
micprog Feb 3, 2023
819c5da
Move SP store reg from tmr to core registers
micprog Feb 3, 2023
93f3eff
Merged CSRs backup and recovery.
micprog May 8, 2023
6dbbd73
Add multibit setback, enable ungroup setback
micprog Feb 6, 2023
cb58b14
Continually back up cores in interleaved mode
micprog Feb 6, 2023
03f71e9
Fix setback signals for proper ungrouping
micprog Feb 6, 2023
be1e9d2
Making cleaner assignments for main_dmr_out bus.
micprog Feb 8, 2023
8d1efa2
Adding first support for TMR rapid recovery (to be fixed).
micprog Feb 8, 2023
7f86799
Ensure sw_synch interrupt stays 0 before boot
micprog Feb 8, 2023
ce3ea38
Add response suppress module
micprog Feb 9, 2023
6558340
TMR: only trigger a single interrupt
micprog Feb 9, 2023
eb0d058
DMR: only trigger a single interrupt
micprog Feb 9, 2023
4eed8a5
TMR: buffer cores_synch signal
micprog Feb 9, 2023
638eada
Connect rapid recovery synch signals
micprog Feb 10, 2023
d6d2116
HMR: fix minor DMR naming error
micprog Feb 13, 2023
e8694c7
HMR: Fix DMR setback connections
micprog Feb 15, 2023
88fa974
Always backup when dmr/tmr is disabled
micprog Feb 16, 2023
91ebee3
Update response suppression to keep req until gnt
micprog Feb 18, 2023
9258507
Add modular hmr unit
micprog May 10, 2023
62c8c63
Fix lint error
micprog May 11, 2023
d64f902
Fix ECC Manager configuration
micprog Jun 22, 2023
1b48ee9
Add Corrector to generation script and update testbench
Dec 2, 2022
c65abf5
Simplify sram wrap and add optional cut to RMW path
micprog Jul 10, 2023
88202cb
WIP: integrated rapid recovery unit.
Jul 26, 2023
a027dbc
Fix no-RR case
micprog Oct 2, 2023
b063115
Fixed assignment for default status backup if cores are not grouped.
Oct 6, 2023
0f4a9b4
Made recovery RF FF-based.
Oct 10, 2023
1364349
Use pipelined checker for core's backup bus.
Oct 11, 2023
7577fac
Store PR coming from IF stage if cores are in independent.
Oct 30, 2023
4eeb79b
[HMR] Fix mismatch count indexing
micprog Nov 15, 2023
51824c3
Create redundant groups only if redundant modes are supported.
Nov 23, 2023
85bab76
Fix out-of-range indices when with a single DMR group.
Nov 30, 2023
9d6e252
Enable usage of checkpoint register for DMR synchronization.
Dec 12, 2023
0b385da
Properly rename DMR registers in hmr_dmr_ctrl.
Dec 12, 2023
dff8abd
Extend checker for separate AXI bus.
May 7, 2024
c44ff73
Fix AXI DMR checker.
May 22, 2024
5f7a22c
Fix undefined assign if bus voters are not there.
May 29, 2024
d08dc33
Add sram update when a sram read finds a correctable error and correc…
Aquaticfuller Apr 16, 2024
0c0b2da
Add the outer scrubber to manage both tag and data sram scrubbing sim…
Aquaticfuller May 6, 2024
b560369
1.Add multi error info propagation path in the ecc_scrubber_out; 2.Mo…
Aquaticfuller May 12, 2024
b62b4be
decouple the parameter with axi_llc
Aquaticfuller May 12, 2024
47d7306
Modify ecc_sram_wrap for parameterizable data width
Aquaticfuller May 13, 2024
eba1154
1.Re-generate ecc_manager_reg, test access to the regs; 2.Add more ec…
Aquaticfuller May 22, 2024
f95ca1a
Add valid, dirty, and addr info output on ecc_scrubber_out for uncorr…
Aquaticfuller May 28, 2024
304295f
Add sram update when a sram read finds a correctable error and correc…
Aquaticfuller Jun 1, 2024
0a62f8f
[CUT TIMING] Try to add a timing cut after tag ram read
Aquaticfuller Jun 6, 2024
d1c35a7
[RTL] Add correct data buffer, so for continuous read, the corrected …
Aquaticfuller Jun 6, 2024
f41308f
[RTL] Add support to multi-cycle delay sram to ecc_scrubber_out
Aquaticfuller Jun 7, 2024
9cf639b
Add output signal to manifest that redundancy enabled.
Jun 8, 2024
12ab267
Pipeline in independend backup bus whem Rapid Recovery is enabled.
Jun 8, 2024
49e714b
Fix always comb.
Jun 9, 2024
efa5d0c
Add ACE buses to DMR checkers.
Jun 19, 2024
78aff21
Drive r/b_ready signals to default 1 for helper cores when DMR is ena…
Jun 19, 2024
6e7a031
[RTL] Uncorrectable error handling: When the external scrubber finds …
Aquaticfuller Jun 24, 2024
ee50d57
Fix the ECC reg address mapping.
Aquaticfuller Jul 10, 2024
fce7611
[RTL] Properly reset the FFs.
Aquaticfuller Jul 18, 2024
9e31f7c
Merge pull request #30 from pulp-platform/zx/astral_ecc_llc
Aquaticfuller Jul 18, 2024
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
39 changes: 39 additions & 0 deletions Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,33 @@ 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
- rtl/hsiao_ecc/hsiao_ecc_dec.sv
- rtl/hsiao_ecc/hsiao_ecc_cor.sv
- rtl/TMR_voter.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
- rtl/pulpissimo_tcls/tcls_manager_reg_top.sv
- rtl/ecc_wrap/ecc_scrubber.sv
- rtl/ecc_wrap/ecc_scrubber_out.sv

- target: any(deprecated, axi_ecc, hci_ecc, pulp_ecc, test)
files:
Expand Down Expand Up @@ -92,6 +107,30 @@ sources:
- test/tb_tmr_word_voter.sv
- test/tb_bitwise_tmr_voter.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 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
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
Loading