Skip to content

Commit

Permalink
Utils: Fix bad shadow gpr parameters
Browse files Browse the repository at this point in the history
On some configurtions (i.e. mor1kx defaults) the shadow GPR's is set to
zero, but it should be one.

This fixes github issue openrisc#69.
  • Loading branch information
stffrdhrn committed Jan 10, 2019
1 parent 75a7b90 commit 2344bae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rtl/verilog/mor1kx_utils.vh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function integer calc_rf_addr_width;
input integer rf_addr_width;
input integer rf_num_shadow_gpr;
begin
calc_rf_addr_width = rf_addr_width + ((rf_num_shadow_gpr == 1) ? 1 :
calc_rf_addr_width = rf_addr_width + ((rf_num_shadow_gpr <= 1) ? 1 :
`clog2(rf_num_shadow_gpr));
end
endfunction
Expand Down

0 comments on commit 2344bae

Please sign in to comment.