From 256f8ffc6bd0dbe2b747fd97dfee60ce4030556c Mon Sep 17 00:00:00 2001 From: Megan Wachs Date: Sun, 11 Feb 2018 21:33:09 -0800 Subject: [PATCH] Clint: Annotate regmap with RegFieldDesc --- src/main/scala/devices/tilelink/Clint.scala | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/scala/devices/tilelink/Clint.scala b/src/main/scala/devices/tilelink/Clint.scala index 94a75fee..ecc6a49f 100644 --- a/src/main/scala/devices/tilelink/Clint.scala +++ b/src/main/scala/devices/tilelink/Clint.scala @@ -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))))) + ) } }