verilator/test_regress/t/t_class_const.v

21 lines
485 B
Systemverilog
Raw Normal View History

2022-11-11 22:45:34 +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 Wilson Snyder.
// SPDX-License-Identifier: CC0-1.0
class Cls;
const int aconst = 10;
static const int astatic = 20;
endclass
module t;
initial begin
Cls c = new;
if (c.aconst !== 10) $stop;
if (Cls::astatic !== 20) $stop;
$write("*-* All Finished *-*\n");
$finish;
end
endmodule