1
0

make ZscaleChip work with new parameters framework

This commit is contained in:
Yunsup Lee
2015-10-25 10:24:39 -07:00
parent c3a7dcf0ab
commit a175afae73
6 changed files with 27 additions and 32 deletions

View File

@ -26,7 +26,6 @@ class DefaultConfig extends Config (
new AddrMap(csrs :+ scr)
}
pname match {
case UseZscale => false
case HtifKey => HtifParameters(
width = Dump("HTIF_WIDTH", 16),
nSCR = 64,
@ -225,9 +224,8 @@ class WithZscale extends Config(
case BuildZscale => {
TestGeneration.addSuites(List(rv32ui("p"), rv32um("p")))
TestGeneration.addSuites(List(zscaleBmarks))
(r: Bool, p: Parameters) => Module(new Zscale(r)(p.alterPartial({case TLId => "L1toL2"})))
(r: Bool, p: Parameters) => Module(new Zscale(r)(p))
}
case UseZscale => true
case BootROMCapacity => Dump("BOOT_CAPACITY", 16*1024)
case DRAMCapacity => Dump("DRAM_CAPACITY", 64*1024*1024)
}

View File

@ -81,25 +81,21 @@ class MultiChannelTopIO(implicit p: Parameters) extends BasicTopIO()(p) {
class Top(topParams: Parameters) extends Module with HasTopLevelParameters {
implicit val p = topParams
val io = new TopIO
if(!p(UseZscale)) {
val temp = Module(new MultiChannelTop)
val arb = Module(new NastiArbiter(nMemChannels))
val conv = Module(new MemIONastiIOConverter(p(CacheBlockOffsetBits)))
arb.io.master <> temp.io.mem
conv.io.nasti <> arb.io.slave
io.mem.req_cmd <> Queue(conv.io.mem.req_cmd)
io.mem.req_data <> Queue(conv.io.mem.req_data, mifDataBeats)
conv.io.mem.resp <> Queue(io.mem.resp, mifDataBeats)
io.mem_backup_ctrl <> temp.io.mem_backup_ctrl
io.host <> temp.io.host
// tie off the mmio port
val errslave = Module(new NastiErrorSlave)
errslave.io <> temp.io.mmio
} else {
val temp = Module(new ZscaleTop)
io.host <> temp.io.host
}
val temp = Module(new MultiChannelTop)
val arb = Module(new NastiArbiter(nMemChannels))
val conv = Module(new MemIONastiIOConverter(p(CacheBlockOffsetBits)))
arb.io.master <> temp.io.mem
conv.io.nasti <> arb.io.slave
io.mem.req_cmd <> Queue(conv.io.mem.req_cmd)
io.mem.req_data <> Queue(conv.io.mem.req_data, mifDataBeats)
conv.io.mem.resp <> Queue(io.mem.resp, mifDataBeats)
io.mem_backup_ctrl <> temp.io.mem_backup_ctrl
io.host <> temp.io.host
// tie off the mmio port
val errslave = Module(new NastiErrorSlave)
errslave.io <> temp.io.mmio
}
class MultiChannelTop(implicit val p: Parameters) extends Module with HasTopLevelParameters {

View File

@ -61,7 +61,8 @@ class ZscaleSystem(implicit p: Parameters) extends Module {
io.corereset <> pbus.io.slaves(1)
}
class ZscaleTop(implicit p: Parameters) extends Module {
class ZscaleTop(topParams: Parameters) extends Module {
implicit val p = topParams.alterPartial({case TLId => "L1toL2" })
val io = new Bundle {
val host = new HtifIO
}