From 927287da34a0e3c3be2fc2000da9055829f73b0c Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Mon, 7 Apr 2014 23:47:53 -0700 Subject: [PATCH] Bypass RAS push/pop --- rocket/src/main/scala/btb.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rocket/src/main/scala/btb.scala b/rocket/src/main/scala/btb.scala index d4beed04..a6a99a8b 100644 --- a/rocket/src/main/scala/btb.scala +++ b/rocket/src/main/scala/btb.scala @@ -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 }