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



Module Instance : tb.dut.u_spi_tpm

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
95.79 99.29 91.20 91.67 96.77 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
92.87 99.28 85.25 91.67 95.68 92.45


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
92.52 95.20 84.31 97.00 90.62 95.45 dut


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_arbiter 87.79 100.00 76.47 92.86 81.82
u_cmdaddr_buffer 92.67 100.00 76.92 93.75 100.00
u_csb_sync_rst 100.00 100.00 100.00 100.00
u_hw_reg_slice 100.00 100.00 100.00
u_rdfifo_ready 100.00 100.00 100.00
u_sram_fifo 89.23 95.00 78.57 83.33 100.00
u_tpm_rd_buffer 89.74 100.00 69.23 100.00
u_tpm_wr_buffer 96.15 100.00 84.62 100.00 100.00
u_wrfifo_busy_sync 100.00 100.00 100.00
u_wrfifo_release_reqack 87.50 100.00 50.00 100.00 100.00


Since this is the module's only instance, the coverage report is the same as for the module.
Line Coverage for Module : spi_tpm
Line No.TotalCoveredPercent
TOTAL28228099.29
CONT_ASSIGN33511100.00
CONT_ASSIGN34911100.00
CONT_ASSIGN37411100.00
CONT_ASSIGN49211100.00
CONT_ASSIGN49311100.00
CONT_ASSIGN52111100.00
ALWAYS52588100.00
ALWAYS54233100.00
ALWAYS55544100.00
CONT_ASSIGN56411100.00
CONT_ASSIGN56611100.00
CONT_ASSIGN59111100.00
ALWAYS59433100.00
ALWAYS60244100.00
ALWAYS61033100.00
ALWAYS62066100.00
CONT_ASSIGN63711100.00
CONT_ASSIGN64411100.00
ALWAYS64844100.00
CONT_ASSIGN65511100.00
ALWAYS65844100.00
CONT_ASSIGN66511100.00
CONT_ASSIGN66711100.00
CONT_ASSIGN68011100.00
ALWAYS68366100.00
CONT_ASSIGN70611100.00
ALWAYS70966100.00
ALWAYS72144100.00
ALWAYS74333100.00
ALWAYS75133100.00
ALWAYS76366100.00
ALWAYS78066100.00
ALWAYS79633100.00
ALWAYS80266100.00
ALWAYS81344100.00
ALWAYS82344100.00
ALWAYS83244100.00
CONT_ASSIGN83911100.00
CONT_ASSIGN84011100.00
ALWAYS85266100.00
ALWAYS86366100.00
ALWAYS87333100.00
ALWAYS89377100.00
ALWAYS9351515100.00
ALWAYS101233100.00
CONT_ASSIGN102111100.00
ALWAYS102433100.00
CONT_ASSIGN104411100.00
CONT_ASSIGN104511100.00
CONT_ASSIGN104911100.00
ALWAYS105233100.00
ALWAYS106444100.00
CONT_ASSIGN107311100.00
ALWAYS109533100.00
ALWAYS1123727198.61
CONT_ASSIGN137311100.00
CONT_ASSIGN137511100.00
ALWAYS138266100.00
ALWAYS139488100.00
ALWAYS140966100.00
CONT_ASSIGN142511100.00
CONT_ASSIGN1428100.00
CONT_ASSIGN145911100.00
CONT_ASSIGN146511100.00
ALWAYS147066100.00
ALWAYS148044100.00
CONT_ASSIGN148911100.00
CONT_ASSIGN149011100.00
CONT_ASSIGN152211100.00
CONT_ASSIGN155611100.00

Click here to see the source line report.

Cond Coverage for Module : spi_tpm
TotalCoveredPercent
Conditions21619791.20
Logical21619791.20
Non-Logical00
Event00

 LINE       564
 EXPRESSION ((cmdaddr_bitcnt == 5'b0) && (sck_st_q == StIdle))
             ------------1-----------    ----------2---------
-1--2-StatusTests
01CoveredT4,T5,T13
10CoveredT4,T5,T13
11CoveredT1,T2,T3

 LINE       564
 SUB-EXPRESSION (cmdaddr_bitcnt == 5'b0)
                ------------1-----------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       564
 SUB-EXPRESSION (sck_st_q == StIdle)
                ----------1---------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       566
 EXPRESSION (cmdaddr_bitcnt == 5'h1d)
            ------------1------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT4,T5,T13

 LINE       591
 EXPRESSION (cmdaddr_bitcnt == 5'h1f)
            ------------1------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT4,T5,T13

 LINE       644
 EXPRESSION (isck_p2s_sent && (isck_data_sel == SelHwReg))
             ------1------    -------------2-------------
-1--2-StatusTests
01CoveredT4,T13,T19
10CoveredT4,T5,T13
11CoveredT4,T13,T19

 LINE       644
 SUB-EXPRESSION (isck_data_sel == SelHwReg)
                -------------1-------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT4,T13,T19

 LINE       655
 EXPRESSION (wrdata_bitcnt == 3'h7)
            -----------1-----------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT5,T17,T28

 LINE       711
 EXPRESSION (sck_cmdaddr_wvalid && (cmd_type == Write))
             ---------1--------    ---------2---------
-1--2-StatusTests
01CoveredT4,T5,T11
10CoveredT5,T17,T28
11CoveredT5,T17,T28

 LINE       711
 SUB-EXPRESSION (cmd_type == Write)
                ---------1---------
-1-StatusTests
0CoveredT4,T5,T13
1CoveredT4,T5,T11

 LINE       744
 EXPRESSION (check_locality && (sys_clk_tpm_cfg.tpm_reg_chk_dis || (addr[23:16] == TpmAddr)))
             -------1------    ------------------------------2------------------------------
-1--2-StatusTests
01CoveredT4,T5,T13
10CoveredT17,T30,T31
11CoveredT4,T5,T13

 LINE       744
 SUB-EXPRESSION (sys_clk_tpm_cfg.tpm_reg_chk_dis || (addr[23:16] == TpmAddr))
                 ---------------1---------------    ------------2-----------
-1--2-StatusTests
00CoveredT1,T2,T3
01CoveredT4,T13,T19
10CoveredT5,T28,T30

 LINE       744
 SUB-EXPRESSION (addr[23:16] == TpmAddr)
                ------------1-----------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT4,T5,T13

 LINE       766
 EXPRESSION (((!sys_clk_tpm_cfg.tpm_mode)) && check_hw_reg && (cmd_type == Read) && is_tpm_reg_q && ((!invalid_locality)) && ((!sys_clk_tpm_cfg.hw_reg_dis)))
             --------------1--------------    ------2-----    ---------3--------    ------4-----    ----------5----------    ---------------6---------------
-1--2--3--4--5--6-StatusTests
011111CoveredT5,T41,T123
101111CoveredT4,T13,T19
110111CoveredT30,T42,T62
111011CoveredT62,T36,T124
111101CoveredT19,T29,T30
111110CoveredT30,T62,T36
111111CoveredT4,T13,T19

 LINE       766
 SUB-EXPRESSION (cmd_type == Read)
                ---------1--------
-1-StatusTests
0CoveredT4,T5,T13
1CoveredT4,T5,T13

 LINE       784
 EXPRESSION (TpmReturnByHwAddr[i][11:2] == addr[11:2])
            ---------------------1--------------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       805
 EXPRESSION (check_locality && is_tpm_reg_d)
             -------1------    ------2-----
-1--2-StatusTests
01CoveredT4,T5,T13
10CoveredT17,T30,T31
11CoveredT4,T5,T13

 LINE       807
 EXPRESSION ((addr[15:12] < 4'(spi_device_reg_pkg::NumLocality)) ? 1'b0 : 1'b1)
             -------------------------1-------------------------
-1-StatusTests
0CoveredT19,T29,T30
1CoveredT4,T5,T13

 LINE       834
 EXPRESSION ((isck_p2s_sent && sck_rddata_shift_en) || (sck_wrfifo_wvalid && wrdata_shift_en))
             -------------------1------------------    -------------------2------------------
-1--2-StatusTests
00CoveredT4,T5,T13
01CoveredT5,T17,T28
10CoveredT5,T17,T28

 LINE       834
 SUB-EXPRESSION (isck_p2s_sent && sck_rddata_shift_en)
                 ------1------    ---------2---------
-1--2-StatusTests
01CoveredT5,T17,T28
10CoveredT4,T5,T13
11CoveredT5,T17,T28

 LINE       834
 SUB-EXPRESSION (sck_wrfifo_wvalid && wrdata_shift_en)
                 --------1--------    -------2-------
-1--2-StatusTests
01CoveredT5,T17,T28
10Not Covered
11CoveredT5,T17,T28

 LINE       840
 EXPRESSION (xfer_bytes_q == xfer_size)
            -------------1-------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       856
 EXPRESSION (sys_rdfifo_wvalid_i & sys_rdfifo_wready_o)
             ---------1---------   ---------2---------
-1--2-StatusTests
01Not Covered
10Not Covered
11CoveredT5,T17,T28

 LINE       867
 EXPRESSION (sys_cmdaddr_rvalid_o & sys_cmdaddr_rready_i)
             ----------1---------   ----------2---------
-1--2-StatusTests
01Not Covered
10CoveredT5,T17,T28
11CoveredT5,T17,T28

 LINE       940
 EXPRESSION (((!invalid_locality)) && (4'(i) == locality))
             ----------1----------    ---------2---------
-1--2-StatusTests
01Not Covered
10CoveredT1,T2,T3
11CoveredT1,T2,T3

 LINE       940
 SUB-EXPRESSION (4'(i) == locality)
                ---------1---------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       965
 EXPRESSION (((!invalid_locality)) && sys_active_locality[locality[2:0]])
             ----------1----------    -----------------2----------------
-1--2-StatusTests
01Not Covered
10CoveredT13,T19,T27
11CoveredT4,T13,T19

 LINE       1021
 EXPRESSION (isck_p2s_valid && (isck_p2s_bitcnt == '0))
             -------1------    -----------2-----------
-1--2-StatusTests
01CoveredT4,T5,T13
10CoveredT4,T5,T13
11CoveredT4,T5,T13

 LINE       1021
 SUB-EXPRESSION (isck_p2s_bitcnt == '0)
                -----------1-----------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT4,T5,T13

 LINE       1049
 EXPRESSION (isck_p2s_sent && (isck_data_sel == SelRdFifo))
             ------1------    --------------2-------------
-1--2-StatusTests
01CoveredT5,T17,T28
10CoveredT4,T5,T13
11CoveredT5,T17,T28

 LINE       1049
 SUB-EXPRESSION (isck_data_sel == SelRdFifo)
                --------------1-------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT5,T17,T28

 LINE       1073
 EXPRESSION (((&sck_rdfifo_idx)) && (isck_data_sel == SelRdFifo) && sck_p2s_valid && (isck_p2s_bitcnt == 3'b1))
             ---------1---------    --------------2-------------    ------3------    ------------4------------
-1--2--3--4-StatusTests
0111CoveredT5,T17,T28
1011Not Covered
1101Not Covered
1110CoveredT17,T28,T30
1111CoveredT17,T28,T30

 LINE       1073
 SUB-EXPRESSION (isck_data_sel == SelRdFifo)
                --------------1-------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT5,T17,T28

 LINE       1073
 SUB-EXPRESSION (isck_p2s_bitcnt == 3'b1)
                ------------1------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT4,T5,T13

 LINE       1146
 EXPRESSION (cmdaddr_bitcnt == 5'h07)
            ------------1------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT4,T5,T13

 LINE       1174
 EXPRESSION (cmdaddr_bitcnt == 5'h1b)
            ------------1------------
-1-StatusTests
0CoveredT4,T5,T13
1CoveredT4,T5,T13

 LINE       1179
 EXPRESSION ((cmdaddr_bitcnt == 5'h1f) && (cmd_type == Read))
             ------------1------------    ---------2--------
-1--2-StatusTests
01CoveredT4,T5,T13
10CoveredT5,T17,T28
11CoveredT4,T5,T13

 LINE       1179
 SUB-EXPRESSION (cmdaddr_bitcnt == 5'h1f)
                ------------1------------
-1-StatusTests
0CoveredT4,T5,T13
1CoveredT4,T5,T13

 LINE       1179
 SUB-EXPRESSION (cmd_type == Read)
                ---------1--------
-1-StatusTests
0CoveredT5,T17,T28
1CoveredT4,T5,T13

 LINE       1180
 EXPRESSION (((!is_tpm_reg_q)) || sys_clk_tpm_cfg.tpm_mode)
             --------1--------    ------------2-----------
-1--2-StatusTests
00CoveredT4,T13,T19
01CoveredT5,T28,T41
10CoveredT30,T62,T36

 LINE       1188
 EXPRESSION (sck_cmdaddr_wdepth == '0)
            -------------1------------
-1-StatusTests
0CoveredT30,T41,T62
1CoveredT5,T17,T28

 LINE       1195
 EXPRESSION (invalid_locality && sys_clk_tpm_cfg.invalid_locality)
             --------1-------    ----------------2---------------
-1--2-StatusTests
01CoveredT30,T42,T62
10CoveredT30,T62,T36
11CoveredT19,T29,T30

 LINE       1206
 EXPRESSION (sck_cmdaddr_wdepth == '0)
            -------------1------------
-1-StatusTests
0CoveredT30,T62,T36
1CoveredT30,T42,T62

 LINE       1212
 EXPRESSION ((cmdaddr_bitcnt == 5'h1f) && (cmd_type == Write))
             ------------1------------    ---------2---------
-1--2-StatusTests
01CoveredT5,T17,T28
10CoveredT4,T5,T13
11CoveredT5,T17,T28

 LINE       1212
 SUB-EXPRESSION (cmdaddr_bitcnt == 5'h1f)
                ------------1------------
-1-StatusTests
0CoveredT4,T5,T13
1CoveredT4,T5,T13

 LINE       1212
 SUB-EXPRESSION (cmd_type == Write)
                ---------1---------
-1-StatusTests
0CoveredT4,T5,T13
1CoveredT5,T17,T28

 LINE       1213
 EXPRESSION (((!sck_wrfifo_busy)) && ((~|sck_cmdaddr_wdepth)))
             ----------1---------    ------------2-----------
-1--2-StatusTests
01CoveredT62,T123,T125
10CoveredT62,T53,T123
11CoveredT5,T17,T28

 LINE       1229
 EXPRESSION ((cmd_type == Read) && ((!sck_rdfifo_cmd_pending)) && ((~|sck_cmdaddr_wdepth)))
             ---------1--------    -------------2-------------    ------------3-----------
-1--2--3-StatusTests
011CoveredT30,T41,T62
101CoveredT5,T17,T28
110CoveredT30,T41,T62
111CoveredT30,T41,T62

 LINE       1229
 SUB-EXPRESSION (cmd_type == Read)
                ---------1--------
-1-StatusTests
0CoveredT30,T41,T62
1CoveredT5,T17,T28

 LINE       1234
 EXPRESSION (isck_p2s_sent && (((cmd_type == Read) && enough_payload_in_rdfifo) || ((cmd_type == Write) && ((!sck_wrfifo_busy)) && ((~|sck_cmdaddr_wdepth)))))
             ------1------    ---------------------------------------------------------------2---------------------------------------------------------------
-1--2-StatusTests
01CoveredT5,T17,T28
10CoveredT5,T17,T28
11CoveredT5,T17,T28

 LINE       1234
 SUB-EXPRESSION (((cmd_type == Read) && enough_payload_in_rdfifo) || ((cmd_type == Write) && ((!sck_wrfifo_busy)) && ((~|sck_cmdaddr_wdepth))))
                 ------------------------1-----------------------    ------------------------------------2------------------------------------
-1--2-StatusTests
00CoveredT5,T17,T28
01CoveredT30,T41,T62
10CoveredT5,T17,T28

 LINE       1234
 SUB-EXPRESSION ((cmd_type == Read) && enough_payload_in_rdfifo)
                 ---------1--------    ------------2-----------
-1--2-StatusTests
01Not Covered
10CoveredT5,T17,T28
11CoveredT5,T17,T28

 LINE       1234
 SUB-EXPRESSION (cmd_type == Read)
                ---------1--------
-1-StatusTests
0CoveredT30,T41,T62
1CoveredT5,T17,T28

 LINE       1234
 SUB-EXPRESSION ((cmd_type == Write) && ((!sck_wrfifo_busy)) && ((~|sck_cmdaddr_wdepth)))
                 ---------1---------    ----------2---------    ------------3-----------
-1--2--3-StatusTests
011CoveredT5,T17,T28
101CoveredT30,T41,T62
110CoveredT62,T53,T123
111CoveredT30,T41,T62

 LINE       1234
 SUB-EXPRESSION (cmd_type == Write)
                ---------1---------
-1-StatusTests
0CoveredT5,T17,T28
1CoveredT30,T41,T62

 LINE       1247
 EXPRESSION ((cmd_type == Read) && is_hw_reg)
             ---------1--------    ----2----
-1--2-StatusTests
01Not Covered
10CoveredT5,T17,T28
11CoveredT4,T13,T19

 LINE       1247
 SUB-EXPRESSION (cmd_type == Read)
                ---------1--------
-1-StatusTests
0CoveredT5,T17,T28
1CoveredT4,T5,T13

 LINE       1249
 EXPRESSION (cmd_type == Read)
            ---------1--------
-1-StatusTests
0CoveredT5,T17,T28
1CoveredT5,T17,T28

 LINE       1251
 EXPRESSION (cmd_type == Write)
            ---------1---------
-1-StatusTests
0Not Covered
1CoveredT5,T17,T28

 LINE       1263
 EXPRESSION (isck_p2s_sent && xfer_size_met)
             ------1------    ------2------
-1--2-StatusTests
01CoveredT5,T17,T28
10CoveredT5,T17,T28
11CoveredT5,T17,T28

 LINE       1274
 EXPRESSION (isck_p2s_sent && xfer_size_met)
             ------1------    ------2------
-1--2-StatusTests
01CoveredT19,T29,T122
10CoveredT4,T13,T19
11CoveredT19,T29,T122

 LINE       1283
 EXPRESSION (sck_wrfifo_wvalid && xfer_size_met)
             --------1--------    ------2------
-1--2-StatusTests
01CoveredT5,T17,T28
10CoveredT5,T17,T28
11CoveredT5,T17,T28

 LINE       1292
 EXPRESSION (cmd_type == Read)
            ---------1--------
-1-StatusTests
0Not Covered
1CoveredT19,T29,T30

 LINE       1299
 EXPRESSION (cmd_type == Read)
            ---------1--------
-1-StatusTests
0CoveredT5,T17,T28
1CoveredT5,T17,T19

 LINE       1386
 EXPRESSION (sys_cmdaddr.rnw & sys_cmdaddr_rvalid_o & sys_cmdaddr_rready_i)
             -------1-------   ----------2---------   ----------3---------
-1--2--3-StatusTests
011CoveredT5,T17,T28
101Not Covered
110CoveredT5,T17,T28
111CoveredT5,T17,T28

 LINE       1396
 EXPRESSION (cmdaddr_bitcnt == 5'h0f)
            ------------1------------
-1-StatusTests
0CoveredT4,T5,T11
1CoveredT4,T5,T13

 LINE       1401
 EXPRESSION (sck_cmdaddr_wvalid && (cmd_type == Read))
             ---------1--------    ---------2--------
-1--2-StatusTests
01CoveredT4,T5,T13
10CoveredT5,T17,T28
11CoveredT5,T17,T28

 LINE       1401
 SUB-EXPRESSION (cmd_type == Read)
                ---------1--------
-1-StatusTests
0CoveredT4,T5,T11
1CoveredT4,T5,T13

 LINE       1403
 EXPRESSION (isck_p2s_sent && xfer_size_met && (sck_st_q == StReadFifo))
             ------1------    ------2------    ------------3-----------
-1--2--3-StatusTests
011CoveredT5,T17,T28
101CoveredT5,T17,T28
110CoveredT19,T29,T30
111CoveredT5,T17,T28

 LINE       1403
 SUB-EXPRESSION (sck_st_q == StReadFifo)
                ------------1-----------
-1-StatusTests
0CoveredT4,T5,T11
1CoveredT5,T17,T28

 LINE       1411
 EXPRESSION (sys_csb_deasserted_pulse & ((!sys_rdfifo_sync_clr)))
             ------------1-----------   ------------2-----------
-1--2-StatusTests
01CoveredT5,T17,T28
10CoveredT1,T2,T4
11CoveredT5,T17,T28

 LINE       1418
 EXPRESSION (sys_cmdaddr_rvalid_o & sys_cmdaddr_rready_i)
             ----------1---------   ----------2---------
-1--2-StatusTests
01Not Covered
10CoveredT5,T17,T28
11CoveredT5,T17,T28

 LINE       1425
 EXPRESSION (sys_csb_deasserted_pulse & ((!sys_rdfifo_sync_clr)))
             ------------1-----------   ------------2-----------
-1--2-StatusTests
01CoveredT5,T17,T28
10CoveredT1,T2,T4
11CoveredT5,T17,T28

 LINE       1459
 EXPRESSION (sys_rdfifo_wvalid_i & ((!sys_rdfifo_wready_o)))
             ---------1---------   ------------2-----------
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT5,T17,T28
11Not Covered

 LINE       1465
 EXPRESSION (enough_payload_in_rdfifo && ((sck_st_q == StReadFifo) || (sck_st_q == StStartByte)))
             ------------1-----------    ---------------------------2---------------------------
-1--2-StatusTests
01CoveredT4,T5,T13
10CoveredT5,T17,T28
11CoveredT5,T17,T28

 LINE       1465
 SUB-EXPRESSION ((sck_st_q == StReadFifo) || (sck_st_q == StStartByte))
                 ------------1-----------    ------------2------------
-1--2-StatusTests
00CoveredT1,T2,T3
01CoveredT4,T5,T13
10CoveredT5,T17,T28

 LINE       1465
 SUB-EXPRESSION (sck_st_q == StReadFifo)
                ------------1-----------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT5,T17,T28

 LINE       1465
 SUB-EXPRESSION (sck_st_q == StStartByte)
                ------------1------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT4,T5,T13

 LINE       1472
 EXPRESSION (sck_sram_req[SramRdFifo] & sck_sram_gnt[SramRdFifo])
             ------------1-----------   ------------2-----------
-1--2-StatusTests
01Not Covered
10Not Covered
11CoveredT5,T17,T28

 LINE       1482
 EXPRESSION (sck_sram_req[SramRdFifo] & sck_sram_gnt[SramRdFifo])
             ------------1-----------   ------------2-----------
-1--2-StatusTests
01Not Covered
10Not Covered
11CoveredT5,T17,T28

 LINE       1489
 EXPRESSION (rdfifo_active && ((!sck_rdfifo_req_pending)) && ((!sck_rdfifo_full)))
             ------1------    -------------2-------------    ----------3---------
-1--2--3-StatusTests
011CoveredT1,T2,T3
101CoveredT5,T17,T28
110CoveredT5,T17,T28
111CoveredT5,T17,T28

FSM Coverage for Module : spi_tpm
Summary for FSM :: sck_st_q
TotalCoveredPercent
States 9 9 100.00 (Not included in score)
Transitions 12 11 91.67
Sequences 0 0

State, Transition and Sequence Details for FSM :: sck_st_q
statesLine No.CoveredTests
StAddr 1148 Covered T4,T5,T13
StEnd 1158 Covered T5,T17,T19
StIdle 1143 Covered T1,T2,T3
StInvalid 1198 Covered T19,T29,T30
StReadFifo 1250 Covered T5,T17,T28
StReadHwReg 1248 Covered T4,T13,T19
StStartByte 1194 Covered T4,T5,T13
StWait 1183 Covered T5,T17,T28
StWrite 1252 Covered T5,T17,T28


transitionsLine No.CoveredTests
StAddr->StInvalid 1198 Covered T19,T29,T30
StAddr->StStartByte 1194 Covered T4,T5,T13
StAddr->StWait 1183 Covered T5,T17,T28
StIdle->StAddr 1148 Covered T4,T5,T13
StIdle->StEnd 1158 Not Covered
StReadFifo->StEnd 1264 Covered T5,T17,T28
StReadHwReg->StEnd 1275 Covered T19,T29,T122
StStartByte->StReadFifo 1250 Covered T5,T17,T28
StStartByte->StReadHwReg 1248 Covered T4,T13,T19
StStartByte->StWrite 1252 Covered T5,T17,T28
StWait->StStartByte 1237 Covered T5,T17,T28
StWrite->StEnd 1286 Covered T5,T17,T28



Branch Coverage for Module : spi_tpm
Line No.TotalCoveredPercent
Branches 155 150 96.77
IF 525 3 3 100.00
IF 542 2 2 100.00
IF 555 3 3 100.00
IF 594 2 2 100.00
IF 602 3 3 100.00
IF 610 2 2 100.00
IF 620 4 4 100.00
IF 648 3 3 100.00
IF 658 3 3 100.00
IF 683 4 4 100.00
IF 709 4 4 100.00
CASE 722 3 3 100.00
IF 744 2 2 100.00
IF 751 2 2 100.00
IF 763 3 3 100.00
IF 784 2 2 100.00
IF 796 2 2 100.00
IF 802 4 4 100.00
IF 813 3 3 100.00
IF 823 3 3 100.00
IF 832 3 3 100.00
IF 852 4 4 100.00
IF 863 4 4 100.00
IF 873 2 2 100.00
CASE 895 6 5 83.33
CASE 937 11 11 100.00
IF 1012 2 2 100.00
IF 1024 2 2 100.00
IF 1052 2 2 100.00
IF 1064 3 3 100.00
IF 1095 2 2 100.00
CASE 1142 37 33 89.19
IF 1382 4 4 100.00
IF 1394 5 5 100.00
IF 1409 4 4 100.00
IF 1470 4 4 100.00
IF 1480 3 3 100.00


525 if (!sys_rst_ni) begin -1- 526 sys_clk_tpm_cfg <= '{default: '0}; ==> 527 sys_clk_tpm_reg <= '{default: '0}; 528 end else begin 529 if (sys_csb_asserted_pulse) begin -2- 530 sys_clk_tpm_cfg <= sys_tpm_cfg; ==> 531 sys_clk_tpm_reg <= sys_tpm_reg; 532 for (int unsigned i = 0 ; i < NumLocality ; i++) begin 533 sys_active_locality[i] <= 534 sys_tpm_reg.access[AccessRegSize*i + ActiveLocalityBitPos]; 535 end 536 end MISSING_ELSE ==>

Branches:
-1--2-StatusTests
1 - Covered T1,T2,T3
0 1 Covered T1,T2,T4
0 0 Covered T1,T2,T3


542 if (!rst_out_ni) begin -1- 543 isck_data_sel <= SelWait; ==> 544 end else begin 545 isck_data_sel <= sck_data_sel; ==>

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


555 if (!rst_ni) begin -1- 556 cmdaddr_bitcnt <= 5'h 0; ==> 557 end else if (cmdaddr_shift_en) begin -2- 558 cmdaddr_bitcnt <= cmdaddr_bitcnt + 5'h 1; ==> 559 end MISSING_ELSE ==>

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


594 if (!rst_out_ni) begin -1- 595 isck_fifoaddr_latch <= 1'b 0; ==> 596 end else begin 597 isck_fifoaddr_latch <= sck_fifoaddr_latch; ==>

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


602 if (!rst_ni) begin -1- 603 sck_cmdaddr_wdata_q <= '0; ==> 604 end else if (cmdaddr_shift_en) begin -2- 605 sck_cmdaddr_wdata_q <= sck_cmdaddr_wdata_d; ==> 606 end MISSING_ELSE ==>

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


610 if (cmdaddr_shift_en) begin -1- 611 sck_cmdaddr_wdata_d = {sck_cmdaddr_wdata_q[0+:CmdAddrSize-1], mosi_i}; ==> 612 end else begin 613 sck_cmdaddr_wdata_d = sck_cmdaddr_wdata_q; ==>

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


620 if (!rst_out_ni) begin -1- 621 isck_fifoaddr <= '0; ==> 622 end else if (isck_fifoaddr_latch) begin -2- 623 // Shall assert when sck_st_q moves away from StAddr 624 isck_fifoaddr <= sck_cmdaddr_wdata_q[FifoRegSize-1:0]; ==> 625 end else if (isck_fifoaddr_inc) begin -3- 626 isck_fifoaddr <= isck_fifoaddr + 1'b 1; ==> 627 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T4,T5,T13
0 0 1 Covered T4,T13,T19
0 0 0 Covered T4,T5,T13


648 if (!rst_ni) begin -1- 649 wrdata_bitcnt <= '0; ==> 650 end else if (wrdata_shift_en) begin -2- 651 wrdata_bitcnt <= wrdata_bitcnt + 3'h 1; ==> 652 end MISSING_ELSE ==>

Branches:
-1--2-StatusTests
1 - Covered T1,T2,T3
0 1 Covered T5,T17,T28
0 0 Covered T4,T5,T13


658 if (!rst_ni) begin -1- 659 wrdata_q <= 8'h 0; ==> 660 end else if (wrdata_shift_en) begin -2- 661 wrdata_q <= wrdata_d; ==> 662 end MISSING_ELSE ==>

Branches:
-1--2-StatusTests
1 - Covered T1,T2,T3
0 1 Covered T5,T17,T28
0 0 Covered T4,T5,T13


683 if (!sys_rst_ni) begin -1- 684 sys_wrfifo_release_req <= 1'b0; ==> 685 end else if (sys_wrfifo_release_i) begin -2- 686 sys_wrfifo_release_req <= 1'b1; ==> 687 end else if (sys_wrfifo_release_ack) begin -3- 688 sys_wrfifo_release_req <= 1'b0; ==> 689 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T5,T17,T28
0 0 1 Covered T5,T17,T28
0 0 0 Covered T1,T2,T3


709 if (!sys_rst_ni) begin -1- 710 sck_wrfifo_busy <= 1'b0; ==> 711 end else if (sck_cmdaddr_wvalid && cmd_type == Write) begin -2- 712 sck_wrfifo_busy <= 1'b1; ==> 713 end else if (sck_wrfifo_release_req) begin -3- 714 sck_wrfifo_busy <= 1'b0; ==> 715 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T5,T17,T28
0 0 1 Covered T5,T17,T28
0 0 0 Covered T4,T5,T11


722 unique case (1'b 1) -1- 723 // locality in the TPM transaction is in addr[15:12]. 724 // check_locality is asserted at the 24th beat. 725 // Look at the assertion LocalityLatchCondition_A 726 check_locality: begin 727 addr = {sck_cmdaddr_wdata_d[19:0], 4'h 0}; ==> 728 end 729 730 check_hw_reg: begin 731 // In Return-by-HW Reg check stage, the lower 2 bits were not arrived. 732 // Look at the assertion HwRegCondition_A 733 addr = {sck_cmdaddr_wdata_d[21:0], 2'b 00}; ==> 734 end 735 736 default: addr = 24'h 00_0000; ==>

Branches:
-1-StatusTests
check_locality Covered T4,T5,T13
check_hw_reg Covered T4,T5,T13
default Covered T1,T2,T3


744 if (check_locality && -1- 745 (sys_clk_tpm_cfg.tpm_reg_chk_dis || (addr[23:16] == TpmAddr))) begin 746 is_tpm_reg_d = 1'b1; ==> 747 end MISSING_ELSE ==>

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


751 if (!rst_ni) begin -1- 752 is_tpm_reg_q <= 1'b 0; ==> 753 end else begin 754 is_tpm_reg_q <= is_tpm_reg_d; ==>

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


763 if (!rst_ni) begin -1- 764 is_hw_reg <= 1'b 0; ==> 765 sck_hw_reg_idx <= RegAccess; 766 end else if (!sys_clk_tpm_cfg.tpm_mode && check_hw_reg && (cmd_type == Read) -2- 767 && is_tpm_reg_q && !invalid_locality && !sys_clk_tpm_cfg.hw_reg_dis) begin 768 // HW register is set only when the following conditions are met: 769 // 770 // 1. TPM is in FIFO mode 771 // 2. The command received is a Read command. 772 // 3. Is TPM register (starting with 0xD4_XXXX) or tpm_reg_chk_dis is set 773 // 4. Received locality is in the range of supported Locality. 774 is_hw_reg <= is_hw_reg_d; ==> 775 sck_hw_reg_idx <= sck_hw_reg_idx_d; 776 end // if check_hw_reg MISSING_ELSE ==>

Branches:
-1--2-StatusTests
1 - Covered T1,T2,T3
0 1 Covered T4,T13,T19
0 0 Covered T4,T5,T13


784 if (TpmReturnByHwAddr[i][11:2] == addr[11:2]) begin -1- 785 is_hw_reg_d = 1'b 1; ==> 786 sck_hw_reg_idx_d = hw_reg_idx_e'(i); 787 end MISSING_ELSE ==>

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


796 if (!rst_out_ni) isck_hw_reg_idx <= RegAccess; -1- ==> 797 else isck_hw_reg_idx <= sck_hw_reg_idx; ==>

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


802 if (!rst_ni) begin -1- 803 locality <= '0; ==> 804 invalid_locality <= 1'b 0; 805 end else if (check_locality && is_tpm_reg_d) begin -2- 806 locality <= addr[15:12]; 807 invalid_locality <= (addr[15:12] < 4'(NumLocality)) ? 1'b 0: 1'b 1; -3- ==> ==> 808 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 1 Covered T4,T5,T13
0 1 0 Covered T19,T29,T30
0 0 - Covered T4,T5,T13


813 if (!rst_ni) begin -1- 814 cmd_type <= Write; ==> 815 end else if (latch_cmd_type) begin -2- 816 // latch at the very first SCK edge 817 cmd_type <= cmd_type_e'(sck_cmdaddr_wdata_d[0]); ==> 818 end MISSING_ELSE ==>

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


823 if (!rst_ni) begin -1- 824 xfer_size <= 6'h 0; ==> 825 end else if (latch_xfer_size) begin -2- 826 xfer_size <= sck_cmdaddr_wdata_d[5:0]; ==> 827 end MISSING_ELSE ==>

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


832 if (!rst_ni) begin -1- 833 xfer_bytes_q <= '0; ==> 834 end else if ((isck_p2s_sent && sck_rddata_shift_en) || -2- 835 (sck_wrfifo_wvalid && wrdata_shift_en)) begin 836 xfer_bytes_q <= xfer_bytes_d; ==> 837 end MISSING_ELSE ==>

Branches:
-1--2-StatusTests
1 - Covered T1,T2,T3
0 1 Covered T5,T17,T28
0 0 Covered T4,T5,T13


852 if (!sys_rst_ni) begin -1- 853 sys_rdfifo_wdepth <= '0; ==> 854 end else if (sys_csb_asserted_pulse) begin -2- 855 sys_rdfifo_wdepth <= '0; ==> 856 end else if (sys_rdfifo_wvalid_i & sys_rdfifo_wready_o) begin -3- 857 sys_rdfifo_wdepth <= sys_rdfifo_wdepth + 1; ==> 858 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T1,T2,T4
0 0 1 Covered T5,T17,T28
0 0 0 Covered T1,T2,T3


863 if (!sys_rst_ni) begin -1- 864 sys_xfer_size <= '1; ==> 865 end else if (sys_csb_asserted_pulse) begin -2- 866 sys_xfer_size <= '1; ==> 867 end else if (sys_cmdaddr_rvalid_o & sys_cmdaddr_rready_i) begin -3- 868 sys_xfer_size <= sys_cmdaddr.xfer_size_minus_one; ==> 869 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T1,T2,T4
0 0 1 Covered T5,T17,T28
0 0 0 Covered T1,T2,T3


873 if (!sys_rst_ni) begin -1- 874 sys_enough_payload_in_rdfifo <= 1'b0; ==> 875 end else begin 876 sys_enough_payload_in_rdfifo <= ==>

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


895 unique case (isck_data_sel) -1- 896 SelWait: begin 897 isck_p2s_data = 8'h 00; ==> 898 end 899 900 SelStart: begin 901 isck_p2s_data = 8'h 01; ==> 902 end 903 904 SelInvalid: begin 905 isck_p2s_data = 8'h FF; ==> 906 end 907 908 SelHwReg: begin 909 isck_p2s_data = isck_hw_reg_byte; ==> 910 end 911 912 SelRdFifo: begin 913 isck_p2s_data = isck_sel_rdata; ==> 914 end 915 916 default: begin 917 isck_p2s_data = 8'h 00; ==>

Branches:
-1-StatusTests
SelWait Covered T1,T2,T3
SelStart Covered T4,T5,T13
SelInvalid Covered T19,T29,T30
SelHwReg Covered T4,T13,T19
SelRdFifo Covered T5,T17,T28
default Not Covered


937 unique case (isck_hw_reg_idx) -1- 938 RegAccess: begin 939 for (int unsigned i = 0 ; i < NumLocality ; i++) begin ==> 940 if (!invalid_locality && (4'(i) == locality)) begin 941 isck_hw_reg_word = { {(32-AccessRegSize){1'b1}}, 942 sys_clk_tpm_reg.access[AccessRegSize*i+:AccessRegSize]}; 943 end 944 end 945 end 946 947 RegIntEn: begin 948 isck_hw_reg_word = sys_clk_tpm_reg.int_enable; ==> 949 end 950 951 RegIntVect: begin 952 isck_hw_reg_word = {24'h FFFFFF, sys_clk_tpm_reg.int_vector}; ==> 953 end 954 955 RegIntSts: begin 956 isck_hw_reg_word = sys_clk_tpm_reg.int_status; ==> 957 end 958 959 RegIntfCap: begin 960 isck_hw_reg_word = sys_clk_tpm_reg.intf_capacity; ==> 961 end 962 963 RegSts: begin 964 // Check locality to return FFh or correct value 965 if (!invalid_locality && sys_active_locality[locality[2:0]]) begin -2- 966 // return data 967 isck_hw_reg_word = sys_clk_tpm_reg.status; ==> 968 end else begin 969 isck_hw_reg_word = 32'h FFFF_FFFF; ==> 970 end 971 end 972 973 RegHashStart: begin 974 isck_hw_reg_word = 32'h FFFF_FFFF; ==> 975 end 976 977 RegId: begin 978 isck_hw_reg_word = sys_clk_tpm_reg.id; ==> 979 end 980 981 RegRid: begin 982 isck_hw_reg_word = {24'h FFFFFF, sys_clk_tpm_reg.rid}; ==> 983 end 984 985 default: begin 986 isck_hw_reg_word = 32'h FFFF_FFFF; ==>

Branches:
-1--2-StatusTests
RegAccess - Covered T1,T2,T3
RegIntEn - Covered T1,T2,T3
RegIntVect - Covered T1,T2,T3
RegIntSts - Covered T1,T2,T3
RegIntfCap - Covered T1,T2,T3
RegSts 1 Covered T1,T2,T3
RegSts 0 Covered T1,T2,T3
RegHashStart - Covered T1,T2,T3
RegId - Covered T1,T2,T3
RegRid - Covered T1,T2,T3
default - Covered T1,T2,T3


1012 if (!rst_out_ni) begin -1- 1013 isck_p2s_bitcnt <= 3'h 7; ==> 1014 end else begin 1015 isck_p2s_bitcnt <= isck_p2s_bitcnt - 1'b 1; ==>

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


1024 if (!rst_out_ni) isck_p2s_valid <= 1'b 0; -1- ==> 1025 else isck_p2s_valid <= sck_p2s_valid; ==>

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


1052 if (!rst_out_ni) begin -1- 1053 isck_sel_rdata <= '0; ==> 1054 end else begin 1055 isck_sel_rdata <= sck_rdfifo_rdata[NumBits*sck_rdfifo_idx+:NumBits]; ==>

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


1064 if (!rst_ni) begin -1- 1065 sck_rdfifo_idx <= '0; ==> 1066 end else if (isck_rd_byte_sent) begin -2- 1067 sck_rdfifo_idx <= sck_rdfifo_idx + 1'b 1; ==> 1068 end MISSING_ELSE ==>

Branches:
-1--2-StatusTests
1 - Covered T1,T2,T3
0 1 Covered T5,T17,T28
0 0 Covered T4,T5,T13


1095 if (!rst_ni) begin -1- 1096 sck_st_q <= StIdle; ==> 1097 end else begin 1098 sck_st_q <= sck_st_d; ==>

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


1142 unique case (sck_st_q) -1- 1143 StIdle: begin 1144 cmdaddr_shift_en = 1'b 1; 1145 1146 if (cmdaddr_bitcnt == 5'h 7) begin -2- 1147 if (sys_clk_tpm_en) begin -3- 1148 sck_st_d = StAddr; ==> 1149 1150 latch_xfer_size = 1'b 1; 1151 end else begin 1152 // Stop processing and move to End state. 1153 // sys_clk_tpm_cfg.tpm_en cannot be compared right after reset. Due 1154 // to the absent of the SCK, the configuration cannot be 1155 // synchronized into SCK domain at the first 3 clock cycle. 1156 // So, the enable signal is checked when the state is about to 1157 // move to StAddr. 1158 sck_st_d = StEnd; ==> 1159 end 1160 end // cmdaddr_bitcnt == 5'h 7 MISSING_ELSE ==> 1161 end // StIdle 1162 1163 StAddr: begin 1164 // NOTE: The coding style in this state is ugly. How can we improve? 1165 cmdaddr_shift_en = 1'b 1; 1166 1167 if (cmdaddr_bitcnt >= 5'h 18) begin -4- 1168 // Send Wait byte [18h:1Fh] 1169 sck_p2s_valid = 1'b 1; ==> 1170 sck_data_sel = SelWait; 1171 end MISSING_ELSE ==> 1172 1173 // Latch locality 1174 if (cmdaddr_bitcnt == 5'h 1B) begin -5- 1175 check_locality = 1'b 1; ==> 1176 end MISSING_ELSE ==> 1177 1178 // Next state: if is_tpm_reg 1 && !cfg_hw_reg_dis 1179 if (cmdaddr_bitcnt == 5'h 1F && cmd_type == Read) begin -6- 1180 if (!is_tpm_reg_q || sys_clk_tpm_cfg.tpm_mode) begin -7- 1181 // If out of TPM register (not staring with 0xD4_XXXX) or 1182 // TPM mode is CRB, always processed by SW 1183 sck_st_d = StWait; 1184 1185 // Only write the command if the FIFO is empty, else back-to-back 1186 // commands may cause ambiguity about which command is getting 1187 // a response. 1188 if (sck_cmdaddr_wdepth == '0) begin -8- 1189 sck_cmdaddr_wvalid = 1'b 1; ==> 1190 end MISSING_ELSE ==> 1191 end else if (is_hw_reg) begin -9- 1192 // If read command and HW REG, then return by HW 1193 // is_hw_reg contains (is_tpm_reg_q && (locality < NumLocality)) 1194 sck_st_d = StStartByte; ==> 1195 end else if (invalid_locality && sys_clk_tpm_cfg.invalid_locality) begin -10- 1196 // The read request is out of supported Localities. 1197 // Return FFh 1198 sck_st_d = StInvalid; ==> 1199 end else begin 1200 // Other read command sends to Wait, till SW response 1201 sck_st_d = StWait; 1202 1203 // Only write the command if the FIFO is empty, else back-to-back 1204 // commands may cause ambiguity about which command is getting 1205 // a response. 1206 if (sck_cmdaddr_wdepth == '0) begin -11- 1207 sck_cmdaddr_wvalid = 1'b 1; ==> 1208 end MISSING_ELSE ==> 1209 end 1210 end // cmdaddr_bitcnt == 5'h 1F MISSING_ELSE ==> 1211 1212 if (cmdaddr_bitcnt == 5'h 1F && cmd_type == Write) begin -12- 1213 if (!sck_wrfifo_busy && ~|sck_cmdaddr_wdepth) begin -13- 1214 // Write command and FIFO is empty. Ready to push 1215 sck_st_d = StStartByte; ==> 1216 end else begin 1217 // FIFO is not empty. Move to StWait and waits for the empty write 1218 // fifo. 1219 sck_st_d = StWait; ==> 1220 end 1221 end // cmd_type == Write MISSING_ELSE ==> 1222 end // StAddr 1223 1224 StWait: begin 1225 sck_p2s_valid = 1'b 1; 1226 sck_data_sel = SelWait; 1227 1228 // Write the Read command if it hasn't been yet. 1229 if ((cmd_type == Read) && !sck_rdfifo_cmd_pending && ~|sck_cmdaddr_wdepth) begin -14- 1230 sck_cmdaddr_wvalid = 1'b1; ==> 1231 end MISSING_ELSE ==> 1232 1233 // at every LSB of a byte, check the next state condition 1234 if (isck_p2s_sent && -15- 1235 (((cmd_type == Read) && enough_payload_in_rdfifo) || 1236 ((cmd_type == Write) && !sck_wrfifo_busy && ~|sck_cmdaddr_wdepth))) begin 1237 sck_st_d = StStartByte; ==> 1238 end MISSING_ELSE ==> 1239 end // StWait 1240 1241 StStartByte: begin 1242 sck_p2s_valid = 1'b 1; 1243 sck_data_sel = SelStart; 1244 1245 if (isck_p2s_sent) begin -16- 1246 // Must move to next state as StartByte is a byte 1247 if ((cmd_type == Read) && is_hw_reg) begin -17- 1248 sck_st_d = StReadHwReg; ==> 1249 end else if (cmd_type == Read) begin -18- 1250 sck_st_d = StReadFifo; ==> 1251 end else if (cmd_type == Write) begin -19- 1252 sck_st_d = StWrite; ==> 1253 end MISSING_ELSE ==> 1254 end MISSING_ELSE ==> 1255 end // StStartByte 1256 1257 StReadFifo: begin 1258 sck_rddata_shift_en = 1'b 1; 1259 1260 sck_p2s_valid = 1'b 1; 1261 sck_data_sel = SelRdFifo; 1262 1263 if (isck_p2s_sent && xfer_size_met) begin -20- 1264 sck_st_d = StEnd; ==> 1265 end MISSING_ELSE ==> 1266 end // StReadFifo 1267 1268 StReadHwReg: begin 1269 sck_p2s_valid = 1'b 1; 1270 sck_data_sel = SelHwReg; 1271 1272 // HW Reg slice? using index 1273 1274 if (isck_p2s_sent && xfer_size_met) begin -21- 1275 sck_st_d = StEnd; ==> 1276 end MISSING_ELSE ==> 1277 end // StReadHwReg 1278 1279 StWrite: begin 1280 wrdata_shift_en = 1'b 1; 1281 // Processed by the logic. Does not have to do 1282 1283 if (sck_wrfifo_wvalid && xfer_size_met) begin -22- 1284 // With complete command, upload for SW to process 1285 sck_cmdaddr_wvalid = 1'b 1; ==> 1286 sck_st_d = StEnd; 1287 end MISSING_ELSE ==> 1288 end // StWrite 1289 1290 StInvalid: begin // TERMINAL_STATE 1291 // Send FFh 1292 if (cmd_type == Read) begin -23- 1293 sck_p2s_valid = 1'b 1; ==> 1294 sck_data_sel = SelInvalid; 1295 end MISSING_ELSE ==> 1296 end // StInvalid 1297 1298 StEnd: begin // TERMINAL_STATE 1299 if (cmd_type == Read) begin -24- 1300 sck_p2s_valid = 1'b 1; ==> 1301 sck_data_sel = SelWait; // drive 0x00 1302 end MISSING_ELSE ==> 1303 end // StEnd 1304 1305 default: begin 1306 sck_st_d = StIdle; ==>

Branches:
-1--2--3--4--5--6--7--8--9--10--11--12--13--14--15--16--17--18--19--20--21--22--23--24-StatusTests
StIdle 1 1 - - - - - - - - - - - - - - - - - - - - - Covered T4,T5,T13
StIdle 1 0 - - - - - - - - - - - - - - - - - - - - - Not Covered
StIdle 0 - - - - - - - - - - - - - - - - - - - - - - Covered T1,T2,T3
StAddr - - 1 - - - - - - - - - - - - - - - - - - - - Covered T4,T5,T13
StAddr - - 0 - - - - - - - - - - - - - - - - - - - - Covered T4,T5,T13
StAddr - - - 1 - - - - - - - - - - - - - - - - - - - Covered T4,T5,T13
StAddr - - - 0 - - - - - - - - - - - - - - - - - - - Covered T4,T5,T13
StAddr - - - - 1 1 1 - - - - - - - - - - - - - - - - Covered T5,T17,T28
StAddr - - - - 1 1 0 - - - - - - - - - - - - - - - - Covered T30,T41,T62
StAddr - - - - 1 0 - 1 - - - - - - - - - - - - - - - Covered T4,T13,T19
StAddr - - - - 1 0 - 0 1 - - - - - - - - - - - - - - Covered T19,T29,T30
StAddr - - - - 1 0 - 0 0 1 - - - - - - - - - - - - - Covered T30,T42,T62
StAddr - - - - 1 0 - 0 0 0 - - - - - - - - - - - - - Covered T30,T62,T36
StAddr - - - - 0 - - - - - - - - - - - - - - - - - - Covered T4,T5,T13
StAddr - - - - - - - - - - 1 1 - - - - - - - - - - - Covered T5,T17,T28
StAddr - - - - - - - - - - 1 0 - - - - - - - - - - - Covered T30,T41,T62
StAddr - - - - - - - - - - 0 - - - - - - - - - - - - Covered T4,T5,T13
StWait - - - - - - - - - - - - 1 - - - - - - - - - - Covered T30,T41,T62
StWait - - - - - - - - - - - - 0 - - - - - - - - - - Covered T5,T17,T28
StWait - - - - - - - - - - - - - 1 - - - - - - - - - Covered T5,T17,T28
StWait - - - - - - - - - - - - - 0 - - - - - - - - - Covered T5,T17,T28
StStartByte - - - - - - - - - - - - - - 1 1 - - - - - - - Covered T4,T13,T19
StStartByte - - - - - - - - - - - - - - 1 0 1 - - - - - - Covered T5,T17,T28
StStartByte - - - - - - - - - - - - - - 1 0 0 1 - - - - - Covered T5,T17,T28
StStartByte - - - - - - - - - - - - - - 1 0 0 0 - - - - - Not Covered
StStartByte - - - - - - - - - - - - - - 0 - - - - - - - - Covered T4,T5,T13
StReadFifo - - - - - - - - - - - - - - - - - - 1 - - - - Covered T5,T17,T28
StReadFifo - - - - - - - - - - - - - - - - - - 0 - - - - Covered T5,T17,T28
StReadHwReg - - - - - - - - - - - - - - - - - - - 1 - - - Covered T19,T29,T122
StReadHwReg - - - - - - - - - - - - - - - - - - - 0 - - - Covered T4,T13,T19
StWrite - - - - - - - - - - - - - - - - - - - - 1 - - Covered T5,T17,T28
StWrite - - - - - - - - - - - - - - - - - - - - 0 - - Covered T5,T17,T28
StInvalid - - - - - - - - - - - - - - - - - - - - - 1 - Covered T19,T29,T30
StInvalid - - - - - - - - - - - - - - - - - - - - - 0 - Not Covered
StEnd - - - - - - - - - - - - - - - - - - - - - - 1 Covered T5,T17,T19
StEnd - - - - - - - - - - - - - - - - - - - - - - 0 Covered T5,T17,T28
default - - - - - - - - - - - - - - - - - - - - - - - Not Covered


1382 if (!sys_rst_ni) begin -1- 1383 sys_rdfifo_sync_clr <= 1'b1; ==> 1384 end else if (sys_csb_deasserted_pulse) begin -2- 1385 sys_rdfifo_sync_clr <= 1'b1; ==> 1386 end else if (sys_cmdaddr.rnw & sys_cmdaddr_rvalid_o & sys_cmdaddr_rready_i) begin -3- 1387 sys_rdfifo_sync_clr <= 1'b0; ==> 1388 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T1,T2,T4
0 0 1 Covered T5,T17,T28
0 0 0 Covered T1,T2,T3


1394 if (!sys_rst_ni) begin -1- 1395 sck_rdfifo_cmd_pending <= 1'b0; ==> 1396 end else if (cmdaddr_bitcnt == 5'h0f) begin -2- 1397 // Clearing the command pending bit here should give at least the 16 SPI 1398 // cycles for the sys_clk domain to sample the event, timed by 1399 // sys_tpm_rst_ni falling edge (after a 2FF sync). 1400 sck_rdfifo_cmd_pending <= 1'b0; ==> 1401 end else if (sck_cmdaddr_wvalid && (cmd_type == Read)) begin -3- 1402 sck_rdfifo_cmd_pending <= 1'b1; ==> 1403 end else if (isck_p2s_sent && xfer_size_met && (sck_st_q == StReadFifo)) begin -4- 1404 sck_rdfifo_cmd_pending <= 1'b0; ==> 1405 end MISSING_ELSE ==>

Branches:
-1--2--3--4-StatusTests
1 - - - Covered T1,T2,T3
0 1 - - Covered T4,T5,T13
0 0 1 - Covered T5,T17,T28
0 0 0 1 Covered T5,T17,T28
0 0 0 0 Covered T4,T5,T11


1409 if (!sys_rst_ni) begin -1- 1410 sys_rdfifo_aborted_o <= 1'b0; ==> 1411 end else if (sys_csb_deasserted_pulse & !sys_rdfifo_sync_clr) begin -2- 1412 // Sample the command pending bit on the CSB de-assertion edge, which 1413 // has a safe timing as long as sys_clk_i is fast enough to handle the 1414 // CSB CDC + this flop in the 16 SPI cycles. sck_rdfifo_cmd_pending will 1415 // be held steady for at least that long, including however long since the 1416 // last SPI clock edge of the *previous* command. 1417 sys_rdfifo_aborted_o <= sck_rdfifo_cmd_pending; ==> 1418 end else if (sys_cmdaddr_rvalid_o & sys_cmdaddr_rready_i) begin -3- 1419 sys_rdfifo_aborted_o <= 1'b0; ==> 1420 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T5,T17,T28
0 0 1 Covered T5,T17,T28
0 0 0 Covered T1,T2,T3


1470 if (!rst_ni) begin -1- 1471 sck_rdfifo_req_pending <= 1'b0; ==> 1472 end else if (sck_sram_req[SramRdFifo] & sck_sram_gnt[SramRdFifo]) begin -2- 1473 sck_rdfifo_req_pending <= 1'b1; ==> 1474 end else if (sck_sram_rvalid[SramRdFifo]) begin -3- 1475 sck_rdfifo_req_pending <= 1'b0; ==> 1476 end MISSING_ELSE ==>

Branches:
-1--2--3-StatusTests
1 - - Covered T1,T2,T3
0 1 - Covered T5,T17,T28
0 0 1 Covered T5,T17,T28
0 0 0 Covered T4,T5,T13


1480 if (!rst_ni) begin -1- 1481 sck_rdfifo_offset <= '0; ==> 1482 end else if (sck_sram_req[SramRdFifo] & sck_sram_gnt[SramRdFifo]) begin -2- 1483 sck_rdfifo_offset <= sck_rdfifo_offset + 1; ==> 1484 end MISSING_ELSE ==>

Branches:
-1--2-StatusTests
1 - Covered T1,T2,T3
0 1 Covered T5,T17,T28
0 0 Covered T4,T5,T13


Assert Coverage for Module : spi_tpm
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 17 17 100.00 17 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 17 17 100.00 17 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
CmdAddrAvailable_A 130162691 43474 0 0
CmdAddrBitCntInAddrSt_A 130162691 469672 0 0
CmdAddrInfo_A 130162691 46748 0 0
CmdPowerof2_A 956 956 0 0
DataFifoLessThan64_A 956 956 0 0
DataSelKnown_A 130163632 24187477 0 0
HwRegCondition2_a 130162691 9546 0 0
HwRegCondition_A 130162691 58709 0 0
HwRegIdxKnown_A 130163632 24187477 0 0
LocalityLatchCondition_A 130162691 58709 0 0
RdFifoDepthPoT_A 956 956 0 0
RdFifoNumBytesPoT_A 956 956 0 0
RdPowerof2_A 956 956 0 0
SckFifoAddrLatchCondition_A 130162691 58709 0 0
TpmRegSizeMatch_A 956 956 0 0
WrDepthSpec_A 956 956 0 0
WrFifoAvailable_A 130162691 371340 0 0


CmdAddrAvailable_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 130162691 43474 0 0
T5 864 3 0 0
T11 68766 0 0 0
T13 864 0 0 0
T14 16 0 0 0
T15 46144 0 0 0
T16 13220 0 0 0
T17 2505 11 0 0
T18 34256 0 0 0
T19 92431 0 0 0
T21 26463 0 0 0
T28 0 7 0 0
T30 0 162 0 0
T31 0 6 0 0
T41 0 382 0 0
T42 0 13 0 0
T43 0 3 0 0
T53 0 80 0 0
T62 0 254 0 0

CmdAddrBitCntInAddrSt_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 130162691 469672 0 0
T4 144 16 0 0
T5 864 24 0 0
T11 68766 0 0 0
T13 864 96 0 0
T14 16 0 0 0
T15 46144 0 0 0
T16 13220 0 0 0
T17 2505 88 0 0
T18 34256 0 0 0
T19 92431 3048 0 0
T27 0 64 0 0
T28 0 56 0 0
T29 0 1840 0 0
T30 0 1512 0 0
T31 0 48 0 0

CmdAddrInfo_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 130162691 46748 0 0
T4 144 2 0 0
T5 864 3 0 0
T11 68766 0 0 0
T13 864 12 0 0
T14 16 0 0 0
T15 46144 0 0 0
T16 13220 0 0 0
T17 2505 0 0 0
T18 34256 0 0 0
T19 92431 381 0 0
T27 0 8 0 0
T28 0 7 0 0
T29 0 230 0 0
T30 0 165 0 0
T122 0 216 0 0
T126 0 14 0 0

CmdPowerof2_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 956 956 0 0
T1 1 1 0 0
T2 1 1 0 0
T3 1 1 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T7 1 1 0 0
T8 1 1 0 0
T9 1 1 0 0
T10 1 1 0 0

DataFifoLessThan64_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 956 956 0 0
T1 1 1 0 0
T2 1 1 0 0
T3 1 1 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T7 1 1 0 0
T8 1 1 0 0
T9 1 1 0 0
T10 1 1 0 0

DataSelKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 130163632 24187477 0 0
T4 145 144 0 0
T5 865 864 0 0
T6 1 0 0 0
T7 1 0 0 0
T8 1 0 0 0
T9 1 0 0 0
T10 1 0 0 0
T11 68767 0 0 0
T12 1 0 0 0
T13 865 864 0 0
T17 0 2328 0 0
T19 0 85888 0 0
T27 0 576 0 0
T28 0 2960 0 0
T29 0 55632 0 0
T30 0 52312 0 0
T31 0 2448 0 0

HwRegCondition2_a
NameAttemptsReal SuccessesFailuresIncomplete
Total 130162691 9546 0 0
T4 144 2 0 0
T5 864 0 0 0
T11 68766 0 0 0
T13 864 12 0 0
T14 16 0 0 0
T15 46144 0 0 0
T16 13220 0 0 0
T17 2505 0 0 0
T18 34256 0 0 0
T19 92431 252 0 0
T27 0 8 0 0
T29 0 138 0 0
T30 0 10 0 0
T122 0 144 0 0
T126 0 14 0 0
T127 0 168 0 0
T128 0 14 0 0

HwRegCondition_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 130162691 58709 0 0
T4 144 2 0 0
T5 864 3 0 0
T11 68766 0 0 0
T13 864 12 0 0
T14 16 0 0 0
T15 46144 0 0 0
T16 13220 0 0 0
T17 2505 11 0 0
T18 34256 0 0 0
T19 92431 381 0 0
T27 0 8 0 0
T28 0 7 0 0
T29 0 230 0 0
T30 0 189 0 0
T31 0 6 0 0

HwRegIdxKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 130163632 24187477 0 0
T4 145 144 0 0
T5 865 864 0 0
T6 1 0 0 0
T7 1 0 0 0
T8 1 0 0 0
T9 1 0 0 0
T10 1 0 0 0
T11 68767 0 0 0
T12 1 0 0 0
T13 865 864 0 0
T17 0 2328 0 0
T19 0 85888 0 0
T27 0 576 0 0
T28 0 2960 0 0
T29 0 55632 0 0
T30 0 52312 0 0
T31 0 2448 0 0

LocalityLatchCondition_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 130162691 58709 0 0
T4 144 2 0 0
T5 864 3 0 0
T11 68766 0 0 0
T13 864 12 0 0
T14 16 0 0 0
T15 46144 0 0 0
T16 13220 0 0 0
T17 2505 11 0 0
T18 34256 0 0 0
T19 92431 381 0 0
T27 0 8 0 0
T28 0 7 0 0
T29 0 230 0 0
T30 0 189 0 0
T31 0 6 0 0

RdFifoDepthPoT_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 956 956 0 0
T1 1 1 0 0
T2 1 1 0 0
T3 1 1 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T7 1 1 0 0
T8 1 1 0 0
T9 1 1 0 0
T10 1 1 0 0

RdFifoNumBytesPoT_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 956 956 0 0
T1 1 1 0 0
T2 1 1 0 0
T3 1 1 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T7 1 1 0 0
T8 1 1 0 0
T9 1 1 0 0
T10 1 1 0 0

RdPowerof2_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 956 956 0 0
T1 1 1 0 0
T2 1 1 0 0
T3 1 1 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T7 1 1 0 0
T8 1 1 0 0
T9 1 1 0 0
T10 1 1 0 0

SckFifoAddrLatchCondition_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 130162691 58709 0 0
T4 144 2 0 0
T5 864 3 0 0
T11 68766 0 0 0
T13 864 12 0 0
T14 16 0 0 0
T15 46144 0 0 0
T16 13220 0 0 0
T17 2505 11 0 0
T18 34256 0 0 0
T19 92431 381 0 0
T27 0 8 0 0
T28 0 7 0 0
T29 0 230 0 0
T30 0 189 0 0
T31 0 6 0 0

TpmRegSizeMatch_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 956 956 0 0
T1 1 1 0 0
T2 1 1 0 0
T3 1 1 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T7 1 1 0 0
T8 1 1 0 0
T9 1 1 0 0
T10 1 1 0 0

WrDepthSpec_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 956 956 0 0
T1 1 1 0 0
T2 1 1 0 0
T3 1 1 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T7 1 1 0 0
T8 1 1 0 0
T9 1 1 0 0
T10 1 1 0 0

WrFifoAvailable_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 130162691 371340 0 0
T5 864 88 0 0
T11 68766 0 0 0
T13 864 0 0 0
T14 16 0 0 0
T15 46144 0 0 0
T16 13220 0 0 0
T17 2505 138 0 0
T18 34256 0 0 0
T19 92431 0 0 0
T21 26463 0 0 0
T28 0 93 0 0
T30 0 1584 0 0
T31 0 6 0 0
T41 0 2708 0 0
T42 0 233 0 0
T43 0 83 0 0
T53 0 590 0 0
T62 0 2643 0 0

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