summaryrefslogtreecommitdiff
path: root/eater_cpu/eater_alu.sv
diff options
context:
space:
mode:
authoruvok2026-01-16 14:22:26 +0100
committeruvok2026-01-16 14:22:26 +0100
commit86901bfbbdd54e1262489fbeaa144394f3abb3fd (patch)
treefdd2031b9cc6f8937919083c289f7129fd4311e6 /eater_cpu/eater_alu.sv
parent63601830da505314839ebe4edbcf6c88af16c69b (diff)
eater: Add ALU
while doing so, add always_out port for regs
Diffstat (limited to 'eater_cpu/eater_alu.sv')
-rw-r--r--eater_cpu/eater_alu.sv17
1 files changed, 17 insertions, 0 deletions
diff --git a/eater_cpu/eater_alu.sv b/eater_cpu/eater_alu.sv
new file mode 100644
index 0000000..b0fa9ae
--- /dev/null
+++ b/eater_cpu/eater_alu.sv
@@ -0,0 +1,17 @@
+// represents the Ben Eater 8bit computer - ALU
+
+`timescale 1us/1us
+
+module eater_alu (
+ input clk_in,
+ input en_output_in,
+
+ input [7:0] A_in,
+ input [7:0] B_in,
+
+ output [7:0] bus_out
+);
+
+assign bus_out = en_output_in ? 0 : 8'bz;
+
+endmodule