Almost working jump.
This commit is contained in:
parent
92d0dfd9eb
commit
323e373d0e
9 changed files with 89 additions and 35 deletions
|
@ -9,6 +9,8 @@ class EXBarrier extends MultiIOModule {
|
|||
val ALUResultIn = Input(UInt(32.W))
|
||||
val ALUResultOut = Output(UInt(32.W))
|
||||
val branchAddress = Output(UInt(32.W))
|
||||
val returnAddrIn = Input(UInt(32.W))
|
||||
val returnAddrOut = Output(UInt(32.W))
|
||||
val r2ValueIn = Input(UInt(32.W))
|
||||
val r2ValueOut = Output(UInt(32.W))
|
||||
val writeAddrIn = Input(UInt(5.W))
|
||||
|
@ -21,6 +23,8 @@ class EXBarrier extends MultiIOModule {
|
|||
val memWriteOut = Output(Bool())
|
||||
val branchIn = Input(Bool())
|
||||
val branchOut = Output(Bool())
|
||||
val jumpIn = Input(Bool())
|
||||
val jumpOut = Output(Bool())
|
||||
})
|
||||
|
||||
io.ALUResultOut := io.ALUResultIn
|
||||
|
@ -28,6 +32,10 @@ class EXBarrier extends MultiIOModule {
|
|||
branchAddress := io.ALUResultIn
|
||||
io.branchAddress := branchAddress
|
||||
|
||||
val returnAddr = RegInit(UInt(32.W), 0.U)
|
||||
returnAddr := io.returnAddrIn
|
||||
io.returnAddrOut := returnAddr
|
||||
|
||||
val r2Value = RegInit(UInt(32.W), 0.U)
|
||||
r2Value := io.r2ValueIn
|
||||
io.r2ValueOut := r2Value
|
||||
|
@ -51,5 +59,9 @@ class EXBarrier extends MultiIOModule {
|
|||
val branch = RegInit(Bool(), false.B)
|
||||
branch := io.branchIn
|
||||
io.branchOut := branch
|
||||
|
||||
val jump = RegInit(Bool(), false.B)
|
||||
jump := io.jumpIn
|
||||
io.jumpOut := jump
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue