verilator/test_regress/t/t_class_const.v

21 lines
470 B
Systemverilog
Raw Normal View History

2022-11-11 23:45:34 +01:00
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain.
// SPDX-FileCopyrightText: 2022 Wilson Snyder
2022-11-11 23:45:34 +01:00
// SPDX-License-Identifier: CC0-1.0
class Cls;
2026-03-08 23:26:40 +01:00
const int aconst = 10;
static const int astatic = 20;
2022-11-11 23:45:34 +01:00
endclass
module t;
2026-03-08 23:26:40 +01:00
initial begin
automatic Cls c = new;
if (c.aconst !== 10) $stop;
if (Cls::astatic !== 20) $stop;
$write("*-* All Finished *-*\n");
$finish;
end
2022-11-11 23:45:34 +01:00
endmodule