blob: 78c8458d1a31e0bddb17c218de6496f8fabf744a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// See LICENSE for license details.
package chiselTests
import chisel3._
import chisel3.stage.ChiselStage
import chisel3.util.Decoupled
class DecoupledSpec extends ChiselFlatSpec {
"Decoupled() and Decoupled.empty" should "give DecoupledIO with empty payloads" in {
ChiselStage.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)
})
}
}
|