statuc prediction is fully funcitonnal
This commit is contained in:
parent
76ca852478
commit
d9f2e03753
|
@ -278,7 +278,7 @@ class BranchPlugin(earlyBranch : Boolean,
|
||||||
}
|
}
|
||||||
default{
|
default{
|
||||||
branch_src1 := input(PC)
|
branch_src1 := input(PC)
|
||||||
branch_src2 := (input(PREDICTION_HAD_BRANCHED) ? B(4) | imm.b_sext).asUInt
|
branch_src2 := (input(PREDICTION_HAD_BRANCHED) ? (if(pipeline(RVC_GEN)) Mux(input(IS_RVC), B(2), B(4)) else B(4)).resized | imm.b_sext).asUInt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val branchAdder = branch_src1 + branch_src2
|
val branchAdder = branch_src1 + branch_src2
|
||||||
|
@ -298,7 +298,7 @@ class BranchPlugin(earlyBranch : Boolean,
|
||||||
}
|
}
|
||||||
|
|
||||||
if(catchAddressMisaligned) {
|
if(catchAddressMisaligned) {
|
||||||
branchExceptionPort.valid := input(INSTRUCTION_READY) && arbitration.isValid && input(BRANCH_DO) && jumpInterface.payload(1 downto 0) =/= 0
|
branchExceptionPort.valid := arbitration.isValid && input(BRANCH_DO) && (if(pipeline(RVC_GEN)) jumpInterface.payload(0 downto 0) =/= 0 else jumpInterface.payload(1 downto 0) =/= 0)
|
||||||
branchExceptionPort.code := 0
|
branchExceptionPort.code := 0
|
||||||
branchExceptionPort.badAddr := jumpInterface.payload
|
branchExceptionPort.badAddr := jumpInterface.payload
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,13 +110,14 @@ class IBusSimplePlugin(interfaceKeepData : Boolean, catchAccessFault : Boolean,
|
||||||
var prefetchExceptionPort : Flow[ExceptionCause] = null
|
var prefetchExceptionPort : Flow[ExceptionCause] = null
|
||||||
def resetVector = BigInt(0x80000000l)
|
def resetVector = BigInt(0x80000000l)
|
||||||
def keepPcPlus4 = false
|
def keepPcPlus4 = false
|
||||||
def decodePcGen = false
|
def decodePcGen = true
|
||||||
def compressedGen = false
|
def compressedGen = true
|
||||||
def cmdToRspStageCount = 1
|
def cmdToRspStageCount = 1
|
||||||
def rspStageGen = false
|
def rspStageGen = false
|
||||||
def injectorReadyCutGen = false
|
def injectorReadyCutGen = false
|
||||||
def relaxedPcCalculation = false
|
def relaxedPcCalculation = false
|
||||||
def prediction : BranchPrediction = STATIC
|
def prediction : BranchPrediction = STATIC
|
||||||
|
def catchAddressMisaligned = true
|
||||||
var decodePrediction : DecodePredictionBus = null
|
var decodePrediction : DecodePredictionBus = null
|
||||||
assert(cmdToRspStageCount >= 1)
|
assert(cmdToRspStageCount >= 1)
|
||||||
assert(!(compressedGen && !decodePcGen))
|
assert(!(compressedGen && !decodePcGen))
|
||||||
|
|
Loading…
Reference in New Issue