Hello! Hopefully you saw this linked to in a deprecation warning and want to migrate your code. Great! We want to make your migration as easy as possible. If you have any questions (or feedback), feel free to get in touch with a developer via any of the following mediums:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//> using scala "2.13" | |
//> using lib "edu.berkeley.cs::chisel3:3.5.1" | |
//> using lib "com.sifive::chisel-circt:0.3.0" | |
//> using mainClass "Foo" | |
import chisel3._ | |
import chisel3.stage.{ChiselStage => SFC} | |
import circt.stage.{ChiselStage => MFC} | |
class Foo extends RawModule { |
./coreMacros/src/main/scala/chisel3/internal/RuntimeDeprecationTransform.scala: /** Adds a Builder.deprecated(...) call based on the contents of a plain @deprecated annotation.
./coreMacros/src/main/scala/chisel3/internal/RuntimeDeprecationTransform.scala: case _ => c.abort(c.enclosingPosition, s"@chiselRuntimeDeprecated annotion must be used with exactly one @deprecated annotation, got annotations $annotations") // scalastyle:ignore line.size.limit
./chiselFrontend/src/main/scala/chisel3/Reg.scala: @deprecated("Use Reg(t), RegNext(next, [init]) or RegInit([t], init) instead", "chisel3")
./chiselFrontend/src/main/scala/chisel3/Mem.scala: @deprecated("Mem argument order should be size, t; this will be removed by the official release", "chisel3")
./chiselFrontend/src/main/scala/chisel3/Mem.scala: @deprecated("Mem argument order should be size, t; this will be removed by the official release", "chisel3")
./chiselFrontend/src/main/scala/chisel3/Mem.scala: @deprecated("SeqMem/SyncReadM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The default error message is: | |
/home/se/tmp/implicit.scala:41: error: could not find implicit value for parameter c: this.Converter[String] | |
println(view[String](1)) | |
^ | |
We could change this to something better..., e.g., | |
/home/se/tmp/implicit.scala:41: error: No implicit `Converter` for type String found in scope. Did you forget to import it? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object X { | |
def f(x: Int): Int = 1 | |
} | |
object Y { | |
def f(x: Int): String = "a" | |
} | |
import X._ | |
import Y._ |
This looks very good! I'm fine with it and the refactor aligns with what I've been pushing.
Some overall feedback along with some bigger thoughts follows.
As there are three locations in which information can exist, I'll use the following nomenclature:
- "case class option" -> a member of a case class used to represent options (e.g.,
topName
offirrtl.FirrtlExecutionOptions
) - "CLI option" -> a command line argument
- "annotation" -> an annotation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[info] [0.002] Elaborating design... | |
Interrupt map (2 harts 2 interrupts): | |
[1, 2] => dut | |
[error] (run-main-0) java.lang.reflect.InvocationTargetException | |
[error] java.lang.reflect.InvocationTargetException | |
[error] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) | |
[error] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) | |
[error] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) | |
[error] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) |