From 5ab4204e8aaaf809303090d340b4c144b152622e Mon Sep 17 00:00:00 2001 From: Megan Wachs Date: Wed, 10 Jan 2018 15:53:13 -0800 Subject: [PATCH] RegField: the JSON will just leave things out of type None --- src/main/scala/tilelink/RegisterRouter.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/scala/tilelink/RegisterRouter.scala b/src/main/scala/tilelink/RegisterRouter.scala index 5fedd959..18c990af 100644 --- a/src/main/scala/tilelink/RegisterRouter.scala +++ b/src/main/scala/tilelink/RegisterRouter.scala @@ -92,12 +92,12 @@ case class TLRegisterNode( ("addressOffset" -> s"0x${offset.toHexString}") ~ ("fields" -> seq.zipWithIndex.map { case (f, i) => { val tmp = (f.description.map{ _.displayName }.getOrElse(s"unnamedRegField${i}") -> ( - ("description" -> f.description.map{_.description}.getOrElse("No Description Provided")) ~ ("bitOffset" -> currentBitOffset) ~ ("bitWidth" -> f.width) ~ - ("resetMask" -> f.description.map { d => if (d.resetType != RegFieldResetType.N) "all" else "none"}.getOrElse("none")) ~ - ("resetValue" -> f.description.map { _.resetValue}.getOrElse(0)) ~ - ("headerName" -> f.description.map { _.headerName}.getOrElse("")))) + ("description" -> f.description.map{ _.description}) ~ + ("resetMask" -> f.description.map { d => if (d.resetType != RegFieldResetType.N) "all" else "none"}) ~ + ("resetValue" -> f.description.map { _.resetValue}) + ("headerName" -> f.description.map { _.headerName})) currentBitOffset = currentBitOffset + f.width tmp }}))}