From 138276fd872887c93235fb4e8b00be35643b457e Mon Sep 17 00:00:00 2001 From: "Wesley W. Terpstra" Date: Wed, 26 Jul 2017 10:40:40 -0700 Subject: [PATCH] tilelink: SourceShrinker should work also for 0 latency --- src/main/scala/tilelink/SourceShrinker.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/scala/tilelink/SourceShrinker.scala b/src/main/scala/tilelink/SourceShrinker.scala index 57558b42..3a1e9a30 100644 --- a/src/main/scala/tilelink/SourceShrinker.scala +++ b/src/main/scala/tilelink/SourceShrinker.scala @@ -60,8 +60,9 @@ class TLSourceShrinker(maxInFlight: Int)(implicit p: Parameters) extends LazyMod out.a.bits := in.a.bits out.a.bits.source := nextFree holdUnless a_first + val bypass = Bool(edgeOut.manager.minLatency == 0) && in.a.fire() && a_first && nextFree === out.d.bits.source in.d <> out.d - in.d.bits.source := sourceIdMap(out.d.bits.source) + in.d.bits.source := Mux(bypass, in.a.bits.source, sourceIdMap(out.d.bits.source)) when (a_first && in.a.fire()) { sourceIdMap(nextFree) := in.a.bits.source