Working forwarding (i think).

This commit is contained in:
Sebastian Bugge 2024-10-18 07:37:50 +02:00
parent f2964c280c
commit bcbe07b601
Signed by: kaholaz
GPG key ID: 2EFFEDEE03519691
6 changed files with 92 additions and 9 deletions

View file

@ -25,6 +25,9 @@ class EXBarrier extends MultiIOModule {
val branchOut = Output(Bool())
val jumpIn = Input(Bool())
val jumpOut = Output(Bool())
val forwardEx = Output(Bool())
val forwardExAddr = Output(UInt(5.W))
val forwardExData = Output(UInt(32.W))
})
io.ALUResultOut := io.ALUResultIn
@ -63,5 +66,8 @@ class EXBarrier extends MultiIOModule {
val jump = RegInit(Bool(), false.B)
jump := io.jumpIn
io.jumpOut := jump
}
io.forwardEx := io.writeEnableIn && !io.memReadIn
io.forwardExAddr := io.writeAddrIn
io.forwardExData := io.ALUResultIn
}