1
0

Merge branch 'master' into periphery-adjustments

This commit is contained in:
Henry Cook 2017-02-24 10:37:41 -08:00 committed by GitHub
commit 35877e6ec1

View File

@ -470,7 +470,7 @@ class HastiTestSRAM(depth: Int)(implicit p: Parameters) extends HastiModule()(p)
// Calculate the bitmask of which bytes are being accessed // Calculate the bitmask of which bytes are being accessed
val mask_decode = Vec.tabulate(hastiAlignment+1) (UInt(_) <= io.hsize) val mask_decode = Vec.tabulate(hastiAlignment+1) (UInt(_) <= io.hsize)
val mask_wide = Vec.tabulate(hastiDataBytes) { i => mask_decode(log2Up(i+1)) } val mask_wide = Vec.tabulate(hastiDataBytes) { i => mask_decode(log2Ceil(i+1)) }
val mask_shift = if (hastiAlignment == 0) UInt(1) else val mask_shift = if (hastiAlignment == 0) UInt(1) else
mask_wide.asUInt() << io.haddr(hastiAlignment-1,0) mask_wide.asUInt() << io.haddr(hastiAlignment-1,0)