-
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
First try to purge out ClockGroup API #3582
base: dev
Are you sure you want to change the base?
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 |
---|---|---|
|
@@ -21,15 +21,18 @@ trait LazyScopeWithParameters extends LazyScope { this: LazyModule => | |
implicit val p: Parameters | ||
} | ||
|
||
/** provide [[anyLocationMap]] to store Locations. */ | ||
trait HasLocations { this: LazyModule => | ||
val anyLocationMap = LocationMap.empty[Any] | ||
} | ||
|
||
/** Layers of hierarchy with this trait contain attachment points for neworks of power, clock, reset, and interrupt resources */ | ||
trait HasPRCILocations extends LazyScopeWithParameters { this: LazyModule => | ||
val allClockGroupsNode: ClockGroupNode | ||
val ibus: InterruptBusWrapper | ||
val anyLocationMap = LocationMap.empty[Any] | ||
} | ||
|
||
/** Layers of hierarchy with this trait contain attachment points for TileLink interfaces */ | ||
trait HasTileLinkLocations extends HasPRCILocations { this: LazyModule => | ||
trait HasTileLinkLocations extends HasLocations with LazyScope { this: LazyModule => | ||
val busContextName: String | ||
val tlBusWrapperLocationMap = LocationMap.empty[TLBusWrapper] | ||
def locateTLBusWrapper(location: Location[TLBusWrapper]): TLBusWrapper = locateTLBusWrapper(location.name) | ||
|
@@ -38,19 +41,19 @@ trait HasTileLinkLocations extends HasPRCILocations { this: LazyModule => | |
|
||
/** Subclasses of this trait have the ability to instantiate things inside a context that has TL attachement locations */ | ||
trait CanInstantiateWithinContextThatHasTileLinkLocations { | ||
def instantiate(context: HasTileLinkLocations)(implicit p: Parameters): Unit | ||
def instantiate(context: HasTileLinkLocations with HasPRCILocations with LazyModule)(implicit p: Parameters): Unit | ||
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. originally the |
||
} | ||
|
||
/** Subclasses of this trait have the ability to connect things inside a context that has TL attachement locations */ | ||
trait CanConnectWithinContextThatHasTileLinkLocations { | ||
def connect(context: HasTileLinkLocations)(implicit p: Parameters): Unit | ||
def connect(context: HasTileLinkLocations with HasPRCILocations with LazyModule)(implicit p: Parameters): Unit | ||
} | ||
|
||
/** Attachable things provide a standard interface by which other things may attach themselves to this target. | ||
* Right now the trait is mostly for backwards compatibility, and in case it eventually becomes valuable | ||
* to be able to define additional resources available to agents trying to attach themselves, other than | ||
* what is being made available via the LocationMaps in trait HasTileLinkLocations. | ||
*/ | ||
trait Attachable extends HasTileLinkLocations { this: LazyModule => | ||
trait Attachable extends HasTileLinkLocations with HasPRCILocations { this: LazyModule => | ||
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. Maybe rename Attachable to |
||
def locateTLBusWrapper(location: TLBusWrapperLocation): TLBusWrapper = locateTLBusWrapper(location.name) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,14 +41,14 @@ class Cluster( | |
lazy val clusterId = thisClusterParams.clusterId | ||
lazy val location = InCluster(clusterId) | ||
|
||
lazy val allClockGroupsNode = ClockGroupIdentityNode() | ||
// lazy val allClockGroupsNode = ClockGroupIdentityNode() | ||
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. I'm not so sure about this... |
||
|
||
val csbus = tlBusWrapperLocationMap(CSBUS(clusterId)) // like the sbus in the base subsystem | ||
val ccbus = tlBusWrapperLocationMap(CCBUS(clusterId)) // like the cbus in the base subsystem | ||
val cmbus = tlBusWrapperLocationMap.lift(CMBUS(clusterId)).getOrElse(csbus) | ||
|
||
csbus.clockGroupNode := allClockGroupsNode | ||
ccbus.clockGroupNode := allClockGroupsNode | ||
// csbus.clockGroupNode := allClockGroupsNode | ||
// ccbus.clockGroupNode := allClockGroupsNode | ||
|
||
val slaveNode = ccbus.inwardNode | ||
val masterNode = cmbus.outwardNode | ||
|
@@ -169,7 +169,7 @@ trait CanAttachCluster { | |
|
||
def connectPRC(domain: ClusterPRCIDomain, context: ClusterContextType): Unit = { | ||
implicit val p = context.p | ||
domain.element.allClockGroupsNode :*= context.allClockGroupsNode | ||
// domain.element.allClockGroupsNode :*= context.allClockGroupsNode | ||
domain { | ||
domain.element_reset_domain.clockNode := crossingParams.resetCrossingType.injectClockNode := domain.clockNode | ||
} | ||
|
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 think we dont need
HasLocations
here.