1
0

RegFieldDesc: don't put characters into names that need to be sanitized

This commit is contained in:
Megan Wachs 2018-02-15 13:25:06 -08:00
parent 197699b93a
commit 64d3731e45

View File

@ -164,7 +164,7 @@ object RegField
val valids = Wire(init = Vec.fill(numBytes) { Bool(false) }) val valids = Wire(init = Vec.fill(numBytes) { Bool(false) })
when (valids.reduce(_ || _)) { reg := newBytes.asUInt } when (valids.reduce(_ || _)) { reg := newBytes.asUInt }
Seq.tabulate(numBytes) { i => 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), RegField(8, oldBytes(i),
RegWriteFn((valid, data) => { RegWriteFn((valid, data) => {
valids(i) := valid valids(i) := valid