2026-06-24 13:44:49 +02:00
|
|
|
// DESCRIPTION: Verilator: Verilog Test module
|
|
|
|
|
//
|
|
|
|
|
// This file ONLY is placed under the Creative Commons Public Domain
|
|
|
|
|
// SPDX-FileCopyrightText: 2026 Antmicro
|
|
|
|
|
// SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
|
|
|
|
|
module t;
|
|
|
|
|
int cnt = 0;
|
|
|
|
|
task automatic myTask;
|
|
|
|
|
fork
|
|
|
|
|
begin
|
|
|
|
|
bit x;
|
|
|
|
|
if (!x) begin
|
|
|
|
|
cnt++;
|
|
|
|
|
end
|
2026-06-24 15:59:32 +02:00
|
|
|
if (!$onehot(x)) begin
|
|
|
|
|
cnt++;
|
|
|
|
|
end
|
2026-06-24 13:44:49 +02:00
|
|
|
end
|
|
|
|
|
join_none
|
|
|
|
|
endtask
|
|
|
|
|
|
|
|
|
|
initial begin
|
|
|
|
|
myTask();
|
|
|
|
|
#1;
|
2026-06-24 15:59:32 +02:00
|
|
|
if (cnt != 2) $stop;
|
2026-06-24 13:44:49 +02:00
|
|
|
|
|
|
|
|
$write("*-* All Finished *-*\n");
|
|
|
|
|
$finish;
|
|
|
|
|
end
|
|
|
|
|
endmodule
|