Skip to content

Fix multi channel difftest support and area cost#33

Open
Wonicon wants to merge 2 commits into
masterfrom
fix-multi-channel-difftest-and-area
Open

Fix multi channel difftest support and area cost#33
Wonicon wants to merge 2 commits into
masterfrom
fix-multi-channel-difftest-and-area

Conversation

@Wonicon

@Wonicon Wonicon commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Difftest

  • Make MultiChannelsABMemLoader correctly register difftest event index when instanciated as BML.

Area

  • Parameterize and cut fifo depth throughout multi-channel data path.
  • Split data and control bits to avoid unncessary data-holding storage.
  • Provide an aggressive opt to cut out CStore ack routing network, enabled in default.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the multi-channel loader/bridge datapaths to both (a) fix difftest indexing behavior for AB multi-channel loaders and (b) reduce area by parameterizing queue depths, splitting payload/meta storage, and optionally bypassing the CStore response-bridge ack routing network.

Changes:

  • Refactors ResponseChannelBridge to use a parameterized queueDepth, optionally drop the data payload, and split data/meta queues.
  • Refactors multi-channel AML/CML internal FIFOs into separate data/meta queues with configurable depths, plus adds an aggressive CStore direct-ack counting mode (enabled by default).
  • Updates/extends unit tests and parameters to reflect the new configuration surface and difftest lane count derivation.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/test/scala/cute/ResponseChannelBridgeSpec.scala Updates bridge instantiation to use queueDepth and hasDataPayload.
src/test/scala/cute/CMLBridgeConfigSpec.scala Adds assertions/tests for derived CStore difftest lane count.
src/main/scala/ResponseChannelBridge.scala Reworks bridge buffering: queueDepth, optional payload, split meta/data queues.
src/main/scala/MultiChannelsCML.scala Splits fill queues, adds direct CStore ack counting/bypass path.
src/main/scala/MultiChannelsAML.scala Splits per-bank response FIFOs and fixes difftest index selection for AML/BML.
src/main/scala/CUTETOP.scala Updates bridge wiring, adds request-channel helper, and adds CStore direct-ack bypass wiring.
src/main/scala/CUTEParameters.scala Introduces new queue-depth params and CStoreDirectAckCountMode (default on).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +791 to +795
val StoreAckDone = Mux(
CStoreDirectAckCountMode.B,
DirectAckResponseCount === Max_Store_Memory_Time,
WriteResponseCountSum === Max_Store_Memory_Time
)
Comment on lines +816 to +831
val ackCanAccept = DirectAckResponseCount =/= Max_Store_Memory_Time
for (bank <- 0 until Matrix_MN) {
ackReadies(bank) := ackCanAccept
io.StoreLocalMMUIO.Response(bank).ready := ackReadies(bank)
directAckFireVec(bank) := io.StoreLocalMMUIO.Response(bank).fire
}
val firedAckCount = PopCount(directAckFireVec)
when(firedAckCount =/= 0.U) {
DirectAckResponseCount := DirectAckResponseCount + firedAckCount
if (YJPCMLDebugEnable) {
printf(
cf"[CMemoryLoader_Store<${io.DebugInfo.DebugTimeStampe}>][DirectAck] " +
cf"ackFireVec=${directAckFireVec.asUInt} ackInc=${firedAckCount} " +
cf"totalAck=${DirectAckResponseCount + firedAckCount}/${Max_Store_Memory_Time}\n"
)
}
Comment on lines +558 to +562
val diffIndexMap = Map(
"AML" -> 0,
"BML" -> 1
)
difftestAmuFinish.index := diffIndexMap.getOrElse(label, 0xdeadabab).U
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants