Virtualizetion of the whole BallDomain#17
Conversation
There was a problem hiding this comment.
Pull request overview
This PR completes the virtualization of the BallDomain by relocating the ToPhysicalLine module from the BBus to the MemDomain, positioning it in front of the MemController. This architectural change unifies the memory interface using SramReadWithInfo and SramWriteWithInfo bundles that carry additional metadata (rob_id, is_acc, bank_id) through the system.
Key Changes:
- Moved
ToPhysicalLineinstantiation from BBus to MemDomain for better separation of concerns - Updated BallDomain and BBus interfaces to use unified
SramReadWithInfo/SramWriteWithInfobundles instead of separate SRAM/ACC interfaces - Removed obsolete
accReadandaccWriteconnections throughout the hierarchy
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| arch/src/main/scala/framework/memdomain/MemDomain.scala | Adds ToPhysicalLine module to convert unified virtual interfaces to physical SRAM/ACC interfaces before MemController |
| arch/src/main/scala/framework/balldomain/bbus/bbus.scala | Removes ToPhysicalLine instantiation and updates IO to use unified virtual interfaces |
| arch/src/main/scala/examples/toy/balldomain/BallDomain.scala | Updates BallDomainIO to use unified virtual interfaces, removes obsolete ACC connections |
| arch/src/main/scala/examples/toy/ToyBuckyBall.scala | Removes obsolete accRead and accWrite connections between BallDomain and MemDomain |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // val toPhysicalLines = Module(new ToPhysicalLine()(b, p)) | ||
|
|
||
| // toPhysicalLines.io.sramRead_i <> memoryrouter.io.sramRead_o | ||
| // toPhysicalLines.io.sramWrite_i <> memoryrouter.io.sramWrite_o | ||
|
|
There was a problem hiding this comment.
Consider removing this commented-out code. The ToPhysicalLine module has been moved to MemDomain as part of this PR, so these commented lines serve no purpose and clutter the codebase.
| // val toPhysicalLines = Module(new ToPhysicalLine()(b, p)) | |
| // toPhysicalLines.io.sramRead_i <> memoryrouter.io.sramRead_o | |
| // toPhysicalLines.io.sramWrite_i <> memoryrouter.io.sramWrite_o | |
| // val accRead = Vec(b.acc_banks, Flipped(new SramReadIO(b.acc_bank_entries, b.acc_w))) | ||
| // val accWrite = Vec(b.acc_banks, Flipped(new SramWriteIO(b.acc_bank_entries, b.acc_w, b.acc_mask_len))) |
There was a problem hiding this comment.
Consider removing this commented-out code for accRead and accWrite. Since the virtualization now uses unified numBanks interfaces, these old separate accumulator interfaces are obsolete and keeping them commented out may cause confusion.
| // val accRead = Vec(b.acc_banks, Flipped(new SramReadIO(b.acc_bank_entries, b.acc_w))) | |
| // val accWrite = Vec(b.acc_banks, Flipped(new SramWriteIO(b.acc_bank_entries, b.acc_w, b.acc_mask_len))) |
| // val accRead = Vec(b.acc_banks, Flipped(new SramReadIO(b.acc_bank_entries, b.acc_w))) | ||
| // val accWrite = Vec(b.acc_banks, Flipped(new SramWriteIO(b.acc_bank_entries, b.acc_w, b.acc_mask_len))) |
There was a problem hiding this comment.
Consider removing this commented-out code for accRead and accWrite. Since the virtualization now uses unified numBanks interfaces, these old separate accumulator interfaces are obsolete and keeping them commented out may cause confusion.
| // val accRead = Vec(b.acc_banks, Flipped(new SramReadIO(b.acc_bank_entries, b.acc_w))) | |
| // val accWrite = Vec(b.acc_banks, Flipped(new SramWriteIO(b.acc_bank_entries, b.acc_w, b.acc_mask_len))) |
| memStorer.io.accRead <> memController.io.dma.accRead | ||
|
|
||
|
|
||
| // ToPhysical interface |
There was a problem hiding this comment.
The comment has a spelling error: "ToPhysical" should be "ToPhysicalLine" for clarity and consistency with the module name.
| // ToPhysical interface | |
| // ToPhysicalLine interface |
| @@ -11,6 +11,7 @@ import framework.balldomain.bbus.pmc.BallCyclePMC | |||
| import framework.balldomain.bbus.cmdrouter.CmdRouter | |||
| import framework.balldomain.bbus.memrouter.MemRouter | |||
| import framework.switcher.{ToPhysicalLine, ToVirtualLine} | |||
There was a problem hiding this comment.
The ToPhysicalLine import is no longer used in this file since the ToPhysicalLine module instantiation has been removed and moved to MemDomain. Consider removing this unused import to keep the code clean.
| import framework.switcher.{ToPhysicalLine, ToVirtualLine} | |
| import framework.switcher.ToVirtualLine |
Finish the Virtualization of the whole BallDomain. The ToPhysicaline is applied in fronot of the Controller.scala module