Add grouped method to AugmentedUInt, like Seq.grouped
This commit is contained in:
parent
8989f5654c
commit
9c78ac4d78
@ -57,6 +57,9 @@ package object util {
|
||||
else x(hi, lo)
|
||||
}
|
||||
|
||||
def grouped(width: Int): Seq[UInt] =
|
||||
(0 until x.getWidth by width).map(base => x(base + width - 1, base))
|
||||
|
||||
def inRange(base: UInt, bounds: UInt) = x >= base && x < bounds
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user