2022-10-13 14:33:15 +02:00
|
|
|
// DESCRIPTION: Verilator: Verilog Test module
|
|
|
|
|
//
|
|
|
|
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
|
|
|
|
// any use, without warranty, 2022 by Antmicro Ltd.
|
|
|
|
|
// SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
|
|
|
|
|
class Cls;
|
|
|
|
|
endclass : Cls
|
|
|
|
|
|
2023-03-24 18:18:20 +01:00
|
|
|
class Cls2;
|
|
|
|
|
endclass
|
|
|
|
|
|
|
|
|
|
class ClsExt extends Cls;
|
|
|
|
|
endclass
|
|
|
|
|
|
2023-06-15 14:00:47 +02:00
|
|
|
typedef Cls2 cls2_t;
|
|
|
|
|
|
2025-09-13 15:28:43 +02:00
|
|
|
module t;
|
2022-10-13 14:33:15 +02:00
|
|
|
Cls c;
|
2023-03-24 18:18:20 +01:00
|
|
|
Cls2 c2;
|
2023-06-15 14:00:47 +02:00
|
|
|
cls2_t ct2;
|
2023-03-24 18:18:20 +01:00
|
|
|
ClsExt c_ext;
|
2022-10-13 14:33:15 +02:00
|
|
|
|
|
|
|
|
task t(Cls c); endtask
|
2025-10-08 03:06:11 +02:00
|
|
|
function void f(ClsExt c); endfunction
|
2022-10-13 14:33:15 +02:00
|
|
|
|
|
|
|
|
initial begin
|
|
|
|
|
c = 0;
|
|
|
|
|
c = 1;
|
2023-03-24 18:18:20 +01:00
|
|
|
c = c2;
|
|
|
|
|
c_ext = c;
|
2023-06-15 14:00:47 +02:00
|
|
|
ct2 = c;
|
2023-03-24 18:18:20 +01:00
|
|
|
|
2022-10-13 14:33:15 +02:00
|
|
|
t(0);
|
|
|
|
|
t(1);
|
2023-03-24 18:18:20 +01:00
|
|
|
t(c2);
|
|
|
|
|
f(c);
|
2022-10-13 14:33:15 +02:00
|
|
|
end
|
|
|
|
|
endmodule
|