SpinalTag Question #1255
-
I am able to create a custom tag and add it to a signal/find after elaboration, but don't see a way for the tag to reference its parent; i.e. can the tag do a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
A tag has no inherent method of finding the signal/component it's on (you could add the same tag instance on multiple components if you wanted to). If you need that then you have to pass the signal/component to the tag at some point (or have the tag search itself...). SpinalHDL uses Tags just as a marker/carrier of some additionally needed information. The logic itself is implemented by having a pass (could also be some rework step) that uses the tags as information on what to do. The tag itself is only carrier the additional information needed. |
Beta Was this translation helpful? Give feedback.
A tag has no inherent method of finding the signal/component it's on (you could add the same tag instance on multiple components if you wanted to). If you need that then you have to pass the signal/component to the tag at some point (or have the tag search itself...).
SpinalHDL uses Tags just as a marker/carrier of some additionally needed information. The logic itself is implemented by having a pass (could also be some rework step) that uses the tags as information on what to do. The tag itself is only carrier the additional information needed.