Heterogeneous Tiles (#550)
Fundamental new features: * Added tile package: This package is intended to hold components re-usable across different types of tile. Will be the future location of TL2-RoCC accelerators and new diplomatic versions of intra-tile interfaces. * Adopted [ModuleName]Params convention: Code base was very inconsistent about what to name case classes that provide parameters to modules. Settled on calling them [ModuleName]Params to distinguish them from config.Parameters and config.Config. So far applied mostly only to case classes defined within rocket and tile. * Defined RocketTileParams: A nested case class containing case classes for all the components of a tile (L1 caches and core). Allows all such parameters to vary per-tile. * Defined RocketCoreParams: All the parameters that can be varied per-core. * Defined L1CacheParams: A trait defining the parameters common to L1 caches, made concrete in different derived case classes. * Defined RocketTilesKey: A sequence of RocketTileParams, one for every tile to be created. * Provided HeterogeneousDualCoreConfig: An example of making a heterogeneous chip with two cores, one big and one little. * Changes to legacy code: ReplacementPolicy moved to package util. L1Metadata moved to package tile. Legacy L2 cache agent removed because it can no longer share the metadata array implementation with the L1. Legacy GroundTests on life support. Additional changes that got rolled in along the way: * rocket: Fix critical path through BTB for I$ index bits > pgIdxBits * coreplex: tiles connected via :=* * groundtest: updated to use TileParams * tilelink: cache cork requirements are relaxed to allow more cacheless masters
This commit is contained in:
@ -4,13 +4,13 @@
|
||||
package rocket
|
||||
|
||||
import Chisel._
|
||||
import Chisel.ImplicitConversions._
|
||||
import config._
|
||||
import coreplex._
|
||||
import diplomacy._
|
||||
import uncore.tilelink2._
|
||||
import uncore.util.CacheName
|
||||
import tile._
|
||||
import util._
|
||||
import Chisel.ImplicitConversions._
|
||||
|
||||
class FrontendReq(implicit p: Parameters) extends CoreBundle()(p) {
|
||||
val pc = UInt(width = vaddrBitsExtended)
|
||||
@ -54,12 +54,12 @@ class FrontendBundle(outer: Frontend) extends CoreBundle()(outer.p) {
|
||||
|
||||
class FrontendModule(outer: Frontend) extends LazyModuleImp(outer)
|
||||
with HasCoreParameters
|
||||
with HasL1CacheParameters {
|
||||
with HasL1ICacheParameters {
|
||||
val io = new FrontendBundle(outer)
|
||||
implicit val edge = outer.node.edgesOut(0)
|
||||
val icache = outer.icache.module
|
||||
|
||||
val tlb = Module(new TLB)
|
||||
val tlb = Module(new TLB(nTLBEntries))
|
||||
|
||||
val s1_pc_ = Reg(UInt(width=vaddrBitsExtended))
|
||||
val s1_pc = ~(~s1_pc_ | (coreInstBytes-1)) // discard PC LSBS (this propagates down the pipeline)
|
||||
@ -106,7 +106,7 @@ class FrontendModule(outer: Frontend) extends LazyModuleImp(outer)
|
||||
s2_valid := Bool(false)
|
||||
}
|
||||
|
||||
if (p(BtbKey).nEntries > 0) {
|
||||
if (usingBTB) {
|
||||
val btb = Module(new BTB)
|
||||
btb.io.req.valid := false
|
||||
btb.io.req.bits.addr := s1_pc_
|
||||
@ -153,21 +153,18 @@ class FrontendModule(outer: Frontend) extends LazyModuleImp(outer)
|
||||
}
|
||||
|
||||
/** Mix-ins for constructing tiles that have an ICache-based pipeline frontend */
|
||||
trait HasICacheFrontend extends CanHavePTW with TileNetwork {
|
||||
trait HasICacheFrontend extends CanHavePTW with HasTileLinkMasterPort {
|
||||
val module: HasICacheFrontendModule
|
||||
val frontend = LazyModule(new Frontend()(p.alterPartial({
|
||||
case CacheName => CacheName("L1I")
|
||||
})))
|
||||
l1backend.node := frontend.node
|
||||
val frontend = LazyModule(new Frontend)
|
||||
masterNode := frontend.node
|
||||
nPTWPorts += 1
|
||||
}
|
||||
|
||||
trait HasICacheFrontendBundle extends TileNetworkBundle {
|
||||
trait HasICacheFrontendBundle extends HasTileLinkMasterPortBundle {
|
||||
val outer: HasICacheFrontend
|
||||
}
|
||||
|
||||
trait HasICacheFrontendModule extends CanHavePTWModule with TileNetworkModule {
|
||||
trait HasICacheFrontendModule extends CanHavePTWModule with HasTileLinkMasterPortModule {
|
||||
val outer: HasICacheFrontend
|
||||
//val io: HasICacheFrontendBundle
|
||||
ptwPorts += outer.frontend.module.io.ptw
|
||||
}
|
||||
|
Reference in New Issue
Block a user