verilator/test_regress/t/t_constraint_mode_unsup.v

22 lines
509 B
Systemverilog
Raw Normal View History

2024-08-21 10:16:44 +00:00
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2024 by Antmicro.
// SPDX-License-Identifier: CC0-1.0
class Packet;
int m_one;
static constraint cons { m_one > 0 && m_one < 2; }
endclass
module t;
Packet p;
initial begin
p = new;
$display("p.cons.constraint_mode()=%0d", p.cons.constraint_mode());
p.cons.constraint_mode(0);
p.constraint_mode(0);
end
endmodule