提交 1bb837b4 编写于 作者: 饶先宏's avatar 饶先宏

202109090547

上级 723963b8
......@@ -361,7 +361,7 @@ module riscv_core(
end else if (state == `RISCVSTATE_EXEC_INST) begin
write <= 0;
if (opcode == 5'h08) begin
writeaddr <= {newwriteaddr[31:2], 2'b00};
writemask <= 4'h0;
writedata <= rs2;
......@@ -501,10 +501,10 @@ module riscv_core(
state <= `RISCVSTATE_WAIT_LD2;
end
else begin
state <= `RISCVSTATE_READ_INST;
state <= `RISCVSTATE_READ_REGS;
end
end
`RISCVSTATE_WAIT_LD2: state <= `RISCVSTATE_READ_INST;
`RISCVSTATE_WAIT_LD2: state <= `RISCVSTATE_READ_REGS;
`RISCVSTATE_WAIT_ST: begin
state <= `RISCVSTATE_READ_INST;
if (opcode == 5'h08) begin
......@@ -520,10 +520,10 @@ module riscv_core(
`RISCVSTATE_WAIT_MUL: begin
`ifdef USEMUL32
if (muldone)
state <= `RISCVSTATE_READ_INST;
state <= `RISCVSTATE_READ_REGS;
`else
if (divclk == 0)
state <= `RISCVSTATE_READ_INST;
state <= `RISCVSTATE_READ_REGS;
else
divclk <= divclk - 1;
`endif
......@@ -532,10 +532,10 @@ module riscv_core(
`RISCVSTATE_WAIT_DIV: begin
`ifdef USEDIV32
if (divdone)
state <= `RISCVSTATE_READ_INST;
state <= `RISCVSTATE_READ_REGS;
`else
if (divclk == 0)
state <= `RISCVSTATE_READ_INST;
state <= `RISCVSTATE_READ_REGS;
else
divclk <= divclk - 1;
`endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册