Array index reset - #334
Open
davekeeshan wants to merge 3 commits into
Open
Conversation
…ues. Complete elaboration, validation, and node API support for heterogeneous array element overrides so indexed reset DPAs work on reg arrays, parameterized dimensions, and downstream type-name generation (SystemRDL#51). Co-authored-by: Cursor <cursoragent@cursor.com>
Add _copy_for_array_element() with an explicit opt-out from copying sibling override dicts, preserving array metadata for path and address resolution. Add a 32-element regression test. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
I raised this as a possibility in the comment thread of #51, but there was no feedback, I figured I open a PR so we can address it properly. I have made this change locally and it is working for my team
Adds limited support for heterogeneous instance arrays via indexed dynamic property assignments (DPAs), addressing the use case in #51 Support for heterogeneous-arrays.:
Example:
Support is intentionally limited to the
resetproperty only. Other properties, array sub-ranges, and references that index more than one array in the same path remain unsupported.Implementation
Indexed DPAs that target a single array element create a per-element component override in
AddressableComponent.array_element_overrides. Elements without an override continue to share the array's component tree, preserving structural identity (size, addressing, field layout).regarrays), and propagate array metadata to overridesis_array, addressing, and path behaviour for unrolled elements; extended DPA type names on override subtrees (e.g.CFG_reset_bvsCFG_reset_a)Limitations
resetmay be assigned via an indexed DPA referencerf[0].r1[1].f->resetis rejected)my_inst[1:4]) are not supportedDocumentation
Updates
docs/known_issues.rstanddocs/dev_notes/instance_arrays.rstto describe the supported subset and internal representation.Test plan
test/test_dpas.py— indexed reset on regfile arrays, reg arrays, parameterized dimensions, whole-array DPA propagation, type-name differentiation, array API consistencyresetproperty, OOB index, multi-array path, dimension mismatch, invalid reset widthPartially addresses #51 (reset-only heterogeneous arrays).