2025-07-09 22:59:26 +02:00
|
|
|
// DESCRIPTION: Verilator: Verilog Test module
|
|
|
|
|
//
|
2026-01-27 02:24:34 +01:00
|
|
|
// This file ONLY is placed under the Creative Commons Public Domain
|
|
|
|
|
// SPDX-FileCopyrightText: 2025 Antmicro
|
2025-07-09 22:59:26 +02:00
|
|
|
// SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
|
|
|
|
|
int x = 0;
|
|
|
|
|
|
|
|
|
|
function int increment_x;
|
2026-03-08 23:26:40 +01:00
|
|
|
x++;
|
|
|
|
|
return x;
|
2025-07-09 22:59:26 +02:00
|
|
|
endfunction
|
|
|
|
|
|
2025-09-13 15:28:43 +02:00
|
|
|
module t;
|
2025-07-09 22:59:26 +02:00
|
|
|
|
2026-03-08 23:26:40 +01:00
|
|
|
initial begin
|
|
|
|
|
fork
|
|
|
|
|
increment_x();
|
|
|
|
|
#1 disable increment_x;
|
|
|
|
|
join
|
|
|
|
|
end
|
2025-07-09 22:59:26 +02:00
|
|
|
|
|
|
|
|
endmodule
|