Use correct interrupt priority order
This commit is contained in:
committed by
Andrew Waterman
parent
bf861293d9
commit
c36c171202
@ -38,9 +38,17 @@ package object util {
|
||||
implicit def wcToUInt(c: WideCounter): UInt = c.value
|
||||
|
||||
implicit class UIntToAugmentedUInt(val x: UInt) extends AnyVal {
|
||||
def sextTo(n: Int): UInt =
|
||||
def sextTo(n: Int): UInt = {
|
||||
require(x.getWidth <= n)
|
||||
if (x.getWidth == n) x
|
||||
else Cat(Fill(n - x.getWidth, x(x.getWidth-1)), x)
|
||||
}
|
||||
|
||||
def padTo(n: Int): UInt = {
|
||||
require(x.getWidth <= n)
|
||||
if (x.getWidth == n) x
|
||||
else Cat(UInt(0, n - x.getWidth), x)
|
||||
}
|
||||
|
||||
def extract(hi: Int, lo: Int): UInt = {
|
||||
if (hi == lo-1) UInt(0)
|
||||
|
Reference in New Issue
Block a user