1
0
mirror of https://github.com/olofk/serv.git synced 2026-02-04 07:12:34 +00:00

Used named generate statements

Unnamed generate statements are not recommended and some tools throw
warnings or errors for these.
This commit is contained in:
Olof Kindgren
2023-11-16 14:34:25 +01:00
parent 7a6d5d3fc9
commit bc74a9a1d7
8 changed files with 55 additions and 47 deletions

View File

@@ -53,10 +53,11 @@ module serv_ctrl
assign {pc_plus_4_cy,pc_plus_4} = pc+plus_4+pc_plus_4_cy_r;
generate
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;
if (|WITH_CSR) begin : gen_csr
assign new_pc = i_trap ? (i_csr_pc & !i_cnt0) : i_jump ? pc_plus_offset_aligned : pc_plus_4;
end else begin : gen_no_csr
assign new_pc = i_jump ? pc_plus_offset_aligned : pc_plus_4;
end
endgenerate
assign o_rd = (i_utype & pc_plus_offset_aligned) | (pc_plus_4 & i_jal_or_jalr);