diff --git a/rtl/serv_csr.v b/rtl/serv_csr.v index ebf4919..b827958 100644 --- a/rtl/serv_csr.v +++ b/rtl/serv_csr.v @@ -4,7 +4,6 @@ module serv_csr input wire i_clk, input wire i_en, input wire i_cnt0to3, - input wire i_cnt2, input wire i_cnt3, input wire i_cnt7, input wire i_cnt_done, @@ -35,7 +34,6 @@ module serv_csr CSR_SOURCE_SET = 2'b10, CSR_SOURCE_CLR = 2'b11; - reg mstatus; reg mstatus_mie; reg mstatus_mpie; reg mie_mtie; @@ -55,7 +53,7 @@ module serv_csr (i_csr_source == CSR_SOURCE_CSR) ? csr_out : 1'bx; - assign csr_out = (i_mstatus_en & i_en & mstatus) | + assign csr_out = (i_mstatus_en & mstatus_mie & i_cnt3) | i_rf_csr_out | (i_mcause_en & i_en & mcause); @@ -83,8 +81,6 @@ module serv_csr if (i_mie_en & i_cnt7) mie_mtie <= csr_in; - mstatus <= i_cnt2 & mstatus_mie; - timer_irq_r <= timer_irq; if (i_mret) begin diff --git a/rtl/serv_top.v b/rtl/serv_top.v index 57b0642..576e425 100644 --- a/rtl/serv_top.v +++ b/rtl/serv_top.v @@ -419,7 +419,6 @@ module serv_top .i_clk (clk), .i_en (cnt_en), .i_cnt0to3 (cnt0to3), - .i_cnt2 (cnt2), .i_cnt3 (cnt3), .i_cnt7 (cnt7), .i_cnt_done (cnt_done),