diff options
author | David Shah <dave@ds0.me> | 2020-12-02 17:08:39 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2020-12-02 17:08:39 +0000 |
commit | 264e924abb85424a70daf50662700e3aceada689 (patch) | |
tree | 0038b6fe8b1a0c4aa2702678a0457843008274ab /techlibs | |
parent | ef5b2777c3a6e3abaa0aa24012bd47e2a2c8a4db (diff) | |
download | yosys-264e924abb85424a70daf50662700e3aceada689.tar.gz yosys-264e924abb85424a70daf50662700e3aceada689.tar.bz2 yosys-264e924abb85424a70daf50662700e3aceada689.zip |
nexus: More efficient CO mapping
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'techlibs')
-rw-r--r-- | techlibs/nexus/arith_map.v | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/techlibs/nexus/arith_map.v b/techlibs/nexus/arith_map.v index fd9d61be3..ce14a15ea 100644 --- a/techlibs/nexus/arith_map.v +++ b/techlibs/nexus/arith_map.v @@ -88,9 +88,9 @@ module _80_nexus_alu (A, B, CI, BI, X, Y, CO); .COUT(FCO[i+2]) ); - assign CO[i] = (AA[i] && BB[i]) || (((i == 0) ? CI : CO[i-1]) && (AA[i] || BB[i])); + assign CO[i] = (AA[i] && BB[i]) || ((Y[i] ^ AA[i] ^ BB[i]) && (AA[i] || BB[i])); if (i+1 < Y_WIDTH) begin - assign CO[i+1] = (AA[i+1] && BB[i+1]) || (CO[i] && (AA[i+1] || BB[i+1])); + assign CO[i + 1] = (AA[i] && BB[i]) || ((Y[i] ^ AA[i] ^ BB[i]) && (AA[i] || BB[i])); assign Y[i+1] = Y1[i]; end end endgenerate |