remove duplicate ResetCatchAndSync definition
authorMegan Wachs <megan@sifive.com>
Fri, 25 Aug 2017 01:12:36 +0000 (18:12 -0700)
committerMegan Wachs <megan@sifive.com>
Fri, 25 Aug 2017 01:12:36 +0000 (18:12 -0700)
src/main/scala/devices/mockaon/MockAONWrapper.scala
src/main/scala/util/ResetCatchAndSync.scala [deleted file]

index aeacd8352b2244067f814c76f709d57b6baa467d..9ac43082d2875bf62d4923cac0781fb5f1d9b6ed 100644 (file)
@@ -7,7 +7,7 @@ import freechips.rocketchip.diplomacy._
 import freechips.rocketchip.tilelink._
 import freechips.rocketchip.util._
 import sifive.blocks.devices.pinctrl.{EnhancedPin}
-import sifive.blocks.util.{DeglitchShiftRegister, ResetCatchAndSync}
+import sifive.blocks.util.{DeglitchShiftRegister}
 
 /* The wrapper handles the Clock and Reset Generation for The AON block itself,
  and instantiates real pad controls (aka pull-ups)*/
diff --git a/src/main/scala/util/ResetCatchAndSync.scala b/src/main/scala/util/ResetCatchAndSync.scala
deleted file mode 100644 (file)
index 6b483e5..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// See LICENSE for license details.
-package sifive.blocks.util
-
-import Chisel._
-import freechips.rocketchip.util.AsyncResetRegVec
-
-/** Reset: asynchronous assert,
-  *  synchronous de-assert
-  *
-  */
-
-class ResetCatchAndSync (sync: Int = 3) extends Module {
-
-  val io = new Bundle {
-    val sync_reset = Bool(OUTPUT)
-  }
-
-  val reset_n_catch_reg = Module (new AsyncResetRegVec(sync, 0))
-
-  reset_n_catch_reg.io.en := Bool(true)
-  reset_n_catch_reg.io.d  := Cat(Bool(true), reset_n_catch_reg.io.q >> 1)
-
-  io.sync_reset := ~reset_n_catch_reg.io.q(0)
-
-}
-
-object ResetCatchAndSync {
-
-  def apply(clk: Clock, rst: Bool, sync: Int = 3, name: Option[String] = None): Bool = {
-
-    val catcher = Module (new ResetCatchAndSync(sync))
-    if (name.isDefined) {catcher.suggestName(name.get)}
-    catcher.clock := clk
-    catcher.reset := rst
-
-    catcher.io.sync_reset
-  }
-
-  def apply(clk: Clock, rst: Bool, sync: Int, name: String): Bool = apply(clk, rst, sync, Some(name))
-  def apply(clk: Clock, rst: Bool, name: String): Bool = apply(clk, rst, name = Some(name))
-
-}