diff options
| author | Jim Lawson | 2016-08-11 09:34:18 -0700 |
|---|---|---|
| committer | Jim Lawson | 2016-08-11 09:34:18 -0700 |
| commit | a3e0744884b51894de6f3c576e6e1482d22484dd (patch) | |
| tree | f05e3e366e8eba2cfadcff49d992bb399ac73c6e /chiselFrontend/src/main/scala/chisel3/core/Module.scala | |
| parent | 8e24085e112d595cfaf2dc7d54bce974498521d5 (diff) | |
| parent | 2a074c828ddd8e6c20fa21d618664d50120f3d7a (diff) | |
Merge branch 'master' into sdtwigg_connectwrap_renamechisel3
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core/Module.scala')
| -rw-r--r-- | chiselFrontend/src/main/scala/chisel3/core/Module.scala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Module.scala b/chiselFrontend/src/main/scala/chisel3/core/Module.scala index ba0720a4..bbed4d9f 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Module.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Module.scala @@ -94,8 +94,11 @@ extends HasId { private[core] val _ids = ArrayBuffer[HasId]() Builder.currentModule = Some(this) - /** Name of the instance. */ - val name = Builder.globalNamespace.name(getClass.getName.split('.').last) + /** Desired name of this module. */ + def desiredName = this.getClass.getName.split('.').last + + /** Legalized name of this module. */ + final val name = Builder.globalNamespace.name(desiredName) /** IO for this Module. At the Scala level (pre-FIRRTL transformations), * connections in and out of a Module may only go through `io` elements. |
