Put instPath before label in AutoCounter output (#1274)
* Put instPath before label in AutoCounter output In a design with many autocounters being output, it is often the case that the instPath can be: * quite long * have common substrings across many of the counters To simplify post-processing, it is strongly preferred that the instPath is first so that common prefix algorithms can be used to shorten the autocounter labels. I think @davidbiancolin has other people who have complained about the consistency of name ordering in other places as well. * Fixup validation name generator as well.
This commit is contained in:
parent
c51340dcd2
commit
163b189ff7
|
@ -183,7 +183,7 @@ class AutoCounterTransform extends Transform with AutoCounterConsts {
|
|||
val eventWidth = portWidthMap(anno.topSink.ref)
|
||||
EventMetadata(
|
||||
anno.topSink.ref,
|
||||
(pathlessLabel +: instPath).mkString("_"),
|
||||
(instPath :+ pathlessLabel).mkString("_"),
|
||||
autoCounterAnno.description,
|
||||
eventWidth,
|
||||
autoCounterAnno.opType)
|
||||
|
|
|
@ -54,7 +54,7 @@ case class PerfCounterInstance(
|
|||
}
|
||||
|
||||
/* Adds a formatted path to the label to match the behavior of the transform */
|
||||
def pathPrefixedLabel: String = (label +: (instPath.reverse)).mkString("_")
|
||||
def pathPrefixedLabel: String = ((instPath.reverse) :+ label).mkString("_")
|
||||
|
||||
/* Quotes the description escapes potentially troublesome characters */
|
||||
def quoteDescriptionForCSV: String =
|
||||
|
|
Loading…
Reference in New Issue