-
Notifications
You must be signed in to change notification settings - Fork 705
Description
Can you please attach an example that shows the issue or missing feature?
I'm working on it. This is from the same (very large) design as was attempting to rebuild that produced #6418. I have a little debug info, but this one seems to be a combination of pretty deep parameterized hierarchy alongside similar usage as the previous issue. bugpoint doesn't converge so I am attempting to bisect.... Similar to #6418 this built in the previously referenced version. I wanted to open in parallel to attempting to whittle it down in case there are any ideas.
What output from that test indicates it is wrong, and what is the correct or expected output? (Or, please make test self-checking if possible.)
%Error: Internal Error: ../V3LinkDot.cpp:3785: class reference parameter not removed by V3Param
: ... note: In instance 'XYZ_wrap'
227 | outb[i] = ohm_c#(p_width)::ohm(sel, bus_array[i]);
| ^~~~~
... See the manual at https://verilator.org/verilator_doc.html?v=5.041 for more assistance.
I did enable dump-tree
and debug
to attempt to get a better point in the design hierarchy to anchor to...
%Error: Internal Error: ../V3Broken.cpp:169: Broken link in node (or something without maybePointedTo): 'm_classOrPackageNodep && !m_classOrPackageNodep->brokeExists()' @ ./V3Ast__gen_impl.h:1223
: ... note: In instance 'XYZ_wrap'
-node: CLASSORPACKAGEREF 0x600000cd76c0 <e3180> {g243az} @dt=0x0@ reverse_c cpkg=0x159e0c620 -> CLASS 0x159e0c620 <e1877864> {g194am} reverse_c L4 [1ps] [VIRT]
243 | inb_reversed = reverse_c#(p_width)::reverse(inb);
This is the package that contains a library of parameterized functions that is used pervasively throughout the design. Unfortunately a simple testcase that just instantiates say a parameterized instance of blshift (pf::blshift_c#(4)::blshift() for instance) doesn't trigger the internal error.
package pf;
virtual class reverse_c #(parameter p_width=4);
static function logic[p_width-1:0] reverse(
input logic[p_width-1:0] inb
);
<snip>
endfunction
endclass
virtual class ohm_c #(parameter p_width=4);
static function ohm(
input logic[p_width-1:0] sel
,input logic[p_width-1:0] inb
);
<snip>
endfunction
endclass
virtual class brshift_c #(parameter p_width=4);
static function logic[p_width-1:0] brshift(
input logic[p_width-1:0] inb
,input logic[p_width-1:0] sel
);
<snip>
endfunction
endclass
virtual class blshift_c #(parameter p_width=4);
static function logic[p_width-1:0] blshift(
input logic[p_width-1:0] inb
,input logic[p_width-1:0] sel
);
<snip>
inb_reversed = reverse_c#(p_width)::reverse(inb);
rslt = brshift_c#(p_width)::brshift(inb_reversed, sel);
rslt_reversed = reverse_c#(p_width)::reverse(rslt);
<snip>
endfunction
endclass
endpackage
What 'verilator --version' are you using? Did you try it with the git master version? Did you try it with other simulators?
Verilator 5.041 devel rev v5.040-94-g990ee994d
What OS and distribution are you using?
Darwin easyemachine.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6041 arm64
Thanks,
-e-