Fix Chisel3 build for XLen=32
This commit is contained in:
@ -14,7 +14,9 @@ object Util {
|
||||
implicit def seqToVec[T <: Data](x: Seq[T]): Vec[T] = Vec(x)
|
||||
implicit def wcToUInt(c: WideCounter): UInt = c.value
|
||||
implicit def sextToConv(x: UInt) = new AnyRef {
|
||||
def sextTo(n: Int): UInt = Cat(Fill(n - x.getWidth, x(x.getWidth-1)), x)
|
||||
def sextTo(n: Int): UInt =
|
||||
if (x.getWidth == n) x
|
||||
else Cat(Fill(n - x.getWidth, x(x.getWidth-1)), x)
|
||||
}
|
||||
|
||||
implicit def intToUnsigned(x: Int): Unsigned = new Unsigned(x)
|
||||
|
Reference in New Issue
Block a user