summaryrefslogtreecommitdiff
path: root/chiselFrontend
diff options
context:
space:
mode:
Diffstat (limited to 'chiselFrontend')
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/UserModule.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/UserModule.scala b/chiselFrontend/src/main/scala/chisel3/core/UserModule.scala
index 422760ec..5183f860 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/UserModule.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/UserModule.scala
@@ -72,11 +72,13 @@ abstract class UserModule(implicit moduleCompileOptions: CompileOptions)
for (id <- getIds) {
id match {
case id: BaseModule => id.forceName(default=id.desiredName, _namespace)
- case id: Data => id.topBinding match {
+ case id: MemBase[_] => id.forceName(default="_T", _namespace)
+ case id: Data if id.topBindingOpt.isDefined => id.topBinding match {
case OpBinding(_) | MemoryPortBinding(_) | PortBinding(_) | RegBinding(_) | WireBinding(_) =>
id.forceName(default="_T", _namespace)
- case _ =>
+ case _ => // don't name literals
}
+ case id: Data if id.topBindingOpt.isEmpty => // don't name unbound types
}
id._onModuleClose
}