1
0

Merge pull request #1242 from freechipsproject/unnamed_reg_fix

RegFieldDesc: fix the output produced for undescribed registers
This commit is contained in:
Megan Wachs 2018-02-16 14:27:53 -08:00 committed by GitHub
commit db35f45bf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,7 +88,7 @@ case class TLRegisterNode(
val regDescs = mapping.flatMap { case (offset, seq) => val regDescs = mapping.flatMap { case (offset, seq) =>
var currentBitOffset = 0 var currentBitOffset = 0
seq.zipWithIndex.map { case (f, i) => { seq.zipWithIndex.map { case (f, i) => {
val tmp = (f.desc.map{ _.name}.getOrElse(s"unnamedRegField${i}") -> ( val tmp = (f.desc.map{ _.name}.getOrElse(s"unnamedRegField${offset.toHexString}_${currentBitOffset}") -> (
("byteOffset" -> s"0x${offset.toHexString}") ~ ("byteOffset" -> s"0x${offset.toHexString}") ~
("bitOffset" -> currentBitOffset) ~ ("bitOffset" -> currentBitOffset) ~
("bitWidth" -> f.width) ~ ("bitWidth" -> f.width) ~