实验一的执行

This commit is contained in:
2025-10-09 19:32:03 +08:00
parent abc354e758
commit b7578fdc84

View File

@@ -47,9 +47,17 @@ class Execute extends Module {
alu_ctrl.io.funct7 := funct7
// lab1(Execute)
alu.io.func := alu_ctrl.io.alu_funct
alu.io.op1 := Mux(
io.aluop1_source === ALUOp1Source.Register,
io.reg1_data,
io.instruction_address
)
alu.io.op2 := Mux(
io.aluop2_source === ALUOp2Source.Register,
io.reg2_data,
io.immediate
)
// lab1(Execute) end