Skip to content

Commit b616edb

Browse files
committed
Follow up 63ba7ec: IMAGE_SIZE assignment
Signed-off-by: Wiktoria Kuna <[email protected]>
1 parent 7575949 commit b616edb

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/recovery/recovery_executor.sv

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,17 @@ module recovery_executor
566566
indirect_rx_wdata_o = tti_rx_rdata_i;
567567
end
568568

569+
logic [TtiRxDataDataWidth-1:0] prev_tti_rx_rdata;
570+
always_ff @(posedge clk_i or negedge rst_ni) begin : collect_prev_tti_rx_data
571+
if (~rst_ni) begin
572+
prev_tti_rx_rdata <= '0;
573+
end else if (tti_rx_rack_i) begin
574+
prev_tti_rx_rdata <= tti_rx_rdata_i;
575+
end else begin
576+
prev_tti_rx_rdata <= prev_tti_rx_rdata;
577+
end
578+
end
579+
569580
// CSR write. Only applicable for writable CSRs as per the OCP
570581
// recovery spec.
571582
logic device_reset_we;
@@ -627,7 +638,9 @@ module recovery_executor
627638
hwif_rec_o.RECOVERY_CTRL.CMS.next = tti_rx_rdata_i[7:0];
628639
hwif_rec_o.INDIRECT_FIFO_CTRL_0.RESET.next = tti_rx_rdata_i[15:8];
629640
hwif_rec_o.INDIRECT_FIFO_CTRL_0.CMS.next = tti_rx_rdata_i[7:0];
630-
hwif_rec_o.INDIRECT_FIFO_CTRL_1.IMAGE_SIZE.next = tti_rx_rdata_i[31:0];
641+
hwif_rec_o.INDIRECT_FIFO_CTRL_1.IMAGE_SIZE.next = {
642+
tti_rx_rdata_i[15:0], prev_tti_rx_rdata[31:16]
643+
};
631644
end
632645

633646
logic fifo_reg_reset_clear;

verification/cocotb/top/lib_i3c_top/test_recovery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ async def test_write(dut):
326326
await recovery.command_write(
327327
VIRT_DYNAMIC_ADDR,
328328
I3cRecoveryInterface.Command.INDIRECT_FIFO_CTRL,
329-
[0xAA, 0xBB, 0xCC, 0xDD, 0x11, 0x22, 0x33, 0x44],
329+
[0xAA, 0xBB, 0x11, 0x22, 0x33, 0x44],
330330
)
331331

332332
# Wait & read the CSR from the AHB/AXI side

0 commit comments

Comments
 (0)