diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-11-16 23:32:00 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-11-16 23:32:25 -0600 |
| commit | f66b372bdffea29ecac3172dd49e48783db45dc1 (patch) | |
| tree | 363ab0efbb24c3a23e1d73e90a4badadee789230 | |
| parent | f1353e81d59986dfc11e3f1a43e351f6c8117f9b (diff) | |
Fix carry flag bug
Diffstat (limited to '')
| -rw-r--r-- | conspiracion.qsf | 3 | ||||
| -rw-r--r-- | rtl/core/alu/alu.sv | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/conspiracion.qsf b/conspiracion.qsf index a8f62ac..d4e404a 100644 --- a/conspiracion.qsf +++ b/conspiracion.qsf @@ -354,4 +354,5 @@ set_global_assignment -name USE_SIGNALTAP_FILE bus_test.stp set_global_assignment -name SIGNALTAP_FILE bus_test.stp -set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top + +set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
\ No newline at end of file diff --git a/rtl/core/alu/alu.sv b/rtl/core/alu/alu.sv index 1e19338..2f71d6a 100644 --- a/rtl/core/alu/alu.sv +++ b/rtl/core/alu/alu.sv @@ -33,7 +33,7 @@ module core_alu .q(q_sub), .c(c_sub), .v(v_sub), - .c_in(c_in && op `FIELD_ALUOP_SUB_SBC), + .c_in(!c_in && op `FIELD_ALUOP_SUB_SBC), .* ); @@ -44,7 +44,7 @@ module core_alu .q(q_rsb), .c(c_rsb), .v(v_rsb), - .c_in(c_in && op `FIELD_ALUOP_RSB_RSC), + .c_in(!c_in && op `FIELD_ALUOP_RSB_RSC), .* ); |
