Almost working jump.

This commit is contained in:
Sebastian Bugge 2024-10-04 04:11:26 +02:00
parent 92d0dfd9eb
commit 323e373d0e
Signed by: kaholaz
GPG key ID: 2EFFEDEE03519691
9 changed files with 89 additions and 35 deletions

View file

@ -33,6 +33,8 @@ class InstructionDecode extends MultiIOModule {
val memWrite = Output(Bool())
val memRead = Output(Bool())
val branchType = Output(UInt(3.W))
val jump = Output(Bool())
val returnAddr = Output(UInt(32.W))
}
)
@ -73,6 +75,9 @@ class InstructionDecode extends MultiIOModule {
io.r1Value := registers.io.readData1
io.r2Value := registers.io.readData2
io.jump := decoder.controlSignals.jump
io.returnAddr := io.pc + 4.U
io.ALUOp := decoder.ALUop
io.branchType := decoder.branchType
io.writeAddrOut := decoder.instruction.registerRd