1
0

max-core-cycles: Add a +max-core-cycles PlusArg

This commit is contained in:
Megan Wachs 2017-08-13 15:20:47 -07:00
parent 41a2a03f90
commit 88332bd885

View File

@ -702,6 +702,13 @@ class Rocket(implicit p: Parameters) extends CoreModule()(p)
wb_reg_cinst, wb_reg_cinst)
}
val max_core_cycles = PlusArg("max-core-cycles",
default = 0,
docstring = "Maximum Core Clock cycles simulation may run before timeout. Ignored if 0 (Default).")
when (max_core_cycles > UInt(0)) {
assert (csr.io.time < max_core_cycles, "Maximum Core Cycles reached.")
}
def checkExceptions(x: Seq[(Bool, UInt)]) =
(x.map(_._1).reduce(_||_), PriorityMux(x))