1
0

Merge pull request #1035 from freechipsproject/big-paddr

Fix paddrBits < xLen && paddrBits == vaddrBits case
This commit is contained in:
Andrew Waterman 2017-10-09 20:59:21 -07:00 committed by GitHub
commit a9686ab883

View File

@ -48,7 +48,9 @@ trait HasTileParameters {
require(v == xLen || xLen > v && v > paddrBits) require(v == xLen || xLen > v && v > paddrBits)
v v
} else { } else {
paddrBits min xLen // since virtual addresses sign-extend but physical addresses
// zero-extend, make room for a zero sign bit for physical addresses
(paddrBits + 1) min xLen
} }
def paddrBits: Int = p(SharedMemoryTLEdge).bundle.addressBits def paddrBits: Int = p(SharedMemoryTLEdge).bundle.addressBits
def vpnBits: Int = vaddrBits - pgIdxBits def vpnBits: Int = vaddrBits - pgIdxBits