Add more overflow ADD and SUB tests

This commit is contained in:
Max Braungardt 2018-04-26 20:10:36 +02:00
parent a1bebb977e
commit c1e2d4f4e1

View File

@ -126,6 +126,13 @@ begin
wait for period; wait for period;
assert result = "0111110110011101" report "ADD failed"; assert result = "0111110110011101" report "ADD failed";
info("ADD-O");
accu <= "1111111111111111";
ram <= "0000000000000001"; carry_in <= '0';
func <= "0011";
wait for period;
assert result = "0000000000000000" report "ADD-O failed";
info("SUB"); info("SUB");
accu <= "0100010000110011"; accu <= "0100010000110011";
ram <= "0011100000101010"; carry_in <= '0'; ram <= "0011100000101010"; carry_in <= '0';
@ -133,6 +140,13 @@ begin
wait for period; wait for period;
assert result = "0000110000001001" report "SUB failed"; assert result = "0000110000001001" report "SUB failed";
info("SUB-O");
accu <= "0000000000000000";
ram <= "0000000000000001"; carry_in <= '0';
func <= "0100";
wait for period;
assert result = "1111111111111111" report "SUB-O failed";
info("SUB-B"); info("SUB-B");
accu <= "0100010010110011"; accu <= "0100010010110011";
ram <= "0011100011101010"; carry_in <= '0'; ram <= "0011100011101010"; carry_in <= '0';