Added zero flag to ALU and updated testbench to not fail because of it. TODO: Add cases to test the zero flag

This commit is contained in:
riley committed 2026-10-13 21:34:25 +11:00
1 parent 80416e1f8a
commit 75ef513efa
2 files changed
+5 -4

No files matched your search

+2 -2
View File
@@ -16,14 +16,14 @@ module alu_tb #(width=2)();
logic [2**width-1:0] A_in;
logic [2**width-1:0] B_in;
logic [2**width-1:0] Y_out;
logic [1:0] flags_out;
logic [2:0] flags_out;
localparam int NUM_TESTS = 28;
logic [3:0] ops[NUM_TESTS];
logic [2**width-1:0] A_cases[NUM_TESTS];
logic [2**width-1:0] B_cases[NUM_TESTS];
logic [2**width-1:0] Y_exp[NUM_TESTS];
logic [1:0] flags_exp[NUM_TESTS];
logic [2:0] flags_exp[NUM_TESTS];
alu #(width) dut (op_in, A_in, B_in, Y_out, flags_out);