You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import chisel3._
import chisel3.experimental.{DataMirror, OpaqueType}
import scala.collection.immutable.SeqMap
class SingleElementRecord extends Record with OpaqueType with chisel3.experimental.AutoCloneType {
private val underlying = UInt(8.W)
val elements = SeqMap("" -> underlying)
def +(that: SingleElementRecord): SingleElementRecord = {
val _w = Wire(new SingleElementRecord)
_w.underlying := this.underlying + that.underlying
_w
}
}
class InnerRecord extends Record with OpaqueType with chisel3.experimental.AutoCloneType {
val k = new InnerInnerRecord
val elements = SeqMap("" -> k)
}
class InnerInnerRecord extends Record with OpaqueType with chisel3.experimental.AutoCloneType {
val k = new SingleElementRecord
val elements = SeqMap("" -> k)
}
class NestedRecordModule extends Module {
val in = IO(Input(new InnerRecord))
val out = IO(Output(new InnerRecord))
val inst = Module(new InnerModule)
inst.io.foo := in
out := inst.io.bar
println(DataMirror.fullModulePorts(inst).mkString(",\n"))
}
class InnerModule extends Module {
val io = IO(new Bundle {
val foo = Input(new InnerRecord)
val bar = Output(new InnerRecord)
})
io.bar := io.foo
}
println(getVerilogString(new NestedRecordModule))
Type of issue: Bug Report
Please provide the steps to reproduce the problem:
Scastie: https://scastie.scala-lang.org/fdtxiIehRGu27O1LD16iZQ
What is the current behavior?
What is the expected behavior?
I'm not sure, my best guess would be:
Please tell us about your environment:
- version:
3.5.5
Other Information
What is the use case for changing the behavior?
Getting accurate names for ports of opaque types
The text was updated successfully, but these errors were encountered: