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

"Failure to assign" error feedback #184

Open
dan-fritchman opened this issue Sep 7, 2023 · 0 comments
Open

"Failure to assign" error feedback #184

dan-fritchman opened this issue Sep 7, 2023 · 0 comments

Comments

@dan-fritchman
Copy link
Owner

Example:

@h.module 
class M:
  i = h.Input()
  o = h.Output()
  s = h.Signal()

There is a similar-looking, but not-working, alternative one might write like so:

@h.module 
class M:
  h.Input(name="i")
  h.Output(name="o")
  h.Signal(name="s")

That "works", in the sense that Python will compile and execute it. But it is highly unlikely to be what the author intended. In the latter case the hdl21.Module M is empty.

Note I do not think the latter should "work". It would be nice to produce some kinda error or feedback though.

But - either "working" or just producing the error would seem to require some tracking of execution context, which I don't love.
Maybe something better will come up.

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