Set marchid to 1, which means "Rocket"
This commit is contained in:
parent
58c2b41712
commit
83540637ba
|
@ -221,6 +221,10 @@ class CSRFileIO(implicit p: Parameters) extends CoreBundle
|
||||||
|
|
||||||
case class CustomCSR(id: Int, mask: BigInt, init: Option[BigInt])
|
case class CustomCSR(id: Int, mask: BigInt, init: Option[BigInt])
|
||||||
|
|
||||||
|
object CustomCSR {
|
||||||
|
def constant(id: Int, value: BigInt): CustomCSR = CustomCSR(id, BigInt(0), Some(value))
|
||||||
|
}
|
||||||
|
|
||||||
class CustomCSRIO(implicit p: Parameters) extends CoreBundle {
|
class CustomCSRIO(implicit p: Parameters) extends CoreBundle {
|
||||||
val wen = Bool()
|
val wen = Bool()
|
||||||
val wdata = UInt(xLen.W)
|
val wdata = UInt(xLen.W)
|
||||||
|
|
|
@ -62,6 +62,10 @@ class RocketCustomCSRs(implicit p: Parameters) extends CustomCSRs with HasRocket
|
||||||
override def bpmCSR = {
|
override def bpmCSR = {
|
||||||
rocketParams.branchPredictionModeCSR.option(CustomCSR(bpmCSRId, BigInt(1), Some(BigInt(0))))
|
rocketParams.branchPredictionModeCSR.option(CustomCSR(bpmCSRId, BigInt(1), Some(BigInt(0))))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def marchid = CustomCSR.constant(CSRs.marchid, BigInt(1))
|
||||||
|
|
||||||
|
override def decls = super.decls :+ marchid
|
||||||
}
|
}
|
||||||
|
|
||||||
class CustomCSRs(implicit p: Parameters) extends CoreBundle {
|
class CustomCSRs(implicit p: Parameters) extends CoreBundle {
|
||||||
|
|
Loading…
Reference in New Issue