By default, chiselName will include val names of instances of annotated classes as a
prefix in final naming. Mixing in this trait to a class, object, or anonymous class
instances will exclude the val name from chiselName naming.
Example:
import chisel3._
import chisel3.experimental.{chiselName, NoChiselNamePrefix}
// Note that this is not a Module
@chiselName
class Counter(w: Int) {
val myReg = RegInit(0.U(w.W))
myReg := myReg + 1.U
}
@chiselName
class MyModule extends Module {
val io = IO(new Bundle {
val out = Output(UInt(8.W))
})
// Name of myReg will be "counter0_myReg"val counter0 = new Counter(8)
// Name of myReg will be "myReg"val counter1 = new Counter(8) with NoChiselNamePrefix
io.out := counter0.myReg + counter1.myReg
}
Do not name instances of this type in chiselName
By default,
chiselName
will includeval
names of instances of annotated classes as a prefix in final naming. Mixing in this trait to aclass
,object
, or anonymousclass
instances will exclude theval
name fromchiselName
naming.