Skip to content

Commit

Permalink
RS: every rs has its own iqSize now (OpenXiangShan#710)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemover authored Mar 24, 2021
1 parent f432c81 commit 6170426
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/xiangshan/backend/FloatBlock.scala
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class FloatBlock
s"delay:${certainLatency}"
)

val rs = Module(new ReservationStation(s"rs_${cfg.name}", cfg, XLEN + 1,
val rs = Module(new ReservationStation(s"rs_${cfg.name}", cfg, IssQueSize, XLEN + 1,
inBlockFastPorts.map(_._1),
slowPorts.map(_._1),
fixedDelay = certainLatency,
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/xiangshan/backend/IntegerBlock.scala
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class IntegerBlock

println(s"${i}: exu:${cfg.name} fastPortsCnt: ${fastPortsCnt} slowPorts: ${extraListenPortsCnt} delay:${certainLatency} feedback:${feedback}")

val rs = Module(new ReservationStation(s"rs_${cfg.name}", cfg, XLEN,
val rs = Module(new ReservationStation(s"rs_${cfg.name}", cfg, IssQueSize, XLEN,
fastDatas.map(_._1),
slowPorts.map(_._1),
fixedDelay = certainLatency,
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/xiangshan/backend/MemBlock.scala
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class MemBlockImp(outer: MemBlock) extends LazyModuleImp(outer)

println(s"${i}: exu:${cfg.name} fastPortsCnt: ${fastPortsCnt} slowPorts: ${slowPortsCnt} delay:${certainLatency} feedback:${feedback}")

val rs = Module(new ReservationStation(s"rs_${cfg.name}", cfg, XLEN,
val rs = Module(new ReservationStation(s"rs_${cfg.name}", cfg, IssQueSize, XLEN,
fastDatas.map(_._1),
slowPorts.map(_._1),
fixedDelay = certainLatency,
Expand Down
14 changes: 7 additions & 7 deletions src/main/scala/xiangshan/backend/issue/ReservationStation.scala
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ class ReservationStation
(
myName : String,
val exuCfg: ExuConfig,
iqSize : Int,
srcLen: Int,
fastPortsCfg: Seq[ExuConfig],
slowPortsCfg: Seq[ExuConfig],
fixedDelay: Int,
fastWakeup: Boolean,
feedback: Boolean,
) extends XSModule {
val iqSize = IssQueSize
val iqIdxWidth = log2Up(iqSize)
val nonBlocked = fixedDelay >= 0
val srcNum = if (exuCfg == Exu.jumpExeUnitCfg) 2 else max(exuCfg.intSrcCnt, exuCfg.fpSrcCnt)
Expand Down Expand Up @@ -124,9 +124,9 @@ class ReservationStation
val isFirstIssue = if (feedback) Output(Bool()) else null // NOTE: just use for tlb perf cnt
})

val select = Module(new ReservationStationSelect(exuCfg, srcLen, fastPortsCfg, slowPortsCfg, fixedDelay, fastWakeup, feedback))
val ctrl = Module(new ReservationStationCtrl(exuCfg, srcLen, fastPortsCfg, slowPortsCfg, fixedDelay, fastWakeup, feedback))
val data = Module(new ReservationStationData(exuCfg, srcLen, fastPortsCfg, slowPortsCfg, fixedDelay, fastWakeup, feedback))
val select = Module(new ReservationStationSelect(exuCfg, iqSize, srcLen, fastPortsCfg, slowPortsCfg, fixedDelay, fastWakeup, feedback))
val ctrl = Module(new ReservationStationCtrl(exuCfg, iqSize, srcLen, fastPortsCfg, slowPortsCfg, fixedDelay, fastWakeup, feedback))
val data = Module(new ReservationStationData(exuCfg, iqSize, srcLen, fastPortsCfg, slowPortsCfg, fixedDelay, fastWakeup, feedback))

select.suggestName(s"${myName}_select")
ctrl.suggestName(s"${myName}_ctrl")
Expand Down Expand Up @@ -202,14 +202,14 @@ class ReservationStation
class ReservationStationSelect
(
val exuCfg: ExuConfig,
iqSize: Int,
srcLen: Int,
fastPortsCfg: Seq[ExuConfig],
slowPortsCfg: Seq[ExuConfig],
fixedDelay: Int,
fastWakeup: Boolean,
feedback: Boolean,
) extends XSModule with HasCircularQueuePtrHelper{
val iqSize = IssQueSize
val iqIdxWidth = log2Up(iqSize)
val nonBlocked = fixedDelay >= 0
val srcNum = if (exuCfg == Exu.jumpExeUnitCfg) 2 else max(exuCfg.intSrcCnt, exuCfg.fpSrcCnt)
Expand Down Expand Up @@ -438,14 +438,14 @@ class ReservationStationSelect
class ReservationStationCtrl
(
val exuCfg: ExuConfig,
iqSize: Int,
srcLen: Int,
fastPortsCfg: Seq[ExuConfig],
slowPortsCfg: Seq[ExuConfig],
fixedDelay: Int,
fastWakeup: Boolean,
feedback: Boolean,
) extends XSModule with HasCircularQueuePtrHelper {
val iqSize = IssQueSize
val iqIdxWidth = log2Up(iqSize)
val nonBlocked = fixedDelay >= 0
val srcNum = if (exuCfg == Exu.jumpExeUnitCfg) 2 else max(exuCfg.intSrcCnt, exuCfg.fpSrcCnt)
Expand Down Expand Up @@ -741,14 +741,14 @@ class RSDataSingleSrc(srcLen: Int, numEntries: Int, numListen: Int, writePort: I
class ReservationStationData
(
val exuCfg: ExuConfig,
iqSize: Int,
srcLen: Int,
fastPortsCfg: Seq[ExuConfig],
slowPortsCfg: Seq[ExuConfig],
fixedDelay: Int,
fastWakeup: Boolean,
feedback: Boolean,
) extends XSModule {
val iqSize = IssQueSize
val iqIdxWidth = log2Up(iqSize)
val nonBlocked = fixedDelay >= 0
val srcNum = if (exuCfg == Exu.jumpExeUnitCfg) 2 else max(exuCfg.intSrcCnt, exuCfg.fpSrcCnt)
Expand Down

0 comments on commit 6170426

Please sign in to comment.