verilator/test_regress/t/t_queue_insert_at_end.v
Krzysztof Boroński f91259f46d
Fix insertion at queue's end (#4619)
Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
2023-10-25 17:41:28 +02:00

24 lines
506 B
Systemverilog

// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2023 by Antmicro Ltd.
// SPDX-License-Identifier: CC0-1.0
module t();
initial begin
int queue[$];
queue.insert(0, 0);
if (queue.size() != 1) $stop;
queue.insert(1, 1);
if (queue.size() != 2) $stop;
if (queue[0] != 0) $stop;
if (queue[1] != 1) $stop;
$write("*-* All Finished *-*\n");
$finish;
end
endmodule