Skip to content

Commit

Permalink
fix(perf): fix dq perf and add vec dq perf
Browse files Browse the repository at this point in the history
  • Loading branch information
sinceforYy committed Nov 11, 2024
1 parent 613565c commit ae673f6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/scala/xiangshan/backend/dispatch/Dispatch.scala
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,12 @@ class Dispatch(implicit p: Parameters) extends XSModule with HasPerfEvents {
XSError(enqFireCnt > renameFireCnt, "enqFireCnt should not be greater than renameFireCnt\n")

val stall_rob = hasValidInstr && !io.enqRob.canAccept && dqCanAccept
val stall_int_dq = hasValidInstr && io.enqRob.canAccept && !toIntDqCanAccept && io.toVecDq.canAccept && io.toLsDq.canAccept
val stall_int_dq0 = hasValidInstr && io.enqRob.canAccept && !io.toIntDq0.canAccept && io.toVecDq.canAccept && io.toLsDq.canAccept
val stall_int_dq1 = hasValidInstr && io.enqRob.canAccept && !io.toIntDq1.canAccept && io.toVecDq.canAccept && io.toLsDq.canAccept
val stall_fp_dq = hasValidInstr && io.enqRob.canAccept && toIntDqCanAccept && !io.toVecDq.canAccept && io.toLsDq.canAccept
val stall_ls_dq = hasValidInstr && io.enqRob.canAccept && toIntDqCanAccept && io.toVecDq.canAccept && !io.toLsDq.canAccept
val stall_int_dq = hasValidInstr && io.enqRob.canAccept && !toIntDqCanAccept && io.toFpDq.canAccept && io.toVecDq.canAccept && io.toLsDq.canAccept
val stall_int_dq0 = hasValidInstr && io.enqRob.canAccept && !io.toIntDq0.canAccept && io.toFpDq.canAccept && io.toVecDq.canAccept && io.toLsDq.canAccept
val stall_int_dq1 = hasValidInstr && io.enqRob.canAccept && !io.toIntDq1.canAccept && io.toFpDq.canAccept && io.toVecDq.canAccept && io.toLsDq.canAccept
val stall_fp_dq = hasValidInstr && io.enqRob.canAccept && toIntDqCanAccept && !io.toFpDq.canAccept && io.toVecDq.canAccept && io.toLsDq.canAccept
val stall_vec_dq = hasValidInstr && io.enqRob.canAccept && toIntDqCanAccept && io.toFpDq.canAccept && !io.toVecDq.canAccept && io.toLsDq.canAccept
val stall_ls_dq = hasValidInstr && io.enqRob.canAccept && toIntDqCanAccept && io.toFpDq.canAccept && io.toVecDq.canAccept && !io.toLsDq.canAccept

XSPerfAccumulate("in_valid_count", PopCount(io.fromRename.map(_.valid)))
XSPerfAccumulate("in_fire_count", PopCount(io.fromRename.map(_.fire)))
Expand All @@ -448,6 +449,7 @@ class Dispatch(implicit p: Parameters) extends XSModule with HasPerfEvents {
XSPerfAccumulate("stall_cycle_int_dq0", stall_int_dq0)
XSPerfAccumulate("stall_cycle_int_dq1", stall_int_dq1)
XSPerfAccumulate("stall_cycle_fp_dq", stall_fp_dq)
XSPerfAccumulate("stall_cycle_vec_dq", stall_vec_dq)
XSPerfAccumulate("stall_cycle_ls_dq", stall_ls_dq)

val notIssue = !io.debugTopDown.fromRob.robHeadLsIssue
Expand Down

0 comments on commit ae673f6

Please sign in to comment.