- class systemrdl.RDLWalker(unroll: bool = False, skip_not_present: bool = True)¶
Implements a walker instance that traverses the elaborated RDL instance tree Each node is visited exactly once.
Each node is visited as follows:
enter_*()callback, such as
Traverse any children
exit_*()callback, such as
unroll (bool) – If True, any nodes that are arrays are unrolled. When the walker arrives at an array node, it will be visited multiple times according to the array dimensions.
skip_not_present (bool) – If True, walker skips nodes whose ‘ispresent’ property is set to False
- walk(node: Node, *listeners: RDLListener, skip_top: bool = False) None ¶
Initiates the walker to traverse the current
nodeand its children. Calls the corresponding callback for each of the
listenersprovided in the order that they are listed.
Changed in version 1.21: Added
- class systemrdl.RDLListener¶
Base class for user-defined RDL traversal listeners.
Changed in version 1.23: Added optional WalkerAction return value
- class systemrdl.WalkerAction(value)¶
- Continue = 0¶
Continue walking the register model
- SkipDescendants = 1¶
Walker will continue calling listener methods for this component, but will not recurse into this node’s children.
- StopNow = 2¶
Stop the walker immediately. No more listener methods will be called.