1
0

Perform all illegal-instruction detection in ID stage

This is simpler, reduces what would have become a critical path in
the commit stage, and will make it easier to support the mbadinst
CSR if it is implemented.
This commit is contained in:
Andrew Waterman
2017-03-07 14:33:51 -08:00
parent 7668827741
commit 24a2278fc4
4 changed files with 135 additions and 143 deletions

View File

@ -15,6 +15,7 @@ class Instruction(implicit val p: Parameters) extends ParameterizedBundle with H
val btb_hit = Bool()
val rvc = Bool()
val inst = new ExpandedInstruction
val raw = UInt(width = 32)
require(coreInstBits == (if (usingCompressed) 16 else 32))
}
@ -92,6 +93,7 @@ class IBuf(implicit p: Parameters) extends CoreModule {
val exp = Module(new RVCExpander)
exp.io.in := curInst
io.inst(i).bits.inst := exp.io.out
io.inst(i).bits.raw := curInst
if (usingCompressed) {
val replay = ic_replay(j) || (!exp.io.rvc && (btbHitMask(j) || ic_replay(j+1)))