1
0

RationalCrossing: use ShiftQueues

These are faster and small don't cost much more.
This commit is contained in:
Wesley W. Terpstra 2017-09-06 14:27:45 -07:00
parent 50d5d8c1fd
commit 2d93262f71

View File

@ -73,10 +73,10 @@ class RationalCrossingSource[T <: Data](gen: T, direction: RationalDirection = S
val deq = io.deq val deq = io.deq
val enq = direction match { val enq = direction match {
case Symmetric => Queue(io.enq, 1, flow=true) case Symmetric => ShiftQueue(io.enq, 1, flow=true)
case Flexible => Queue(io.enq, 2) case Flexible => ShiftQueue(io.enq, 2)
case FastToSlow => io.enq case FastToSlow => io.enq
case SlowToFast => Queue(io.enq, 2) case SlowToFast => ShiftQueue(io.enq, 2)
} }
val count = RegInit(UInt(0, width = 2)) val count = RegInit(UInt(0, width = 2))
@ -109,9 +109,9 @@ class RationalCrossingSink[T <: Data](gen: T, direction: RationalDirection = Sym
val enq = io.enq val enq = io.enq
val deq = Wire(io.deq) val deq = Wire(io.deq)
direction match { direction match {
case Symmetric => io.deq <> Queue(deq, 1, pipe=true) case Symmetric => io.deq <> ShiftQueue(deq, 1, pipe=true)
case Flexible => io.deq <> Queue(deq, 2) case Flexible => io.deq <> ShiftQueue(deq, 2)
case FastToSlow => io.deq <> Queue(deq, 2) case FastToSlow => io.deq <> ShiftQueue(deq, 2)
case SlowToFast => io.deq <> deq case SlowToFast => io.deq <> deq
} }