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
When first called, obj doesn't yet have the attributes (e.g. axil_AWVALID) populated. The for loop will iterate through the dir, but not find the signal we are looking for and the function will return None as the handle.
I noticed that hasattr and getattr are not case sensitive for me. So my current workaround for this is to (counterintuitively) set case_insensitive=False in the call to BusDriver.__init__ so this code doesn't get called.
I'm instantiating an AXI4LiteMaster in my testbench.
With the default behaviour in cocotb_bus 0.2.1 installed from pypi the following line fails:
cocotb-bus/src/cocotb_bus/drivers/amba.py
Line 67 in 2c846dc
with
AttributeError: 'NoneType' object has no attribute 'setimmediatevalue'
I traced the cause to this function:
cocotb-bus/src/cocotb_bus/bus.py
Lines 78 to 82 in 2c846dc
When first called,
obj
doesn't yet have the attributes (e.g.axil_AWVALID
) populated. The for loop will iterate through thedir
, but not find the signal we are looking for and the function will returnNone
as the handle.I noticed that
hasattr
andgetattr
are not case sensitive for me. So my current workaround for this is to (counterintuitively) setcase_insensitive=False
in the call toBusDriver.__init__
so this code doesn't get called.cocotb-bus/src/cocotb_bus/drivers/amba.py
Line 64 in 2c846dc
The text was updated successfully, but these errors were encountered: