Skip to content

Commit

Permalink
minimal bug reproduce
Browse files Browse the repository at this point in the history
  • Loading branch information
sequencer committed Jul 19, 2024
1 parent ae54349 commit 772f0d7
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/test/scala/chiselTests/ProbeSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -731,4 +731,30 @@ class ProbeSpec extends ChiselFlatSpec with MatchesAndOmits with Utils {
"output b : Probe<UInt<2>, LayerA.LayerB>"
)()
}


"FixedIO" should "work" in {
class Baz extends Bundle {
val ele = Bool()
}
class FooIO extends Bundle with IgnoreSeqInBundle {
val probeA = Output(Vec(2, Probe(new Baz)))
}
@chisel3.experimental.hierarchy.instantiable
class Foo extends FixedIORawModule(new FooIO) {
val bars = Seq.fill(2)(chisel3.experimental.hierarchy.Instantiate(new Bar))
bars.zipWithIndex.foreach { case (bar, idx) =>
define(io.probeA(idx), bar.io.probeA)
}
}
class BarIO extends Bundle with IgnoreSeqInBundle {
val probeA = Output(Probe(new Baz))
}
@chisel3.experimental.hierarchy.instantiable
class Bar extends FixedIORawModule(new BarIO) {
val bazWire = 0.U.asTypeOf(new Baz)
define(io.probeA, ProbeValue(bazWire))
}
ChiselStage.emitSystemVerilog(new Foo)
}
}

0 comments on commit 772f0d7

Please sign in to comment.