summaryrefslogtreecommitdiff
path: root/core/src/main/scala
diff options
context:
space:
mode:
authormergify[bot]2022-10-10 20:21:22 +0000
committerGitHub2022-10-10 20:21:22 +0000
commit721adc5c5509af48118afae44afa6b8a0107a926 (patch)
treeacf202ead9e2c625ec22fc49434d08d853d67f93 /core/src/main/scala
parent5b13d04b28ddd05e4acbc5b9b3755c92ac0d9515 (diff)
Fix traceName module type to RawModule (backport #2765) (#2768)
* Fix traceName module type to RawModule (#2765) Change the type of modules that the traceName API can be used for from "Module" to "RawModule". This fixes a bug where this API couldn't be used for RawModules even though it totally works. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com> Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com> (cherry picked from commit 74f1c85060cc72ebffe59a49f8d4539a464a4a19) * Fix binary compatibility issue Co-authored-by: Jack Koenig <koenig@sifive.com>
Diffstat (limited to 'core/src/main/scala')
-rw-r--r--core/src/main/scala/chisel3/experimental/Trace.scala7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/src/main/scala/chisel3/experimental/Trace.scala b/core/src/main/scala/chisel3/experimental/Trace.scala
index 4ab615a5..3cc27162 100644
--- a/core/src/main/scala/chisel3/experimental/Trace.scala
+++ b/core/src/main/scala/chisel3/experimental/Trace.scala
@@ -1,7 +1,7 @@
package chisel3.experimental
import chisel3.internal.HasId
-import chisel3.{Aggregate, Data, Element, Module}
+import chisel3.{Aggregate, Data, Element, Module, RawModule}
import firrtl.AnnotationSeq
import firrtl.annotations.{Annotation, CompleteTarget, SingleTargetAnnotation}
import firrtl.transforms.DontTouchAllTargets
@@ -22,7 +22,10 @@ import firrtl.transforms.DontTouchAllTargets
object Trace {
/** Trace a Instance name. */
- def traceName(x: Module): Unit = {
+ def traceName(x: Module): Unit = traceName(x: RawModule)
+
+ /** Trace a Instance name. */
+ def traceName(x: RawModule): Unit = {
annotate(new ChiselAnnotation {
def toFirrtl: Annotation = TraceNameAnnotation(x.toAbsoluteTarget, x.toAbsoluteTarget)
})