tilelink2 Buffer: support an unlimited number of channels
This commit is contained in:
		@@ -15,14 +15,11 @@ class TLBuffer(entries: Int = 2, pipe: Boolean = false) extends LazyModule
 | 
				
			|||||||
      val out = node.bundleOut
 | 
					      val out = node.bundleOut
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    val in  = io.in(0)
 | 
					    ((io.in zip io.out) zip (node.edgesIn zip node.edgesOut)) foreach { case ((in, out), (edgeIn, edgeOut)) =>
 | 
				
			||||||
    val out = io.out(0)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      out.a <> Queue(in .a, entries, pipe)
 | 
					      out.a <> Queue(in .a, entries, pipe)
 | 
				
			||||||
      in .d <> Queue(out.d, entries, pipe)
 | 
					      in .d <> Queue(out.d, entries, pipe)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    val edge = node.edgesOut(0) // same as edgeIn(0)
 | 
					      if (edgeOut.manager.anySupportAcquire && edgeOut.client.anySupportProbe) {
 | 
				
			||||||
    if (edge.manager.anySupportAcquire && edge.client.anySupportProbe) {
 | 
					 | 
				
			||||||
        in .b <> Queue(out.b, entries, pipe)
 | 
					        in .b <> Queue(out.b, entries, pipe)
 | 
				
			||||||
        out.c <> Queue(in .c, entries, pipe)
 | 
					        out.c <> Queue(in .c, entries, pipe)
 | 
				
			||||||
        out.e <> Queue(out.e, entries, pipe)
 | 
					        out.e <> Queue(out.e, entries, pipe)
 | 
				
			||||||
@@ -35,6 +32,7 @@ class TLBuffer(entries: Int = 2, pipe: Boolean = false) extends LazyModule
 | 
				
			|||||||
        out.e.valid := Bool(false)
 | 
					        out.e.valid := Bool(false)
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
object TLBuffer
 | 
					object TLBuffer
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user