blob: edaff8aa15eb3a2bd81cdb193eb7fcb0863883c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// See LICENSE for license details.
package chiselTests
import chisel3._
import org.scalatest.{Matchers, FreeSpec}
class RangeSpec extends FreeSpec with Matchers {
"Ranges can be specified for UInt, SInt, and FixedPoint" - {
"to specify a UInt" in {
val x = UInt(range"[0, 7)")
x.getWidth should be (3)
println(range"[4,32)")
}
}
}
|