mirror of
https://github.com/olofk/serv.git
synced 2025-04-22 04:47:16 -04:00
Remove redundant mstatus register
This commit is contained in:
parent
9142c3ca02
commit
fa6c420b10
2 changed files with 1 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue