From 08a7c5984f109d5ed9444a67311ac7bb83588591 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Tue, 8 Oct 2024 13:34:21 -0700 Subject: [PATCH] Move `desiredName` override to top of `LazyModuleImp` --- src/main/scala/tilelink/Xbar.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/tilelink/Xbar.scala b/src/main/scala/tilelink/Xbar.scala index 4d6c9ef7b63..b7f02563b66 100644 --- a/src/main/scala/tilelink/Xbar.scala +++ b/src/main/scala/tilelink/Xbar.scala @@ -72,13 +72,13 @@ class TLXbar(policy: TLArbiter.Policy = TLArbiter.roundRobin, nameSuffix: Option lazy val module = new Impl class Impl extends LazyModuleImp(this) { + val wide_bundle = TLBundleParameters.union((node.in ++ node.out).map(_._2.bundle)) + override def desiredName = (Seq("TLXbar") ++ nameSuffix ++ Seq(s"i${node.in.size}_o${node.out.size}_${wide_bundle.shortName}")).mkString("_") if ((node.in.size * node.out.size) > (8*32)) { println (s"!!! WARNING !!!") println (s" Your TLXbar ($name with parent $parent) is very large, with ${node.in.size} Masters and ${node.out.size} Slaves.") println (s"!!! WARNING !!!") } - val wide_bundle = TLBundleParameters.union((node.in ++ node.out).map(_._2.bundle)) - override def desiredName = (Seq("TLXbar") ++ nameSuffix ++ Seq(s"i${node.in.size}_o${node.out.size}_${wide_bundle.shortName}")).mkString("_") TLXbar.circuit(policy, node.in, node.out) } }