summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel3
diff options
context:
space:
mode:
authorJim Lawson2016-10-05 17:07:45 -0700
committerJim Lawson2016-10-05 17:07:45 -0700
commitbae8e4a4d2d0ffe52fe209ccc7dc19418eee8cab (patch)
tree2e582fb8aa6955a9a77fb36529d9b19143f2f105 /src/main/scala/chisel3
parentaf9f06570b786da3cfe23f8bf604b6187dcaf4bc (diff)
TransitName comment change.
This was originally mixed in with #199, Add Assert Data.
Diffstat (limited to 'src/main/scala/chisel3')
-rw-r--r--src/main/scala/chisel3/util/TransitName.scala16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/main/scala/chisel3/util/TransitName.scala b/src/main/scala/chisel3/util/TransitName.scala
index ce6cb60f..a3220a13 100644
--- a/src/main/scala/chisel3/util/TransitName.scala
+++ b/src/main/scala/chisel3/util/TransitName.scala
@@ -5,14 +5,16 @@ package chisel3.util
import chisel3._
import internal.HasId
+/**
+ * The purpose of TransitName is to allow a library to 'move' a name
+ * call to a more appropriate place.
+ * For example, a library factory function may create a module and return
+ * the io. The only user-exposed field is that given IO, which can't use
+ * any name supplied by the user. This can add a hook so that the supplied
+ * name then names the Module.
+ * See Queue companion object for working example
+ */
object TransitName {
- // The purpose of this is to allow a library to 'move' a name call to a more
- // appropriate place.
- // For example, a library factory function may create a module and return
- // the io. The only user-exposed field is that given IO, which can't use
- // any name supplied by the user. This can add a hook so that the supplied
- // name then names the Module.
- // See Queue companion object for working example
def apply[T<:HasId](from: T, to: HasId): T = {
from.addPostnameHook((given_name: String) => {to.suggestName(given_name)})
from