From b7e0fb39cf82ed736d831d4a30aa351819cf5dde Mon Sep 17 00:00:00 2001 From: uvok Date: Sun, 18 Jan 2026 11:01:36 +0100 Subject: eater: Use separate "zbuffer" module keeps code a bit cleaner --- eater_cpu/eater_alu.sv | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'eater_cpu/eater_alu.sv') 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 -- cgit v1.2.3