Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

Commit

Permalink
test: failing wider elements test.
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed May 18, 2024
1 parent 9c11343 commit 0bcf437
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ class BlackBoxGeneratorSpec extends AnyFlatSpec with Matchers {
| attribute \cxxrtl_sync 1
| wire output 5 \d_out_1
|end
""".stripMargin)
}

it should "expand wider elements correctly" in {
val sw = new StringWriter
BlackBoxGenerator(sw, classOf[WiderElementsBB])
sw.toString() should be("""attribute \cxxrtl_blackbox 1
|attribute \blackbox 1
|module \WiderElementsBB
| wire input 1 width 64 \d_in
|
| attribute \cxxrtl_sync 1
| wire output 2 width 8 \d_out
|end
""".stripMargin)
}
}
Expand All @@ -60,3 +74,10 @@ private class VecOfBoolBB extends BlackBox {
val d_out = Output(Vec(2, Bool()))
})
}

private class WiderElementsBB extends BlackBox {
val io = IO(new Bundle {
val d_in = Input(UInt(64.W))
val d_out = Input(SInt(8.W))
})
}

0 comments on commit 0bcf437

Please sign in to comment.