summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruvok2026-01-16 17:46:39 +0100
committeruvok2026-01-16 17:46:39 +0100
commitdd222c33ae00eb9312cb34610efd886dc565c159 (patch)
treea7c9cc7fe562385a6d83525bade9f433223d6c90
parent3cb63dec5174fa442463ad150a6f3c4aa61a4cef (diff)
eater: Use "actual -" for alu
better synthesis?
-rw-r--r--eater_cpu/eater_alu.sv10
1 files changed, 5 insertions, 5 deletions
diff --git a/eater_cpu/eater_alu.sv b/eater_cpu/eater_alu.sv
index 01b62ae..bbfb050 100644
--- a/eater_cpu/eater_alu.sv
+++ b/eater_cpu/eater_alu.sv
@@ -14,11 +14,11 @@ module eater_alu (
output [7:0] bus_out
);
-// wire [7:0] result = subtract_n_add_in ? (A_in - B_in) : (A_in + B_in);
-wire [7:0] xormask = {8{subtract_n_add_in}};
-wire [7:0] B_neg_if = B_in ^ xormask;
-wire [7:0] result2 = A_in + B_neg_if + subtract_n_add_in;
+wire [7:0] result = subtract_n_add_in ? (A_in - B_in) : (A_in + B_in);
+// wire [7:0] xormask = {8{subtract_n_add_in}};
+// wire [7:0] B_neg_if = B_in ^ xormask;
+// wire [7:0] result2 = A_in + B_neg_if + subtract_n_add_in;
-assign bus_out = en_output_in ? result2 : 8'bz;
+assign bus_out = en_output_in ? result : 8'bz;
endmodule