summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel/util/TransitName.scala
diff options
context:
space:
mode:
authorRichard Lin2016-06-28 10:38:25 -0700
committerGitHub2016-06-28 10:38:25 -0700
commitbc3813ebd752646a92987c74136bb2adb476b687 (patch)
treecc6e0e257f57d87e828a811e8c0c85d5780bb141 /src/main/scala/chisel/util/TransitName.scala
parent3eb51f8484ad21d8a39da1ab7b036f1bb3bbe102 (diff)
parenta367073eaad494e86883b319d3b06bd6e8f05a00 (diff)
Merge pull request #224 from ucb-bar/renamechisel3
renamechisel3 - "chisel" -> "chisel3"
Diffstat (limited to 'src/main/scala/chisel/util/TransitName.scala')
-rw-r--r--src/main/scala/chisel/util/TransitName.scala22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/main/scala/chisel/util/TransitName.scala b/src/main/scala/chisel/util/TransitName.scala
deleted file mode 100644
index 04e1995b..00000000
--- a/src/main/scala/chisel/util/TransitName.scala
+++ /dev/null
@@ -1,22 +0,0 @@
-package chisel.util
-
-import chisel._
-import internal.HasId
-
-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
- }
- def withSuffix[T<:HasId](suffix: String)(from: T, to: HasId): T = {
- from.addPostnameHook((given_name: String) => {to.suggestName(given_name+suffix)})
- from
- }
-}