1
0

PositionalMultiQueue: convert 'next' to a single write port

This commit is contained in:
Wesley W. Terpstra 2016-11-22 18:38:55 -08:00
parent 13190a5de0
commit d9a203b0f0

View File

@ -45,6 +45,10 @@ class PositionalMultiQueue[T <: Data](params: PositionalMultiQueueParameters[T],
// ensure the user never stores to the same position twice
assert (!guard(io.enq.bits.pos))
guard(io.enq.bits.pos) := Bool(true)
when (!empty(io.enq.bits.way)) {
next(tail(io.enq.bits.way)) := io.enq.bits.pos
}
}
val deq = Wire(io.deq)
@ -59,8 +63,6 @@ class PositionalMultiQueue[T <: Data](params: PositionalMultiQueueParameters[T],
tail(i) := io.enq.bits.pos
when (empty(i)) {
head(i) := io.enq.bits.pos
} .otherwise {
next(tail(i)) := io.enq.bits.pos
}
}