Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LogicArray in cocotb has been rewritten #88

Open
davekeeshan opened this issue Jun 5, 2024 · 1 comment · May be fixed by #91
Open

LogicArray in cocotb has been rewritten #88

davekeeshan opened this issue Jun 5, 2024 · 1 comment · May be fixed by #91

Comments

@davekeeshan
Copy link

There has be a few extensive changes in cocotb that have resulted in cocotbext-axi not working against the head of the repo. It related to this change cocotb #3792, which changes and deprecates how things are done.

In my testing this is the first fallover in cocotbext-axi:

File "/mnt/sda/projects/cocotbext-axi/cocotbext/axi/stream.py", line 123, in __init__
    v.binstr = 'x'*len(v)
    ^^^^^^^^
AttributeError: property 'binstr' of 'LogicArray' object has no setter

I fixed (or bypassed) that one, but there are more, I am still unclear what this base code is doing and just the start of the rabbit hole:

Traceback (most recent call last):
  File "/mnt/sda/projects/cocotbext-axi/cocotbext/axi/axi_master.py", line 592, in _process_write_resp
    bid = int(getattr(b, 'bid', 0))
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/sda/projects/cocotb/src/cocotb/types/logic_array.py", line 460, in __int__
    return self.to_unsigned()
           ^^^^^^^^^^^^^^^^^^
  File "/mnt/sda/projects/cocotb/src/cocotb/types/logic_array.py", line 361, in to_unsigned
    value = value << 1 | int(bit)
                         ^^^^^^^^
  File "/mnt/sda/projects/cocotb/src/cocotb/types/logic.py", line 243, in __int__
    raise ValueError(f"Cannot convert {self!r} to int")
ValueError: Cannot convert Logic('X') to int

Reporting to start, I may get time to see if I can propose fixes

@p12tic
Copy link

p12tic commented Sep 6, 2024

This will be fixed by #91.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants