From 0d87e3bacc946b07f97a452b98f5cbce4b3d4559 Mon Sep 17 00:00:00 2001 From: Huy Vo Date: Sat, 20 Apr 2013 00:38:01 -0700 Subject: [PATCH] fixed init pin generation --- src/main/scala/RocketChip.scala | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/scala/RocketChip.scala b/src/main/scala/RocketChip.scala index f641f346..b75c5192 100644 --- a/src/main/scala/RocketChip.scala +++ b/src/main/scala/RocketChip.scala @@ -276,16 +276,16 @@ class ReferenceChipBackend extends VerilogBackend def addMemPin(c: Component) = { for (node <- Component.nodes) { if (node.isInstanceOf[Mem[ _ ]] && node.component != null && node.asInstanceOf[Mem[_]].seqRead) { - val init = Bool(INPUT) - init.setName("init") + val init = Bool() + init.setName("init_node") node.inputs += init + init.component = node.component connectMemPin(c, node.component, init) } } } def connectMemPin(topC: Component, c: Component, p: Bool): Unit = { - p.component = c var isNewPin = false val compInitPin = if (initMap.contains(c)) { @@ -300,6 +300,7 @@ class ReferenceChipBackend extends VerilogBackend if (isNewPin) { compInitPin.setName("init") c.io.asInstanceOf[Bundle] += compInitPin + compInitPin.component = c initMap += (c -> compInitPin) connectMemPin(topC, c.parent, compInitPin) }