summaryrefslogtreecommitdiff
path: root/chiselFrontend/src/main/scala/chisel3/core/Data.scala
diff options
context:
space:
mode:
authorJack Koenig2017-12-28 16:56:05 -0800
committerRichard Lin2018-01-02 13:43:01 -0800
commitade792ee7c5bb718f738f5e4c3886b2e87c68756 (patch)
tree0b3fb00565e1c442abd7885d490cd4324f02d3fe /chiselFrontend/src/main/scala/chisel3/core/Data.scala
parent43e4d6dbd0f131c7484dc24cb09ab3a25614cb62 (diff)
Add support for autoclonetype of bound, anonymous inner Bundles
Also change Data.outerModule to Bundle._outerInst since it is only used in autoclonetype. _outerInst is also Option[Object] instead of Option[BaseModule] because the outer object could also be a Bundle.
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core/Data.scala')
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/Data.scala6
1 files changed, 1 insertions, 5 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Data.scala b/chiselFrontend/src/main/scala/chisel3/core/Data.scala
index 35401fa1..1cf50e9f 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/Data.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/Data.scala
@@ -208,11 +208,6 @@ abstract class Data extends HasId {
}
}
- // If this Data is an instance of an inner class, record enclosing class
- // This is only used for cloneType, and is mutable to allow autoCloneType to preserve the
- // original outerModule.
- private[core] var outerModule: Option[BaseModule] = Builder.currentModule
-
// User-specified direction, local at this node only.
// Note that the actual direction of this node can differ from child and parent specifiedDirection.
private var _specifiedDirection: SpecifiedDirection = SpecifiedDirection.Unspecified
@@ -245,6 +240,7 @@ abstract class Data extends HasId {
// This information is supplemental (more than is necessary to generate FIRRTL) and is used to
// perform checks in Chisel, where more informative error messages are possible.
private var _binding: Option[Binding] = None
+ private[core] def bindingOpt = _binding
private[core] def hasBinding = _binding.isDefined
// Only valid after node is bound (synthesizable), crashes otherwise
private[core] def binding = _binding.get