Skip to content

Commit

Permalink
subsystem: clean up handling of BuiltInDevices
Browse files Browse the repository at this point in the history
  • Loading branch information
hcook committed Apr 16, 2020
1 parent 15bb067 commit def1061
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/main/scala/subsystem/BankedL2Params.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package freechips.rocketchip.subsystem

import chisel3.util.isPow2
import freechips.rocketchip.config._
import freechips.rocketchip.devices.tilelink.BuiltInDevices
import freechips.rocketchip.diplomacy._
import freechips.rocketchip.interrupts._
import freechips.rocketchip.tilelink._
Expand Down Expand Up @@ -56,6 +57,7 @@ class CoherenceManagerWrapper(params: CoherenceManagerWrapperParams, context: Ha
val viewNode = TLIdentityNode()
def busView: TLEdge = viewNode.edges.out.head
val inwardNode = tempIn :*= viewNode
val builtInDevices = BuiltInDevices.none

private def banked(node: TLOutwardNode): TLOutwardNode =
if (params.nBanks == 0) node else { TLTempNode() :=* BankBinder(params.nBanks, params.blockBytes) :*= node }
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/subsystem/BaseSubsystem.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ trait HasConfigurableTLNetworkTopology { this: HasTileLinkLocations =>

// Calling these functions populates tlBusWrapperLocationMap and connects the locations to each other.
val topology = p(TLNetworkTopologyLocated(location))
private val buses = topology.map(_.instantiate(this))
topology.map(_.instantiate(this))
topology.foreach(_.connect(this))

// This is used lazily at DTS binding time to get a view of the network
Expand Down Expand Up @@ -115,7 +115,7 @@ abstract class BaseSubsystem(val location: HierarchicalLocation = InSubsystem)

lazy val logicalTreeNode = new SubsystemLogicalTreeNode()

buses.foreach { bus =>
tlBusWrapperLocationMap.values.foreach { bus =>
val builtIn = bus.builtInDevices
builtIn.errorOpt.foreach { error =>
LogicalModuleTree.add(logicalTreeNode, error.logicalTreeNode)
Expand Down

0 comments on commit def1061

Please sign in to comment.