-
Notifications
You must be signed in to change notification settings - Fork 0
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
Stream compatatibility checks #15
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
Tiny bit of refactoring.
Type tags are generally not available, unless implemented everywhere in the toolchain.
Default dimensionality is now 1 instead of 0.
Multiple overloaded methods cannot define default arguments, however.
This has the issue that type parameters are not checked.
Run formatting.
Define := function singularly in base class so default arguments can be used.
Merged
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.
This PR adds support for compatibility checking of streams.
There are three types of checks:
n
,d
,c
)One can select the strictness of the check through an implicit parameter of type
CompatCheck
. The strict check is default and checks if both streams use the same data-type. The weaker check (calledParameter
) only checks the bit width of the used data-types.One can select if errors should be thrown on incompatible streams or to print warnings (useful if checking all the issues in a design since execution stops at exceptions) by an implicit parameter of type
CompatCheckResult
.The connection function
:=
is now defined in thePhysicalStreamBase
class and calls the correct data connection methods through matching and upcasting the arguments. This has the advantage that:=
can now use default arguments as there are no overloaded methods anymore.:@=
is the meta-connect function that only connects the meta signals of two streams and checks the parameter compatibility.:~=
is a shorthand for using:=
in an environment whereimplicit val errorReporting: CompatCheck.Value = CompatCheck.Params
. I.e.: quick weak connect function.Two examples/tests were updated because they had incompatible streams.