diff --git a/src/V3AssertPre.cpp b/src/V3AssertPre.cpp index 28bb57635..349f2df67 100644 --- a/src/V3AssertPre.cpp +++ b/src/V3AssertPre.cpp @@ -811,7 +811,6 @@ private: static AstStmtExpr* getProcessAssocArrayDelete(AstVarRef* const refp) { // Constructs refp.delete(std::process::self()) statement FileLine* const flp = refp->fileline(); - refp->classOrPackagep(v3Global.rootp()->stdPackageProcessp()); AstCMethodHard* const deletep = new AstCMethodHard{ flp, refp, VCMethod::ASSOC_ERASE, v3Global.rootp()->stdPackageProcessSelfp(flp)}; deletep->dtypep(refp->findVoidDType()); @@ -819,7 +818,6 @@ private: } static AstNodeExpr* getProcessAssocArraySize(AstVarRef* const refp) { // Constructs refp.size() statement - refp->classOrPackagep(v3Global.rootp()->stdPackageProcessp()); AstCMethodHard* const sizep = new AstCMethodHard{refp->fileline(), refp, VCMethod::ASSOC_SIZE}; sizep->dtypep(refp->findBasicDType(VBasicDTypeKwd::UINT32)); diff --git a/test_regress/t/t_property_s_eventually_iface.py b/test_regress/t/t_property_s_eventually_iface.py new file mode 100755 index 000000000..1ddad07d5 --- /dev/null +++ b/test_regress/t/t_property_s_eventually_iface.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 +# DESCRIPTION: Verilator: Verilog Test driver/expect definition +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of either the GNU Lesser General Public License Version 3 +# or the Perl Artistic License Version 2.0. +# SPDX-FileCopyrightText: 2026 Wilson Snyder +# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 + +import vltest_bootstrap + +test.scenarios('simulator') + +test.compile(timing_loop=True, verilator_flags2=['--timing']) + +test.execute() + +test.passes() diff --git a/test_regress/t/t_property_s_eventually_iface.v b/test_regress/t/t_property_s_eventually_iface.v new file mode 100644 index 000000000..f5df9e5ab --- /dev/null +++ b/test_regress/t/t_property_s_eventually_iface.v @@ -0,0 +1,33 @@ +// DESCRIPTION: Verilator: Verilog Test module +// +// This file ONLY is placed under the Creative Commons Public Domain. +// SPDX-FileCopyrightText: 2026 Wilson Snyder +// SPDX-License-Identifier: CC0-1.0 + +// s_eventually (strong eventually) inside an interface used to trigger an +// internal error in V3Scope ("Can't locate varref scope"). + +interface my_if(input logic clk); + logic a; + assert property (@(posedge clk) s_eventually a); +endinterface + +module t(/*AUTOARG*/); + bit clk = 0; + initial forever #1 clk = ~clk; + + integer cyc = 0; + + my_if u_if(.clk(clk)); + + initial u_if.a = 0; + + always @(posedge clk) begin + cyc <= cyc + 1; + u_if.a <= (cyc >= 3); + if (cyc == 10) begin + $write("*-* All Finished *-*\n"); + $finish; + end + end +endmodule