Skip to content

Commit 11696aa

Browse files
committed
array multiplier working
1 parent 62f9155 commit 11696aa

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

components-and-cores/arithmetic/array-multiplier/array_multiplier_tb.vhd

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,28 @@ begin
2424
while test_suite loop
2525
if run("0_times_0") then
2626
wait for 1 ps;
27-
check(to_integer(unsigned(result)) = 0, to_string(result));
27+
check_equal(to_integer(unsigned(result)), 0);
2828

29-
elsif run("1_times_1") then
30-
x <= "0001";
31-
y <= "0001";
32-
wait for 1 ps;
33-
34-
check(result = "00000001", to_string(to_integer(unsigned(result))));
3529
elsif run("0_to_15_times_1") then
30+
y <= "0001";
3631
for i in 0 to (2**x'length)-1 loop
3732
x <= std_logic_vector(to_unsigned(i, x'length));
3833
wait for 1 ps;
3934

40-
check(to_integer(unsigned(result)) = i, to_string(result));
35+
check_equal(to_integer(unsigned(result)), i);
4136
end loop;
4237
elsif run("5_times_5") then
4338
x <= "0101";
4439
y <= "0101";
4540
wait for 1 ps;
4641

47-
check(result = "00011001", to_string(to_integer(unsigned(result))));
42+
check_equal(to_integer(unsigned(result)), 25);
43+
elsif run("16_times_16") then
44+
x <= "1111";
45+
y <= "1111";
46+
wait for 1 ps;
47+
48+
check_equal(to_integer(unsigned(result)), 225);
4849
end if;
4950
end loop;
5051
test_runner_cleanup(runner);

0 commit comments

Comments
 (0)