From 260246f488389c63fc6b9c285d39042e8d4a3b41 Mon Sep 17 00:00:00 2001 From: liangkangnan Date: Thu, 7 May 2020 22:40:31 +0800 Subject: [PATCH] fix nop inst Signed-off-by: liangkangnan --- rtl/core/defines.v | 1 + rtl/core/ex.v | 2 +- rtl/core/id.v | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rtl/core/defines.v b/rtl/core/defines.v index ed39393..854dbe6 100644 --- a/rtl/core/defines.v +++ b/rtl/core/defines.v @@ -110,6 +110,7 @@ `define INST_LUI 7'b0110111 `define INST_AUIPC 7'b0010111 `define INST_NOP 32'h00000001 +`define INST_NOP_OP 7'b0000001 `define INST_MRET 32'h30200073 `define INST_RET 32'h00008067 diff --git a/rtl/core/ex.v b/rtl/core/ex.v index 8093206..e5fb907 100644 --- a/rtl/core/ex.v +++ b/rtl/core/ex.v @@ -1028,7 +1028,7 @@ module ex( jump_flag = `JumpDisable; reg_wdata = {inst_i[31:12], 12'b0} + inst_addr_i; end - `INST_NOP: begin + `INST_NOP_OP: begin jump_flag = `JumpDisable; hold_flag = `HoldDisable; jump_addr = `ZeroWord; diff --git a/rtl/core/id.v b/rtl/core/id.v index b47b99d..c50ed70 100644 --- a/rtl/core/id.v +++ b/rtl/core/id.v @@ -232,7 +232,7 @@ module id( reg1_raddr_o = `ZeroReg; reg2_raddr_o = `ZeroReg; end - `INST_NOP: begin + `INST_NOP_OP: begin reg_we_o = `WriteDisable; reg_waddr_o = `ZeroReg; reg1_raddr_o = `ZeroReg;