Skip to content

Commit

Permalink
mshralloc: restrict the condition of nestC
Browse files Browse the repository at this point in the history
* When an A request has already been nested by B, it depends on
* status of bc-mshr to allow C request to be double nested
  • Loading branch information
wakafa1 committed Nov 1, 2022
1 parent 0fead6e commit 73dae29
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/main/scala/huancun/MSHRAlloc.scala
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,18 @@ class MSHRAlloc(implicit p: Parameters) extends HuanCunModule {
val conflict_b = b_match_vec.asUInt().orR()
val conflict_a = a_match_vec.asUInt().orR()

val may_nestC = (c_match_vec.asUInt() & nestC_vec.asUInt()).orR()
val abc_mshr_status = io.status.init.init
val bc_mshr_status = io.status.init.last
val c_mshr_status = io.status.last

val double_nest = Cat(c_match_vec.init.init).orR() && c_match_vec.init.last
val may_nestC = (c_match_vec.asUInt() & nestC_vec.asUInt()).orR() && !(double_nest && !bc_mshr_status.bits.nestC)
val may_nestB = (b_match_vec.asUInt() & nestB_vec.asUInt()).orR()

val abc_mshr_alloc = io.alloc.init.init
val bc_mshr_alloc = io.alloc.init.last
val c_mshr_alloc = io.alloc.last

val abc_mshr_status = io.status.init.init
val bc_mshr_status = io.status.init.last
val c_mshr_status = io.status.last

val nestC = may_nestC && !c_mshr_status.valid
val nestB = may_nestB && !bc_mshr_status.valid && !c_mshr_status.valid

Expand Down

0 comments on commit 73dae29

Please sign in to comment.