coreplex: support multiple memory channels via diplomatic trickery
This commit is contained in:
@ -40,7 +40,7 @@ class MemtestStatelessConfig extends Config(
|
||||
// Test ALL the things
|
||||
class FancyMemtestConfig extends Config(
|
||||
new WithNGenerators(1, 2) ++ new WithNCores(2) ++ new WithMemtest ++
|
||||
new WithNMemoryChannels(1) ++ new WithNBanksPerMemChannel(4) ++ // !!! waiting on Chisel3 support for 2 channels
|
||||
new WithNMemoryChannels(2) ++ new WithNBanksPerMemChannel(4) ++
|
||||
new WithL2Cache ++ new GroundTestConfig)
|
||||
|
||||
class CacheFillTestConfig extends Config(
|
||||
|
@ -16,11 +16,6 @@ class TestHarness(implicit p: Parameters) extends Module {
|
||||
val dut = Module(LazyModule(new GroundTestTop).module)
|
||||
io.success := dut.io.success
|
||||
|
||||
if (dut.io.mem_axi4.nonEmpty) {
|
||||
val memSize = p(ExtMem).size
|
||||
require(memSize % dut.io.mem_axi4.size == 0)
|
||||
for (axi4 <- dut.io.mem_axi4) {
|
||||
Module(LazyModule(new SimAXIMem(memSize / dut.io.mem_axi4.size)).module).io.axi4 <> axi4
|
||||
}
|
||||
}
|
||||
val channels = p(coreplex.BankedL2Config).nMemoryChannels
|
||||
if (channels > 0) Module(LazyModule(new SimAXIMem(channels)).module).io.axi4 <> dut.io.mem_axi4
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ class GroundTestTop(implicit p: Parameters) extends BaseTop
|
||||
|
||||
socBus.node := coreplex.mmio
|
||||
coreplex.mmioInt := intBus.intnode
|
||||
(mem zip coreplex.mem) foreach { case (m, c) => m := c }
|
||||
mem.foreach { _ := coreplex.mem }
|
||||
}
|
||||
|
||||
class GroundTestTopBundle[+L <: GroundTestTop](_outer: L) extends BaseTopBundle(_outer)
|
||||
|
Reference in New Issue
Block a user