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

🧪 try to fix *_reduce_f functions usage for gate-level simulation #290

Merged
merged 4 commits into from
Mar 20, 2022

Conversation

stnolting
Copy link
Owner

@stnolting stnolting commented Mar 19, 2022

This PR changes the way the *_reduce_f functions from the NEORV32 package are used.

If the function result is used for direct signal assignment this can cause undefined ('X' or 'U') signal states, which might corrupt gate-level simulation.

Current (pre-PR):

some_signal <= or_reduce_f(another_signal);

Proposed (post-PR):

some_signal <= '1' when (or_reduce_f(another_signal) = '1') else '0';

Furthermore, synthesis seems to be able to do better optimizations when using the changes from this PR (at least Intel Quartus).

There are no functional (real hardware) changes caused by this PR.

do not use function result for direct signal assignment
@stnolting stnolting added the experimental Experimental feature label Mar 19, 2022
@stnolting stnolting self-assigned this Mar 19, 2022
@stnolting stnolting marked this pull request as ready for review March 19, 2022 13:57
@stnolting stnolting merged commit 8f58987 into main Mar 20, 2022
@stnolting stnolting deleted the fix_xreduce_sim_issues branch March 20, 2022 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental Experimental feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant