Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sequencer committed Mar 11, 2024
1 parent 6e1e785 commit 9505d87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/subsystem/BaseSubsystem.scala
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ trait HasConfigurablePRCILocations { this: HasPRCILocations =>
val prciClockNode = ClockAdapterNode()
val io_clocks = Option.when(p(SubsystemDriveClockFromIO)){
val source = ClockSourceNode(Seq(ClockSourceParameters()))
prciClockNode :*= source
prciClockNode :*= FixedClockBroadcast() := source
InModuleBody(source.makeIOs())
}
}
Expand Down Expand Up @@ -90,7 +90,7 @@ abstract class BaseSubsystem(val location: HierarchicalLocation = InSubsystem)

val busContextName = "subsystem"

viewpointBus.clockNode := prciClockNode
viewpointBus.clockNode :*= prciClockNode

// TODO: Preserve legacy implicit-clock behavior for IBUS for now. If binding
// a PLIC to the CBUS, ensure it is synchronously coupled to the SBUS.
Expand Down
6 changes: 3 additions & 3 deletions src/main/scala/tilelink/BusWrapper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ abstract class TLBusWrapper(params: HasTLBusParams, val busName: String)(implici
with HasTLBusParams
with CanHaveBuiltInDevices
{
val clockNode = ClockAdapterNode() // device clocks attach here
val clockNode = ClockIdentityNode() // device clocks attach here
val fixedClockNode = FixedClockBroadcast(fixedClockOpt)
private val clockSinkNode = ClockSinkNode(List(ClockSinkParameters(take = fixedClockOpt)))

Expand Down Expand Up @@ -84,14 +84,14 @@ abstract class TLBusWrapper(params: HasTLBusParams, val busName: String)(implici
from(name) { gen(inwardNode :*=* TLNameNode("tl")) }

def crossToBus(bus: TLBusWrapper, xType: ClockCrossingType, asyncClockNode: ClockEphemeralNode): NoHandle = {
bus.clockNode := asyncMux(xType, asyncClockNode, this.clockNode)
bus.clockNode := asyncMux(xType, asyncClockNode, fixedClockNode)
coupleTo(s"bus_named_${bus.busName}") {
bus.crossInHelper(xType) :*= TLWidthWidget(beatBytes) :*= _
}
}

def crossFromBus(bus: TLBusWrapper, xType: ClockCrossingType, asyncClockNode: ClockEphemeralNode): NoHandle = {
this.clockNode := asyncMux(xType, asyncClockNode, bus.clockNode)
this.clockNode := asyncMux(xType, asyncClockNode, bus.fixedClockNode)
coupleFrom(s"bus_named_${bus.busName}") {
_ :=* TLWidthWidget(bus.beatBytes) :=* bus.crossOutHelper(xType)
}
Expand Down

0 comments on commit 9505d87

Please sign in to comment.