You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you pass in an array of interfaces to a module that is expecting a differently sized array, you either get a silent success or a segfault, depending on whether the module expects a smaller or larger array.
module t (/*AUTOARG*/);
localparam N = 4;
foo_intf foos [N-1:0] ();
baz baz_inst (.foo(foos));
initial begin
$write("*-* All Finished *-*\n");
$finish;
end
endmodule
module baz(foo_intf foo[4:0] );
endmodule
%Error: t/t_interface_array_bad.v:14: Can't find definition of 'foos__Viftop__BRA__4__KET__' in dotted signal: .foos__Viftop[4]
%Error: Known scopes under 'foos__Viftop[4]': baz_inst, foos[0], foos[1], foos[2], foos[3]
%Error: Verilator internal fault, sorry. Consider trying --debug --gdbbt
It seems AstUnpackArrayDType sets width "for backward compatibility" to the width of the subDType, so that makes the check in V3Width.cpp:2171 pass which otherwise seems to be the correct check to detect this.
The text was updated successfully, but these errors were encountered:
Author Name: Johan Bjork
Original Redmine Issue: 1143 from https://www.veripool.org
If you pass in an array of interfaces to a module that is expecting a differently sized array, you either get a silent success or a segfault, depending on whether the module expects a smaller or larger array.
It seems AstUnpackArrayDType sets width "for backward compatibility" to the width of the subDType, so that makes the check in V3Width.cpp:2171 pass which otherwise seems to be the correct check to detect this.
The text was updated successfully, but these errors were encountered: