projects
/
soc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7f9d13
)
bug in carry32 handling in OP_CMP
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Wed, 2 Sep 2020 14:13:22 +0000
(15:13 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Wed, 2 Sep 2020 14:13:22 +0000
(15:13 +0100)
src/soc/fu/alu/main_stage.py
patch
|
blob
|
history
diff --git
a/src/soc/fu/alu/main_stage.py
b/src/soc/fu/alu/main_stage.py
index f2e751d6965e58a0872a5956a61a1f43de06e5fa..7f98c344535ea6665262afb2f71fb4e8e4f0f18c 100644
(file)
--- a/
src/soc/fu/alu/main_stage.py
+++ b/
src/soc/fu/alu/main_stage.py
@@
-100,7
+100,7
@@
class ALUMainStage(PipeModBase):
# this is supposed to be inverted (b-a, not a-b)
comb += a_n.eq(~a) # sigh a gets inverted
- comb += carry_32.eq(add_o[33] ^ a
_n
[32] ^ b[32])
+ comb += carry_32.eq(add_o[33] ^ a[32] ^ b[32])
comb += carry_64.eq(add_o[65])
comb += zerolo.eq(~((a_n[0:32] ^ b[0:32]).bool()))