Skip to content

Commit

Permalink
Add pipe regs to cut critical paths and remove unused params
Browse files Browse the repository at this point in the history
  • Loading branch information
LuigiGhionda committed Jul 3, 2024
1 parent 20c3e00 commit c039e23
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
1 change: 0 additions & 1 deletion rtl/hwpe_subsystem.sv
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ module hwpe_subsystem

// TEMP: softex doesn't yet support ECC-HCI internally
hci_ecc_enc #(
.DW ( DW ),
.`HCI_SIZE_PARAM(tcdm_target) ( `HCI_SIZE_PARAM(tcdm_softex) ),
.`HCI_SIZE_PARAM(tcdm_initiator) ( HCI_HWPE_SIZE )
) i_ecc_softex_enc (
Expand Down
26 changes: 18 additions & 8 deletions rtl/tcdm_banks_wrap.sv
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ for(genvar i=0; i<NbBanks; i++) begin : banks_gen
.clk( clk_i )
);

logic meta_single_err, meta_multi_err;
logic meta_single_err_d, meta_single_err_q;
logic meta_multi_err_d, meta_multi_err_q;
logic valid_handshake;

assign valid_handshake = tcdm_slave[i].req & tcdm_slave[i].gnt;
Expand All @@ -89,18 +90,27 @@ for(genvar i=0; i<NbBanks; i++) begin : banks_gen
assign tcdm_slave_dec.r_id = resp_id_q;

hci_ecc_dec #(
.DW ( DataWidth ),
.`HCI_SIZE_PARAM(tcdm_target) ( HCI_MEM_SIZE ),
.EnableData ( 0 )
) i_ecc_dec_meta (
.data_single_err_o ( ),
.data_multi_err_o ( ),
.meta_single_err_o ( meta_single_err ),
.meta_multi_err_o ( meta_multi_err ),
.tcdm_target ( tcdm_slave[i] ),
.tcdm_initiator ( tcdm_slave_dec )
.meta_single_err_o ( meta_single_err_d ),
.meta_multi_err_o ( meta_multi_err_d ),
.tcdm_target ( tcdm_slave[i] ),
.tcdm_initiator ( tcdm_slave_dec )
);

always_ff @(posedge clk_i or negedge rst_ni) begin : ecc_error_pipe
if(~rst_ni) begin
meta_single_err_q <= '0;
meta_multi_err_q <= '0;
end else begin
meta_single_err_q <= meta_single_err_d;
meta_multi_err_q <= meta_multi_err_d;
end
end

ecc_sram #(
.NumWords ( BankSize ),
.InputECC ( EccInterco ),
Expand All @@ -126,8 +136,8 @@ for(genvar i=0; i<NbBanks; i++) begin : banks_gen
.multi_error_o ( )
);

assign ecc_single_error_o[i] = meta_single_err & valid_handshake;
assign ecc_multiple_error_o[i] = meta_multi_err & valid_handshake;
assign ecc_single_error_o[i] = meta_single_err_q & valid_handshake;
assign ecc_multiple_error_o[i] = meta_multi_err_q & valid_handshake;

end else begin: gen_ecc_banks_only

Expand Down

0 comments on commit c039e23

Please sign in to comment.