1
0

make Comparator fit the GroundTest model

This commit is contained in:
Howard Mao 2016-06-27 16:01:32 -07:00
parent 800e62412a
commit 2dd8d90ae4
2 changed files with 5 additions and 27 deletions

@ -1 +1 @@
Subproject commit 1b54352bb64699bf6612c3faea46522891c58269 Subproject commit 961f3543a5a85a45da5bd36dbf9c16a34f19ecd0

View File

@ -54,37 +54,15 @@ class WithGroundTest extends Config(
class WithComparator extends Config( class WithComparator extends Config(
(pname, site, here) => pname match { (pname, site, here) => pname match {
case TLKey("L1toL2") => case GroundTestUncachedClients => site(ComparatorKey).targets.size
TileLinkParameters( case BuildGroundTest =>
coherencePolicy = new MESICoherence(site(L2DirectoryRepresentation)), (id: Int, p: Parameters) => Module(new ComparatorCore()(p))
nManagers = site(NBanksPerMemoryChannel)*site(NMemoryChannels) + 1,
nCachingClients = site(NCachedTileLinkPorts),
nCachelessClients = site(NUncachedTileLinkPorts),
maxClientXacts = 2,
maxClientsPerPort = 1,
maxManagerXacts = site(NAcquireTransactors) + 2,
dataBeats = site(MIFDataBeats),
dataBits = site(CacheBlockBytes)*8)
case BuildTiles => {
val groundtest = if (site(XLen) == 64)
DefaultTestSuites.groundtest64
else
DefaultTestSuites.groundtest32
TestGeneration.addSuite(groundtest("p"))
TestGeneration.addSuite(DefaultTestSuites.emptyBmarks)
Seq((r: Bool, p: Parameters) => Module(new ComparatorTile(r)(
p.alterPartial({
case TLId => "L1toL2"
case NUncachedTileLinkPorts => site(ComparatorKey).targets.size
}))))
}
case ComparatorKey => ComparatorParameters( case ComparatorKey => ComparatorParameters(
targets = Seq(0L, 0x100L).map(site(GlobalAddrMap)("mem").start.longValue + _), targets = Seq(0L, 0x100L).map(site(GlobalAddrMap)("mem").start.longValue + _),
width = 8, width = 8,
operations = 1000, operations = 1000,
atomics = site(UseAtomics), atomics = site(UseAtomics),
prefetches = site("COMPARATOR_PREFETCHES")) prefetches = site("COMPARATOR_PREFETCHES"))
case NUncachedTileLinkPorts => 1 + site(ComparatorKey).targets.size
case TohostAddr => BigInt("80001000", 16) // quit test by writing here case TohostAddr => BigInt("80001000", 16) // quit test by writing here
case UseFPU => false case UseFPU => false
case UseAtomics => false case UseAtomics => false
@ -208,7 +186,7 @@ class WithTraceGen extends Config(
case _ => throw new CDEMatchError case _ => throw new CDEMatchError
}) })
class ComparatorConfig extends Config(new WithComparator ++ new BaseConfig) class ComparatorConfig extends Config(new WithComparator ++ new GroundTestConfig)
class ComparatorL2Config extends Config( class ComparatorL2Config extends Config(
new WithAtomics ++ new WithPrefetches ++ new WithAtomics ++ new WithPrefetches ++
new WithL2Cache ++ new ComparatorConfig) new WithL2Cache ++ new ComparatorConfig)