Resurrect the backup memory port
We need this to work for our chip, and it's not been tested in a long time in upstream -- it didn't even used to build since the Nasti conversion. This makes a few changes: * Rather than calling the backup memory port parameters MEM_*, it calls them MIF_* (to match the MIT* paramater objects). A new name was necessary because the Nasti stuff is now dumped as MEM_*, which has similar names but incompatible values. * p(MIFDataBits) was changed back to 128, as otherwise the backup memory port doesn't work (it only send half a TileLink transaction). 64 also causes readmemh to bail out, but changing the elf2hex parameters works around that. * A configuration was added that enabled the backup memory port in the tester. While this is kind of an awkward way to do it, I want to make sure I can start testing this regularly and this makes it easy to integrate.
This commit is contained in:
@ -87,13 +87,15 @@ class DefaultConfig extends Config (
|
||||
case PPNBits => site(PAddrBits) - site(PgIdxBits)
|
||||
case VAddrBits => site(VPNBits) + site(PgIdxBits)
|
||||
case ASIdBits => 7
|
||||
case MIFTagBits => // Bits needed at the L2 agent
|
||||
case MIFTagBits => Dump("MIF_TAG_BITS",
|
||||
// Bits needed at the L2 agent
|
||||
log2Up(site(NAcquireTransactors)+2) +
|
||||
// Bits added by NASTI interconnect
|
||||
max(log2Up(site(MaxBanksPerMemoryChannel)),
|
||||
(if (site(UseDma)) 3 else 2))
|
||||
case MIFDataBits => 64
|
||||
case MIFAddrBits => site(PAddrBits) - site(CacheBlockOffsetBits)
|
||||
(if (site(UseDma)) 3 else 2)))
|
||||
case MIFDataBits => Dump("MIF_DATA_BITS", 128)
|
||||
case MIFAddrBits => Dump("MIF_ADDR_BITS",
|
||||
site(PAddrBits) - site(CacheBlockOffsetBits))
|
||||
case MIFDataBeats => site(CacheBlockBytes) * 8 / site(MIFDataBits)
|
||||
case NastiKey => {
|
||||
Dump("MEM_STRB_BITS", site(MIFDataBits) / 8)
|
||||
@ -447,5 +449,7 @@ class WithOneOrMaxChannels extends Config(
|
||||
case MemoryChannelMuxConfigs => Dump("MEMORY_CHANNEL_MUX_CONFIGS", List(1, site(NMemoryChannels)))
|
||||
}
|
||||
)
|
||||
|
||||
class OneOrEightChannelBenchmarkConfig extends Config(new WithOneOrMaxChannels ++ new With8MemoryChannels ++ new SingleChannelBenchmarkConfig)
|
||||
|
||||
class SimulateBackupMemConfig extends Config(){ Dump("MEM_BACKUP_EN", true) }
|
||||
class BackupMemVLSIConfig extends Config(new SimulateBackupMemConfig ++ new DefaultVLSIConfig)
|
||||
|
Reference in New Issue
Block a user