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

Check combinational loop #931

Open
taichi-ishitani opened this issue Sep 3, 2024 · 3 comments
Open

Check combinational loop #931

taichi-ishitani opened this issue Sep 3, 2024 · 3 comments
Labels
tools Tools feature

Comments

@taichi-ishitani
Copy link
Contributor

Combinational loop should be resolved but Veryl does not check it.

image

@dalance dalance added the tools Tools feature label Sep 3, 2024
@nblei
Copy link
Contributor

nblei commented Nov 1, 2024

How general should combinational loop checking be?

Should veryl compiler fully elaborate and flatten the design, including all generate blocks, to identify combinational loops?

How do inout ports get handled?

This is a very big task, I think. But also a useful one. It would be very cool to see combinational loop detection via language server.

@taichi-ishitani
Copy link
Contributor Author

Should veryl compiler fully elaborate and flatten the design, including all generate blocks, to identify combinational loops?

Veryl compiler is a just transpiler so it's difficult to check combinational loops including paths crossing module boundaries as you mention.
I'm implementing feature to track all of assignments and references in PR #1036. I think we can trace combinational paths not crossing a module boundary by using this feature.

@nblei
Copy link
Contributor

nblei commented Nov 3, 2024

Within module would still require some effort for generate blocks.

For example,

assign v[0] = v[31];
for i in 1..32 {
  assign v[i] = v[i-1];
}

contains a combinational loop.

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

No branches or pull requests

3 participants