Skip to content

Commit

Permalink
Merge pull request #2619 from chipsalliance/ptw_refill_ready
Browse files Browse the repository at this point in the history
PTW: wait for L2TLB refill before searching
  • Loading branch information
ingallsj authored Aug 25, 2020
2 parents d6a5dc3 + f478998 commit 3176ed8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/rocket/PTW.scala
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ class PTW(n: Int)(implicit edge: TLEdgeOut, p: Parameters) extends CoreModule()(

val s_ready :: s_req :: s_wait1 :: s_dummy1 :: s_wait2 :: s_wait3 :: s_dummy2 :: s_fragment_superpage :: Nil = Enum(UInt(), 8)
val state = Reg(init=s_ready)
val l2_refill_wire = Wire(Bool())

val arb = Module(new Arbiter(Valid(new PTWReq), n))
arb.io.in <> io.requestor.map(_.req)
arb.io.out.ready := state === s_ready
arb.io.out.ready := (state === s_ready) && !l2_refill_wire

val resp_valid = Reg(next = Vec.fill(io.requestor.size)(Bool(false)))
val l2_refill_wire = Wire(Bool())

val clock_en = state =/= s_ready || l2_refill_wire || arb.io.out.valid || io.dpath.sfence.valid || io.dpath.customCSRs.disableDCacheClockGate
io.dpath.clock_enabled := usingVM && clock_en
Expand Down

0 comments on commit 3176ed8

Please sign in to comment.