SourceShrinker improvements (#1197)
* SourceShrinker: preserve FIFO guarantees of slaves * tilelink: document that Releases can use TtoT, BtoB, and NtoN TtoT is needed for write-through caches.
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							338e453a91
						
					
				
				
					commit
					5854fb5f7c
				
			@@ -76,7 +76,7 @@ object TLPermissions
 | 
				
			|||||||
  def BtoN = UInt(2, cWidth)
 | 
					  def BtoN = UInt(2, cWidth)
 | 
				
			||||||
  def isShrink(x: UInt) = x <= BtoN
 | 
					  def isShrink(x: UInt) = x <= BtoN
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Report types (ProbeAck)
 | 
					  // Report types (ProbeAck, Release)
 | 
				
			||||||
  def TtoT = UInt(3, cWidth)
 | 
					  def TtoT = UInt(3, cWidth)
 | 
				
			||||||
  def BtoB = UInt(4, cWidth)
 | 
					  def BtoB = UInt(4, cWidth)
 | 
				
			||||||
  def NtoN = UInt(5, cWidth)
 | 
					  def NtoN = UInt(5, cWidth)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,8 +18,8 @@ class TLSourceShrinker(maxInFlight: Int)(implicit p: Parameters) extends LazyMod
 | 
				
			|||||||
    sourceId = IdRange(0, maxInFlight))
 | 
					    sourceId = IdRange(0, maxInFlight))
 | 
				
			||||||
  val node = TLAdapterNode(
 | 
					  val node = TLAdapterNode(
 | 
				
			||||||
    // We erase all client information since we crush the source Ids
 | 
					    // We erase all client information since we crush the source Ids
 | 
				
			||||||
    clientFn  = { _ => TLClientPortParameters(clients = Seq(client)) },
 | 
					    clientFn  = { cp => TLClientPortParameters(clients = Seq(client.copy(requestFifo = cp.clients.exists(_.requestFifo)))) },
 | 
				
			||||||
    managerFn = { mp => mp.copy(managers = mp.managers.map(_.copy(fifoId = None)))  })
 | 
					    managerFn = { mp => mp.copy(managers = mp.managers.map(m => m.copy(fifoId = if (maxInFlight==1) Some(0) else m.fifoId)))  })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  lazy val module = new LazyModuleImp(this) {
 | 
					  lazy val module = new LazyModuleImp(this) {
 | 
				
			||||||
    (node.in zip node.out) foreach { case ((in, edgeIn), (out, edgeOut)) =>
 | 
					    (node.in zip node.out) foreach { case ((in, edgeIn), (out, edgeOut)) =>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user