Skip to content

Commit 6be6a70

Browse files
committed
smem coalescer criteria fix
1 parent e991187 commit 6be6a70

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/scala/radiance/memory/SingleAddrCoalescer.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class SingleAddrCoalescer(val sourceBits: Int = 2)
3939
out.a.valid := in.a.valid && !coalescibleOut
4040
in.a.ready := Mux(coalescibleOut, coalOut.a.ready && coalSource.io.id.valid, out.a.ready)
4141

42-
in.d.valid := out.d.valid && !coalescedIn // TODO FIXME HACK, ASSUMES UNIFORM D READY
42+
in.d.valid := out.d.valid && !coalescedIn
4343
out.d.ready := in.d.ready && !coalescedIn // coalesced response has priority
4444
}
4545

@@ -48,7 +48,8 @@ class SingleAddrCoalescer(val sourceBits: Int = 2)
4848
val leader = PriorityMux(inA.map(a => (a.valid, a.bits)))
4949
val leaderReady = PriorityMux(inA.map(a => (a.valid, a.ready)))
5050

51-
coalescibleOut := inA.map(x => !x.valid || (x.bits.address === leader.address)).andR
51+
coalescibleOut := inA.map(x => !x.valid || (x.bits.address === leader.address &&
52+
x.bits.opcode === leader.opcode && x.bits.size === leader.size)).andR
5253

5354
coalOut.a.valid := coalescibleOut && inA.map(_.valid).orR && coalSource.io.id.valid
5455
coalOut.a.bits := leader

0 commit comments

Comments
 (0)