diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/scala/chiselTests/DecoupledSpec.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/DecoupledSpec.scala b/src/test/scala/chiselTests/DecoupledSpec.scala new file mode 100644 index 00000000..c251df82 --- /dev/null +++ b/src/test/scala/chiselTests/DecoupledSpec.scala @@ -0,0 +1,19 @@ +// See LICENSE for license details. + +package chiselTests + +import chisel3._ +import chisel3.util.Decoupled + +class DecoupledSpec extends ChiselFlatSpec { + "Decoupled() and Decoupled.empty" should "give DecoupledIO with empty payloads" in { + elaborate(new Module { + val io = IO(new Bundle { + val in = Flipped(Decoupled()) + val out = Decoupled.empty + }) + io.out <> io.in + assert(io.asUInt.widthOption.get === 4) + }) + } +} |
