Replace needWidth() with getWidth.
This commit is contained in:
parent
de32595fba
commit
0c93567dea
@ -9,7 +9,7 @@ object DecodeLogic
|
||||
val lit = b.litOf
|
||||
if (lit.isZ) {
|
||||
var (bits, mask, swidth) = Literal.parseLit(lit.toString)
|
||||
new Term(BigInt(bits, 2), BigInt(2).pow(lit.needWidth())-(BigInt(mask, 2)+1))
|
||||
new Term(BigInt(bits, 2), BigInt(2).pow(lit.getWidth)-(BigInt(mask, 2)+1))
|
||||
} else {
|
||||
new Term(lit.value)
|
||||
}
|
||||
|
@ -163,8 +163,8 @@ class FlowThroughSerializer[T <: HasTileLinkData](gen: LogicalNetworkIO[T], n: I
|
||||
val cnt = UInt(OUTPUT, log2Up(n))
|
||||
val done = Bool(OUTPUT)
|
||||
}
|
||||
require(io.in.bits.payload.data.needWidth() % n == 0)
|
||||
val narrowWidth = io.in.bits.payload.data.needWidth() / n
|
||||
require(io.in.bits.payload.data.getWidth % n == 0)
|
||||
val narrowWidth = io.in.bits.payload.data.getWidth / n
|
||||
val cnt = Reg(init=UInt(0, width = log2Up(n)))
|
||||
val wrap = cnt === UInt(n-1)
|
||||
val rbits = Reg(init=io.in.bits)
|
||||
|
Loading…
Reference in New Issue
Block a user