From 64d3731e4532286404110404c57343faa97dc690 Mon Sep 17 00:00:00 2001 From: Megan Wachs Date: Thu, 15 Feb 2018 13:25:06 -0800 Subject: [PATCH] RegFieldDesc: don't put characters into names that need to be sanitized --- src/main/scala/regmapper/RegField.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/regmapper/RegField.scala b/src/main/scala/regmapper/RegField.scala index 0f5e64cc..d676ec79 100644 --- a/src/main/scala/regmapper/RegField.scala +++ b/src/main/scala/regmapper/RegField.scala @@ -164,7 +164,7 @@ object RegField val valids = Wire(init = Vec.fill(numBytes) { Bool(false) }) when (valids.reduce(_ || _)) { reg := newBytes.asUInt } Seq.tabulate(numBytes) { i => - val newDesc = desc.map {d => d.copy(name = d.name + s"[${(i+1)*8-1}:${i*8}]")} + val newDesc = desc.map {d => d.copy(name = d.name + s"_$i")} RegField(8, oldBytes(i), RegWriteFn((valid, data) => { valids(i) := valid