ignore overrun at end of skidbuffer test

This commit is contained in:
Brendan Haines 2022-12-28 22:24:55 -07:00
parent 3b476cfc32
commit 71bc903f14
2 changed files with 9 additions and 7 deletions

View File

@ -1,4 +1,4 @@
module skidbuffer #(
module axis_skidbuffer #(
parameter WIDTH = 1
)(
input logic clk,

View File

@ -4,7 +4,7 @@
import bh_assert::bh_assert_equal;
import bh_assert::bh_assert_stats;
module skidbuffer_tb();
module axis_skidbuffer_tb();
parameter WIDTH = 15;
parameter TEST_LIST_LENGTH = 256;
@ -17,7 +17,7 @@ module skidbuffer_tb();
wire out_valid;
logic out_ready = 0;
skidbuffer #(
axis_skidbuffer #(
.WIDTH(WIDTH)
) dut (
.clk(clk),
@ -40,8 +40,8 @@ module skidbuffer_tb();
always #5 clk = !clk;
initial begin
$dumpfile("skidbuffer_tb.vcd");
$dumpvars(0, skidbuffer_tb);
$dumpfile("axis_skidbuffer_tb.vcd");
$dumpvars(0, axis_skidbuffer_tb);
for (i=0; i<TEST_LIST_LENGTH; i=i+1) begin
in_list[i] = $urandom();
@ -71,8 +71,10 @@ module skidbuffer_tb();
end
if (reset == 0 && out_valid && out_ready) begin
bh_assert_equal(out, in_list[out_count], $sformatf("Output value [%3d]", out_count));
out_count <= out_count + 1;
if (out_count < TEST_LIST_LENGTH) begin
bh_assert_equal(out, in_list[out_count], $sformatf("Output value [%3d]", out_count));
out_count <= out_count + 1;
end
end
end