1
0

TLCacheCork: unsafe flag now _really_ unsafe (#760)

This commit is contained in:
Henry Cook 2017-05-22 19:37:11 -07:00 committed by GitHub
parent 7f1d3c445f
commit 940614625e

View File

@ -34,9 +34,9 @@ class TLCacheCork(unsafe: Boolean = false)(implicit p: Parameters) extends LazyM
val clients = edgeIn.client.clients val clients = edgeIn.client.clients
val caches = clients.filter(_.supportsProbe) val caches = clients.filter(_.supportsProbe)
require (clients.size == 1 || caches.size == 0 || unsafe, "Only one client can safely use a TLCacheCork") require (clients.size == 1 || caches.size == 0 || unsafe, "Only one client can safely use a TLCacheCork")
require (caches.size <= 1, "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, "Cannot support caches beyond the Cork") require (!m.supportsAcquireB || unsafe, "Cannot support caches beyond the Cork")
} }
// The Cork turns [Acquire=>Get] => [AccessAckData=>GrantData] // The Cork turns [Acquire=>Get] => [AccessAckData=>GrantData]