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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user