Replies: 1 comment
|
Yeah, I think both of these are reasonable: the specific error here can be made suppressible, and also we can try harder to detect if statements that have known constant false values. That will always be based on heuristics since slang isn't going to do a full constant propagation pass at this point in AST construction but for simple cases it should be doable. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm working on an existing codebase that has modules like this:
If
DELAYis greater than 1, all is fine.However, if
DELAY==1, slang will error this module because the assignation in the if statement is invalid, even though it would never execute as the if statement will always be false.Is it possible for slang to ignore "always false paths" in if statements, or have a way downgrade the error to a warning? I understand the prefered way is to use a generate block, but this syntax is accepted by synthesis tool and pass the "logically ok" test.
All reactions