-
Notifications
You must be signed in to change notification settings - Fork 597
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
Allow BoringUtils.bore to work on probes #3908
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -224,9 +224,14 @@ object BoringUtils { | |
else if (DataMirror.hasOuterFlip(source)) Flipped(chiselTypeOf(source)) | ||
else chiselTypeOf(source) | ||
def purePortType = createProbe match { | ||
case Some(pi) if pi.writable => RWProbe(purePortTypeBase) | ||
case Some(pi) => Probe(purePortTypeBase) | ||
case None => purePortTypeBase | ||
case Some(pi) => | ||
// If the source is already a probe, don't double wrap it in a probe. | ||
purePortTypeBase.probeInfo match { | ||
case Some(_) => purePortTypeBase | ||
case None if pi.writable => RWProbe(purePortTypeBase) | ||
case None => Probe(purePortTypeBase) | ||
} | ||
case None => purePortTypeBase | ||
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. Some of the below logic maybe can/should be tweaked, not sure and maybe better to defer that to a later simplification. |
||
} | ||
def isPort(d: Data): Boolean = d.topBindingOpt match { | ||
case Some(PortBinding(_)) => true | ||
|
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.
Things get strange if the bore/tap target is mixed probe/non-probe, but that's already true.
(or if has incompatible probe type vs requested kind)
Not sure what the errors look like if this is wrong.
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.
Not something to be addressed here unless it seems easy/reasonable to address while visiting (?), just a note.