Fixed index offset in mask port mapping. (#38)

Fixed index offset in mask port mapping.
This commit is contained in:
James Dunn
2019-02-13 15:17:12 -08:00
committed by John Wright
parent 1f58ea1e14
commit 9d505d6063

View File

@@ -432,7 +432,7 @@ class MacroCompilerPass(mems: Option[Seq[Macro]],
// zero out the upper bits.
zero
} else {
if (i >= memPort.src.width.get) {
if ((low + i) >= memPort.src.width.get) {
// If our bit is larger than the whole width of the mem, just zero out the upper bits.
zero
} else {