aboutsummaryrefslogtreecommitdiff
path: root/src/alu.v
diff options
context:
space:
mode:
authorFlavian Kaufmann <flavian@flaviankaufmann.ch>2024-05-07 21:27:21 +0200
committerFlavian Kaufmann <flavian@flaviankaufmann.ch>2024-05-07 21:27:21 +0200
commit9a357b3ad679751bc7a9ce85adbc303130211226 (patch)
tree9898c449a53ff3caa0ae4620a1078c3a8268cbd0 /src/alu.v
parentda9b25591e8b4d1c05a2ac84bb40b5cb5e3a86c5 (diff)
downloadriscv_cpu-9a357b3ad679751bc7a9ce85adbc303130211226.tar.gz
riscv_cpu-9a357b3ad679751bc7a9ce85adbc303130211226.zip
alu equal
Diffstat (limited to 'src/alu.v')
-rw-r--r--src/alu.v4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/alu.v b/src/alu.v
index 6962129..6f9251c 100644
--- a/src/alu.v
+++ b/src/alu.v
@@ -2,7 +2,8 @@ module alu (
input [31:0] a, b,
input [3:0] op,
output reg [31:0] result,
- output zero
+ output zero,
+ output equal
);
wire [31:0] arithmetic_result, logic_result, shift_result;
@@ -38,5 +39,6 @@ always @ (*) begin
end
assign zero = result == 32'b0;
+assign equal = a == b;
endmodule