Skip to content

Commit

Permalink
chore: replace deprecated APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang-Haojin committed Jan 15, 2024
1 parent 449e4a8 commit ff0b19b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/main/scala/huancun/inclusive/MSHR.scala
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class MSHR()(implicit p: Parameters) extends BaseMSHR[DirResult, DirWrite, TagWr
Mux(gotT, Mux(req_acquire, TRUNK, TIP), BRANCH),
MuxLookup(
meta.state,
BRANCH,
BRANCH)(
Seq(
INVALID -> BRANCH,
BRANCH -> BRANCH,
Expand Down Expand Up @@ -392,7 +392,7 @@ class MSHR()(implicit p: Parameters) extends BaseMSHR[DirResult, DirWrite, TagWr
req.fromB,
MuxLookup(
Cat(meta.state, probe_next_state),
NtoN,
NtoN)(
Seq( // TODO: optimize this
Cat(TRUNK, TRUNK) -> TtoT,
Cat(TIP, TIP) -> TtoT,
Expand Down Expand Up @@ -428,7 +428,7 @@ class MSHR()(implicit p: Parameters) extends BaseMSHR[DirResult, DirWrite, TagWr
Mux(
!req_acquire,
req.param,
MuxLookup(req.param, req.param, Seq(NtoB -> Mux(req_promoteT, toT, toB), BtoT -> toT, NtoT -> toT))
MuxLookup(req.param, req.param)(Seq(NtoB -> Mux(req_promoteT, toT, toB), BtoT -> toT, NtoT -> toT))
)

od.size := req.size
Expand Down
10 changes: 5 additions & 5 deletions src/main/scala/huancun/noninclusive/MSHR.scala
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class MSHR()(implicit p: Parameters) extends BaseMSHR[DirResult, SelfDirWrite, S
val replace_need_release = self_meta.state > replace_clients_perm || self_meta.dirty && isT(self_meta.state)
val replace_param = MuxLookup(
Cat(self_meta.state, replace_clients_perm),
TtoB,
TtoB)(
Seq(
Cat(BRANCH, INVALID) -> BtoN,
Cat(BRANCH, BRANCH) -> BtoB,
Expand Down Expand Up @@ -249,7 +249,7 @@ class MSHR()(implicit p: Parameters) extends BaseMSHR[DirResult, SelfDirWrite, S
new_self_meta.dirty := self_meta.hit && self_meta.dirty || req.dirty && isParamFromT(req.param)
new_self_meta.state := MuxLookup(
req.param,
self_meta.state,
self_meta.state)(
Seq(
TtoT -> TRUNK,
TtoB -> TIP,
Expand Down Expand Up @@ -345,7 +345,7 @@ class MSHR()(implicit p: Parameters) extends BaseMSHR[DirResult, SelfDirWrite, S
BRANCH
),
),
MuxLookup(self_meta.state, INVALID, Seq(
MuxLookup(self_meta.state, INVALID)(Seq(
INVALID -> BRANCH,
BRANCH -> BRANCH,
// if prefetch read && hit && self is Trunk
Expand Down Expand Up @@ -1107,7 +1107,7 @@ class MSHR()(implicit p: Parameters) extends BaseMSHR[DirResult, SelfDirWrite, S

val probeack_param = MuxLookup( // TODO: optimize this
Cat(highest_perm, probe_next_state(highest_perm, req.param)),
NtoN,
NtoN)(
Seq(
Cat(TRUNK, TRUNK) -> TtoT,
Cat(TIP, TIP) -> TtoT,
Expand Down Expand Up @@ -1159,7 +1159,7 @@ class MSHR()(implicit p: Parameters) extends BaseMSHR[DirResult, SelfDirWrite, S
Mux(
!req_acquire,
req.param,
MuxLookup(req.param, req.param, Seq(NtoB -> Mux(req_promoteT, toT, toB), BtoT -> toT, NtoT -> toT))
MuxLookup(req.param, req.param)(Seq(NtoB -> Mux(req_promoteT, toT, toB), BtoT -> toT, NtoT -> toT))
)
od.size := req.size
od.way := meta_reg.self.way
Expand Down

0 comments on commit ff0b19b

Please sign in to comment.