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

bus array_idx is causing issues with enum arrays #81

Open
s3bs opened this issue Aug 2, 2024 · 1 comment
Open

bus array_idx is causing issues with enum arrays #81

s3bs opened this issue Aug 2, 2024 · 1 comment

Comments

@s3bs
Copy link

s3bs commented Aug 2, 2024

if array_idx is not None:
handle = handle[array_idx]

previous implementation prior to cocotb/cocotb#2304 used a different way and that worked

ie.

# works
getattr(dut, "my_signal[0]")  
# doesn't work
handle = getattr(dut, "my_signal")
handle[0]
-->  IndexError: my_signal(GPI_ENUM) is not indexable.  Unable to get object at index 0

Signal that is accessed is
my_enum_e [SIZE-1:0] my_signal

using Linux, xcelium 24.03-s004, cocotb 1.4

the above works with the build in bus.py from cocotb 1.4 but not with this library

@s3bs
Copy link
Author

s3bs commented Aug 5, 2024

persists in v1.8.0

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

No branches or pull requests

1 participant