Skip to content

Commit

Permalink
feat: modify some vars's name
Browse files Browse the repository at this point in the history
  • Loading branch information
maksyuki committed Jan 7, 2022
1 parent 5548122 commit e1e5773
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions rtl/tc_l2/src/main/scala/core/if/BTB.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ class BTB extends Module {
}

// signals about BTB lookup
val lookupIdx = io.lookupPc(ConstVal.BTBIdxLen - 1, 0)
val lookupPcSel = io.lookupPc
val btbHit = valids(lookupIdx) && lines(lookupIdx).pc === lookupPcSel
protected val lookupIdx = io.lookupPc(ConstVal.BTBIdxLen - 1, 0)
protected val lookupPcSel = io.lookupPc
protected val btbHit = valids(lookupIdx) && lines(lookupIdx).pc === lookupPcSel

// BTB lookup
io.lookupBranch := btbHit
Expand Down
6 changes: 3 additions & 3 deletions rtl/tc_l2/src/main/scala/core/if/GHR.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ class GHR extends Module {
val idx = Output(UInt(ConstVal.GHRLen.W))
})

protected val ghr = Reg(UInt(ConstVal.GHRLen.W))
protected val shiftReg = Reg(UInt(ConstVal.GHRLen.W))

when(io.branch) {
ghr := Cat(ghr(ConstVal.GHRLen - 2, 0), io.taken)
shiftReg := Cat(shiftReg(ConstVal.GHRLen - 2, 0), io.taken)
}

io.idx := ghr
io.idx := shiftReg
}

0 comments on commit e1e5773

Please sign in to comment.