1
0

Update with paratermized LazyModule

This commit is contained in:
Jacob Chang 2016-12-12 16:16:56 -08:00
parent 762afcd54a
commit aae9b23036

View File

@ -13,18 +13,14 @@ abstract class TLMonitorBase(args: TLMonitorArgs) extends LazyModule()(args.p)
{
implicit val sourceInfo = args.sourceInfo
def legalize(bundle: TLBundleSnoop, edge: TLEdge): Unit
var code_insertion = (bundle_monitor: TLBundleSnoop, edge: TLEdge) => {}
def legalize(bundle: TLBundleSnoop, edge: TLEdge, reset: Bool): Unit
lazy val module = new LazyModuleImp(this) {
val io = new Bundle {
val in = args.gen().asInput
}
code_insertion(io.in, edge())
legalize(io.in, args.edge())
legalize(io.in, args.edge(), reset)
}
}
@ -431,7 +427,7 @@ class TLMonitor(args: TLMonitorArgs) extends TLMonitorBase(args)
inflight := (inflight | a_set) & ~d_clr
}
def legalize(bundle: TLBundleSnoop, edge: TLEdge) {
def legalize(bundle: TLBundleSnoop, edge: TLEdge, reset: Bool) {
legalizeFormat (bundle, edge)
legalizeMultibeat (bundle, edge)
legalizeSourceUnique(bundle, edge)