RegFieldDesc: mark some more registers as volatile
This commit is contained in:
parent
7458378a4a
commit
0fcacd37df
@ -82,10 +82,12 @@ class CLINT(params: CLINTParams, beatBytes: Int)(implicit p: Parameters) extends
|
||||
*/
|
||||
|
||||
node.regmap(
|
||||
0 -> RegFieldGroup ("msip", Some("MSIP Bits"), ipi.zipWithIndex.map{ case (r, i) => RegField(ipiWidth, r, RegFieldDesc(s"msip_$i", s"MSIP bit for Hart $i", reset=Some(0)))}),
|
||||
timecmpOffset(0) -> timecmp.zipWithIndex.flatMap{ case (t, i) =>
|
||||
RegFieldGroup(s"mtimecmp_$i", Some(s"MTIMECMP for hart $i"), RegField.bytes(t, Some(RegFieldDesc(s"mtimecmp_$i", "", reset=None))))},
|
||||
timeOffset -> RegFieldGroup("mtime", Some("Timer Register"), RegField.bytes(time, Some(RegFieldDesc("mtime", "", reset=Some(0)))))
|
||||
0 -> RegFieldGroup ("msip", Some("MSIP Bits"), ipi.zipWithIndex.map{ case (r, i) =>
|
||||
RegField(ipiWidth, r, RegFieldDesc(s"msip_$i", s"MSIP bit for Hart $i", reset=Some(0)))}),
|
||||
timecmpOffset(0) -> timecmp.zipWithIndex.flatMap{ case (t, i) => RegFieldGroup(s"mtimecmp_$i", Some(s"MTIMECMP for hart $i"),
|
||||
RegField.bytes(t, Some(RegFieldDesc(s"mtimecmp_$i", "", reset=None))))},
|
||||
timeOffset -> RegFieldGroup("mtime", Some("Timer Register"),
|
||||
RegField.bytes(time, Some(RegFieldDesc("mtime", "", reset=Some(0), volatile=true))))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ trait ExampleModule extends HasRegMap
|
||||
Some(RegFieldDesc("pending", "Pending: Example of a special (W1ToC) Register. " +
|
||||
"Writing a bit here causes it to be reset to 0. " +
|
||||
"The bits are set when the corresponding bit in 'state' is high.",
|
||||
reset=Some(0xF)))))
|
||||
reset=Some(0xF), volatile=true))))
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user