Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PorterLu committed Aug 13, 2024
1 parent 0300c5c commit cdb458a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rocketv/configs/james.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parameter": {
"useAsyncReset": false,
"clockGate": true,
"instructionSets": ["rv32_i", "rv_smrnmi", "sfence.vma"],
"instructionSets": ["rv32_i", "rv_a", "rv_s", "rv_smrnmi"],
"priv": "msu",
"hartIdLen": 4,
"useBPWatch": false,
Expand Down
2 changes: 1 addition & 1 deletion rocketv/src/RocketCore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ case class RocketParameter(

def usingAtomics = hasInstructionSet("rv_a") || hasInstructionSet("rv64_a")

def usingVM = hasInstructionSet("sfence.vma")
def usingVM = hasInstruction("sfence.vma")

// static to false for now
def usingHypervisor = hasInstructionSet("rv_h") || hasInstructionSet("rv64_h")
Expand Down
4 changes: 3 additions & 1 deletion rocketv/src/RocketTile.scala
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ case class RocketTileParameter(
.sortBy(i => (i.instructionSet.name, i.name))
private def hasInstructionSet(setName: String): Boolean =
instructions.flatMap(_.instructionSets.map(_.name)).contains(setName)
private def hasInstruction(instName: String): Boolean = instructions.map(_.name).contains(instName)

def usingBTB: Boolean = btbEntries > 0
def xLen: Int =
(hasInstructionSet("rv32_i"), hasInstructionSet("rv64_i")) match {
Expand All @@ -200,7 +202,7 @@ case class RocketTileParameter(
case (true, true) => Some(64)
}

def usingVM = hasInstructionSet("sfence.vma")
def usingVM = hasInstruction("sfence.vma")
def usingNMI = hasInstructionSet("rv_smrnmi")

def pgLevels: Int = xLen match {
Expand Down

0 comments on commit cdb458a

Please sign in to comment.