2016-11-28 01:16:37 +01:00
|
|
|
// See LICENSE.SiFive for license details.
|
|
|
|
// See LICENSE.Berkeley for license details.
|
|
|
|
|
2017-07-07 19:48:16 +02:00
|
|
|
package freechips.rocketchip.groundtest
|
2015-10-27 05:37:35 +01:00
|
|
|
|
|
|
|
import Chisel._
|
2017-07-07 19:48:16 +02:00
|
|
|
import freechips.rocketchip.config._
|
2017-09-12 21:10:39 +02:00
|
|
|
import freechips.rocketchip.diplomacy._
|
2017-07-07 19:48:16 +02:00
|
|
|
import freechips.rocketchip.coreplex._
|
2017-12-21 02:18:38 +01:00
|
|
|
import freechips.rocketchip.interrupts._
|
2017-10-10 08:43:18 +02:00
|
|
|
import freechips.rocketchip.rocket.{DCache, RocketCoreParams}
|
2017-07-07 19:48:16 +02:00
|
|
|
import freechips.rocketchip.tile._
|
2017-12-21 02:18:38 +01:00
|
|
|
import freechips.rocketchip.tilelink._
|
2017-02-09 22:59:09 +01:00
|
|
|
import scala.collection.mutable.ListBuffer
|
2015-11-19 07:54:05 +01:00
|
|
|
|
2017-07-07 19:48:16 +02:00
|
|
|
trait GroundTestTileParams extends TileParams {
|
|
|
|
val memStart: BigInt
|
|
|
|
val maxRequests: Int
|
|
|
|
val numGens: Int
|
2015-10-27 05:37:35 +01:00
|
|
|
|
2017-07-07 19:48:16 +02:00
|
|
|
def build(i: Int, p: Parameters): GroundTestTile
|
|
|
|
|
2017-02-09 22:59:09 +01:00
|
|
|
val icache = None
|
|
|
|
val btb = None
|
|
|
|
val rocc = Nil
|
2017-07-07 19:48:16 +02:00
|
|
|
val core = RocketCoreParams(nPMPs = 0) //TODO remove this
|
2017-02-09 22:59:09 +01:00
|
|
|
val cached = if(dcache.isDefined) 1 else 0
|
|
|
|
val dataScratchpadBytes = 0
|
|
|
|
}
|
2016-06-14 01:17:11 +02:00
|
|
|
|
2017-07-07 19:48:16 +02:00
|
|
|
case object GroundTestTilesKey extends Field[Seq[GroundTestTileParams]]
|
2016-07-12 01:41:55 +02:00
|
|
|
|
2017-12-28 23:00:13 +01:00
|
|
|
abstract class GroundTestTile(params: GroundTestTileParams)
|
|
|
|
(implicit p: Parameters)
|
|
|
|
extends BaseTile(params, crossing = SynchronousCrossing())(p) {
|
2017-12-21 02:18:38 +01:00
|
|
|
val intInwardNode: IntInwardNode = IntIdentityNode()
|
|
|
|
val intOutwardNode: IntOutwardNode = IntIdentityNode()
|
|
|
|
val slaveNode: TLInwardNode = TLIdentityNode()
|
|
|
|
|
2017-10-10 08:43:18 +02:00
|
|
|
val dcacheOpt = params.dcache.map { dc => LazyModule(new DCache(0)) }
|
2016-06-14 01:17:11 +02:00
|
|
|
|
2018-01-03 02:55:54 +01:00
|
|
|
override lazy val module = new GroundTestTileModuleImp(this)
|
2016-07-12 01:41:55 +02:00
|
|
|
}
|
|
|
|
|
2018-01-03 02:55:54 +01:00
|
|
|
class GroundTestTileModuleImp(outer: GroundTestTile) extends BaseTileModuleImp(outer) {
|
2018-01-03 00:37:31 +01:00
|
|
|
val status = IO(new GroundTestStatus)
|
2017-10-06 08:49:35 +02:00
|
|
|
val halt_and_catch_fire = None
|
2016-06-14 01:17:11 +02:00
|
|
|
|
2017-07-07 19:48:16 +02:00
|
|
|
outer.dcacheOpt foreach { dcache =>
|
|
|
|
val ptw = Module(new DummyPTW(1))
|
|
|
|
ptw.io.requestors.head <> dcache.module.io.ptw
|
2016-06-14 01:17:11 +02:00
|
|
|
}
|
2015-10-27 05:37:35 +01:00
|
|
|
}
|