Skip to content

Commit

Permalink
refactor(Boolean): remove some constant Boolean expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
Anzooooo committed Nov 29, 2024
1 parent 00ddfc5 commit 4785400
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/xiangshan/cache/mmu/Repeater.scala
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ class PTWFilter(Width: Int, Size: Int, FenceDelay: Int)(implicit p: Parameters)

val issue_valid = v(issPtr) && !isEmptyIss && !inflight_full
val issue_filtered = ptwResp_valid && ptwResp_hit(io.ptw.req(0).bits.vpn, io.ptw.req(0).bits.s2xlate, ptwResp)
val issue_fire_fake = issue_valid && (io.ptw.req(0).ready || (issue_filtered && false.B /*timing-opt*/))
val issue_fire_fake = issue_valid && io.ptw.req(0).ready
io.ptw.req(0).valid := issue_valid && !issue_filtered
io.ptw.req(0).bits.vpn := vpn(issPtr)
io.ptw.req(0).bits.s2xlate := s2xlate(issPtr)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class LqExceptionBuffer(implicit p: Parameters) extends XSModule with HasCircula
when (req_valid && req.uop.robIdx.needFlush(io.redirect)) {
req_valid := s2_enqueue.asUInt.orR
} .elsewhen (s2_enqueue.asUInt.orR) {
req_valid := req_valid || true.B
req_valid := true.B
}

def selectOldest[T <: LqWriteBundle](valid: Seq[Bool], bits: Seq[T]): (Seq[Bool], Seq[T]) = {
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/xiangshan/mem/lsqueue/StoreQueue.scala
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class StoreExceptionBuffer(implicit p: Parameters) extends XSModule with HasCirc
when (req_valid && req.uop.robIdx.needFlush(io.redirect)) {
req_valid := s2_enqueue.asUInt.orR
}.elsewhen (s2_enqueue.asUInt.orR) {
req_valid := req_valid || true.B
req_valid := true.B
}

def selectOldest[T <: LsPipelineBundle](valid: Seq[Bool], bits: Seq[T]): (Seq[Bool], Seq[T]) = {
Expand Down

0 comments on commit 4785400

Please sign in to comment.