From 05120dc0363d976a4108655addf686da31996498 Mon Sep 17 00:00:00 2001 From: Pascal Nasahl Date: Wed, 11 Dec 2024 08:01:34 +0000 Subject: [PATCH] [sram_ctrl,dv] Fix readback_err test for write iteration 0 When injecting a fault into write transaction 0, we previously were writing 0 to memory. However, as the memory seems to be initialized with 0, the readback returned the init value 0. Hence, the readback check was not failing as expected. Signed-off-by: Pascal Nasahl --- hw/ip/sram_ctrl/dv/env/seq_lib/sram_ctrl_readback_err_vseq.sv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ip/sram_ctrl/dv/env/seq_lib/sram_ctrl_readback_err_vseq.sv b/hw/ip/sram_ctrl/dv/env/seq_lib/sram_ctrl_readback_err_vseq.sv index f0898d10776a3..8c369bf1171a6 100644 --- a/hw/ip/sram_ctrl/dv/env/seq_lib/sram_ctrl_readback_err_vseq.sv +++ b/hw/ip/sram_ctrl/dv/env/seq_lib/sram_ctrl_readback_err_vseq.sv @@ -33,7 +33,7 @@ class sram_ctrl_readback_err_vseq extends sram_ctrl_base_vseq; for (int iteration = 0; iteration < iterations; iteration++) begin `DV_CHECK_STD_RANDOMIZE_WITH_FATAL(addr, (addr & sram_addr_mask) < max_offset;) if (write) begin - do_single_write(.addr(addr), .data(iteration), .mask('1), .blocking(0)); + do_single_write(.addr(addr), .data(iteration + 1), .mask('1), .blocking(0)); end else begin do_single_read(.addr(addr), .mask('1), .check_rdata(0), .blocking(0), .rdata(rdata)); end