1
0

Plusargs -- tilelink timeout detection from the command line (#752)

* util: PlusArg gives Chisel access to the command-line

* tilelink2: add a progress watchdog to Monitors
This commit is contained in:
Wesley W. Terpstra
2017-05-18 22:49:59 -07:00
committed by GitHub
parent 20704b1454
commit 7f1d3c445f
5 changed files with 52 additions and 0 deletions

View File

@ -435,6 +435,13 @@ class TLMonitor(args: TLMonitorArgs) extends TLMonitorBase(args)
}
inflight := (inflight | a_set) & ~d_clr
val watchdog = RegInit(UInt(0, width = 32))
val limit = util.PlusArg("tilelink_timeout")
assert (!inflight.orR || limit === UInt(0) || watchdog < limit, "TileLink timeout expired" + extra)
watchdog := watchdog + UInt(1)
when (bundle.a.fire() || bundle.d.fire()) { watchdog := UInt(0) }
}
def legalizeDESink(bundle: TLBundleSnoop, edge: TLEdge)(implicit sourceInfo: SourceInfo) {