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
|
2016-08-11 02:20:00 +02:00
|
|
|
|
|
|
|
import Chisel._
|
2017-07-07 19:48:16 +02:00
|
|
|
import freechips.rocketchip.config.Config
|
2017-07-23 17:31:04 +02:00
|
|
|
import freechips.rocketchip.coreplex._
|
2017-09-01 03:48:59 +02:00
|
|
|
import freechips.rocketchip.rocket.{DCacheParams}
|
2017-07-07 19:48:16 +02:00
|
|
|
import freechips.rocketchip.tile.{MaxHartIdBits, XLen}
|
2016-09-15 22:04:01 +02:00
|
|
|
|
|
|
|
/** Actual testing target Configs */
|
|
|
|
|
2017-07-23 17:31:04 +02:00
|
|
|
class TraceGenConfig extends Config(new WithTraceGen(List.fill(2){ DCacheParams(nSets = 16, nWays = 1) }) ++ new BaseCoreplexConfig)
|
2016-09-15 22:04:01 +02:00
|
|
|
|
2017-07-07 19:48:16 +02:00
|
|
|
class TraceGenBufferlessConfig extends Config(new WithBufferlessBroadcastHub ++ new TraceGenConfig)
|
2016-09-15 22:04:01 +02:00
|
|
|
|
|
|
|
/* Composable Configs to set individual parameters */
|
2017-02-09 22:59:09 +01:00
|
|
|
|
2017-07-07 19:48:16 +02:00
|
|
|
class WithTraceGen(params: Seq[DCacheParams], nReqs: Int = 8192) extends Config((site, here, up) => {
|
|
|
|
case GroundTestTilesKey => params.map { dcp => TraceGenParams(
|
|
|
|
dcache = Some(dcp),
|
|
|
|
wordBits = site(XLen),
|
2017-09-01 03:48:59 +02:00
|
|
|
addrBits = 32,
|
2017-07-07 19:48:16 +02:00
|
|
|
addrBag = {
|
|
|
|
val nSets = 2
|
|
|
|
val nWays = 1
|
2017-09-09 03:33:44 +02:00
|
|
|
val blockOffset = site(SystemBusKey).blockOffset
|
|
|
|
val nBeats = site(SystemBusKey).blockBeats
|
2017-07-07 19:48:16 +02:00
|
|
|
List.tabulate(4 * nWays) { i =>
|
|
|
|
Seq.tabulate(nBeats) { j => BigInt((j * 8) + ((i * nSets) << blockOffset)) }
|
|
|
|
}.flatten
|
|
|
|
},
|
|
|
|
maxRequests = nReqs,
|
|
|
|
memStart = site(ExtMem).base,
|
|
|
|
numGens = params.size)
|
|
|
|
}
|
|
|
|
case MaxHartIdBits => log2Up(params.size)
|
2017-01-13 23:41:19 +01:00
|
|
|
})
|