Skip to content

Commit

Permalink
Deprecate old BusWrapper methods (#3337)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryz123 authored May 1, 2023
1 parent 58c8249 commit 2570db7
Showing 1 changed file with 0 additions and 152 deletions.
152 changes: 0 additions & 152 deletions src/main/scala/tilelink/BusWrapper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ abstract class TLBusWrapper(params: HasTLBusParams, val busName: String)(implici
extends ClockDomain
with HasTLBusParams
with CanHaveBuiltInDevices
with CanAttachTLSlaves
with CanAttachTLMasters
{
private val clockGroupAggregator = LazyModule(new ClockGroupAggregator(busName){ override def shouldBeInlined = true }).suggestName(busName + "_clock_groups")
private val clockGroup = LazyModule(new ClockGroup(busName){ override def shouldBeInlined = true })
Expand Down Expand Up @@ -219,156 +217,6 @@ class TLBusWrapperTopology(
}
}

trait CanAttachTLSlaves extends HasTLBusParams { this: TLBusWrapper =>

def toTile
(name: Option[String] = None, buffer: BufferParams = BufferParams.none)
(gen: => TLInwardNode): NoHandle = {
to("tile" named name) { FlipRendering { implicit p =>
gen :*= TLWidthWidget(beatBytes) :*= TLBuffer(buffer) :*= outwardNode
}}
}

def toDRAMController[D,U,E,B <: Data]
(name: Option[String] = None, buffer: BufferParams = BufferParams.none)
(gen: => NodeHandle[ TLClientPortParameters,TLManagerPortParameters,TLEdgeIn,TLBundle, D,U,E,B] =
TLNameNode(name)): OutwardNodeHandle[D,U,E,B] = {
to("memory_controller" named name) { gen :*= TLWidthWidget(beatBytes) :*= TLBuffer(buffer) :*= outwardNode }
}

@deprecated("Replace with e.g. bus.coupleTo(s\"slave_named_${name}\"){ slave.controlXing(NoCrossing) :*= _ }", "rocket-chip 1.3")
def toSlave[D,U,E,B <: Data]
(name: Option[String] = None, buffer: BufferParams = BufferParams.none)
(gen: => NodeHandle[TLClientPortParameters,TLManagerPortParameters,TLEdgeIn,TLBundle,D,U,E,B] =
TLNameNode(name)): OutwardNodeHandle[D,U,E,B] = {
to("slave" named name) { gen :*= TLBuffer(buffer) :*= outwardNode }
}

@deprecated("Replace with e.g. bus.coupleTo(s\"slave_named_${name}\"){ node :*= TLFragmenter(bus.beatBytes, bus.blockBytes) :*= _ }", "rocket-chip 1.3")
def toVariableWidthSlaveNode(name: Option[String] = None, buffer: BufferParams = BufferParams.none)(node: TLInwardNode): Unit = {
toVariableWidthSlaveNodeOption(name, buffer)(Some(node))
}

@deprecated("Replace with e.g. node.foreach { n => bus.coupleTo(s\"slave_named_${name}\"){ b => n :*= TLFragmenter(bus.beatBytes, bus.blockBytes) :*= b } }", "rocket-chip 1.3")
def toVariableWidthSlaveNodeOption(name: Option[String] = None, buffer: BufferParams = BufferParams.none)(node: Option[TLInwardNode]): Unit = {
node foreach { n => to("slave" named name) {
n :*= TLFragmenter(beatBytes, blockBytes) :*= TLBuffer(buffer) :*= outwardNode
}}
}

@deprecated("Replace with e.g. bus.coupleTo(s\"slave_named_${name}\"){ slave.controlXing(NoCrossing) :*= TLFragmenter(bus.beatBytes, bus.blockBytes) :*= _ }", "rocket-chip 1.3")
def toVariableWidthSlave[D,U,E,B <: Data]
(name: Option[String] = None, buffer: BufferParams = BufferParams.none)
(gen: => NodeHandle[TLClientPortParameters,TLManagerPortParameters,TLEdgeIn,TLBundle,D,U,E,B] =
TLNameNode(name)): OutwardNodeHandle[D,U,E,B] = {
to("slave" named name) {
gen :*= TLFragmenter(beatBytes, blockBytes) :*= TLBuffer(buffer) :*= outwardNode
}
}

@deprecated("Replace with e.g. bus.coupleTo(s\"slave_named_${name}\"){ slave.control :*= TLWidthWidget(bus.beatBytes) :*= node }", "rocket-chip 1.3")
def toFixedWidthSlaveNode(name: Option[String] = None, buffer: BufferParams = BufferParams.none)(gen: TLInwardNode): Unit = {
to("slave" named name) { gen :*= TLWidthWidget(beatBytes) :*= TLBuffer(buffer) :*= outwardNode }
}

@deprecated("Replace with e.g. bus.coupleTo(s\"slave_named_${name}\"){ slave.controlXing(NoCrossing) :*= TLWidthWidget(bus.beatBytes) :*= _ }", "rocket-chip 1.3")
def toFixedWidthSlave[D,U,E,B <: Data]
(name: Option[String] = None, buffer: BufferParams = BufferParams.none)
(gen: => NodeHandle[TLClientPortParameters,TLManagerPortParameters,TLEdgeIn,TLBundle,D,U,E,B] =
TLNameNode(name)): OutwardNodeHandle[D,U,E,B] = {
to("slave" named name) { gen :*= TLWidthWidget(beatBytes) :*= TLBuffer(buffer) :*= outwardNode }
}

@deprecated("Replace with e.g. bus.coupleTo(s\"slave_named_${name}\"){ slave.controlXing(NoCrossing) :*= TLFragmenter(widthBytes, bus.blockBytes) :*= TLWidthWidget(bus.beatBytes) :*= node }", "rocket-chip 1.3")
def toFixedWidthSingleBeatSlaveNode
(widthBytes: Int, name: Option[String] = None, buffer: BufferParams = BufferParams.none)
(gen: TLInwardNode): Unit = {
to("slave" named name) {
gen :*= TLFragmenter(widthBytes, blockBytes) :*= TLWidthWidget(beatBytes) :*= TLBuffer(buffer) :*= outwardNode
}
}

@deprecated("Replace with e.g. bus.coupleTo(s\"slave_named_${name}\"){ slave.controlXing(NoCrossing) :*= TLFragmenter(widthBytes, bus.blockBytes) :*= TLWidthWidget(bus.beatBytes) :*= _ }", "rocket-chip 1.3")
def toFixedWidthSingleBeatSlave[D,U,E,B <: Data]
(widthBytes: Int, name: Option[String] = None, buffer: BufferParams = BufferParams.none)
(gen: => NodeHandle[TLClientPortParameters,TLManagerPortParameters,TLEdgeIn,TLBundle,D,U,E,B] =
TLNameNode(name)): OutwardNodeHandle[D,U,E,B] = {
to("slave" named name) {
gen :*= TLFragmenter(widthBytes, blockBytes) :*= TLWidthWidget(beatBytes) :*= TLBuffer(buffer) :*= outwardNode
}
}

@deprecated("Replace with e.g. bus.coupleTo(s\"slave_named_${name}\"){ slave.controlXing(NoCrossing) :*= TLFragmenter(bus.beatBytes, <maxXferBytes>) :*= _ }", "rocket-chip 1.3")
def toLargeBurstSlave[D,U,E,B <: Data]
(maxXferBytes: Int, name: Option[String] = None, buffer: BufferParams = BufferParams.none)
(gen: => NodeHandle[TLClientPortParameters,TLManagerPortParameters,TLEdgeIn,TLBundle,D,U,E,B] =
TLNameNode(name)): OutwardNodeHandle[D,U,E,B] = {
to("slave" named name) {
gen :*= TLFragmenter(beatBytes, maxXferBytes) :*= TLBuffer(buffer) :*= outwardNode
}
}

@deprecated("Replace with e.g. bus.coupleTo(s\"slave_named_${name}\"){ slave.controlXing(NoCrossing) :*= TLFragmenter(bus.beatBytes, <maxXferBytes>) :*= _ }", "rocket-chip 1.3")
def toFixedWidthPort[D,U,E,B <: Data]
(name: Option[String] = None, buffer: BufferParams = BufferParams.none)
(gen: => NodeHandle[TLClientPortParameters,TLManagerPortParameters,TLEdgeIn,TLBundle,D,U,E,B] =
TLNameNode(name)): OutwardNodeHandle[D,U,E,B] = {
to("port" named name) {
gen := TLWidthWidget(beatBytes) :*= TLBuffer(buffer) :*= outwardNode
}
}
}

trait CanAttachTLMasters extends HasTLBusParams { this: TLBusWrapper =>
def fromTile
(name: Option[String], buffer: BufferParams = BufferParams.none, cork: Option[Boolean] = None)
(gen: => TLOutwardNode): NoHandle = {
from("tile" named name) {
inwardNode :=* TLBuffer(buffer) :=* TLFIFOFixer(TLFIFOFixer.allVolatile) :=* gen
}
}

@deprecated("Replace with e.g. bus.coupleFrom(s\"master_named_${name}\"){ _ :=* TLFIFOFixer(TLFIFOFixer.all) :=* node }", "rocket-chip 1.3")
def fromMasterNode
(name: Option[String] = None, buffer: BufferParams = BufferParams.none)
(gen: TLOutwardNode): Unit = {
from("master" named name) {
inwardNode :=* TLBuffer(buffer) :=* TLFIFOFixer(TLFIFOFixer.all) :=* gen
}
}

@deprecated("Replace with e.g. bus.coupleFrom(s\"master_named_${name}\"){ _ :=* TLFIFOFixer(TLFIFOFixer.all) :=* master.node }", "rocket-chip 1.3")
def fromMaster[D,U,E,B <: Data]
(name: Option[String] = None, buffer: BufferParams = BufferParams.none)
(gen: => NodeHandle[D,U,E,B,TLClientPortParameters,TLManagerPortParameters,TLEdgeOut,TLBundle] =
TLNameNode(name)): InwardNodeHandle[D,U,E,B] = {
from("master" named name) {
inwardNode :=* TLBuffer(buffer) :=* TLFIFOFixer(TLFIFOFixer.all) :=* gen
}
}

// TODO also deprecate this once debug module isn't using it
//@deprecated("Replace with e.g. bus.coupleFrom(s\"port_named_${name}\"){ _ :=* TLFIFOFixer(TLFIFOFixer.all) :=* master.node }", "rocket-chip 1.3")
def fromPort[D,U,E,B <: Data]
(name: Option[String] = None, buffer: BufferParams = BufferParams.none)
(gen: => NodeHandle[D,U,E,B,TLClientPortParameters,TLManagerPortParameters,TLEdgeOut,TLBundle] =
TLNameNode(name)): InwardNodeHandle[D,U,E,B] = {
from("port" named name) {
inwardNode :=* TLBuffer(buffer) :=* TLFIFOFixer(TLFIFOFixer.all) :=* gen
}
}

@deprecated("Replace with e.g. bus.coupleFrom(s\"coherent_master_named_${name}\"){ _ :=* TLFIFOFixer(TLFIFOFixer.all) :=* master.node }", "rocket-chip 1.3")
def fromCoherentMaster[D,U,E,B <: Data]
(name: Option[String] = None, buffer: BufferParams = BufferParams.none)
(gen: => NodeHandle[D,U,E,B,TLClientPortParameters,TLManagerPortParameters,TLEdgeOut,TLBundle] =
TLNameNode(name)): InwardNodeHandle[D,U,E,B] = {
from("coherent_master" named name) {
inwardNode :=* TLBuffer(buffer) :=* TLFIFOFixer(TLFIFOFixer.all) :=* gen
}
}
}

trait HasTLXbarPhy { this: TLBusWrapper =>
private val xbar = LazyModule(new TLXbar).suggestName(busName + "_xbar")

Expand Down

0 comments on commit 2570db7

Please sign in to comment.