Module Definition
dashboard | hierarchy | modlist | groups | tests | asserts

Module : spi_s2p
SCORELINECONDTOGGLEFSMBRANCHASSERT
89.38 100.00 78.57 78.95 100.00

Source File(s) :
/workspaces/repo/scratch/os_regression_2024_09_08/spi_device_1r1w-sim-vcs/default/sim-vcs/../src/lowrisc_ip_spi_device_0.1/rtl/spi_s2p.sv

Module self-instances :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
tb.dut.u_s2p 89.38 100.00 78.57 78.95 100.00



Module Instance : tb.dut.u_s2p

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
89.38 100.00 78.57 78.95 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
89.38 100.00 78.57 78.95 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
90.46 95.20 84.31 86.70 90.62 95.45 dut


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
no children


Since this is the module's only instance, the coverage report is the same as for the module.
Line Coverage for Module : spi_s2p
Line No.TotalCoveredPercent
TOTAL2020100.00
ALWAYS4344100.00
ALWAYS6333100.00
CONT_ASSIGN7111100.00
ALWAYS7588100.00
ALWAYS9144100.00

42 always_comb begin 43 1/1 unique case (io_mode_i) Tests: T1 T2 T3  44 SingleIO: begin 45 1/1 data_d = (order_i) ? {s_i[0], data_q[7:1]} : {data_q[6:0], s_i[0]}; Tests: T1 T2 T3  46 end 47 48 DualIO: begin 49 1/1 data_d = (order_i) ? {s_i[1:0], data_q[7:2]} : {data_q[5:0], s_i[1:0]}; Tests: T1 T2 T3  50 end 51 52 QuadIO: begin 53 1/1 data_d = (order_i) ? {s_i[3:0], data_q[7:4]} : {data_q[3:0], s_i[3:0]}; Tests: T1 T2 T3  54 end 55 56 default: begin 57 data_d = data_q; 58 end 59 endcase 60 end 61 62 always_ff @(posedge clk_i or negedge rst_ni) begin 63 1/1 if (!rst_ni) begin Tests: T1 T2 T3  64 1/1 data_q <= '0; Tests: T1 T2 T3  65 end else begin 66 1/1 data_q <= data_d; Tests: T1 T3 T5  67 end 68 end 69 70 // send un-latched data 71 1/1 assign data_o = data_d; Tests: T1 T2 T3  72 73 // Bitcount in a byte 74 always_ff @(posedge clk_i or negedge rst_ni) begin 75 1/1 if (!rst_ni) begin Tests: T1 T2 T3  76 1/1 cnt <= count_t'(Bits-1); Tests: T1 T2 T3  77 1/1 end else if (cnt == '0) begin Tests: T1 T3 T5  78 1/1 cnt <= count_t'(Bits-1); Tests: T1 T3 T5  79 end else begin 80 1/1 unique case (io_mode_i) Tests: T1 T3 T5  81 1/1 SingleIO: cnt <= cnt - count_t'('h1); Tests: T1 T3 T5  82 1/1 DualIO: cnt <= cnt - count_t'('h2); Tests: T7 T10 T12  83 1/1 QuadIO: cnt <= cnt - count_t'('h4); Tests: T8 T11 T13  84 default: cnt <= cnt; 85 endcase 86 end 87 end 88 89 // data valid 90 always_comb begin 91 1/1 unique case (io_mode_i) Tests: T1 T2 T3  92 1/1 SingleIO: data_valid_o = (cnt == 'h0); Tests: T1 T2 T3  93 1/1 DualIO: data_valid_o = (cnt == 'h1); Tests: T1 T2 T3  94 1/1 QuadIO: data_valid_o = (cnt == 'h3); Tests: T1 T2 T3  95 default: data_valid_o = 1'b 0;

Cond Coverage for Module : spi_s2p
TotalCoveredPercent
Conditions141178.57
Logical141178.57
Non-Logical00
Event00

 LINE       45
 EXPRESSION (order_i ? ({s_i[0], data_q[7:1]}) : ({data_q[6:0], s_i[0]}))
             ---1---
-1-StatusTests
0CoveredT1,T2,T3
1Not Covered

 LINE       49
 EXPRESSION (order_i ? ({s_i[1:0], data_q[7:2]}) : ({data_q[5:0], s_i[1:0]}))
             ---1---
-1-StatusTests
0CoveredT1,T2,T3
1Not Covered

 LINE       53
 EXPRESSION (order_i ? ({s_i[3:0], data_q[7:4]}) : ({data_q[3:0], s_i[3:0]}))
             ---1---
-1-StatusTests
0CoveredT1,T2,T3
1Not Covered

 LINE       77
 EXPRESSION (cnt == '0)
            -----1-----
-1-StatusTests
0CoveredT1,T3,T5
1CoveredT1,T3,T5

 LINE       92
 EXPRESSION (cnt == 3'b0)
            ------1------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T3,T5

 LINE       93
 EXPRESSION (cnt == 3'b1)
            ------1------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT7,T10,T12

 LINE       94
 EXPRESSION (cnt == 3'h3)
            ------1------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT8,T11,T13

Branch Coverage for Module : spi_s2p
Line No.TotalCoveredPercent
Branches 19 15 78.95
CASE 43 7 4 57.14
IF 63 2 2 100.00
IF 75 6 5 83.33
CASE 91 4 4 100.00


43 unique case (io_mode_i) -1- 44 SingleIO: begin 45 data_d = (order_i) ? {s_i[0], data_q[7:1]} : {data_q[6:0], s_i[0]}; -2- ==> ==> 46 end 47 48 DualIO: begin 49 data_d = (order_i) ? {s_i[1:0], data_q[7:2]} : {data_q[5:0], s_i[1:0]}; -3- ==> ==> 50 end 51 52 QuadIO: begin 53 data_d = (order_i) ? {s_i[3:0], data_q[7:4]} : {data_q[3:0], s_i[3:0]}; -4- ==> ==> 54 end 55 56 default: begin 57 data_d = data_q; ==>

Branches:
-1--2--3--4-StatusTests
SingleIO 1 - - Not Covered
SingleIO 0 - - Covered T1,T2,T3
DualIO - 1 - Not Covered
DualIO - 0 - Covered T1,T2,T3
QuadIO - - 1 Not Covered
QuadIO - - 0 Covered T1,T2,T3
default - - - Covered T1,T2,T3


63 if (!rst_ni) begin -1- 64 data_q <= '0; ==> 65 end else begin 66 data_q <= data_d; ==>

Branches:
-1-StatusTests
1 Covered T1,T2,T3
0 Covered T1,T3,T5


75 if (!rst_ni) begin -1- 76 cnt <= count_t'(Bits-1); ==> 77 end else if (cnt == '0) begin -2- 78 cnt <= count_t'(Bits-1); ==> 79 end else begin 80 unique case (io_mode_i) -3- 81 SingleIO: cnt <= cnt - count_t'('h1); ==> 82 DualIO: cnt <= cnt - count_t'('h2); ==> 83 QuadIO: cnt <= cnt - count_t'('h4); ==> 84 default: cnt <= cnt; ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T1,T3,T5
0 0 SingleIO Covered T1,T3,T5
0 0 DualIO Covered T7,T10,T12
0 0 QuadIO Covered T8,T11,T13
0 0 default Not Covered


91 unique case (io_mode_i) -1- 92 SingleIO: data_valid_o = (cnt == 'h0); ==> 93 DualIO: data_valid_o = (cnt == 'h1); ==> 94 QuadIO: data_valid_o = (cnt == 'h3); ==> 95 default: data_valid_o = 1'b 0; ==>

Branches:
-1-StatusTests
SingleIO Covered T1,T2,T3
DualIO Covered T1,T2,T3
QuadIO Covered T1,T2,T3
default Covered T1,T2,T3


Assert Coverage for Module : spi_s2p
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 1 1 100.00 1 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 1 1 100.00 1 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
IoModeDefault_A 146443726 19728 0 0


IoModeDefault_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 146443726 19728 0 0
T1 28040 3 0 0
T3 12138 1 0 0
T4 10704 0 0 0
T5 11561 2 0 0
T6 164371 0 0 0
T7 38338 1 0 0
T8 11192 1 0 0
T9 8288 1 0 0
T10 16256 1 0 0
T11 8976 1 0 0
T12 0 3 0 0
T13 0 3 0 0

0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%