Fix relaxedPc/DYNAMIC_TARGET interaction

This commit is contained in:
Dolu1990 2018-06-06 18:30:30 +02:00
parent dc968020c4
commit 5e7dd02bf7
3 changed files with 23 additions and 8 deletions

View File

@ -33,12 +33,13 @@ object TestsWorkspace {
plugins = List(
new IBusSimplePlugin(
resetVector = 0x80000000l,
relaxedPcCalculation = false,
relaxedPcCalculation = true,
relaxedBusCmdValid = false,
prediction = DYNAMIC_TARGET,
historyRamSizeLog2 = 10,
catchAccessFault = true,
compressedGen = true,
busLatencyMin = 3
compressedGen = false,
busLatencyMin = 1
),
// new IBusCachedPlugin(
// resetVector = 0x80000000l,

View File

@ -126,18 +126,21 @@ abstract class IBusFetcherImpl(val catchAccessFault : Boolean,
}
}
preOutput.valid := RegNext(True) init (False) // && !jump.pcLoad.valid
preOutput.payload := pcReg
//application of the selected jump request
if(predictionPcLoad != null) {
when(predictionPcLoad.valid) {
pcReg := predictionPcLoad.payload
preOutput.valid := False
}
}
when(jump.pcLoad.valid) {
pcReg := jump.pcLoad.payload
}
preOutput.valid := RegNext(True) init (False) // && !jump.pcLoad.valid
preOutput.payload := pcReg
} else new PcFetch{
//PC calculation without Jump
val pcReg = Reg(UInt(32 bits)) init(if(resetVector != null) resetVector else externalResetVector) addAttribute(Verilator.public)

View File

@ -202,8 +202,8 @@ class IBusDimension extends VexRiscvDimension("IBus") {
busLatencyMin = latency,
injectorStage = injectorStage
)
}) :+ new VexRiscvPosition("FullRelaxed"){
override def testParam = "IBUS=SIMPLE"
}) :+ new VexRiscvPosition("FullRelaxedDeep"){
override def testParam = "IBUS=SIMPLE COMPRESSED=yes"
override def applyOn(config: VexRiscvConfig): Unit = config.plugins += new IBusSimplePlugin(
resetVector = 0x80000000l,
relaxedPcCalculation = true,
@ -212,10 +212,21 @@ class IBusDimension extends VexRiscvDimension("IBus") {
catchAccessFault = false,
compressedGen = true,
busLatencyMin = 3,
injectorStage = false
)
} :+ new VexRiscvPosition("FullRelaxedStd") {
override def testParam = "IBUS=SIMPLE"
override def applyOn(config: VexRiscvConfig): Unit = config.plugins += new IBusSimplePlugin(
resetVector = 0x80000000l,
relaxedPcCalculation = true,
relaxedBusCmdValid = true,
prediction = STATIC,
catchAccessFault = false,
compressedGen = false,
busLatencyMin = 1,
injectorStage = true
)
}
}