Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

difftest: The difftest remove redundant logic gates #504

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/main/scala/Batch.scala
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ class BatchCollector(

val data_site = WireInit(0.U((alignWidth * length).W))
data_site := VecInit(delay_data.zipWithIndex.map { case (d, idx) =>
val offset = if (idx == 0) 0.U else MuxLookup(PopCount(delay_valid.take(idx)), 0.U)(offset_map)
Mux(delay_valid(idx), (d << offset).asUInt, 0.U)
val offset = MuxLookup(PopCount(delay_valid.take(idx)), 0.U)(offset_map)
Mux(idx.U === 0.U, (d << offset).asUInt, 0.U)
}.toSeq).reduce(_ | _)

when(delay_valid.asUInt.orR) {
Expand Down Expand Up @@ -314,8 +314,8 @@ class BatchAssembler(
}
// Flush state to provide more space for peak data
val state_flush = enable && step_stats_vec.last.data_len > param.MaxDataByteLen.U
val timeout_count = RegInit(0.U(32.W))
val timeout = timeout_count === 200000.U
val timeout_count = RegInit(0.U(18.W))
val timeout = timeout_count === 0x3ffff.U
if (config.hasBuiltInPerf) {
DifftestPerf("BatchExceed_data", data_exceed_vec.asUInt.orR)
DifftestPerf("BatchExceed_info", info_exceed_vec.asUInt.orR)
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/Squash.scala
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ class SquashEndpoint(bundles: Seq[Valid[DifftestBundle]], config: GatewayConfig)
.filter(_.desiredCppName == "trace_info")
.map(_.asInstanceOf[DiffTraceInfo].in_replay)
.foldLeft(false.B)(_ || _)
val timeout_count = RegInit(0.U(32.W))
val timeout = timeout_count === 200000.U
val timeout_count = RegInit(0.U(18.W))
val timeout = timeout_count === 0x3ffff.U
val global_tick = !control.enable || in_replay || timeout

val uniqBundles = bundles.map(_.bits).distinctBy(_.desiredCppName)
Expand Down