diff options
Diffstat (limited to 'techlibs/ecp5/arith_map.v')
-rw-r--r-- | techlibs/ecp5/arith_map.v | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/techlibs/ecp5/arith_map.v b/techlibs/ecp5/arith_map.v index 05d44b9b4..1094c5f8a 100644 --- a/techlibs/ecp5/arith_map.v +++ b/techlibs/ecp5/arith_map.v @@ -42,7 +42,7 @@ module _80_ecp5_alu (A, B, CI, BI, X, Y, CO); function integer round_up2; input integer N; begin - round_up2 = ((N / 2) + 1) * 2; + round_up2 = ((N + 1) / 2) * 2; end endfunction @@ -69,7 +69,7 @@ module _80_ecp5_alu (A, B, CI, BI, X, Y, CO); ); assign CO[i] = (AA[i] && BB[i]) || (C[i] && (AA[i] || BB[i])); - if (i < Y_WIDTH) begin + if (i+1 < Y_WIDTH) begin assign CO[i+1] = FCO[i]; assign Y[i+1] = Y1[i]; end |