|
Hi, I'm trying to get the frame that 'contains' a given signal by using the signal name, something like this def get_frame_by_signal(unconditional_frames, signal_name: str):
for frame in unconditional_frames:
if frame._get_signal(signal_name) is not None:
return frame
return NoneIt seems to work, but I would like to know if there's a cleaner way since I'm not used to python. Regards |
Replies: 2 comments 2 replies
|
In the latest version there's no back reference from signal to unconditional frame, this issue can be solved within the parser and looking at the standard we can assume that the relation is 1-to-1.
Until this is implemented you should keep using your solution. One recommendation regarding Python is not to use functions/variables from the library starting with an underscore, that is used to indicate that it's private and therefore might break at one point. In the I will convert this discussion into an issue and try to schedule it for |
The issue has been resolved and was released in 0.14.0, you can now use
ldf.get_signal('Signal_name').frameto retrieve the unconditional frame the signal is used in.I will mark this discussion as resolved.