1
0

Replace needWidth() with getWidth.

This commit is contained in:
Jim Lawson 2014-06-13 14:58:52 -07:00
parent de32595fba
commit 0c93567dea
2 changed files with 3 additions and 3 deletions

View File

@ -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)
}

View File

@ -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)