Describe the bug
Arrays of external components with write-buffered registers crash the exporter.
Details like these can be helpful:
peakrdl-regblock v1.3.1
Reproduced with
external myreg ext_reg_array[2];
added to the read buffer/write buffer test RDL files.
Error message:
@property
def current_loop(self) -> Body:
> return self._stack[-1]
E IndexError: list index out of range
../src/peakrdl_regblock/forloop_generator.py:44: IndexError
Additional context
Bug introduced in #192. Specifically, this method was added to the read buffering/write buffering for loop implementations:
def enter_AddressableComponent(self, node: AddressableNode) -> Optional[WalkerAction]:
if node.external:
return WalkerAction.SkipDescendants
return super().enter_AddressableComponent(node)
Note that the parent's enter_AddressableComponent is not called if the node is external. If the node is an array, that means the array's dimensions are not "pushed" into the loop generator. However, the default exit_AddressableComponent method still tries to "pop" those dimensions from the generator.
PR incoming.
Describe the bug
Arrays of external components with write-buffered registers crash the exporter.
Details like these can be helpful:
peakrdl-regblock v1.3.1
Reproduced with
added to the read buffer/write buffer test RDL files.
Error message:
Additional context
Bug introduced in #192. Specifically, this method was added to the read buffering/write buffering for loop implementations:
Note that the parent's
enter_AddressableComponentis not called if the node is external. If the node is an array, that means the array's dimensions are not "pushed" into the loop generator. However, the defaultexit_AddressableComponentmethod still tries to "pop" those dimensions from the generator.PR incoming.