2024-07-12 16:18:18 +02:00
|
|
|
// DESCRIPTION: Verilator: Verilog Test module
|
|
|
|
|
//
|
2026-01-27 02:24:34 +01:00
|
|
|
// This file ONLY is placed under the Creative Commons Public Domain.
|
|
|
|
|
// SPDX-FileCopyrightText: 2024 Antmicro Ltd
|
2024-07-12 16:18:18 +02:00
|
|
|
// SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
|
|
|
|
|
class Foo;
|
|
|
|
|
rand int unsigned v;
|
|
|
|
|
endclass
|
|
|
|
|
|
|
|
|
|
module t_randomize_method_with_bad();
|
|
|
|
|
function automatic int unsigned in_mod_function();
|
|
|
|
|
return 5;
|
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
initial begin
|
2026-02-09 00:20:28 +01:00
|
|
|
automatic Foo foo = new;
|
|
|
|
|
automatic int res = foo.randomize() with { v < in_mod_function(); };
|
2024-07-12 16:18:18 +02:00
|
|
|
end
|
|
|
|
|
endmodule
|