From dd222c33ae00eb9312cb34610efd886dc565c159 Mon Sep 17 00:00:00 2001 From: uvok Date: Fri, 16 Jan 2026 17:46:39 +0100 Subject: eater: Use "actual -" for alu better synthesis? --- eater_cpu/eater_alu.sv | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'eater_cpu') 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 -- cgit v1.2.3