From 7b4c48d005c83609bf5634b2ac843eac63962827 Mon Sep 17 00:00:00 2001 From: Megan Wachs Date: Wed, 11 Oct 2017 13:14:25 -0700 Subject: [PATCH] Correctly hook up the Local Interrupts into the Coreplex. Name some IntXBars --- src/main/scala/coreplex/BaseCoreplex.scala | 8 ++++++-- src/main/scala/coreplex/RocketCoreplex.scala | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/scala/coreplex/BaseCoreplex.scala b/src/main/scala/coreplex/BaseCoreplex.scala index ae54c9a6..e5696988 100644 --- a/src/main/scala/coreplex/BaseCoreplex.scala +++ b/src/main/scala/coreplex/BaseCoreplex.scala @@ -40,8 +40,12 @@ trait HasTiles extends HasSystemBus { // Handle interrupts to be routed directly into each tile // TODO: figure out how to merge the localIntNodes and coreIntXbar def localIntCounts = tileParams.map(_.core.nLocalInterrupts) - def localIntNodes = tileParams map { t => - (t.core.nLocalInterrupts > 0).option(LazyModule(new IntXbar).intnode) + lazy val localIntNodes = tileParams.zipWithIndex map { case (t, i) => { + (t.core.nLocalInterrupts > 0).option({ + val n = LazyModule(new IntXbar) + n.suggestName(s"localIntXbar_${i}") + n.intnode}) + } } val tiles: Seq[BaseTile] diff --git a/src/main/scala/coreplex/RocketCoreplex.scala b/src/main/scala/coreplex/RocketCoreplex.scala index fa315ddb..e1f8836e 100644 --- a/src/main/scala/coreplex/RocketCoreplex.scala +++ b/src/main/scala/coreplex/RocketCoreplex.scala @@ -62,16 +62,19 @@ trait HasRocketTiles extends HasTiles // so may or may not need to be synchronized depending on the Tile's crossing type. // Debug interrupt is definitely asynchronous in all cases. val asyncIntXbar = LazyModule(new IntXbar) + asyncIntXbar.suggestName("asyncIntXbar") asyncIntXbar.intnode := debug.intnode // debug wrapper.asyncIntNode := asyncIntXbar.intnode val periphIntXbar = LazyModule(new IntXbar) + periphIntXbar.suggestName("periphIntXbar") periphIntXbar.intnode := clint.intnode // msip+mtip periphIntXbar.intnode := plic.intnode // meip if (tp.core.useVM) periphIntXbar.intnode := plic.intnode // seip wrapper.periphIntNode := periphIntXbar.intnode val coreIntXbar = LazyModule(new IntXbar) + coreIntXbar.suggestName("coreIntXbar") lip.foreach { coreIntXbar.intnode := _ } // lip wrapper.coreIntNode := coreIntXbar.intnode