Working branching.
This commit is contained in:
parent
934593fb6f
commit
92d0dfd9eb
9 changed files with 102 additions and 32 deletions
|
@ -8,6 +8,7 @@ class EXBarrier extends MultiIOModule {
|
|||
new Bundle {
|
||||
val ALUResultIn = Input(UInt(32.W))
|
||||
val ALUResultOut = Output(UInt(32.W))
|
||||
val branchAddress = Output(UInt(32.W))
|
||||
val r2ValueIn = Input(UInt(32.W))
|
||||
val r2ValueOut = Output(UInt(32.W))
|
||||
val writeAddrIn = Input(UInt(5.W))
|
||||
|
@ -18,9 +19,14 @@ class EXBarrier extends MultiIOModule {
|
|||
val memReadOut = Output(Bool())
|
||||
val memWriteIn = Input(Bool())
|
||||
val memWriteOut = Output(Bool())
|
||||
val branchIn = Input(Bool())
|
||||
val branchOut = Output(Bool())
|
||||
})
|
||||
|
||||
io.ALUResultOut := io.ALUResultIn
|
||||
val branchAddress = RegInit(UInt(32.W), 0.U)
|
||||
branchAddress := io.ALUResultIn
|
||||
io.branchAddress := branchAddress
|
||||
|
||||
val r2Value = RegInit(UInt(32.W), 0.U)
|
||||
r2Value := io.r2ValueIn
|
||||
|
@ -41,5 +47,9 @@ class EXBarrier extends MultiIOModule {
|
|||
val memWrite = RegInit(Bool(), false.B)
|
||||
memWrite := io.memWriteIn
|
||||
io.memWriteOut := memWrite
|
||||
|
||||
val branch = RegInit(Bool(), false.B)
|
||||
branch := io.branchIn
|
||||
io.branchOut := branch
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue