Add autoinst_multidim_rename test and fix for issue #1848 #1850
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I had some more time to look into this, and I have both a test case and a fix for the issue. The summary of the changes are as follows:
vl-bits
without the logic that prevents displaying it in certain circumstances. This ensures it has the correct value when used in the multi-dim hint comment, as well as ensuring it will have the correct value if the user uses it directly in an@"(...)"
expression.auto-inst-vector
for theauto-inst-vector
component that can be masked ifverilog-auto-inst-vector
isn'tt
or'unsigned
and the net is signed, or if the port name matches one of the moddecls names (typically wires or outputs on the parent module) and the dimensions match. This preserves the original behavior expected byverilog-auto-inst-vector
.AUTO_TEMPLATE
), then the name after renaming is used for the check (result is inauto-inst-vector-tpl
). This ensures thatAUTOWIRE
/AUTOINPUT
/AUTOOUTPUT
works correctly for connections within a block, but it matches the expected behavior if the output port/wire already exists.