-
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
Diplomatic Clock Primitives #1795
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hcook
force-pushed
the
clocks
branch
2 times, most recently
from
November 13, 2019 19:40
bd00c76
to
aa11060
Compare
rmac-sifive
reviewed
Nov 19, 2019
rmac-sifive
reviewed
Nov 19, 2019
mwachs5
reviewed
Nov 19, 2019
mwachs5
reviewed
Nov 19, 2019
rmac-sifive
approved these changes
Nov 19, 2019
hcook
force-pushed
the
clocks
branch
3 times, most recently
from
December 19, 2019 01:34
f117f14
to
d9eb4b2
Compare
rmac-sifive
reviewed
Jan 22, 2020
One year birthday of opening this PR 🎉 |
5 tasks
clockGroupNode what does this class do? |
what does "each other" refer to?
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds some primitives that can be used to pipe pairs of clock+reset signals through the design diplomatically. Adding this package upstreams some features from https://github.com/sifive/fpga-shells/tree/master/src/main/scala/clocks, which it is intended to (eventually) replace. There are node and edge types for both clock/reset pairs, and groups of such pairs that then must share a synchronous or rational relationship. Mutually asynchronous clocks should always be expressed as individual clock groups (which may then have only a single member).
The PR also adds some test harness clock generation functionality (which is not verilator compatible and so not currently added to regressions here), and includes a set of example clocking adapters, and updates some clocking utility blackbox wrappers to
import chisel3
.Right now these features are only employed to drive the clocks of the TileLink buses included by default in
BaseSubsystem
. It maintains backwards compatibility with devices that tap into the bus clock directly by providingclock
andreset
outputs from theTLBusWrapper
module instances.This PR also adds the
trait Attachable
, which wraps the different nodes and members of the subsystem to which devices, tiles and other peripherals might which to attach themselves, including a point for registering additional clocks asynchronous to the tilelink bus clock. However, no code is yet changed to depend on this newtrait
.Both
Attachable
and all the graph types added in theprci
package should be considered experimental and are still under active development.Type of change: other enhancement
Impact: API change
While this PR is mostly additive, it does change how the clock/resets of
TLBusWrapper
subclasses are to be driven. Mostly, they drive each other's clocks based on the type of TL clock crossing adapter that is inserted between them in thecrossToBus
andcrossFromBus
methods. However, the "root" bus needs to have itsclockGroupNode
driven, which the exampleHasHierarchicalBusTopology
does viaBaseSubsystem.asyncClockGroupsNode
, which is in turn (by configurable default) driven by the implicit Chiselclock
ofBaseSubsystem
's module implementation, here https://github.com/chipsalliance/rocket-chip/pull/1795/files#diff-3d87f78ef4648ef6b47c853c4581a47bR95Development Phase: implementation
Future Work:
There are already a set of requested features for future work. These cover both internal functionality of the clocking graph and external application of the graph to use cases in the subsystem. Logging them here for future reference:
Internal features:
ClockBundle.reset
is currentlyBool
, not the newchisel3.Reset
wrapper type. Working theory is that every instance of aClockBundle
should be explicitly told whether it is to be an instance ofBool
or an instance ofAsyncReset
, but this needs to be proven out and won't necessarily be compatible with the version infpga-shells
HeterogenousBag
indexes, this should be improved to be based on the eventual clock sink name.ClockGroupSourceParameters
toClockSourceParameters
needs to be fleshed out. ClockGroups should be capable of resolving into single pairs when only a single source is provided to satisfy all the clocks in a group.External features:
InterruptBusWrapper
should have its ownClockSinkDomain
.sifive-blocks
should be updated to rely on only theAttachable
trait