File tree 1 file changed +10
-9
lines changed
components-and-cores/arithmetic/array-multiplier 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -24,27 +24,28 @@ begin
24
24
while test_suite loop
25
25
if run(" 0_times_0" ) then
26
26
wait for 1 ps ;
27
- check (to_integer (unsigned (result)) = 0 , to_string(result) );
27
+ check_equal (to_integer (unsigned (result)), 0 );
28
28
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))));
35
29
elsif run(" 0_to_15_times_1" ) then
30
+ y <= "0001" ;
36
31
for i in 0 to (2 ** x'length )- 1 loop
37
32
x <= std_logic_vector (to_unsigned (i, x'length ));
38
33
wait for 1 ps ;
39
34
40
- check (to_integer (unsigned (result)) = i, to_string(result) );
35
+ check_equal (to_integer (unsigned (result)), i );
41
36
end loop ;
42
37
elsif run(" 5_times_5" ) then
43
38
x <= "0101" ;
44
39
y <= "0101" ;
45
40
wait for 1 ps ;
46
41
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 );
48
49
end if ;
49
50
end loop ;
50
51
test_runner_cleanup(runner);
You can’t perform that action at this time.
0 commit comments