From a424f92b552b7f1cc8c74826ee4998fb1ad74085 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Wed, 23 Aug 2023 19:02:43 -0700 Subject: [PATCH] Make MemTraceDriver no longer be UnitTestModule This makes it trickier to hook the driver up to sbus since we need to assert its io.start. We still need io.finished coming out of it to tell when the trace finished. --- src/main/scala/tilelink/Coalescing.scala | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/scala/tilelink/Coalescing.scala b/src/main/scala/tilelink/Coalescing.scala index 03cdf4b..37c9759 100644 --- a/src/main/scala/tilelink/Coalescing.scala +++ b/src/main/scala/tilelink/Coalescing.scala @@ -1362,8 +1362,11 @@ class MemTraceDriverImp( config: CoalescerConfig, filename: String, traceHasSource: Boolean -) extends LazyModuleImp(outer) - with UnitTestModule { +) extends LazyModuleImp(outer) { + val io = IO(new Bundle { + val finished = Output(Bool()) + }) + // Current cycle mark to read from trace val traceReadCycle = RegInit(1.U(64.W)) @@ -2005,7 +2008,7 @@ class TLRAMCoalescerLogger(filename: String)(implicit p: Parameters) lazy val module = new Impl class Impl extends LazyModuleImp(this) with UnitTestModule { - driver.module.io.start := io.start + // io.start is unused since MemTraceDriver doesn't accept io.start io.finished := driver.module.io.finished when(io.finished) { @@ -2059,7 +2062,7 @@ class TLRAMCoalescer(implicit p: Parameters) extends LazyModule { lazy val module = new Impl class Impl extends LazyModuleImp(this) with UnitTestModule { - driver.module.io.start := io.start + // io.start is unused since MemTraceDriver doesn't accept io.start io.finished := driver.module.io.finished } }