1
0
mirror of https://github.com/olofk/serv.git synced 2026-02-24 23:47:42 +00:00

Expose with_csr in servant

This commit is contained in:
Olof Kindgren
2022-07-26 00:19:09 +02:00
parent be06cd21c2
commit 73508bc5de
5 changed files with 11 additions and 6 deletions

View File

@@ -53,7 +53,7 @@ module serv_ctrl
assign {pc_plus_4_cy,pc_plus_4} = pc+plus_4+pc_plus_4_cy_r;
generate
if (WITH_CSR)
if (|WITH_CSR)
assign new_pc = i_trap ? (i_csr_pc & !i_cnt0) : i_jump ? pc_plus_offset_aligned : pc_plus_4;
else
assign new_pc = i_jump ? pc_plus_offset_aligned : pc_plus_4;

View File

@@ -53,7 +53,7 @@ module serv_rf_if
wire rd_wen = i_rd_wen & (|i_rd_waddr);
generate
if (WITH_CSR) begin
if (|WITH_CSR) begin
wire rd = (i_ctrl_rd ) |
(i_alu_rd & i_rd_alu_en) |
(i_csr_rd & i_rd_csr_en) |

View File

@@ -222,7 +222,7 @@ module serv_top
serv_state
#(.RESET_STRATEGY (RESET_STRATEGY),
.WITH_CSR (WITH_CSR),
.WITH_CSR (WITH_CSR[0:0]),
.MDU(MDU),
.ALIGN(ALIGN))
state
@@ -512,7 +512,7 @@ module serv_top
.o_csr (rf_csr_out));
serv_mem_if
#(.WITH_CSR (WITH_CSR))
#(.WITH_CSR (WITH_CSR[0:0]))
mem_if
(
.i_clk (clk),
@@ -533,7 +533,7 @@ module serv_top
.o_wb_sel (o_dbus_sel));
generate
if (WITH_CSR) begin
if (|WITH_CSR) begin
serv_csr
#(.RESET_STRATEGY (RESET_STRATEGY))
csr