mirror of
https://github.com/antonblanchard/chiselwatt.git
synced 2026-03-02 18:05:31 +00:00
committed by
Anton Blanchard
parent
6f6141249b
commit
06563749f9
@@ -1768,6 +1768,12 @@ mtocrf:
|
||||
compare: CMP_RC_0
|
||||
fxm: FXM_ONEHOT
|
||||
|
||||
mcrf:
|
||||
unit: U_CR
|
||||
internalOp: CR_MCRF
|
||||
rOut: ROUT_NONE
|
||||
compare: CMP_RC_0
|
||||
|
||||
b:
|
||||
unit: U_BR
|
||||
internalOp: BR_UNCOND
|
||||
|
||||
@@ -37,8 +37,9 @@ object Control {
|
||||
val SPR_MF = 0.U(2.W)
|
||||
val SPR_MT = 1.U(2.W)
|
||||
|
||||
val CR_MF = 0.U(2.W)
|
||||
val CR_MT = 1.U(2.W)
|
||||
val CR_MF = 0.U(2.W)
|
||||
val CR_MT = 1.U(2.W)
|
||||
val CR_MCRF = 2.U(2.W)
|
||||
|
||||
val BR_UNCOND = 0.U(2.W)
|
||||
val BR_COND = 1.U(2.W)
|
||||
|
||||
@@ -240,6 +240,8 @@ class Core(bits: Int, memSize: Int, memFileName: String, resetAddr: Int) extends
|
||||
conditionRegister := fxm.asBools.zip(conditionRegister).zip(executeRs(31, 0).nibbles().reverse).map({ case ((fxm, cr), reg) =>
|
||||
Mux(fxm, reg, cr)
|
||||
})
|
||||
} .elsewhen (ctrl.internalOp === CR_MCRF) {
|
||||
conditionRegister(insn_bf(executeInsn)) := conditionRegister(insn_bfa(executeInsn))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -164,6 +164,7 @@ object Instructions {
|
||||
def MFOCRF = BitPat("b011111?????1?????????0000010011?")
|
||||
def MTCRF = BitPat("b011111?????0?????????0010010000?")
|
||||
def MTOCRF = BitPat("b011111?????1?????????0010010000?")
|
||||
def MCRF = BitPat("b010011???????????????0000000000?")
|
||||
|
||||
// SPR read/write
|
||||
def MFSPR = BitPat("b011111???????????????0101010011?")
|
||||
@@ -214,7 +215,6 @@ object Instructions {
|
||||
|
||||
//def DCBZ = BitPat("b011111???????????????1111110110?")
|
||||
|
||||
//def MCRF = BitPat("b010011???????????????0000000000?")
|
||||
//def ISEL = BitPat("b011111????????????????????01111?") // 2.03
|
||||
|
||||
//def PRTYD = BitPat("b011111???????????????0010111010?") // 2.05
|
||||
|
||||
Reference in New Issue
Block a user