Skip to content

Commit

Permalink
Add pgLevels check to Tile
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryz123 committed Jun 30, 2024
1 parent e3da6bd commit 4b80c37
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/scala/tile/Core.scala
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ trait HasCoreParameters extends HasTileParameters {
require(vfLen <= eLen)
}

if (coreParams.useVM) {
if (coreParams.xLen == 32) {
require(coreParams.pgLevels == 2)
} else {
require(coreParams.pgLevels >= 3)
}
}

lazy val hartIdLen: Int = p(MaxHartIdBits)
lazy val resetVectorLen: Int = {
val externalLen = paddrBits
Expand Down

0 comments on commit 4b80c37

Please sign in to comment.