You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, cocotb-bus lacks the ability to wire a bus driver or monitor (e.g., AvalonSTPkts) to a SystemVerilog struct. Many users prefer to use structs for their interfaces, and as a result, have to create wrappers specifically for cocotb simulation, which can be cumbersome.
I've developed a fix for this issue. The solution basically passes a handle dict to the Bus class constructor. In this dict, keys represent the signal names like StartOfPacket, while the values are the corresponding cocotb handles.
For example, here is a helper function that generates a handle dict for an Avalon bus:
For example, I have this helpful function for avalon bus:
Currently, cocotb-bus lacks the ability to wire a bus driver or monitor (e.g., AvalonSTPkts) to a SystemVerilog struct. Many users prefer to use structs for their interfaces, and as a result, have to create wrappers specifically for cocotb simulation, which can be cumbersome.
I've developed a fix for this issue. The solution basically passes a handle dict to the Bus class constructor. In this dict, keys represent the signal names like
StartOfPacket
, while the values are the corresponding cocotb handles.For example, here is a helper function that generates a handle dict for an Avalon bus:
For example, I have this helpful function for avalon bus:
The fix modifies the Bus class. For example, here are some of the changes:
This modification has worked great in my local tests. Would the maintainers be interested in this addition? If so, may I go ahead and create a PR?
The text was updated successfully, but these errors were encountered: