@@ -67,9 +67,10 @@ class ReservationStation(implicit p: Parameters) extends CoreModule()(p) {
6767 }
6868 }
6969 def collFiredTable (row : Int ): Vec [Bool ] = collFiredTable(row.U )
70- // where the operand lives in the collector banks
70+ // where the operand lives in the collector banks. RS uses this to allocate a
71+ // spot in the collector & feed the correct data to EX upon issue.
7172 val collPtrTable = Mem (numEntries, Vec (Isa .maxNumRegs, UInt (collEntryWidth.W )))
72- val collAllReadyTable = Wire (Vec (numEntries, Bool ()))
73+ val collNeedAllReadyTable = Wire (Vec (numEntries, Bool ()))
7374 // mostly for debugging
7475 val eligibleTable = WireDefault (VecInit .fill(numEntries)(false .B ))
7576 dontTouch(eligibleTable)
@@ -128,10 +129,10 @@ class ReservationStation(implicit p: Parameters) extends CoreModule()(p) {
128129 // select a single entry for collection
129130 // TODO: @perf: currently a simple priority encoder; might introduce fairness
130131 // problem
131- val collBitvec = WireDefault (VecInit (needCollects.map(_._1)))
132- collAllReadyTable := VecInit (needCollects.map(_._3))
133- dontTouch(collBitvec )
134- dontTouch(collAllReadyTable )
132+ val collNeedTable = WireDefault (VecInit (needCollects.map(_._1)))
133+ collNeedAllReadyTable := VecInit (needCollects.map(_._3))
134+ dontTouch(collNeedTable )
135+ dontTouch(collNeedAllReadyTable )
135136
136137 // don't allow early-firing collector requests for partial operands of an
137138 // instruction. Partial collects may result in a deadlock with insufficient
@@ -148,9 +149,9 @@ class ReservationStation(implicit p: Parameters) extends CoreModule()(p) {
148149 // that, we need some kind of bookkeeping in the collector for the
149150 // partial-collect uops, which is what the collector banks are meant for,
150151 // which are expensive.
151- val allReadyExists = collAllReadyTable .reduce(_ || _)
152- val firstAllReadyRow = PriorityEncoder (collAllReadyTable )
153- val firstNeedRow = PriorityEncoder (collBitvec )
152+ val allReadyExists = collNeedAllReadyTable .reduce(_ || _)
153+ val firstAllReadyRow = PriorityEncoder (collNeedAllReadyTable )
154+ val firstNeedRow = PriorityEncoder (collNeedTable )
154155 val collRow = Mux (! allowPartialCollect.B || allReadyExists,
155156 firstAllReadyRow, firstNeedRow)
156157 dontTouch(collRow)
@@ -428,6 +429,7 @@ class ReservationStation(implicit p: Parameters) extends CoreModule()(p) {
428429 cf " hasOp: ${hasOpTable(i)(0 )}${hasOpTable(i)(1 )}${hasOpTable(i)(2 )} | " +
429430 cf " opReady: ${opReadyTable(i)(0 )}${opReadyTable(i)(1 )}${opReadyTable(i)(2 )} | " +
430431 cf " busy: ${busyTable(i)(0 )}${busyTable(i)(1 )}${busyTable(i)(2 )} | " +
432+ cf " collNeed: ${collNeedAllReadyTable(i)} | " +
431433 cf " collFired: ${collFiredTable(i)(0 )}${collFiredTable(i)(1 )}${collFiredTable(i)(2 )} | " +
432434 cf " eligible: ${eligibleTable(i)}" +
433435 cf " \n " )
0 commit comments