Skip to content

Commit 682237f

Browse files
authored
[TB] Fix a corner case in random DMA testbench that pushes data to FIFO during reset (#859)
* Don't push/pop from TB fifo during a rest * Reduce default num_iterations to 50 to give reasonable run-time in nightly regressions * Fix status message * MICROSOFT AUTOMATED PIPELINE: Stamp 'cwhitehead-msft-dma-fifo-tb-fix' with updated timestamp and hash after successful run
1 parent 17a0f47 commit 682237f

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

.github/workflow_metadata/pr_hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
72bbc24d2efd78d87f5fc0e13b3230457a3f2611b3f5a6cb748d42beca67e9a6e9a6f5e5f4e67b87cb2b636344db0a14
1+
b4346b9efd43323f75f75e67316488e755110a4883acada97422d82c0396374133c12908180decb4d2d229b64bb4ee1f
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1744826985
1+
1745565133

src/integration/tb/caliptra_top_tb_axi_fifo.sv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ module caliptra_top_tb_axi_fifo #(
190190
rand_w_data <= $urandom;
191191
`endif
192192
end
193-
rand_w_valid <= !fifo_clear && ((auto_push && (stall_down_count == 0)) || (rand_w_valid && !fifo_w_ready)); // Hold valid until data is accepted
194-
rand_r_ready <= (auto_pop && (stall_down_count == 0)) && fifo_r_valid;
193+
rand_w_valid <= !fifo_clear && rst_n && ((auto_push && (stall_down_count == 0)) || (rand_w_valid && !fifo_w_ready)); // Hold valid until data is accepted
194+
rand_r_ready <= rst_n && (auto_pop && (stall_down_count == 0)) && fifo_r_valid;
195195
end
196196

197197
//=========================================================================-

src/integration/tb/caliptra_top_tb_services.sv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2348,8 +2348,8 @@ task initialize_caliptra_axi_sram;
23482348
end
23492349

23502350
// Progress reporting every 12.5% (8192 addresses)
2351-
if ((addr % AXI_SRAM_DEPTH/8) == 0) begin
2352-
$display(" SRAM initialization progress: %0d%%", (addr * 100) / AXI_SRAM_DEPTH);
2351+
if (addr % (AXI_SRAM_DEPTH/8) == 0) begin
2352+
$display(" SRAM initialization progress: %0d%% (addr: 0x%x)", (addr * 100) / AXI_SRAM_DEPTH, addr);
23532353
end
23542354
end
23552355

src/integration/tb/dma_testcase_generator.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ module dma_testcase_generator (
6666
logic [31:0] data; // Assuming a 39-bit data format
6767

6868
if (!$value$plusargs("NUM_ITERATIONS=%d", num_iterations)) begin
69-
num_iterations = 100; // Default
69+
num_iterations = 50; // Default
7070
end
7171
if (num_iterations > 100) begin
7272
$fatal("num_iterations cannot exceed 100 due to width of dma_gen_block_size output signal...");

0 commit comments

Comments
 (0)