diff options
| author | Henry Cook | 2015-08-13 13:19:19 -0700 |
|---|---|---|
| committer | Henry Cook | 2015-08-13 13:20:00 -0700 |
| commit | cd4f96021998f64874d1f59879b797e16d646116 (patch) | |
| tree | 4f85006a089ccf404ba9af9edd56772414380546 /src/main/scala/Chisel/Core.scala | |
| parent | 6232fce08fcc4a8f6b31b7f019b12fe20c489dba (diff) | |
re-privatize class Namespace, fix use of Module/Bundle child namespaces
Diffstat (limited to 'src/main/scala/Chisel/Core.scala')
| -rw-r--r-- | src/main/scala/Chisel/Core.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/scala/Chisel/Core.scala b/src/main/scala/Chisel/Core.scala index f1b92efa..9838554e 100644 --- a/src/main/scala/Chisel/Core.scala +++ b/src/main/scala/Chisel/Core.scala @@ -655,7 +655,7 @@ object Bundle { } class Bundle extends Aggregate(NO_DIR) { - private implicit val _namespace = Builder.globalNamespace.child + private val _namespace = Builder.globalNamespace.child override def <> (that: Data): Unit = that match { case _: Bundle => this bulkConnect that @@ -693,7 +693,7 @@ class Bundle extends Aggregate(NO_DIR) { namedElts += name -> elt override def collectElts = - for ((name, elt) <- namedElts) { elt.setRef(this, name) } + for ((name, elt) <- namedElts) { elt.setRef(this, _namespace.name(name)) } override def cloneType : this.type = { try { @@ -728,7 +728,7 @@ object Module { } abstract class Module(_clock: Clock = null, _reset: Bool = null) extends HasId { - private implicit val _namespace = Builder.globalNamespace.child + private val _namespace = Builder.globalNamespace.child private[Chisel] val _commands = ArrayBuffer[Command]() private[Chisel] val _nodes = ArrayBuffer[Data]() private[Chisel] val _children = ArrayBuffer[Module]() @@ -782,7 +782,7 @@ abstract class Module(_clock: Clock = null, _reset: Bool = null) extends HasId { val methods = getClass.getMethods.sortWith(_.getName > _.getName) for (m <- methods; if isPublicVal(m)) m.invoke(this) match { - case id: HasId => id.setRef(m.getName) + case id: HasId => id.setRef(_namespace.name(m.getName)) case _ => } (_nodes ++ _children).foreach(_.setRef) |
