Line Coverage for Module :
timer_core
| Line No. | Total | Covered | Percent |
TOTAL | | 10 | 10 | 100.00 |
ALWAYS | 28 | 7 | 7 | 100.00 |
CONT_ASSIGN | 39 | 1 | 1 | 100.00 |
CONT_ASSIGN | 41 | 1 | 1 | 100.00 |
CONT_ASSIGN | 45 | 1 | 1 | 100.00 |
27 always_ff @(posedge clk_i or negedge rst_ni) begin : generate_tick
28 1/1 if (!rst_ni) begin
Tests: T1 T2 T3
29 1/1 tick_count <= 12'h0;
Tests: T1 T2 T3
30 1/1 end else if (!active) begin
Tests: T1 T2 T3
31 1/1 tick_count <= 12'h0;
Tests: T1 T2 T3
32 1/1 end else if (tick_count == prescaler) begin
Tests: T3 T7 T9
33 1/1 tick_count <= 12'h0;
Tests: T3 T7 T9
34 end else begin
35 1/1 tick_count <= tick_count + 1'b1;
Tests: T3 T7 T9
36 end
37 end
38
39 1/1 assign tick = active & (tick_count >= prescaler);
Tests: T1 T2 T3
40
41 1/1 assign mtime_d = mtime + 64'(step);
Tests: T1 T2 T3
42
43 // interrupt is generated if mtime is greater than or equal to mtimecmp
44 for (genvar t = 0 ; t < N ; t++) begin : gen_intr
45 1/1 assign intr[t] = active & (mtime >= mtimecmp[t]);
Tests: T1 T2 T3
Cond Coverage for Module :
timer_core
| Total | Covered | Percent |
Conditions | 8 | 8 | 100.00 |
Logical | 8 | 8 | 100.00 |
Non-Logical | 0 | 0 | |
Event | 0 | 0 | |
LINE 32
EXPRESSION (tick_count == prescaler)
------------1------------
-1- | Status | Tests |
0 | Covered | T3,T7,T9 |
1 | Covered | T3,T7,T9 |
LINE 39
EXPRESSION (active & (tick_count >= prescaler))
---1-- ------------2------------
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T2,T3 |
1 | 0 | Covered | T3,T7,T9 |
1 | 1 | Covered | T3,T7,T9 |
LINE 45
EXPRESSION (active & (mtime >= mtimecmp[0]))
---1-- -----------2----------
-1- | -2- | Status | Tests |
0 | 1 | Covered | T1,T7,T9 |
1 | 0 | Covered | T3,T7,T9 |
1 | 1 | Covered | T7,T10,T24 |
Branch Coverage for Module :
timer_core
| Line No. | Total | Covered | Percent |
Branches |
|
4 |
4 |
100.00 |
IF |
28 |
4 |
4 |
100.00 |
28 if (!rst_ni) begin
-1-
29 tick_count <= 12'h0;
==>
30 end else if (!active) begin
-2-
31 tick_count <= 12'h0;
==>
32 end else if (tick_count == prescaler) begin
-3-
33 tick_count <= 12'h0;
==>
34 end else begin
35 tick_count <= tick_count + 1'b1;
==>
Branches:
-1- | -2- | -3- | Status | Tests |
1 |
- |
- |
Covered |
T1,T2,T3 |
0 |
1 |
- |
Covered |
T1,T2,T3 |
0 |
0 |
1 |
Covered |
T3,T7,T9 |
0 |
0 |
0 |
Covered |
T3,T7,T9 |