-
Notifications
You must be signed in to change notification settings - Fork 68
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
Combinational sensitivity refactor and SSA #344
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…vers, conditionals of conditionals
This was referenced Apr 19, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description & Motivation
This PR is a significant refactor of
Combinational
to make it safer to use.Combinational
. This also removesFullyCombinational
stuff. This exposes previous unit-test failures which were a result of "write after read" implementations.Combinational
against "write after read" behavior.Combinational.ssa
which uses "static single-assignment form" (SSA) to "rename" signals to automatically avoid "write after read" scenarios.Pipeline
abstractions to useCombinational.ssa
since they encourage and leverage "write after read" coding styles for flexibility.SimCompare
:checkIverilogVector
so you don't have to compare the bool afterwards, and a mask for known warnings to remove known print messages while doing verilog simulations in the test suite.SynchronousSubscription
) whenever aglitch
is listened to. This mirrors capabilities ofStream
s.drivers
andreceivers
in conditional logic to use lazy evaluation to avoid recalculation during simulation, which should provide some boost to simulation performance.If
andIfBlock
, with newIf.block
API.Related Issue(s)
Fix #312
Fix #290
Fix #286
Fix #285
Testing
Combinational.ssa
.Pipeline
tests to cover potential new scenarios.Backwards-compatibility
Yes!
Combinational
will now throw fatal exceptions in case of "write after read".Logic
functionsincr
,decr
,mulAssign
, anddivAssign
now require an SSA-like renaming function forCombinational
use since they inherently cause "write after read" behavior without one. The API has changed to use named parameters to support using this for eitherCombinational.ssa
orSequential
.FullyCombinational
was removed entirely, along withModule.combinationalPaths
andModule.reverseCombinationalPaths
.getReceivers
,getDrivers
, andgetConditionals
in_Always
blocksCombinational
andSequential
.IfBlock
in favor ofIf.block
.Documentation
Documentation was upated in API docs. No new separate README or other docs were written about
Combinational.ssa
since it's generally a more advanced topic. Eventually a small article would be nice on the topic.