Debug.scala 359 字节
Newer Older
Z
Zihao Yu 已提交
1 2 3 4 5 6 7 8 9
package utils

import chisel3._
import chisel3.util._

import noop.NOOPConfig

object Debug {
  def apply(flag: Boolean = NOOPConfig().EnableDebug, cond: Bool = true.B)(body: => Unit): Any =
10
    if (flag) { when (cond && (GTimer() > 60258600.U && GTimer() < 60258850.U)) { body } }
Z
Zihao Yu 已提交
11
}
12 13 14

object ShowType {
  def apply[T: Manifest](t: T) = println(manifest[T])
Z
Zihao Yu 已提交
15
}