1
0

Clint: Annotate regmap with RegFieldDesc

This commit is contained in:
Megan Wachs 2018-02-11 21:33:09 -08:00
parent 718c88a8f9
commit 256f8ffc6b

View File

@ -83,9 +83,11 @@ class CoreplexLocalInterrupter(params: ClintParams)(implicit p: Parameters) exte
*/
node.regmap(
0 -> ipi.map(r => RegField(ipiWidth, r)),
timecmpOffset(0) -> timecmp.flatMap(RegField.bytes(_)),
timeOffset -> RegField.bytes(time))
0 -> RegFieldGroup ("msip", Some("MSIP Bits"), ipi.zipWithIndex.map{ case (r, i) => RegField(ipiWidth, r, RegFieldDesc(s"msip_$i", "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("mtimecmp_$i", "", reset=None))))},
timeOffset -> RegFieldGroup("mtime", Some("Timer Register"), RegField.bytes(time, Some(RegFieldDesc("mtime", "", reset=Some(0)))))
)
}
}