1
0

[debug]: fix issue with subword select logic

This commit is contained in:
Megan Wachs 2016-06-03 15:45:20 -07:00 committed by Andrew Waterman
parent 3e8322816b
commit 605fb5b92f

View File

@ -840,9 +840,9 @@ class DebugModule ()(implicit val p:cde.Parameters)
// Pick out the correct word based on the address. // Pick out the correct word based on the address.
val sbWrDataWords = Vec.tabulate (tlDataBits / 32) {ii => sbWrData((ii+1)*32 - 1, ii*32)} val sbWrDataWords = Vec.tabulate (tlDataBits / 32) {ii => sbWrData((ii+1)*32 - 1, ii*32)}
val sbWrMaskWords = Vec.tabulate(tlDataBits/32) {ii => sbWrMask ((ii+1)*32 -1, ii*32)} val sbWrMaskWords = Vec.tabulate (tlDataBits / 32) {ii => sbWrMask ((ii+1)*32 -1, ii*32)}
val sbWrSelTop = log2Up(tlDataBits/8) val sbWrSelTop = log2Up(tlDataBits/8) - 1
val sbWrSelBottom = 2 val sbWrSelBottom = 2
SETHALTNOTWrData := sbWrDataWords(SETHALTNOT(sbWrSelTop, sbWrSelBottom)) SETHALTNOTWrData := sbWrDataWords(SETHALTNOT(sbWrSelTop, sbWrSelBottom))
@ -853,12 +853,12 @@ class DebugModule ()(implicit val p:cde.Parameters)
sbRamRdEn := sbRdEn sbRamRdEn := sbRdEn
} }
SETHALTNOTWrEn := sbAddr(sbAddrWidth - 1, sbWrSelTop) === SETHALTNOT(sbAddrWidth-1, sbWrSelTop) && SETHALTNOTWrEn := sbAddr(sbAddrWidth - 1, sbWrSelTop + 1) === SETHALTNOT(sbAddrWidth-1, sbWrSelTop + 1) &&
sbWrMaskWords(SETHALTNOT(sbWrSelTop, sbWrSelBottom)).orR && (sbWrMaskWords(SETHALTNOT(sbWrSelTop, sbWrSelBottom))).orR &&
sbWrEn sbWrEn
CLEARDEBINTWrEn := sbAddr(sbAddrWidth - 1, sbWrSelTop) === CLEARDEBINT(sbAddrWidth-1, sbWrSelTop) && CLEARDEBINTWrEn := sbAddr(sbAddrWidth - 1, sbWrSelTop + 1) === CLEARDEBINT(sbAddrWidth-1, sbWrSelTop + 1) &&
sbWrMaskWords(CLEARDEBINT(sbWrSelTop, sbWrSelBottom)).orR && (sbWrMaskWords(CLEARDEBINT(sbWrSelTop, sbWrSelBottom))).orR &&
sbWrEn sbWrEn
} }