summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel3/util/TransitName.scala
diff options
context:
space:
mode:
authorJack2022-07-30 22:41:15 +0000
committerJack2022-07-30 22:41:15 +0000
commit4cd44fa4dab370fcc5c20bcacc1fa0ee02327252 (patch)
tree05730be260feca0d2a870c4bb88325d36631a8fc /src/main/scala/chisel3/util/TransitName.scala
parentfe9635ef21bad233945617a24ab16cfa4055f2d1 (diff)
parentbced77045c8fc5db37e40b159c49220929e15d46 (diff)
Merge branch '3.5.x' into 3.5-release
Diffstat (limited to 'src/main/scala/chisel3/util/TransitName.scala')
-rw-r--r--src/main/scala/chisel3/util/TransitName.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/scala/chisel3/util/TransitName.scala b/src/main/scala/chisel3/util/TransitName.scala
index cc8f2456..8b509db5 100644
--- a/src/main/scala/chisel3/util/TransitName.scala
+++ b/src/main/scala/chisel3/util/TransitName.scala
@@ -42,6 +42,12 @@ object TransitName {
* @param to the thing that will receive the "good" name
* @return the `from` parameter
*/
+ @deprecated(
+ "Use suggestName or rely on the naming plugin instead of this function: \n" +
+ " val from = {to}\n" +
+ " val from = prefix(prefixYouWant){to}",
+ "Chisel 3.5.4"
+ )
def apply[T <: HasId](from: T, to: HasId): T = {
// To transit a name, we need to hook on both the suggestName and autoSeed mechanisms
from.addSuggestPostnameHook((given_name: String) => { to.suggestName(given_name) })
@@ -55,6 +61,11 @@ object TransitName {
* @param to the thing that will receive the "good" name
* @return the `from` parameter
*/
+ @deprecated(
+ "Use suggestName or rely on the naming plugin instead of this function. Use prefix instead of suffix: \n" +
+ " val from = prefix(prefixYouWant){to}",
+ "Chisel 3.5.4"
+ )
def withSuffix[T <: HasId](suffix: String)(from: T, to: HasId): T = {
// To transit a name, we need to hook on both the suggestName and autoSeed mechanisms
from.addSuggestPostnameHook((given_name: String) => { to.suggestName(given_name + suffix) })