Refactor package hierarchy. (#25)
[sifive-blocks.git] / src / main / scala / devices / mockaon / MockAONWrapper.scala
index d472ddd118deee21779e8b0011f6821d6bc2f8f5..9062ff72bd38d957ce80a6644838c1ec1f79091a 100644 (file)
@@ -2,12 +2,13 @@
 package sifive.blocks.devices.mockaon
 
 import Chisel._
-import config._
-import diplomacy._
-import uncore.tilelink2._
+import freechips.rocketchip.config.Parameters
+import freechips.rocketchip.diplomacy._
+import freechips.rocketchip.tilelink._
+import freechips.rocketchip.util._
 import sifive.blocks.devices.gpio.{GPIOPin, GPIOOutputPinCtrl, GPIOInputPinCtrl}
 import sifive.blocks.util.{DeglitchShiftRegister, ResetCatchAndSync}
-import util._
+
 /* The wrapper handles the Clock and Reset Generation for The AON block itself,
  and instantiates real pad controls (aka pull-ups)*/
 
@@ -56,6 +57,7 @@ class MockAONWrapper(w: Int, c: MockAONParams)(implicit p: Parameters) extends L
       val in = node.bundleIn
       val ip = intnode.bundleOut
       val rtc  = Clock(OUTPUT)
+      val ndreset = Bool(INPUT)
     }
 
     val aon_io = aon.module.io
@@ -99,7 +101,7 @@ class MockAONWrapper(w: Int, c: MockAONParams)(implicit p: Parameters) extends L
     val lfclk = aon_io.lfclk
 
     val aonrst_catch = Module (new ResetCatchAndSync(3))
-    aonrst_catch.reset := erst | aon_io.wdog_rst
+    aonrst_catch.reset := erst | aon_io.wdog_rst | io.ndreset
     aonrst_catch.clock := lfclk
     aon.module.reset := aonrst_catch.io.sync_reset