1
0

tilelink: it is now legal to support Acquire for UNCACHED regions

These cases exist:
  GET_EFFECTS, PUT_EFFECTS, UNCACHEABLE && !supportsAcquire: MMIO
  UNCACHED && !supportsAcquire: speculation ok and may be cached
  UNCACHED && supportsAcquire: LLC/CacheCork applied (slave never probes)
  CACHED, TRACKED && supportsAcquire: slave might probe
This commit is contained in:
Wesley W. Terpstra 2017-07-27 00:25:07 -07:00
parent 0ab5cb67b3
commit 651da73d89
2 changed files with 6 additions and 5 deletions

View File

@ -20,9 +20,8 @@ class TLCacheCork(unsafe: Boolean = false)(implicit p: Parameters) extends LazyM
mp.copy( mp.copy(
endSinkId = 1, endSinkId = 1,
managers = mp.managers.map { m => m.copy( managers = mp.managers.map { m => m.copy(
regionType = if (m.regionType == RegionType.UNCACHED) RegionType.TRACKED else m.regionType, supportsAcquireB = if (m.regionType == RegionType.UNCACHED) m.supportsGet else m.supportsAcquireB,
supportsAcquireB = m.supportsGet, supportsAcquireT = if (m.regionType == RegionType.UNCACHED) m.supportsPutFull else m.supportsAcquireT)})})
supportsAcquireT = m.supportsPutFull)})})
lazy val module = new LazyModuleImp(this) { lazy val module = new LazyModuleImp(this) {
val io = new Bundle { val io = new Bundle {
@ -37,6 +36,7 @@ class TLCacheCork(unsafe: Boolean = false)(implicit p: Parameters) extends LazyM
require (caches.size <= 1 || unsafe, "Only one caching client allowed") require (caches.size <= 1 || unsafe, "Only one caching client allowed")
edgeOut.manager.managers.foreach { case m => edgeOut.manager.managers.foreach { case m =>
require (!m.supportsAcquireB || unsafe, "Cannot support caches beyond the Cork") require (!m.supportsAcquireB || unsafe, "Cannot support caches beyond the Cork")
require (m.regionType <= RegionType.UNCACHED)
} }
// The Cork turns [Acquire=>Get] => [AccessAckData=>GrantData] // The Cork turns [Acquire=>Get] => [AccessAckData=>GrantData]

View File

@ -38,8 +38,9 @@ case class TLManagerParameters(
require (supportsAcquireB.contains(supportsAcquireT)) require (supportsAcquireB.contains(supportsAcquireT))
// Make sure that the regionType agrees with the capabilities // Make sure that the regionType agrees with the capabilities
require ((regionType == RegionType.CACHED || regionType == RegionType.TRACKED) != supportsAcquireB.none) require (!supportsAcquireB || regionType >= RegionType.UNCACHED) // acquire -> uncached, tracked, cached
require (regionType != RegionType.UNCACHED || supportsGet) require (regionType <= RegionType.UNCACHED || supportsAcquireB) // tracked, cached -> acquire
require (regionType != RegionType.UNCACHED || supportsGet) // uncached -> supportsGet
val name = nodePath.lastOption.map(_.lazyModule.name).getOrElse("disconnected") val name = nodePath.lastOption.map(_.lazyModule.name).getOrElse("disconnected")
val maxTransfer = List( // Largest supported transfer of all types val maxTransfer = List( // Largest supported transfer of all types