tilelink2 Buffer: support an unlimited number of channels
This commit is contained in:
		| @@ -15,24 +15,22 @@ 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) | ||||||
|  |       in .d <> Queue(out.d, entries, pipe) | ||||||
|  |  | ||||||
|     out.a <> Queue(in .a, entries, pipe) |       if (edgeOut.manager.anySupportAcquire && edgeOut.client.anySupportProbe) { | ||||||
|     in .d <> Queue(out.d, entries, pipe) |         in .b <> Queue(out.b, entries, pipe) | ||||||
|      |         out.c <> Queue(in .c, entries, pipe) | ||||||
|     val edge = node.edgesOut(0) // same as edgeIn(0) |         out.e <> Queue(out.e, entries, pipe) | ||||||
|     if (edge.manager.anySupportAcquire && edge.client.anySupportProbe) { |       } else { | ||||||
|       in .b <> Queue(out.b, entries, pipe) |         in.b.valid := Bool(false) | ||||||
|       out.c <> Queue(in .c, entries, pipe) |         in.c.ready := Bool(true) | ||||||
|       out.e <> Queue(out.e, entries, pipe) |         in.e.ready := Bool(true) | ||||||
|     } else { |         out.b.ready := Bool(true) | ||||||
|       in.b.valid := Bool(false) |         out.c.valid := Bool(false) | ||||||
|       in.c.ready := Bool(true) |         out.e.valid := Bool(false) | ||||||
|       in.e.ready := Bool(true) |       } | ||||||
|       out.b.ready := Bool(true) |  | ||||||
|       out.c.valid := Bool(false) |  | ||||||
|       out.e.valid := Bool(false) |  | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user