verilator/test_regress/t/t_queue_output_func.v

28 lines
465 B
Systemverilog
Raw Normal View History

2024-10-24 15:40:54 +02:00
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain
// SPDX-FileCopyrightText: 2024 Antmicro
2024-10-24 15:40:54 +02:00
// SPDX-License-Identifier: CC0-1.0
class Cls;
2026-03-08 23:26:40 +01:00
int x = 1;
2024-10-24 15:40:54 +02:00
endclass
2026-03-08 23:26:40 +01:00
task init_set_2(output Cls c);
c = new;
c.x = 2;
2024-10-24 15:40:54 +02:00
endtask
module t;
2024-10-24 15:40:54 +02:00
2026-03-08 23:26:40 +01:00
initial begin
Cls cls_q[$];
init_set_2(cls_q[0]);
if (cls_q[0].x != 2) $stop;
2024-10-24 15:40:54 +02:00
2026-03-08 23:26:40 +01:00
$write("*-* All Finished *-*\n");
$finish;
end
2024-10-24 15:40:54 +02:00
endmodule