blob: dddf26b665d47ac4327519e8ea2aa4bda57ec9a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// See LICENSE for license details.
package chiselTests
import chisel3._
class RebindingSpec extends ChiselFlatSpec {
"Rebinding a literal" should "fail" in {
a [chisel3.core.Binding.BindingException] should be thrownBy {
elaborate { new Module {
val io = IO(new Bundle {
val a = 4.U
})
} }
}
}
"Rebinding a hardware type" should "fail" in {
a [chisel3.core.Binding.BindingException] should be thrownBy {
elaborate { new Module {
val io = IO(new Bundle {
val a = Reg(UInt(32.W))
})
} }
}
}
}
|