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

Fix input ordering isses in Verilog generation #1294

Merged
merged 12 commits into from
May 21, 2021
Merged

Conversation

atomb
Copy link
Contributor

@atomb atomb commented May 14, 2021

This adapts SAWScript to GaloisInc/what4#122 allowing SAW to control the order of inputs in generated Verilog modules.

Fixes GaloisInc/what4#121 and the associated buggy counterexamples in SAW.

Aaron Tomb added 9 commits May 17, 2021 16:28
This builds on the same changes to What4 used to fix counterexamples
for w4_abc_verilog.
Instead of ad-hoc reversing in various places, adapt readFiniteValues
to be parameterized by endianness. Typical Verilog ordering, including
in that generated by What4, is little endian.
@atomb atomb marked this pull request as ready for review May 18, 2021 15:25
Copy link
Contributor

@robdockins robdockins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nitpicks, otherwise looks OK to me

saw-core-what4/src/Verifier/SAW/Simulator/What4.hs Outdated Show resolved Hide resolved
saw-core/src/Verifier/SAW/FiniteValue.hs Show resolved Hide resolved
@atomb atomb added the ready-to-merge If at least one person approves this PR, automatically merge it when CI finishes successfully. label May 21, 2021
@mergify mergify bot merged commit 5535b03 into master May 21, 2021
@mergify mergify bot deleted the at-verilog-inputs branch May 21, 2021 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge If at least one person approves this PR, automatically merge it when CI finishes successfully.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The order of inputs in generated Verilog is unpredictable
2 participants