summaryrefslogtreecommitdiff
path: root/eater_cpu/eater_alu.sv
diff options
context:
space:
mode:
authoruvok2026-01-18 11:01:36 +0100
committeruvok2026-01-18 11:01:36 +0100
commitb7e0fb39cf82ed736d831d4a30aa351819cf5dde (patch)
tree9eecfefe6a5fd23fdc80f2c1f6349cc68b2e0a16 /eater_cpu/eater_alu.sv
parent1cfdda0d9f76d36df95677e631b8b15dd19b4dcb (diff)
eater: Use separate "zbuffer" module
keeps code a bit cleaner
Diffstat (limited to 'eater_cpu/eater_alu.sv')
-rw-r--r--eater_cpu/eater_alu.sv8
1 files changed, 6 insertions, 2 deletions
diff --git a/eater_cpu/eater_alu.sv b/eater_cpu/eater_alu.sv
index 1474d6d..39aa37d 100644
--- a/eater_cpu/eater_alu.sv
+++ b/eater_cpu/eater_alu.sv
@@ -19,6 +19,10 @@ wire [7:0] result = subtract_n_add_in ? (A_in - B_in) : (A_in + B_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 ? result : 8'bz;
-
+zbuffer buffer (
+ .data_in(result),
+ .en_output_in(en_output_in),
+ .data_out(bus_out)
+);
+
endmodule