Multiple local variables with the same name ( __Vtable1_valid ) generated in a header file when using SystemVerilog interfaces in a certain situation #1431
Labels
resolution: fixed
Closed; fixed
Author Name: Bogdan Vukobratovic (@bogdanvuk)
Original Redmine Issue: 1431 from https://www.veripool.org
Original Assignee: Wilson Snyder (@wsnyder)
Hi,
I've stumbled upon a situation where verilator generates invalid C++ code, i.e. it generates multiple local variables with the same name: __Vtable1_valid.
Please find attached the minimal code I could come up with to reproduce the issue. The code models a demultiplexer in SystemVerilog (wrap_demux.sv), with 3 outputs with handshaking interface for each one. If I remove one output, the issue is gone.
If you take a look at "obj_dir/Vwrap_demux.h", you will see the following erroneous code:
Internally, "wrap_demux.sv" uses interfaces which are defined in "dti.sv". If I remove the interfaces, the issue is gone.
The text was updated successfully, but these errors were encountered: