2022-10-13 12:33:15 +00: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 17:18:20 +00:00
|
|
|
class Cls2;
|
|
|
|
endclass
|
|
|
|
|
|
|
|
class ClsExt extends Cls;
|
|
|
|
endclass
|
|
|
|
|
2023-06-15 12:00:47 +00:00
|
|
|
typedef Cls2 cls2_t;
|
|
|
|
|
2022-10-13 12:33:15 +00:00
|
|
|
module t (/*AUTOARG*/);
|
|
|
|
Cls c;
|
2023-03-24 17:18:20 +00:00
|
|
|
Cls2 c2;
|
2023-06-15 12:00:47 +00:00
|
|
|
cls2_t ct2;
|
2023-03-24 17:18:20 +00:00
|
|
|
ClsExt c_ext;
|
2022-10-13 12:33:15 +00:00
|
|
|
|
|
|
|
task t(Cls c); endtask
|
2023-03-24 17:18:20 +00:00
|
|
|
function f(ClsExt c); endfunction
|
2022-10-13 12:33:15 +00:00
|
|
|
|
|
|
|
initial begin
|
|
|
|
c = 0;
|
|
|
|
c = 1;
|
2023-03-24 17:18:20 +00:00
|
|
|
c = c2;
|
|
|
|
c_ext = c;
|
2023-06-15 12:00:47 +00:00
|
|
|
ct2 = c;
|
2023-03-24 17:18:20 +00:00
|
|
|
|
2022-10-13 12:33:15 +00:00
|
|
|
t(0);
|
|
|
|
t(1);
|
2023-03-24 17:18:20 +00:00
|
|
|
t(c2);
|
|
|
|
f(c);
|
2022-10-13 12:33:15 +00:00
|
|
|
end
|
|
|
|
endmodule
|