aboutsummaryrefslogtreecommitdiff
path: root/multiplier/hdl/half_adder.sv
diff options
context:
space:
mode:
authorfunctionpointersuss <joshua@joshuayun.com>2023-12-23 13:36:04 +0800
committerfunctionpointersuss <joshua@joshuayun.com>2023-12-23 13:36:04 +0800
commitdec5747241d15fca0b94117205a139b4ba692a9d (patch)
treec7e61055b703eef47bbf032d252135cc1d1c592e /multiplier/hdl/half_adder.sv
parent5b04327dfa7a3005819045c9cc19e558e86d59d5 (diff)
downloadriscv-processor-dec5747241d15fca0b94117205a139b4ba692a9d.tar.gz
updated gitignore, updated testbench, added beginnings of synthesis testing
Diffstat (limited to 'multiplier/hdl/half_adder.sv')
-rw-r--r--multiplier/hdl/half_adder.sv11
1 files changed, 11 insertions, 0 deletions
diff --git a/multiplier/hdl/half_adder.sv b/multiplier/hdl/half_adder.sv
new file mode 100644
index 0000000..a322900
--- /dev/null
+++ b/multiplier/hdl/half_adder.sv
@@ -0,0 +1,11 @@
+module half_adder (
+ input logic a,
+ input logic b,
+ output logic sum,
+ output logic carry
+);
+
+assign sum = a ^ b;
+assign carry = a & b;
+
+endmodule