Improve QoR of PMP homogeneity checker
This commit is contained in:
parent
0182b6ca07
commit
ccd5bc9a91
@ -1 +1 @@
|
|||||||
Subproject commit 3aeba95847a80f92bed639d0b76f4dfbd13a6ee0
|
Subproject commit e15160d13aca4c007bcab70375eb438d7a204562
|
@ -89,8 +89,11 @@ class PMP(implicit p: Parameters) extends PMPReg {
|
|||||||
private def rangeHomogeneous(x: UInt, pgLevel: UInt, prev: PMP) = {
|
private def rangeHomogeneous(x: UInt, pgLevel: UInt, prev: PMP) = {
|
||||||
val beginsAfterLower = !(x < prev.comparand)
|
val beginsAfterLower = !(x < prev.comparand)
|
||||||
val beginsAfterUpper = !(x < comparand)
|
val beginsAfterUpper = !(x < comparand)
|
||||||
val endsBeforeLower = pgLevelMap { idxBits => (x >> idxBits) < (prev.comparand >> idxBits) } (pgLevel)
|
|
||||||
val endsBeforeUpper = pgLevelMap { idxBits => (x >> idxBits) < (comparand >> idxBits) } (pgLevel)
|
val pgMask = pgLevelMap { idxBits => ((BigInt(1) << paddrBits) - (BigInt(1) << idxBits)).U } (pgLevel)
|
||||||
|
val endsBeforeLower = (x & pgMask) < (prev.comparand & pgMask)
|
||||||
|
val endsBeforeUpper = (x & pgMask) < (comparand & pgMask)
|
||||||
|
|
||||||
endsBeforeLower || beginsAfterUpper || (beginsAfterLower && endsBeforeUpper)
|
endsBeforeLower || beginsAfterUpper || (beginsAfterLower && endsBeforeUpper)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user