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

Unreachable condition in stoch_add #31

Closed
nblei opened this issue Mar 17, 2024 · 1 comment
Closed

Unreachable condition in stoch_add #31

nblei opened this issue Mar 17, 2024 · 1 comment

Comments

@nblei
Copy link
Contributor

nblei commented Mar 17, 2024

In stoch_add.sv you have, essentially

assign y = c >= 1;

But then in the comb block, you have

if (~|c & y) next_counter ...

This seemed strange to me, so I added a coverage check

cov_possable: cover property ((~|c & y));

and indeed, this is uncoverable. So simply replacing that procedural block with assign next_counter = c-y; will lead to better hardware implementation.

@darsnack
Copy link
Member

Indeed that guard is not necessary and can be removed. Would you like to submit a PR? Otherwise I'll take care of it later.

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