Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Generated C++ array index out of bound #630
For the following code, Verilator generates incorrect code where array index is out of bound.
Specifically, the signal involved is @conf@ which is an array and it triggers a "UNOPTFLAT" warning by Verilator. However, if we disable the "UNOPTFLAT" warning, Verilator will generate C++ code. But the index of the array is not correct.
But in Vsim_top.cpp::_change_request, these are used as:
The verilog was compiled with
Original Redmine Comment
The error code is caused by the processing of circular array in V3Changed.cpp. A possible fix would be:
Although not sure if this is proper, it temporarily fix our problem.