[test] Add tests of domain crossings w/ assertions#5280
Open
[test] Add tests of domain crossings w/ assertions#5280
Conversation
Add semi-comprehensive tests of different dummy clock crossings: (1) synchronous, (2) rational, and (3) asynchronous. Use property assertions to show how these crossings can be written to disallow crossings which are supposed to not be allowed. E.g., this shows that a synchronous crossing cannot be used to cross between rationally related domains or to do fully asynchronous crossings. While not shown (for brevity) these are intended to be added to strengthen the otherwise entirely unsafe `domain.unsafeCast` API. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
dc32ddd to
0e5a64c
Compare
This file contains hidden or 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
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.
Add semi-comprehensive tests of different dummy clock crossings: (1)
synchronous, (2) rational, and (3) asynchronous. Use property assertions
to show how these crossings can be written to disallow crossings which are
supposed to not be allowed. E.g., this shows that a synchronous crossing
cannot be used to cross between rationally related domains or to do fully
asynchronous crossings.
While not shown (for brevity) these are intended to be added to strengthen
the otherwise entirely unsafe
domain.unsafeCastAPI.Note: this test will build these, but doesn't do anything as
domaintoolis not available. This passes locally for me. However, once we have afirtool-resolverthat includes this, or separate publishing ofdomaintool, then this can be used for checking correctness of domain crossings.I can't currently express everything I want with checking rational crossings and am in the process of adding boolean operations to the FIRRTL and OM dialects. Granted, this is just a test, so it's kind of fine if these are "weird" crossings that don't work as they entirely should.