Skip to content
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

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft

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.

@@ -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
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.

}

/** 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 =>
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?

src/main/scala/subsystem/BaseSubsystem.scala Outdated Show resolved Hide resolved
@@ -41,14 +41,14 @@ class Cluster(
lazy val clusterId = thisClusterParams.clusterId
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 4 times, most recently from 38a8752 to 9505d87 Compare March 11, 2024 09:01
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.

1 participant