diff options
| author | Jack Koenig | 2021-09-08 14:31:10 -0700 |
|---|---|---|
| committer | GitHub | 2021-09-08 14:31:10 -0700 |
| commit | 2b51053fe7744d6860416c7de8bcb99d4aa9e532 (patch) | |
| tree | feb5c83ae84d0bde40b4c2734dd2cd4cfd08fffe /core/src/main/scala/chisel3/internal | |
| parent | ff1bcb09d9bd416fcba68496b7cef1d0e454dfd5 (diff) | |
Restore return type of BaseModule.toTarget to ModuleTarget (#2117)
Definition/Instance introduced the need for representing the targets of
instances as InstanceTargets. This original implementation changed the
return type of BaseModule.toTarget to express this need. This is a
backwards incompatible change that is actually unnecessary because it is
impossible for users to get references to the internal InstanceClone
objects, instead only accessing such modules via Instance[_] wrappers
and cloned Data. We restored the old API by adding a new internal method
"getTarget" which will give the correct targets for InstanceClones while
maintaining the API of BaseModule.toTarget.
Diffstat (limited to 'core/src/main/scala/chisel3/internal')
| -rw-r--r-- | core/src/main/scala/chisel3/internal/Builder.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/scala/chisel3/internal/Builder.scala b/core/src/main/scala/chisel3/internal/Builder.scala index 1d15247d..441abc92 100644 --- a/core/src/main/scala/chisel3/internal/Builder.scala +++ b/core/src/main/scala/chisel3/internal/Builder.scala @@ -309,7 +309,7 @@ private[chisel3] trait NamedComponent extends HasId { val root = _parent.map { case ViewParent => reifyParent case other => other - }.get.toTarget // All NamedComponents will have a parent, only the top module can have None here + }.get.getTarget // All NamedComponents will have a parent, only the top module can have None here Target.toTargetTokens(name).toList match { case TargetToken.Ref(r) :: components => root.ref(r).copy(component = components) case other => |
