Internal error when assigning a member of an interface array to a virtual interface
Assigining a member of an interface array to a virtual interface results in an internal error:
interface A;
endinterface
module top;
A a[2]();
initial begin
virtual A aa = a[0];
end
endmodule
similarly, when the interface array is a parameter of a function:
interface A;
endinterface
class B;
function new(virtual A va);
endfunction
endclass
module top;
A a[2]();
initial begin
B b = new(a[0]);
$finish;
end
endmodule
What 'verilator' command line do we use to run your example?
verilator --timing --trace --top-module top --binary bug.sv
What 'verilator --version' are you using? Did you try it with the git master version?
Tried on Verilator 5.026 and current master branch.
What OS and distribution are you using?
Linux under WSL.
May we assist you in trying to fix this in Verilator yourself?
If this look like someone who is a Verilator beginner could reasonably handle.
Updated: a slightly smaller example;
Thanks for the report. From this and other virtual interface issues these may take some time to get to resolved, so pull requests to fix these welcome.