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