Open darsor opened 2 months ago
x
would be a better choice. Its equally possible to introduce bugs that incorrectly rely on zeros when valid is low
Great point. Then any reliance on signal values when *VALID
is low can be caught in simulation.
I was able to hack this functionality in by adding
for sig_name, sig_handle in self.bus._signals.items():
if not sig_name.endswith(("valid", "ready")):
sig_handle.value = BinaryValue("x"*sig_handle.value.n_bits)
to the StreamSource
_run()
coroutine here. Then every time it sets *valid
low it sets all the other signals to X
.
First of all, incredible library. Well designed and well engineered. Thanks for your hard work!
I'm testing a custom AXI module whose upstream master likes to drive all channel signals back to 0 when
*VALID
is low. Because this python library doesn't change the signal values when*VALID
goes low, there was an uncaught bug where my module depended on this library's behavior.Would it be possible to add an option to drive channel signals back to some default value when not active?