support no gemminis, trim debug prints
This commit is contained in:
@@ -44,7 +44,7 @@ class AlignFilterNode(filters: Seq[AddressSet])(implicit p: Parameters) extends
|
|||||||
val addresses = seq.flatMap(_.slaves.flatMap(_.address))
|
val addresses = seq.flatMap(_.slaves.flatMap(_.address))
|
||||||
val unifiedAddressRange = addresses.flatMap(_.toRanges).sorted.reduce(_.union(_).get)
|
val unifiedAddressRange = addresses.flatMap(_.toRanges).sorted.reduce(_.union(_).get)
|
||||||
assert(isPow2(unifiedAddressRange.size))
|
assert(isPow2(unifiedAddressRange.size))
|
||||||
println(s"$name address range ${unifiedAddressRange}")
|
// println(s"$name address range ${unifiedAddressRange}")
|
||||||
seq.head.v1copy(
|
seq.head.v1copy(
|
||||||
responseFields = BundleField.union(seq.flatMap(_.responseFields)),
|
responseFields = BundleField.union(seq.flatMap(_.responseFields)),
|
||||||
requestKeys = seq.flatMap(_.requestKeys).distinct,
|
requestKeys = seq.flatMap(_.requestKeys).distinct,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import org.chipsalliance.diplomacy.lazymodule._
|
|||||||
|
|
||||||
class DistributorNode(from: Int, to: Int)(implicit p: Parameters) extends LazyModule {
|
class DistributorNode(from: Int, to: Int)(implicit p: Parameters) extends LazyModule {
|
||||||
require(isPow2(from) && isPow2(to) && (from >= to), "invalid distributor node parameters")
|
require(isPow2(from) && isPow2(to) && (from >= to), "invalid distributor node parameters")
|
||||||
println(s"distributor node to segment from $from into $to")
|
// println(s"distributor node to segment from $from into $to")
|
||||||
val numClients = from / to
|
val numClients = from / to
|
||||||
|
|
||||||
val node = TLNexusNode(clientFn = seq => {
|
val node = TLNexusNode(clientFn = seq => {
|
||||||
@@ -54,13 +54,13 @@ class DistributorNode(from: Int, to: Int)(implicit p: Parameters) extends LazyMo
|
|||||||
lazy val module = new LazyModuleImp(this) {
|
lazy val module = new LazyModuleImp(this) {
|
||||||
val cn = node.in.head._1
|
val cn = node.in.head._1
|
||||||
val mn = node.out.map(_._1)
|
val mn = node.out.map(_._1)
|
||||||
println(f"$name node in size ${node.in.size}, out size ${node.out.size}")
|
// println(f"$name node in size ${node.in.size}, out size ${node.out.size}")
|
||||||
assert(node.out.size == numClients, s"got ${node.out.size} clients instead of $numClients")
|
assert(node.out.size == numClients, s"got ${node.out.size} clients instead of $numClients")
|
||||||
|
|
||||||
// A channel
|
// A channel
|
||||||
val ca = cn.a.bits
|
val ca = cn.a.bits
|
||||||
mn.map(_.a.bits).zipWithIndex.foreach { case (m, i) =>
|
mn.map(_.a.bits).zipWithIndex.foreach { case (m, i) =>
|
||||||
println(s"$i master source id width ${m.source.getWidth}, client source id width ${ca.source.getWidth}")
|
// println(s"$i master source id width ${m.source.getWidth}, client source id width ${ca.source.getWidth}")
|
||||||
m.opcode := ca.opcode
|
m.opcode := ca.opcode
|
||||||
m.param := ca.param
|
m.param := ca.param
|
||||||
m.user := ca.user
|
m.user := ca.user
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class RWSplitterNode(visibility: Option[AddressSet], override val name: String =
|
|||||||
val visibilities = seq.flatMap(_.masters.flatMap(_.visibility))
|
val visibilities = seq.flatMap(_.masters.flatMap(_.visibility))
|
||||||
val unified_vis = if (visibilities.map(_ == AddressSet.everything).reduce(_ || _)) Seq(AddressSet.everything)
|
val unified_vis = if (visibilities.map(_ == AddressSet.everything).reduce(_ || _)) Seq(AddressSet.everything)
|
||||||
else AddressSet.unify(visibilities)
|
else AddressSet.unify(visibilities)
|
||||||
println(s"$name has input visibilities $visibilities, unified to $unified_vis")
|
// println(s"$name has input visibilities $visibilities, unified to $unified_vis")
|
||||||
|
|
||||||
seq.head.v1copy(
|
seq.head.v1copy(
|
||||||
echoFields = BundleField.union(seq.flatMap(_.echoFields)),
|
echoFields = BundleField.union(seq.flatMap(_.echoFields)),
|
||||||
|
|||||||
@@ -98,8 +98,10 @@ class RadianceClusterModuleImp(outer: RadianceCluster) extends ClusterModuleImp(
|
|||||||
g.cmd.valid := VecInit(active).reduceTree(_ || _)
|
g.cmd.valid := VecInit(active).reduceTree(_ || _)
|
||||||
}
|
}
|
||||||
|
|
||||||
// this might need some more tweaking (e.g. bitmask instead of or)
|
if (gemminiAccs.nonEmpty) {
|
||||||
coreAccs.foreach(_.status := VecInit(gemminiAccs.map(_.status)).reduceTree(_ | _))
|
// this might need some more tweaking (e.g. bitmask instead of or)
|
||||||
|
coreAccs.foreach(_.status := VecInit(gemminiAccs.map(_.status)).reduceTree(_ | _))
|
||||||
|
}
|
||||||
|
|
||||||
(outer.traceTLNode.in.map(_._1) zip outer.traceTLNode.out.map(_._1)).foreach { case (i, o) =>
|
(outer.traceTLNode.in.map(_._1) zip outer.traceTLNode.out.map(_._1)).foreach { case (i, o) =>
|
||||||
o.a <> i.a
|
o.a <> i.a
|
||||||
|
|||||||
@@ -96,8 +96,12 @@ class VirgoSharedMemComponents(
|
|||||||
}
|
}
|
||||||
Seq.fill(smemWidth / spWidthBytes)(fanout).flatten // smem wider than spad, duplicate masters
|
Seq.fill(smemWidth / spWidthBytes)(fanout).flatten // smem wider than spad, duplicate masters
|
||||||
}
|
}
|
||||||
// (gemmini, word) => (word, gemmini)
|
if (nodes.isEmpty) {
|
||||||
wordFanoutNodes.transpose
|
Seq.fill(smemSubbanks)(Seq())
|
||||||
|
} else {
|
||||||
|
// (gemmini, word) => (word, gemmini)
|
||||||
|
wordFanoutNodes.transpose
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// (banks, subbanks, gemminis)
|
// (banks, subbanks, gemminis)
|
||||||
|
|||||||
Reference in New Issue
Block a user