-
Notifications
You must be signed in to change notification settings - Fork 29
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
[Proposal] Remove implicit truncations. #165
Open
darthscsi
wants to merge
1
commit into
main
Choose a base branch
from
dev/darthscsi/notrunc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -1093,8 +1093,8 @@ Finally, while submodules instances and memories are strictly sources, they inte | |||||
|
||||||
The type equivalence relation is used to determine whether a connection between two components is legal. | ||||||
|
||||||
An unsigned integer type is always equivalent to another unsigned integer type regardless of bit width, and is not equivalent to any other type. | ||||||
Similarly, a signed integer type is always equivalent to another signed integer type regardless of bit width, and is not equivalent to any other type. | ||||||
An unsigned integer type may be connected to another unsigned integer type of equal or longer width or with an uninferred width. | ||||||
Similarly, a signed integer type may be connect to another signed integer type of equal or longer width or with an uninferred width. | ||||||
|
||||||
Clock types are equivalent to clock types, and are not equivalent to any other type. | ||||||
|
||||||
|
@@ -1103,14 +1103,14 @@ It cannot be connected to both a `UInt`{.firrtl} and an `AsyncReset`{.firrtl}. | |||||
|
||||||
The `AsyncReset`{.firrtl} type can be connected to another `AsyncReset`{.firrtl} or to a `Reset`{.firrtl}. | ||||||
|
||||||
Two enumeration types are equivalent if both have the same number of variants, and both the enumerations' i'th variants have matching names and equivalent types. | ||||||
Two enumeration types may be connected if both have the same number of variants, and both the enumerations' i'th variants have matching names and equivalent types. | ||||||
|
||||||
Two vector types are equivalent if they have the same length, and if their element types are equivalent. | ||||||
Two vector types may be connected if they have the same length, and if their element types are connectable. | ||||||
|
||||||
Two bundle types are equivalent if they have the same number of fields, and both the bundles' i'th fields have matching names and orientations, as well as equivalent types. | ||||||
Two bundle types may be connected if they have the same number of fields, and both the bundles' i'th fields have matching names and orientations, as well as connectable types. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
Consequently, `{a:UInt, b:UInt}`{.firrtl} is not equivalent to `{b:UInt, a:UInt}`{.firrtl}, and `{a: {flip b:UInt}}`{.firrtl} is not equivalent to `{flip a: {b: UInt}}`{.firrtl}. | ||||||
|
||||||
Two property types are equivalent if they are the same concrete property type. | ||||||
Two property types are connectable if they are the same concrete property type. | ||||||
|
||||||
## The Connect Statement | ||||||
|
||||||
|
@@ -1135,12 +1135,10 @@ In order for a connection to be legal the following conditions must hold: | |||||
|
||||||
4. The left-hand side and right-hand side types are not property types. | ||||||
|
||||||
Connect statements from a narrower ground type component to a wider ground type component will have its value automatically sign-extended or zero-extended to the larger bit width. | ||||||
The behavior of connect statements between two circuit components with aggregate types is defined by the connection algorithm in [@sec:the-connection-algorithm]. | ||||||
|
||||||
### The Connection Algorithm | ||||||
|
||||||
Connect statements between ground types cannot be expanded further. | ||||||
Connect statements from a narrower ground type component to a wider ground type component will have its value automatically sign-extended or zero-extended to the larger bit width. | ||||||
|
||||||
Connect statements between two vector typed components recursively connects each sub-element in the right-hand side expression to the corresponding sub-element in the left-hand side expression. | ||||||
|
||||||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.