-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Use BundleBridge to propagate tile input "constants" #2521
Conversation
b1d2bb1
to
e5b737e
Compare
bee7db8
to
230cf4f
Compare
e5b737e
to
0286604
Compare
cc5a02e
to
f982cb0
Compare
{ | ||
// optionally add ROM devices | ||
val bootROM = p(BootROMLocated(location)).map { BootROM.attach(_, this, CBUS) } | ||
val maskROMs = p(MaskROMLocated(location)).map { MaskROM.attach(_, this, CBUS) } |
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.
@rmac-sifive These are candidate targets for a more generic HasDevices
trait in rocket-chip, but note that the BootROM
one needs more than just Attachable
src/main/scala/rocket/ICache.scala
Outdated
@@ -52,13 +52,14 @@ class ICacheErrors(implicit p: Parameters) extends CoreBundle()(p) | |||
val bus = Valid(UInt(width = paddrBits)) | |||
} | |||
|
|||
class ICache(val icacheParams: ICacheParams, val hartId: Int)(implicit p: Parameters) extends LazyModule { | |||
class ICache(val icacheParams: ICacheParams, val staticIdForMetadata: Int)(implicit p: Parameters) extends LazyModule { |
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.
maybe we should call this "staticIdForMetadataOnly"
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.
yes Only
seems like a useful addition in terms of my intended meaning
Co-authored-by: Megan Wachs <megan@sifive.com>
Co-authored-by: Megan Wachs <megan@sifive.com>
Co-authored-by: Megan Wachs <megan@sifive.com>
Co-authored-by: Megan Wachs <megan@sifive.com>
Co-authored-by: Megan Wachs <megan@sifive.com>
Co-authored-by: Megan Wachs <megan@sifive.com>
Co-authored-by: Megan Wachs <megan@sifive.com>
Co-authored-by: Megan Wachs <megan@sifive.com>
Co-authored-by: Megan Wachs <megan@sifive.com>
148cc1c
to
d99f1b0
Compare
This PR's CI seems to be permanently stuck. Github action/cache always hits, but returns cache sizes of 0MB. Opening a new PR #2531 to replace this one seems to have magically fixed it. |
chipsalliance/rocket-chip#2521 replaces case object BootROMParams extends Field[BootROMParams] with case class BootROMLocated(loc: HierarchicalLocation) extends Field[Option[BootROMParams]](None) This commit updates DromajoHelper to take a HierarchicalLocation and updates the lookup of DRAMOJO_RESET_VECTOR adn DRAMOJO_MMIO_START accordingly.
def makeIO()(implicit valName: ValName): T = { | ||
val io: T = IO(Flipped(chiselTypeClone(bundle))) | ||
val io: T = IO(if (inferInput) Input(chiselTypeOf(bundle)) else Flipped(chiselTypeClone(bundle))) | ||
io.suggestName(valName.name) | ||
bundle <> io |
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.
I just felt confused here. By code reading, I felt like the direction of makeIO of BundleBridgeSourceNode is Input, While the direction of makeIO of BundleBridgeSinkNode is Output. I felt like this is strange, the source node only has output bundles and the sink only has input right? Why this is opposite here. Also, if inferInput is false in the makeIO of BundleBridgeSource, why we need to Flipped the orignal direction, while inside the BundleBridgeSink, there is no Flipped? it is wired. Seems like the io after calling makeIO in corresponding node is opposite with its original IO, why?
@hcook @mwachs5 @jackkoenig
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.
I just felt confused here. By code reading, I felt like the direction of makeIO of BundleBridgeSourceNode is Input, While the direction of makeIO of BundleBridgeSinkNode is Output. I felt like this is strange, the source node only has output bundles and the sink only has input right? Why this is opposite here. Also, if inferInput is false in the makeIO of BundleBridgeSource, why we need to Flipped the orignal direction, while inside the BundleBridgeSink, there is no Flipped? it is wired. Seems like the io after calling makeIO in corresponding node is opposite with its original IO, why?
@hcook @mwachs5 @jackkoenig
I answer (more or less) this question in stackoverflow https://stackoverflow.com/questions/66963837/how-to-understand-the-flip-in-autobundle-and-in-makeios
The "TileInputConstants" are increasingly less constant in certain configurations. Meanwhile, use of
hartId: Int
to generate circuits within the tile continues to occasionally foil deduplication across tiles. This PR attempts to address both issues by:HasTileParmas.hartId
and providing the more clearly namedstaticIdForMetadataUseOnly
to replace itType of change: other enhancement
Impact: API modification
Development Phase: implementation
Release Notes
HasPeripheryBootROM
andHasPeripheryBootROMModuleImp
are removed and replaced by a call toBootROM.attach
BootROMParams
Field
is removed and replaced withBootROMLocated
Field
MaskROMLocated
Field
is addedSubsystemExternalResetVectorKey
,SubsystemExternalHartIdWidthKey
andInsertTimingClosureRegistersOnHartIds
Fields
are addedResetVectorBits
Field
is removedHasExternallyDrivenTileConstants
bundle mixin is removedHasResetVectorWire
subsystem trait is removedHasTileInputConstants
andInstantiatesTiles
subsystem traits are addedBaseTile
exposesval hartIdNode: BundleBridgeNode[UInt]
andresetVectorNode: BundleBridgeNode[UInt]
and these are automatically connected to inHasTiles
.rocket.Frontend, rocket.ICache, rocket.DCache, rocket.NDCache
now haveBundleBridgeSink[UInt]
for their reset vector or hartid wire inputs. If you instantiate them manually, i.e. not using the traits e.g.rocket.HasHellaCache
, you will have to manually connect up those nodes to the aforementionedBaseTile
nodes.