Warning in Chisel 3.5.4

37 views
Skip to first unread message

Øyvind Harboe

unread,
Aug 9, 2022, 8:20:49 AM8/9/22
to chisel-users
What does this mean?

I can't find any references to instanceName or toTarget in my source code...

How do I track this down?

Cheers,

[info] [deprecated] Compiler.scala:29 (1 calls): Accessing the .instanceName or .toTarget of non-hardware Data is deprecated. This will become an error in Chisel 3.6.
[info] [warn] There were 1 deprecated function(s) used. These may stop compiling in a future release - you are encouraged to fix these issues.
[info] [warn] Line numbers for deprecations reported by Chisel may be inaccurate; enable scalac compiler deprecation warnings via either of the following methods:
[info] [warn]   In the sbt interactive console, enter:
[info] [warn]     set scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation")
[info] [warn]   or, in your build.sbt, add the line:
[info] [warn]     scalacOptions := Seq("-unchecked", "-deprecation")

Jack Koenig

unread,
Aug 10, 2022, 2:32:22 PM8/10/22
to chisel...@googlegroups.com
It would be helpful if we provided a way to ge the full stacktrace of the deprecated call... Something to do for 3.5.5 :)

Do you have any files named Compiler.scala in your code base? It _might_ be from this line in chiseltest: https://github.com/ucb-bar/chiseltest/blob/98661a810a68352d5368bb2632937722d302e0c6/src/main/scala/chiseltest/simulator/Compiler.scala#L29

Are you using chiseltest and are you using aspects?

--
You received this message because you are subscribed to the Google Groups "chisel-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chisel-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chisel-users/da23603b-b919-4d6b-b384-6df823d8fb8cn%40googlegroups.com.

Øyvind Harboe

unread,
Aug 10, 2022, 4:08:36 PM8/10/22
to chisel...@googlegroups.com
On Wed, Aug 10, 2022 at 8:32 PM Jack Koenig <jack.k...@gmail.com> wrote:
It would be helpful if we provided a way to ge the full stacktrace of the deprecated call... Something to do for 3.5.5 :)

Can I generate this now?
 

Do you have any files named Compiler.scala in your code base? It _might_ be from this line in chiseltest: https://github.com/ucb-bar/chiseltest/blob/98661a810a68352d5368bb2632937722d302e0c6/src/main/scala/chiseltest/simulator/Compiler.scala#L29


No...

 
Are you using chiseltest

Yes.
 
and are you using aspects?

I don't know what "aspects" are... So only indirectly in that case.
 

On Tue, Aug 9, 2022 at 5:20 AM Øyvind Harboe <oyvind...@gmail.com> wrote:
What does this mean?

I can't find any references to instanceName or toTarget in my source code...

How do I track this down?

Cheers,

[info] [deprecated] Compiler.scala:29 (1 calls): Accessing the .instanceName or .toTarget of non-hardware Data is deprecated. This will become an error in Chisel 3.6.
[info] [warn] There were 1 deprecated function(s) used. These may stop compiling in a future release - you are encouraged to fix these issues.
[info] [warn] Line numbers for deprecations reported by Chisel may be inaccurate; enable scalac compiler deprecation warnings via either of the following methods:
[info] [warn]   In the sbt interactive console, enter:
[info] [warn]     set scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation")
[info] [warn]   or, in your build.sbt, add the line:
[info] [warn]     scalacOptions := Seq("-unchecked", "-deprecation")

--
You received this message because you are subscribed to the Google Groups "chisel-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chisel-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chisel-users/da23603b-b919-4d6b-b384-6df823d8fb8cn%40googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "chisel-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/chisel-users/nD2Tq2MoAQ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chisel-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chisel-users/CAFooY_QfhA9C4y9YNp4x8SLKdz15sZ1xDL6QAVAcZXwQ_8yJmQ%40mail.gmail.com.


--
Øyvind Harboe
+4791786146

Øyvind Harboe

unread,
Aug 19, 2022, 3:54:30 AM8/19/22
to chisel-users
Is there a way to turn deprecation warnings into errors. Hopefully, I'll then get some useful information...

Rather than just "The computer says no"... https://www.youtube.com/watch?v=qNDS4kVwA68

Jack Koenig

unread,
Aug 19, 2022, 2:09:49 PM8/19/22
to chisel...@googlegroups.com
> Is there a way to turn deprecation warnings into errors. Hopefully, I'll then get some useful information...

I was hoping to surprise you with a "yes" because we did recently add --warnings-as-errors to 3.5.x (to be released in 3.5.5). Unfortunately the problem is that the particular warning you're seeing happens _after_ Chisel elaboration (ie. outside of the context of the Chisel runtime) so it does not have access to information about what command-line options were used. You can see the warning and related comment in the code here: https://github.com/chipsalliance/chisel3/blob/16dfc84d6667f1f6bbca46935cb445bc288c96d4/core/src/main/scala/chisel3/internal/Builder.scala#L247

If you are willing to do a little "super user" debugging, you could tweak this code to throw an exception which would give you a full stacktrace and shed more light on why you're getting this warning.

Øyvind Harboe

unread,
Sep 6, 2022, 7:22:57 AM9/6/22
to chisel-users
I've modified my code so I no longer have these warnings.

With the help of Jack, I found that this was caused by forceName() being invoked on signals(inputs/outputs of modules) that were elimianted in elaboration. 

Reply all
Reply to author
Forward
0 new messages