Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Internal Error when localparam is assigned by constant function returning a nested struct #1149
Author Name: Matt Myers
The attached example shows a localparam assigned by a constant function which returns a nested struct.
The code results in the following Verilator error:
There are two tweaks that cause the code to work:
In a larger system, this incompatibility is not actually causing a compile error, but it is causing a problem where a generate statement that uses this nested struct field as an upper bound on a for loop is not iterating properly. I got this Internal Error when trying to create a small test case.
Run the test with: