summaryrefslogtreecommitdiff
path: root/eater_cpu
diff options
context:
space:
mode:
authoruvok2026-01-25 16:24:58 +0100
committeruvok2026-01-25 16:24:58 +0100
commit889486d53a591bdfac86c20a91d5041ec9dab10a (patch)
tree4b65a9bf06acb788077a76fdef49e631f0893fb6 /eater_cpu
parent8668bdc4042f0fe91e95e0f70caca201d04955a2 (diff)
tb: Check ALU Flag
Diffstat (limited to 'eater_cpu')
-rw-r--r--eater_cpu/eater_computer_tb.sv4
1 files changed, 4 insertions, 0 deletions
diff --git a/eater_cpu/eater_computer_tb.sv b/eater_cpu/eater_computer_tb.sv
index e70953c..eab7b23 100644
--- a/eater_cpu/eater_computer_tb.sv
+++ b/eater_cpu/eater_computer_tb.sv
@@ -116,6 +116,10 @@ initial begin
@(negedge clk_in);
assert (uut.bus == 8'('haa + 'hbb))
else $error("Expected 0x%02x (from ALU), got 0x%02x on bus", 8'('haa + 'hbb), uut.bus);
+
+ assert (uut.ALU_flags_int.Carry == 1)
+ else $error("Expected carry flag from ALU, got it not.");
+
uut.manual_flags.ALU_out = 0;
uut.manual_flags.PC_out = 1;