1
0

Bypass RAS push/pop

This commit is contained in:
Andrew Waterman 2014-04-07 23:47:53 -07:00
parent f235fa0db6
commit 927287da34

View File

@ -204,12 +204,16 @@ class BTB(implicit conf: BTBConfig) extends Module {
if (conf.nras > 0) {
val ras = new RAS
when (!ras.isEmpty && Mux1H(hits, useRAS)) {
val doPeek = Mux1H(hits, useRAS)
when (!ras.isEmpty && doPeek) {
io.resp.bits.target := ras.peek
}
when (io.update.valid) {
when (io.update.bits.isCall) {
ras.push(io.update.bits.returnAddr)
when (doPeek) {
io.resp.bits.target := io.update.bits.returnAddr
}
}.elsewhen (io.update.bits.isReturn && io.update.bits.prediction.valid) {
ras.pop
}