forked from chipsalliance/rocket-chip
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
subsystem: add MaskROM to RocketSubsystem (chipsalliance#2009)
* subsystem: add MaskROM to RocketSubsystem * subsystem: factor bus topology out of example system
- Loading branch information
Showing
3 changed files
with
35 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// See LICENSE.SiFive for license details. | ||
|
||
package freechips.rocketchip.subsystem | ||
|
||
import freechips.rocketchip.diplomacy._ | ||
import freechips.rocketchip.tilelink._ | ||
|
||
trait HasHierarchicalBusTopology { this: BaseSubsystem => | ||
// The sbus masters the cbus; here we convert TL-UH -> TL-UL | ||
sbus.crossToBus(cbus, NoCrossing) | ||
|
||
// The cbus masters the pbus; which might be clocked slower | ||
cbus.crossToBus(pbus, SynchronousCrossing()) | ||
|
||
// The fbus masters the sbus; both are TL-UH or TL-C | ||
FlipRendering { implicit p => | ||
sbus.crossFromBus(fbus, SynchronousCrossing()) | ||
} | ||
|
||
// The sbus masters the mbus; here we convert TL-C -> TL-UH | ||
private val BankedL2Params(nBanks, coherenceManager) = p(BankedL2Key) | ||
private val (in, out, halt) = coherenceManager(this) | ||
if (nBanks != 0) { | ||
sbus.coupleTo("coherence_manager") { in :*= _ } | ||
mbus.coupleFrom("coherence_manager") { _ :=* BankBinder(mbus.blockBytes * (nBanks-1)) :*= out } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters