Skip to content

Commit

Permalink
RAS: fix uninitialized top and write bypass entry (OpenXiangShan#2250)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenguokai authored Aug 18, 2023
1 parent 7b8f8f0 commit 8088cde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/xiangshan/frontend/RAS.scala
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ class RAS(implicit p: Parameters) extends BasePredictor {

val stack = Mem(RasSize, new RASEntry)
val sp = RegInit(0.U(log2Up(rasSize).W))
val top = Reg(new RASEntry())
val top = RegInit(0.U.asTypeOf(new RASEntry()))
val topPtr = RegInit(0.U(log2Up(rasSize).W))

val wen = WireInit(false.B)
val write_bypass_entry = Reg(new RASEntry())
val write_bypass_entry = RegInit(0.U.asTypeOf(new RASEntry()))
val write_bypass_ptr = RegInit(0.U(log2Up(rasSize).W))
val write_bypass_valid = RegInit(false.B)
when (wen) {
Expand Down

0 comments on commit 8088cde

Please sign in to comment.