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

Fault silently allows poking non-existing ports #206

Open
rdaly525 opened this issue Jan 30, 2020 · 2 comments
Open

Fault silently allows poking non-existing ports #206

rdaly525 opened this issue Jan 30, 2020 · 2 comments

Comments

@rdaly525
Copy link

I would expect the following code to raise an error or warning trying to poke a bad port. When you try to peek a bad port, it does error.

tester = Tester(my_circuit)
tester.circuit.NON_EXISTANT_PORT = 5
test.eval()
tester.compile_and_run("verilator")
@leonardt
Copy link
Owner

Technically this is valid default Python behavior (you can set new attributes on an object), but we can make it an error

@leonardt
Copy link
Owner

Confirmed, this does work with normal objects (but not when you do object())
E.g.

>>> class A:
...     pass
...

>>> a = A()
>>> a.x = 3

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

2 participants