Directory:  generated/vunit_out/preprocessed/ 

File:  generated/vunit_out/preprocessed/math/tb_math_pkg.vhd 
Date:  20210726 04:08:16 
Exec  Total  Coverage  

Lines:  104  104  100.0% 
Branches:  298  426  70.0% 
Line  Branch  Exec  Source 

1  78     
2   Copyright (c) Lukas Vik. All rights reserved.  
3    
4   This file is part of the tsfpga project.  
5   https://tsfpga.com  
6   https://gitlab.com/tsfpga/tsfpga  
7     
8  
9  library ieee;  
10  use ieee.std_logic_1164.all;  
11  use ieee.numeric_std.all;  
12  
13  library vunit_lib;  
14  context vunit_lib.vunit_context;  
15  
16  use work.math_pkg.all;  
17  
18  
19 
28/56✓ Branch 0 taken 13 times.
✗ Branch 1 not taken.
✓ Branch 3 taken 13 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 13 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 13 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 13 times.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✓ Branch 16 taken 13 times.
✗ Branch 18 not taken.
✓ Branch 19 taken 13 times.
✓ Branch 21 taken 13 times.
✗ Branch 22 not taken.
✗ Branch 24 not taken.
✓ Branch 25 taken 13 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 13 times.
✓ Branch 30 taken 13 times.
✗ Branch 31 not taken.
✓ Branch 33 taken 13 times.
✗ Branch 34 not taken.
✓ Branch 36 taken 13 times.
✗ Branch 37 not taken.
✓ Branch 39 taken 13 times.
✗ Branch 40 not taken.
✓ Branch 42 taken 13 times.
✗ Branch 43 not taken.
✗ Branch 45 not taken.
✓ Branch 46 taken 13 times.
✗ Branch 48 not taken.
✓ Branch 49 taken 13 times.
✗ Branch 51 not taken.
✓ Branch 52 taken 13 times.
✗ Branch 54 not taken.
✓ Branch 55 taken 13 times.
✓ Branch 57 taken 13 times.
✗ Branch 58 not taken.
✗ Branch 60 not taken.
✓ Branch 61 taken 13 times.
✓ Branch 63 taken 13 times.
✗ Branch 64 not taken.
✓ Branch 66 taken 13 times.
✗ Branch 67 not taken.
✓ Branch 69 taken 13 times.
✗ Branch 70 not taken.
✓ Branch 72 taken 13 times.
✗ Branch 73 not taken.
✓ Branch 75 taken 13 times.
✗ Branch 76 not taken.
✓ Branch 78 taken 13 times.
✗ Branch 79 not taken.
✓ Branch 81 taken 13 times.
✗ Branch 82 not taken.

866  entity tb_math_pkg is 
20  generic (  
21  runner_cfg : string  
22  );  
23  end entity;  
24  
25  26  architecture tb of tb_math_pkg is  
26  
27   This function calculates the number of bits pars that differs  
28   in the two input vectors.  
29  function hamming_distance(in1, in2 : std_logic_vector) return integer is  
30  6858  variable tmp : std_logic_vector(in1'range);  
31  762  variable ret : integer := 0;  
32  begin  
33  762  tmp := in1 xor in2;  
34  762  for i in tmp'range loop  
35  6096  if tmp(i) = '1' then  
36  6096  ret := ret + 1;  
37  end if;  
38  end loop;  
39 
144/146✓ Branch 0 taken 13 times.
✓ Branch 1 taken 26 times.
✓ Branch 2 taken 13 times.
✓ Branch 3 taken 1 times.
✓ Branch 4 taken 1 times.
✓ Branch 5 taken 1 times.
✓ Branch 6 taken 1 times.
✓ Branch 7 taken 1 times.
✓ Branch 8 taken 1 times.
✓ Branch 9 taken 1 times.
✓ Branch 10 taken 1 times.
✓ Branch 11 taken 1 times.
✓ Branch 12 taken 1 times.
✓ Branch 13 taken 1 times.
✓ Branch 14 taken 1 times.
✓ Branch 15 taken 1 times.
✓ Branch 16 taken 1 times.
✓ Branch 17 taken 1 times.
✓ Branch 18 taken 1 times.
✓ Branch 19 taken 1 times.
✓ Branch 20 taken 1 times.
✓ Branch 21 taken 1 times.
✓ Branch 22 taken 1 times.
✓ Branch 23 taken 1 times.
✓ Branch 24 taken 1 times.
✓ Branch 25 taken 1 times.
✓ Branch 26 taken 1 times.
✓ Branch 27 taken 1 times.
✓ Branch 28 taken 1 times.
✓ Branch 29 taken 1 times.
✓ Branch 30 taken 1 times.
✓ Branch 31 taken 1 times.
✓ Branch 32 taken 1 times.
✓ Branch 33 taken 1 times.
✓ Branch 34 taken 1 times.
✓ Branch 35 taken 1 times.
✓ Branch 36 taken 1 times.
✓ Branch 37 taken 1 times.
✓ Branch 38 taken 1 times.
✓ Branch 39 taken 1 times.
✓ Branch 40 taken 1 times.
✓ Branch 41 taken 1 times.
✓ Branch 42 taken 1 times.
✓ Branch 43 taken 1 times.
✓ Branch 44 taken 1 times.
✓ Branch 45 taken 1 times.
✓ Branch 46 taken 1 times.
✓ Branch 47 taken 1 times.
✓ Branch 48 taken 1 times.
✓ Branch 49 taken 1 times.
✓ Branch 50 taken 1 times.
✓ Branch 51 taken 1 times.
✓ Branch 52 taken 1 times.
✓ Branch 53 taken 1 times.
✓ Branch 54 taken 1 times.
✓ Branch 55 taken 1 times.
✓ Branch 56 taken 1 times.
✓ Branch 57 taken 1 times.
✓ Branch 58 taken 1 times.
✓ Branch 59 taken 1 times.
✓ Branch 60 taken 1 times.
✓ Branch 61 taken 1 times.
✓ Branch 62 taken 1 times.
✓ Branch 63 taken 1 times.
✓ Branch 64 taken 1 times.
✓ Branch 65 taken 1 times.
✓ Branch 66 taken 1 times.
✓ Branch 67 taken 1 times.
✓ Branch 68 taken 1 times.
✓ Branch 69 taken 1 times.
✓ Branch 70 taken 1 times.
✓ Branch 71 taken 1 times.
✓ Branch 72 taken 1 times.
✓ Branch 73 taken 1 times.
✓ Branch 74 taken 1 times.
✓ Branch 75 taken 1 times.
✓ Branch 76 taken 1 times.
✓ Branch 77 taken 1 times.
✓ Branch 78 taken 1 times.
✓ Branch 79 taken 1 times.
✓ Branch 80 taken 1 times.
✓ Branch 81 taken 1 times.
✓ Branch 82 taken 1 times.
✓ Branch 83 taken 1 times.
✓ Branch 84 taken 1 times.
✓ Branch 85 taken 1 times.
✓ Branch 86 taken 1 times.
✓ Branch 87 taken 1 times.
✓ Branch 88 taken 1 times.
✓ Branch 89 taken 1 times.
✓ Branch 90 taken 1 times.
✓ Branch 91 taken 254 times.
✓ Branch 92 taken 254 times.
✓ Branch 93 taken 254 times.
✓ Branch 94 taken 254 times.
✓ Branch 95 taken 254 times.
✓ Branch 96 taken 254 times.
✓ Branch 97 taken 254 times.
✓ Branch 98 taken 254 times.
✓ Branch 99 taken 254 times.
✓ Branch 100 taken 254 times.
✓ Branch 101 taken 1 times.
✓ Branch 102 taken 1 times.
✓ Branch 103 taken 1 times.
✓ Branch 104 taken 1 times.
✓ Branch 105 taken 1 times.
✓ Branch 106 taken 1 times.
✓ Branch 107 taken 1 times.
✓ Branch 108 taken 1 times.
✓ Branch 109 taken 1 times.
✓ Branch 110 taken 1 times.
✓ Branch 111 taken 1 times.
✓ Branch 112 taken 1 times.
✓ Branch 113 taken 1 times.
✓ Branch 114 taken 4 times.
✓ Branch 115 taken 4 times.
✓ Branch 116 taken 4 times.
✓ Branch 117 taken 4 times.
✓ Branch 118 taken 1 times.
✓ Branch 119 taken 1 times.
✓ Branch 120 taken 1 times.
✓ Branch 121 taken 1 times.
✓ Branch 122 taken 1 times.
✓ Branch 123 taken 1 times.
✓ Branch 124 taken 1 times.
✓ Branch 125 taken 1 times.
✓ Branch 126 taken 1 times.
✓ Branch 127 taken 1 times.
✓ Branch 128 taken 1 times.
✓ Branch 129 taken 1 times.
✓ Branch 130 taken 1 times.
✓ Branch 131 taken 1 times.
✓ Branch 132 taken 1 times.
✓ Branch 133 taken 1 times.
✓ Branch 134 taken 1 times.
✓ Branch 135 taken 1 times.
✓ Branch 136 taken 1 times.
✓ Branch 137 taken 1 times.
✓ Branch 138 taken 1 times.
✓ Branch 139 taken 1 times.
✓ Branch 140 taken 1 times.
✓ Branch 141 taken 1 times.
✓ Branch 142 taken 13 times.
✓ Branch 143 taken 13 times.
✗ Branch 144 not taken.
✗ Branch 145 not taken.

3521  return ret; 
40  end function;  
41  begin  
42  
43  13  main : process  
44  78  variable value : signed(5  1 downto 0);  
45  117  variable value_slv : unsigned(8  1 downto 0);  
46  constant some_integer_vector : integer_vector(0 to 3) := (1, 4, 0, 7);  
47  117  variable abs_vector_output : integer_vector(0 to 3);  
48  begin  
49 
2/2✓ Branch 2 taken 13 times.
✓ Branch 3 taken 13 times.

39  test_runner_setup(runner, runner_cfg); 
50  
51 
2/2✓ Branch 1 taken 1 times.
✓ Branch 2 taken 12 times.

13  if run("ceil_log2") then 
52 
1/2✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.

2  check_equal(ceil_log2(1), 0, line_num => 52, file_name => "tb_math_pkg.vhd"); 
53  
54 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(ceil_log2(2), 1, line_num => 54, file_name => "tb_math_pkg.vhd"); 
55  
56 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(ceil_log2(3), 2, line_num => 56, file_name => "tb_math_pkg.vhd"); 
57 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(ceil_log2(4), 2, line_num => 57, file_name => "tb_math_pkg.vhd"); 
58  
59 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(ceil_log2(5), 3, line_num => 59, file_name => "tb_math_pkg.vhd"); 
60 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(ceil_log2(7), 3, line_num => 60, file_name => "tb_math_pkg.vhd"); 
61 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(ceil_log2(8), 3, line_num => 61, file_name => "tb_math_pkg.vhd"); 
62  
63 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

3  check_equal(ceil_log2(9), 4, line_num => 63, file_name => "tb_math_pkg.vhd"); 
64  
65 
2/2✓ Branch 1 taken 1 times.
✓ Branch 2 taken 11 times.

12  elsif run("log2") then 
66 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(log2(1), 0, line_num => 66, file_name => "tb_math_pkg.vhd"); 
67 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(log2(2), 1, line_num => 67, file_name => "tb_math_pkg.vhd"); 
68 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(log2(32), 5, line_num => 68, file_name => "tb_math_pkg.vhd"); 
69 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(log2(64), 6, line_num => 69, file_name => "tb_math_pkg.vhd"); 
70 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

3  check_equal(log2(128), 7, line_num => 70, file_name => "tb_math_pkg.vhd"); 
71  
72 
2/2✓ Branch 1 taken 1 times.
✓ Branch 2 taken 10 times.

11  elsif run("num_bits_needed_int") then 
73 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(num_bits_needed(0), 1, line_num => 73, file_name => "tb_math_pkg.vhd"); 
74 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(num_bits_needed(1), 1, line_num => 74, file_name => "tb_math_pkg.vhd"); 
75 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(num_bits_needed(2), 2, line_num => 75, file_name => "tb_math_pkg.vhd"); 
76 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(num_bits_needed(3), 2, line_num => 76, file_name => "tb_math_pkg.vhd"); 
77  
78 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(num_bits_needed(6), 3, line_num => 78, file_name => "tb_math_pkg.vhd"); 
79 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(num_bits_needed(7), 3, line_num => 79, file_name => "tb_math_pkg.vhd"); 
80 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(num_bits_needed(8), 4, line_num => 80, file_name => "tb_math_pkg.vhd"); 
81 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

3  check_equal(num_bits_needed(9), 4, line_num => 81, file_name => "tb_math_pkg.vhd"); 
82  
83 
2/2✓ Branch 1 taken 1 times.
✓ Branch 2 taken 9 times.

10  elsif run("round_up_to_power_of_two") then 
84 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(round_up_to_power_of_two(1), 1, line_num => 84, file_name => "tb_math_pkg.vhd"); 
85  
86 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(round_up_to_power_of_two(2), 2, line_num => 86, file_name => "tb_math_pkg.vhd"); 
87  
88 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(round_up_to_power_of_two(3), 4, line_num => 88, file_name => "tb_math_pkg.vhd"); 
89 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(round_up_to_power_of_two(4), 4, line_num => 89, file_name => "tb_math_pkg.vhd"); 
90  
91 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(round_up_to_power_of_two(5), 8, line_num => 91, file_name => "tb_math_pkg.vhd"); 
92  
93 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(round_up_to_power_of_two(127), 128, line_num => 93, file_name => "tb_math_pkg.vhd"); 
94 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(round_up_to_power_of_two(128), 128, line_num => 94, file_name => "tb_math_pkg.vhd"); 
95 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

3  check_equal(round_up_to_power_of_two(129), 256, line_num => 95, file_name => "tb_math_pkg.vhd"); 
96  
97 
2/2✓ Branch 1 taken 1 times.
✓ Branch 2 taken 8 times.

9  elsif run("num_bits_needed_vector") then 
98  1  value_slv := "00000000";  
99 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(num_bits_needed(value_slv), 1, line_num => 99, file_name => "tb_math_pkg.vhd"); 
100  
101  1  value_slv := "00000001";  
102 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(num_bits_needed(value_slv), 1, line_num => 102, file_name => "tb_math_pkg.vhd"); 
103  
104  1  value_slv := "00000010";  
105 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(num_bits_needed(value_slv), 2, line_num => 105, file_name => "tb_math_pkg.vhd"); 
106  
107  1  value_slv := "00000011";  
108 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(num_bits_needed(value_slv), 2, line_num => 108, file_name => "tb_math_pkg.vhd"); 
109  
110  1  value_slv := "00000100";  
111 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

3  check_equal(num_bits_needed(value_slv), 3, line_num => 111, file_name => "tb_math_pkg.vhd"); 
112  
113 
2/2✓ Branch 1 taken 1 times.
✓ Branch 2 taken 7 times.

8  elsif run("lt_0") then 
114 
1/2✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.

1  value := to_signed(3, value'length); 
115 
3/6✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 1 times.

2  check_true(lt_0(value), line_num => 115, file_name => "tb_math_pkg.vhd"); 
116 
1/2✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.

1  value := to_signed(0, value'length); 
117 
3/6✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 1 times.

2  check_false(lt_0(value), line_num => 117, file_name => "tb_math_pkg.vhd"); 
118 
1/2✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.

1  value := to_signed(3, value'length); 
119 
3/6✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 1 times.

3  check_false(lt_0(value), line_num => 119, file_name => "tb_math_pkg.vhd"); 
120  
121 
2/2✓ Branch 1 taken 1 times.
✓ Branch 2 taken 6 times.

7  elsif run("geq_0") then 
122 
1/2✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.

1  value := to_signed(3, value'length); 
123 
3/6✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 1 times.

2  check_false(geq_0(value), line_num => 123, file_name => "tb_math_pkg.vhd"); 
124 
1/2✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.

1  value := to_signed(0, value'length); 
125 
3/6✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 1 times.

2  check_true(geq_0(value), line_num => 125, file_name => "tb_math_pkg.vhd"); 
126 
1/2✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.

1  value := to_signed(3, value'length); 
127 
3/6✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 1 times.

3  check_true(geq_0(value), line_num => 127, file_name => "tb_math_pkg.vhd"); 
128  
129 
2/2✓ Branch 1 taken 1 times.
✓ Branch 2 taken 5 times.

6  elsif run("to_and_from_gray") then 
130 
1/2✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.

1  for i in 1 to 2 ** value_slv'length  2 loop 
131 
2/4✗ Branch 1 not taken.
✓ Branch 2 taken 254 times.
✓ Branch 5 taken 254 times.
✗ Branch 6 not taken.

254  value_slv := to_unsigned(i, value_slv'length); 
132 
1/2✗ Branch 5 not taken.
✓ Branch 6 taken 254 times.

508  check_equal(from_gray(to_gray(value_slv)), value_slv, line_num => 132, file_name => "tb_math_pkg.vhd"); 
133   Verify that only one bit changes when incrementing the input  
134   to to_gray  
135 
1/2✗ Branch 6 not taken.
✓ Branch 7 taken 254 times.

508  check_equal(hamming_distance(to_gray(value_slv), to_gray(value_slv + 1)), 1, line_num => 135, file_name => "tb_math_pkg.vhd"); 
136 
1/2✗ Branch 6 not taken.
✓ Branch 7 taken 254 times.

508  check_equal(hamming_distance(to_gray(value_slv  1), to_gray(value_slv)), 1, line_num => 136, file_name => "tb_math_pkg.vhd"); 
137 
3/4✗ Branch 7 not taken.
✓ Branch 8 taken 254 times.
✓ Branch 10 taken 1 times.
✓ Branch 11 taken 253 times.

1017  check_equal(hamming_distance(to_gray(value_slv  1), to_gray(value_slv + 1)), 2, line_num => 137, file_name => "tb_math_pkg.vhd"); 
138  end loop;  
139  
140 
2/2✓ Branch 1 taken 1 times.
✓ Branch 2 taken 4 times.

5  elsif run("is_power_of_two") then 
141 
3/6✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 1 times.

2  check_true(is_power_of_two(2), line_num => 141, file_name => "tb_math_pkg.vhd"); 
142 
3/6✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 1 times.

2  check_true(is_power_of_two(4), line_num => 142, file_name => "tb_math_pkg.vhd"); 
143 
3/6✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 1 times.

2  check_true(is_power_of_two(16), line_num => 143, file_name => "tb_math_pkg.vhd"); 
144  
145 
3/6✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 1 times.

2  check_false(is_power_of_two(15), line_num => 145, file_name => "tb_math_pkg.vhd"); 
146 
3/6✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 1 times.

3  check_false(is_power_of_two(17), line_num => 146, file_name => "tb_math_pkg.vhd"); 
147  
148 
2/2✓ Branch 1 taken 1 times.
✓ Branch 2 taken 3 times.

4  elsif run("abs_vector") then 
149 
1/2✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.

1  abs_vector_output := abs_vector(some_integer_vector); 
150 
1/2✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.

1  for idx in some_integer_vector'range loop 
151 
5/8✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 4 times.
✓ Branch 11 taken 1 times.
✓ Branch 12 taken 3 times.

17  check_equal(abs_vector_output(idx), abs(some_integer_vector(idx)), line_num => 151, file_name => "tb_math_pkg.vhd"); 
152  end loop;  
153  
154 
2/2✓ Branch 1 taken 1 times.
✓ Branch 2 taken 2 times.

3  elsif run("vector_sum") then 
155 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(vector_sum((0, 1, 4)), 3, line_num => 155, file_name => "tb_math_pkg.vhd"); 
156 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

3  check_equal(vector_sum((4, 1, 3)), 8, line_num => 156, file_name => "tb_math_pkg.vhd"); 
157  
158 
2/2✓ Branch 1 taken 1 times.
✓ Branch 2 taken 1 times.

2  elsif run("greatest_common_divisor") then 
159 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(greatest_common_divisor(6, 3), 3, line_num => 159, file_name => "tb_math_pkg.vhd"); 
160 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(greatest_common_divisor(7, 3), 1, line_num => 160, file_name => "tb_math_pkg.vhd"); 
161 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(greatest_common_divisor(7, 1), 1, line_num => 161, file_name => "tb_math_pkg.vhd"); 
162 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

3  check_equal(greatest_common_divisor(8, 15), 1, line_num => 162, file_name => "tb_math_pkg.vhd"); 
163  
164 
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.

14  elsif run("is_mutual_prime") then 
165 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(is_mutual_prime(6, (3, 7)), false, line_num => 165, file_name => "tb_math_pkg.vhd"); 
166 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(is_mutual_prime(7, (3, 6)), true, line_num => 166, file_name => "tb_math_pkg.vhd"); 
167 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

2  check_equal(is_mutual_prime(7, (1, 5)), true, line_num => 167, file_name => "tb_math_pkg.vhd"); 
168 
1/2✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.

3  check_equal(is_mutual_prime(8, (3, 7)), true, line_num => 168, file_name => "tb_math_pkg.vhd"); 
169  end if;  
170  
171 
0/2✗ Branch 3 not taken.
✗ Branch 4 not taken.

2759  test_runner_cleanup(runner); 
172  end process;  
173  
174  end architecture;  
175 