Skip to content

Conversation

@sequencer
Copy link
Member

@sequencer sequencer commented Mar 10, 2024

The Current ClockGroup API is misleading and is strange design pattern for clock doamins. This PR is used for purging out all the ClockGroup usage in rocket-chip, providing a clean API for ClockNode Attaching.


/** 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 =>
Copy link
Member Author

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.

/** 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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

originally the
HasTileLinkLocations couples HasPRCILocations to much. It's a bad design pattern.

* 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 =>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename Attachable to TLAttachable?

lazy val location = InCluster(clusterId)

lazy val allClockGroupsNode = ClockGroupIdentityNode()
// lazy val allClockGroupsNode = ClockGroupIdentityNode()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not so sure about this...

private val clockGroup = LazyModule(new ClockGroup(busName){ override def shouldBeInlined = true })
val clockGroupNode = clockGroupAggregator.node // other bus clock groups attach here
val clockNode = clockGroup.node
val clockNode = ClockAdapterNode()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to assert input to this clockNode to be 1? or just use FixedClockBroadcast instead?

@sequencer sequencer force-pushed the no-more-clockgroup branch from 15c9041 to ab61e47 Compare March 11, 2024 05:09
@sequencer sequencer force-pushed the no-more-clockgroup branch 4 times, most recently from 38a8752 to 9505d87 Compare March 11, 2024 09:01
@sequencer sequencer force-pushed the no-more-clockgroup branch from 9505d87 to fdd303a Compare March 12, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants