2024-10-10 14:40:07 +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: 2024 Antmicro
|
2024-10-10 14:40:07 +02:00
|
|
|
// SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
|
|
|
|
|
class Cls;
|
2026-03-10 02:38:29 +01:00
|
|
|
int x = 1;
|
|
|
|
|
function new();
|
|
|
|
|
process p = process::self();
|
|
|
|
|
endfunction
|
2024-10-10 14:40:07 +02:00
|
|
|
endclass
|
|
|
|
|
|
2026-03-10 02:38:29 +01:00
|
|
|
module t ( /*AUTOARG*/
|
|
|
|
|
);
|
|
|
|
|
initial begin
|
|
|
|
|
Cls c, d;
|
|
|
|
|
c = new;
|
|
|
|
|
c.x = 2;
|
|
|
|
|
d = new c;
|
|
|
|
|
if (d.x != 2) $stop;
|
|
|
|
|
$write("*-* All Finished *-*\n");
|
|
|
|
|
$finish;
|
|
|
|
|
end
|
2024-10-10 14:40:07 +02:00
|
|
|
endmodule
|