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

Missing wait for 0 ns in else-branch in WaitForLevel procedure #73

Open
Paebbels opened this issue May 2, 2022 · 2 comments
Open

Missing wait for 0 ns in else-branch in WaitForLevel procedure #73

Paebbels opened this issue May 2, 2022 · 2 comments

Comments

@Paebbels
Copy link
Member

Paebbels commented May 2, 2022

The WaitForLevel procedures have no else-branch with a delta-cycle delay in it.

If a WaitForLevel is used to also update signal assignments when the next wait statement is reached, it's not guaranteed by the implementation that all execution paths will cause an assignment.

Suggested solution:

if ... then
  -- wait until ...
else
  wait for 0 ns;
end if;
@JimLewis
Copy link
Member

JimLewis commented May 2, 2022

Can you share a use model?

@Paebbels
Copy link
Member Author

Paebbels commented May 2, 2022

dut_input <= '1';
WaitForLevel(dut_output);

dut_input <= '0';
wait until dut_error = '1';

This might never assign dut_input, because WaitForLevel doesn't always wait, but a user expects a wait procedure to behave like a wait statement. (That's the intension of a wait procedure, to abstract wait statements, right?)

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