package.scala 392 Bytes
Newer Older
Jens Korinth's avatar
Jens Korinth committed
1
2
package chisel.axi

Jens Korinth's avatar
Jens Korinth committed
3
package object axi4lite {
Jens Korinth's avatar
Jens Korinth committed
4
  /** Tuple-type for bit ranges. */
5
6
  sealed case class BitRange(to: Int, from: Int) {
    require (to >= from && from >= 0, "BitRange: invalid range (%d, %d)".format(to, from))
7
    def overlapsWith(other: BitRange): Boolean = !(to < other.from || from > other.to)
8
9
10
11
  }
  /** Names for bit ranges. **/
  type BitfieldMap = Map[String, BitRange]
}