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



Module Instance : tb.dut.u_errchk

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
92.60 96.83 96.67 73.33 96.15 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
92.70 97.22 96.67 73.33 96.30 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
97.24 96.27 93.33 100.00 100.00 93.85 100.00 dut


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_state_regs 100.00 100.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 : kmac_errchk
Line No.TotalCoveredPercent
TOTAL636196.83
ALWAYS187151386.67
CONT_ASSIGN23611100.00
ALWAYS24444100.00
ALWAYS25044100.00
ALWAYS26644100.00
CONT_ASSIGN30400
ALWAYS30966100.00
ALWAYS32255100.00
CONT_ASSIGN37611100.00
ALWAYS39133100.00
CONT_ASSIGN39911100.00
ALWAYS4021919100.00

186 always_comb begin 187 1/1 err_swsequence = 1'b 0; Tests: T1 T2 T3  188 1/1 sparse_fsm_error_o = 1'b 0; Tests: T1 T2 T3  189 190 1/1 unique case (st) Tests: T1 T2 T3  191 StIdle: begin 192 // Allow Start command only 193 1/1 if (!(sw_cmd_i inside {CmdNone, CmdStart})) begin Tests: T1 T2 T3  194 1/1 err_swsequence = 1'b 1; Tests: T24 T25 T26  195 end MISSING_ELSE 196 end 197 198 StMsgFeed: begin 199 // Allow Process only 200 1/1 if (!(sw_cmd_i inside {CmdNone, CmdProcess})) begin Tests: T1 T2 T12  201 1/1 err_swsequence = 1'b 1; Tests: T31 T24 T25  202 end MISSING_ELSE 203 end 204 205 StProcessing: begin 206 1/1 if (sw_cmd_i != CmdNone) begin Tests: T1 T2 T12  207 0/1 ==> err_swsequence = 1'b 1; 208 end MISSING_ELSE 209 end 210 211 StAbsorbed: begin 212 // Allow ManualRun and Done 213 1/1 if (!(sw_cmd_i inside {CmdNone, CmdManualRun, CmdDone})) begin Tests: T1 T2 T12  214 1/1 err_swsequence = 1'b 1; Tests: T25 T90 T91  215 end MISSING_ELSE 216 end 217 218 StSqueezing: begin 219 1/1 if (sw_cmd_i != CmdNone) begin Tests: T13 T15 T27  220 0/1 ==> err_swsequence = 1'b 1; 221 end MISSING_ELSE 222 end 223 224 StTerminalError: begin 225 1/1 err_swsequence = 1'b 0; Tests: T3 T5 T6  226 1/1 sparse_fsm_error_o = 1'b 1; Tests: T3 T5 T6  227 end 228 229 default: begin 230 err_swsequence = 1'b 0; 231 sparse_fsm_error_o = 1'b 1; 232 end 233 endcase 234 end 235 236 1/1 assign block_swcmd = (err_swsequence) Tests: T1 T2 T3  237 || (err_modestrength 238 && !cfg_en_unsupported_modestrength_i) 239 || err_entropy_ready; 240 241 // sw_cmd_o latch 242 // To reduce the command path delay, sw_cmd is latched here 243 always_ff @(posedge clk_i or negedge rst_ni) begin 244 2/2 if (!rst_ni) sw_cmd_o <= CmdNone; Tests: T1 T2 T3  | T1 T2 T3  245 2/2 else if (!block_swcmd) sw_cmd_o <= sw_cmd_i; Tests: T1 T2 T3  | T1 T2 T3  MISSING_ELSE 246 end 247 248 // Mode & Strength 249 always_comb begin : check_modestrength 250 1/1 err_modestrength = 1'b 0; Tests: T1 T2 T3  251 252 1/1 if (st == StIdle && st_d == StMsgFeed) begin Tests: T1 T2 T3  253 // When moving to the next stage, checks the config 254 1/1 if (!((cfg_mode_i == Sha3 && Tests: T1 T2 T12  255 cfg_strength_i inside {L224, L256, L384, L512}) || 256 ((cfg_mode_i == Shake || cfg_mode_i == CShake) && 257 (cfg_strength_i inside {L128, L256})))) begin 258 1/1 err_modestrength = 1'b 1; Tests: T31 T24 T25  259 end MISSING_ELSE 260 end MISSING_ELSE 261 end : check_modestrength 262 263 264 // Check prefix 6B is `encode_string("KMAC")` 265 always_comb begin : check_prefix 266 1/1 err_prefix = 1'b 0; Tests: T1 T2 T3  267 268 1/1 if (st == StIdle && st_d == StMsgFeed && kmac_en_i) begin Tests: T1 T2 T3  269 1/1 if (cfg_prefix_6B_i != EncodedStringKMAC) begin Tests: T1 T2 T12  270 1/1 err_prefix = 1'b 1; Tests: T31 T24 T25  271 end MISSING_ELSE 272 end MISSING_ELSE 273 end : check_prefix 274 275 if (EnMasking) begin : g_entropy_chk 276 277 always_ff @(posedge clk_i or negedge rst_ni) begin 278 if (!rst_ni) cfg_entropy_ready <= 1'b 0; 279 else if (err_processed_i) cfg_entropy_ready <= 1'b 0; 280 else if (entropy_ready_pulse_i && st == StIdle) begin 281 cfg_entropy_ready <= 1'b 1; 282 end 283 end 284 285 always_comb begin : check_entropy_ready 286 err_entropy_ready = 1'b 0; 287 288 if (st == StIdle && st_d == StMsgFeed && kmac_en_i) begin 289 if (!cfg_entropy_ready) begin 290 err_entropy_ready = 1'b 1; 291 end 292 end 293 end : check_entropy_ready 294 295 end else begin : g_pseudo_entropy_chk 296 297 // If EnMasking is 0, entropy module is not generated. 298 // tying the error signal to 0. 299 assign err_entropy_ready = 1'b 0; 300 301 assign cfg_entropy_ready = 1'b 1; 302 303 logic unused_cfg_entropy_ready; 304 unreachable assign unused_cfg_entropy_ready = cfg_entropy_ready; 305 306 end 307 308 always_comb begin : recode_st 309 1/1 unique case (st) Tests: T1 T2 T3  310 1/1 StIdle : stL = StIdleL; Tests: T1 T2 T3  311 1/1 StMsgFeed : stL = StMsgFeedL; Tests: T1 T2 T12  312 1/1 StProcessing : stL = StProcessingL; Tests: T1 T2 T12  313 1/1 StAbsorbed : stL = StAbsorbedL; Tests: T1 T2 T12  314 1/1 StSqueezing : stL = StSqueezingL; Tests: T13 T15 T27  315 default : stL = StErrorL; 316 endcase 317 end : recode_st 318 319 // Return error code 320 err_t err; 321 always_comb begin : err_return 322 1/1 err = '{valid: 1'b0, code: ErrNone, info: '0}; Tests: T1 T2 T3  323 324 1/1 priority case (1'b 1) Tests: T1 T2 T3  325 err_swsequence: begin 326 1/1 err = '{ valid: 1'b 1, Tests: T31 T24 T25  327 code: ErrSwCmdSequence, 328 info: {5'h0, 329 {err_swsequence, err_modestrength, err_prefix}, 330 {5'h 0, stL}, 331 {2'b0, sw_cmd_i} 332 } 333 }; 334 end 335 336 err_modestrength: begin 337 1/1 err = '{ valid: 1'b 1, Tests: T31 T24 T25  338 code: ErrUnexpectedModeStrength, 339 info: { 5'h 0, 340 {err_swsequence, err_modestrength, err_prefix}, 341 8'h 0, 342 {2'b 00, cfg_mode_i}, 343 {1'b 0, cfg_strength_i} 344 } 345 }; 346 end 347 348 err_prefix: begin 349 1/1 err = '{ valid: 1'b 1, Tests: T31 T24 T25  350 code: ErrIncorrectFunctionName, 351 info: { 5'h 0, 352 {err_swsequence, err_modestrength, err_prefix}, 353 16'h 0000 354 } 355 }; 356 end 357 358 err_entropy_ready: begin 359 unreachable err = '{ valid: 1'b 1, 360 code: ErrSwHashingWithoutEntropyReady, 361 info: { 8'({ err_entropy_ready, 362 err_swsequence, 363 err_modestrength, 364 err_prefix}), 365 16'({kmac_en_i, cfg_entropy_ready}) 366 } 367 }; 368 end 369 370 default: begin 371 err = '{valid: 1'b0, code: ErrNone, info: '0}; 372 end 373 endcase 374 end : err_return 375 376 1/1 assign error_o = err; Tests: T1 T2 T3  377 378 // If below failed, revise err_swsequence error response info field. 379 `ASSERT_INIT(ExpectedStSwCmdBits_A, $bits(st) == StateWidth && $bits(sw_cmd_i) == 6) 380 381 // If failed, revise err_modestrength error info field. 382 `ASSERT_INIT(ExpectedModeStrengthBits_A, 383 $bits(cfg_mode_i) == 2 && $bits(cfg_strength_i) == 3) 384 385 386 /////////////////// 387 // State Machine // 388 /////////////////// 389 st_e st_gated_d; 390 391 3/3 `PRIM_FLOP_SPARSE_FSM(u_state_regs, st_gated_d, st, st_e, StIdle) Tests: T1 T2 T3  | T1 T2 T3  | T1 T2 T3 
PRIM_FLOP_SPARSE_FSM(u_state_regs, st_gated_d, st, st_e, StIdle): 391.1 `ifdef SIMULATION 391.2 prim_sparse_fsm_flop #( 391.3 .StateEnumT(st_e), 391.4 .Width($bits(st_e)), 391.5 .ResetValue($bits(st_e)'(StIdle)), 391.6 .EnableAlertTriggerSVA(1), 391.7 .CustomForceName("st") 391.8 ) u_state_regs ( 391.9 .clk_i ( clk_i ), 391.10 .rst_ni ( rst_ni ), 391.11 .state_i ( st_gated_d ), 391.12 .state_o ( ) 391.13 ); 391.14 always_ff @(posedge clk_i or negedge rst_ni) begin 391.15 1/1 if (!rst_ni) begin Tests: T1 T2 T3  391.16 1/1 st <= StIdle; Tests: T1 T2 T3  391.17 end else begin 391.18 1/1 st <= st_gated_d; Tests: T1 T2 T3  391.19 end 391.20 end 391.21 u_state_regs_A: assert property (@(posedge clk_i) disable iff ((!rst_ni) !== '0) (st === u_state_regs.state_o)) 391.22 else begin 391.23 `ifdef UVM 391.24 uvm_pkg::uvm_report_error("ASSERT FAILED", "u_state_regs_A", uvm_pkg::UVM_NONE, 391.25 "../src/lowrisc_ip_kmac_0.1/rtl/kmac_errchk.sv", 391, "", 1); 391.26 `else 391.27 $error("%0t: (%0s:%0d) [%m] [ASSERT FAILED] %0s", $time, `__FILE__, `__LINE__, 391.28 `PRIM_STRINGIFY(u_state_regs_A)); 391.29 `endif 391.30 end 391.31 `else 391.32 prim_sparse_fsm_flop #( 391.33 .StateEnumT(st_e), 391.34 .Width($bits(st_e)), 391.35 .ResetValue($bits(st_e)'(StIdle)), 391.36 .EnableAlertTriggerSVA(1) 391.37 ) u_state_regs ( 391.38 .clk_i ( `PRIM_FLOP_CLK ), 391.39 .rst_ni ( `PRIM_FLOP_RST ), 391.40 .state_i ( st_gated_d ), 391.41 .state_o ( st ) 391.42 ); 391.43 `endif392 393 // ICEBOX(#14631): Move block_swcmd to PRIM_FLOP_SPARSE_FSM() 394 // 395 // It would be better to place this condition (block_swcmd) in `always_ff` 396 // block to clearly indicate the clock gating condition. However, the 397 // statemachine uses the sparse encoding scheme and macro. It prevents any 398 // latch enable signals. 399 1/1 assign st_gated_d = (block_swcmd) ? st : st_d ; Tests: T1 T2 T3  400 401 always_comb begin : next_state 402 1/1 st_d = st; Tests: T1 T2 T3  403 404 1/1 unique case (st) Tests: T1 T2 T3  405 StIdle: begin 406 1/1 if (!app_active_i && sw_cmd_i == CmdStart) begin Tests: T1 T2 T3  407 // Proceed to the next state only when the SW issues the Start command 408 // in a valid period. 409 1/1 st_d = StMsgFeed; Tests: T1 T2 T12  410 end MISSING_ELSE 411 end 412 413 StMsgFeed: begin 414 1/1 if (sw_cmd_i == CmdProcess) begin Tests: T1 T2 T12  415 1/1 st_d = StProcessing; Tests: T1 T2 T12  416 end MISSING_ELSE 417 end 418 419 StProcessing: begin 420 1/1 if (prim_mubi_pkg::mubi4_test_true_strict(sha3_absorbed_i)) begin Tests: T1 T2 T12  421 1/1 st_d = StAbsorbed; Tests: T1 T2 T12  422 end MISSING_ELSE 423 end 424 425 StAbsorbed: begin 426 1/1 if (sw_cmd_i == CmdManualRun) begin Tests: T1 T2 T12  427 1/1 st_d = StSqueezing; Tests: T13 T15 T27  428 1/1 end else if (sw_cmd_i == CmdDone) begin Tests: T1 T2 T12  429 1/1 st_d = StIdle; Tests: T1 T2 T12  430 end MISSING_ELSE 431 end 432 433 StSqueezing: begin 434 1/1 if (keccak_done_i) begin Tests: T13 T15 T27  435 1/1 st_d = StAbsorbed; Tests: T13 T15 T27  436 end MISSING_ELSE 437 end 438 439 StTerminalError: begin 440 // this state is terminal 441 1/1 st_d = st; Tests: T3 T5 T6  442 end 443 444 default: begin 445 // this state is terminal 446 st_d = StTerminalError; 447 end 448 endcase 449 450 // SEC_CM: FSM.GLOBAL_ESC, FSM.LOCAL_ESC 451 // Unconditionally jump into the terminal error state 452 // if the life cycle controller triggers an escalation. 453 1/1 if (lc_ctrl_pkg::lc_tx_test_true_loose(lc_escalate_en_i)) begin Tests: T1 T2 T3  454 1/1 st_d = StTerminalError; Tests: T3 T5 T6  455 end MISSING_ELSE 456 457 1/1 if (st_d != StTerminalError && Tests: T1 T2 T3  458 prim_mubi_pkg::mubi4_test_true_strict(clear_after_error_i)) begin 459 1/1 st_d = StIdle; Tests: T4 T19 T20  460 end MISSING_ELSE

Cond Coverage for Module : kmac_errchk
TotalCoveredPercent
Conditions605896.67
Logical605896.67
Non-Logical00
Event00

 LINE       206
 EXPRESSION (sw_cmd_i != CmdNone)
            ----------1----------
-1-StatusTests
0CoveredT1,T2,T12
1Not Covered

 LINE       219
 EXPRESSION (sw_cmd_i != CmdNone)
            ----------1----------
-1-StatusTests
0CoveredT13,T15,T27
1Not Covered

 LINE       236
 EXPRESSION (err_swsequence || (err_modestrength && ((!cfg_en_unsupported_modestrength_i))) || err_entropy_ready)
             -------1------    ------------------------------2-----------------------------    --------3--------
-1--2--3-StatusTests
000CoveredT1,T2,T3
001Unreachable
010CoveredT24,T25,T26
100CoveredT31,T24,T25

 LINE       236
 SUB-EXPRESSION (err_modestrength && ((!cfg_en_unsupported_modestrength_i)))
                 --------1-------    -------------------2------------------
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT31,T24,T25
11CoveredT24,T25,T26

 LINE       252
 EXPRESSION ((st == StIdle) && (st_d == StMsgFeed))
             -------1------    ---------2---------
-1--2-StatusTests
01CoveredT1,T2,T12
10CoveredT1,T2,T3
11CoveredT1,T2,T12

 LINE       252
 SUB-EXPRESSION (st == StIdle)
                -------1------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       252
 SUB-EXPRESSION (st_d == StMsgFeed)
                ---------1---------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T12

 LINE       254
 EXPRESSION 
 Number  Term
      1  (((cfg_mode_i == Sha3) && (cfg_strength_i inside {L224, L256, L384, L512})) || (((cfg_mode_i == Shake) || (cfg_mode_i == CShake)) && (cfg_strength_i inside {L128, L256}))) )
-1-StatusTests
0CoveredT31,T24,T25
1CoveredT1,T2,T12

 LINE       254
 SUB-EXPRESSION 
 Number  Term
      1  ((cfg_mode_i == Sha3) && (cfg_strength_i inside {L224, L256, L384, L512})) || 
      2  (((cfg_mode_i == Shake) || (cfg_mode_i == CShake)) && (cfg_strength_i inside {L128, L256})))
-1--2-StatusTests
00CoveredT31,T24,T25
01CoveredT1,T2,T12
10CoveredT12,T13,T14

 LINE       254
 SUB-EXPRESSION ((cfg_mode_i == Sha3) && (cfg_strength_i inside {L224, L256, L384, L512}))
                 ----------1---------    ------------------------2-----------------------
-1--2-StatusTests
01CoveredT1,T12,T13
10CoveredT24,T25,T26
11CoveredT12,T13,T14

 LINE       254
 SUB-EXPRESSION (cfg_mode_i == Sha3)
                ----------1---------
-1-StatusTests
0CoveredT1,T2,T12
1CoveredT12,T13,T14

 LINE       254
 SUB-EXPRESSION (((cfg_mode_i == Shake) || (cfg_mode_i == CShake)) && (cfg_strength_i inside {L128, L256}))
                 ------------------------1------------------------    ------------------2-----------------
-1--2-StatusTests
01CoveredT12,T46,T60
10CoveredT31,T24,T25
11CoveredT1,T2,T12

 LINE       254
 SUB-EXPRESSION ((cfg_mode_i == Shake) || (cfg_mode_i == CShake))
                 ----------1----------    -----------2----------
-1--2-StatusTests
00CoveredT12,T13,T14
01CoveredT1,T2,T12
10CoveredT12,T13,T15

 LINE       254
 SUB-EXPRESSION (cfg_mode_i == Shake)
                ----------1----------
-1-StatusTests
0CoveredT1,T2,T12
1CoveredT12,T13,T15

 LINE       254
 SUB-EXPRESSION (cfg_mode_i == CShake)
                -----------1----------
-1-StatusTests
0CoveredT12,T13,T14
1CoveredT1,T2,T12

 LINE       268
 EXPRESSION ((st == StIdle) && (st_d == StMsgFeed) && kmac_en_i)
             -------1------    ---------2---------    ----3----
-1--2--3-StatusTests
011CoveredT1,T2,T12
101CoveredT1,T2,T4
110CoveredT12,T13,T14
111CoveredT1,T2,T12

 LINE       268
 SUB-EXPRESSION (st == StIdle)
                -------1------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       268
 SUB-EXPRESSION (st_d == StMsgFeed)
                ---------1---------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T12

 LINE       269
 EXPRESSION (cfg_prefix_6B_i != kmac_pkg::EncodedStringKMAC)
            ------------------------1-----------------------
-1-StatusTests
0CoveredT1,T2,T12
1CoveredT31,T24,T25

 LINE       399
 EXPRESSION (block_swcmd ? st : st_d)
             -----1-----
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT31,T24,T25

 LINE       406
 EXPRESSION (((!app_active_i)) && (sw_cmd_i == CmdStart))
             --------1--------    -----------2----------
-1--2-StatusTests
01CoveredT24,T25,T26
10CoveredT1,T2,T3
11CoveredT1,T2,T12

 LINE       406
 SUB-EXPRESSION (sw_cmd_i == CmdStart)
                -----------1----------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T12

 LINE       414
 EXPRESSION (sw_cmd_i == CmdProcess)
            ------------1-----------
-1-StatusTests
0CoveredT1,T2,T12
1CoveredT1,T2,T12

 LINE       426
 EXPRESSION (sw_cmd_i == CmdManualRun)
            -------------1------------
-1-StatusTests
0CoveredT1,T2,T12
1CoveredT13,T15,T27

 LINE       428
 EXPRESSION (sw_cmd_i == CmdDone)
            ----------1----------
-1-StatusTests
0CoveredT1,T2,T12
1CoveredT1,T2,T12

FSM Coverage for Module : kmac_errchk
Summary for FSM :: st
TotalCoveredPercent
States 6 6 100.00 (Not included in score)
Transitions 15 11 73.33
Sequences 0 0

State, Transition and Sequence Details for FSM :: st
statesLine No.CoveredTests
StAbsorbed 421 Covered T1,T2,T12
StIdle 429 Covered T1,T2,T3
StMsgFeed 409 Covered T1,T2,T12
StProcessing 415 Covered T1,T2,T12
StSqueezing 427 Covered T13,T15,T27
StTerminalError 454 Covered T3,T5,T6


transitionsLine No.CoveredTests
StAbsorbed->StIdle 429 Covered T1,T2,T12
StAbsorbed->StSqueezing 427 Covered T13,T15,T27
StAbsorbed->StTerminalError 454 Covered T61,T62,T63
StIdle->StMsgFeed 409 Covered T1,T2,T12
StIdle->StTerminalError 454 Covered T3,T5,T6
StMsgFeed->StIdle 459 Not Covered
StMsgFeed->StProcessing 415 Covered T1,T2,T12
StMsgFeed->StTerminalError 454 Covered T43,T44,T45
StProcessing->StAbsorbed 421 Covered T1,T2,T12
StProcessing->StIdle 459 Covered T35
StProcessing->StTerminalError 454 Not Covered
StSqueezing->StAbsorbed 435 Covered T13,T15,T27
StSqueezing->StIdle 459 Not Covered
StSqueezing->StTerminalError 454 Not Covered
StTerminalError->StIdle 459 Covered T3,T5,T6



Branch Coverage for Module : kmac_errchk
Line No.TotalCoveredPercent
Branches 52 50 96.15
TERNARY 399 2 2 100.00
CASE 190 12 10 83.33
IF 244 3 3 100.00
IF 252 3 3 100.00
IF 268 3 3 100.00
CASE 309 6 6 100.00
CASE 324 4 4 100.00
IF 391 2 2 100.00
CASE 404 13 13 100.00
IF 453 2 2 100.00
IF 457 2 2 100.00


399 assign st_gated_d = (block_swcmd) ? st : st_d ; -1- ==> ==>

Branches:
-1-StatusTests
1 Covered T31,T24,T25
0 Covered T1,T2,T3


190 unique case (st) -1- 191 StIdle: begin 192 // Allow Start command only 193 if (!(sw_cmd_i inside {CmdNone, CmdStart})) begin -2- 194 err_swsequence = 1'b 1; ==> 195 end MISSING_ELSE ==> 196 end 197 198 StMsgFeed: begin 199 // Allow Process only 200 if (!(sw_cmd_i inside {CmdNone, CmdProcess})) begin -3- 201 err_swsequence = 1'b 1; ==> 202 end MISSING_ELSE ==> 203 end 204 205 StProcessing: begin 206 if (sw_cmd_i != CmdNone) begin -4- 207 err_swsequence = 1'b 1; ==> 208 end MISSING_ELSE ==> 209 end 210 211 StAbsorbed: begin 212 // Allow ManualRun and Done 213 if (!(sw_cmd_i inside {CmdNone, CmdManualRun, CmdDone})) begin -5- 214 err_swsequence = 1'b 1; ==> 215 end MISSING_ELSE ==> 216 end 217 218 StSqueezing: begin 219 if (sw_cmd_i != CmdNone) begin -6- 220 err_swsequence = 1'b 1; ==> 221 end MISSING_ELSE ==> 222 end 223 224 StTerminalError: begin 225 err_swsequence = 1'b 0; ==> 226 sparse_fsm_error_o = 1'b 1; 227 end 228 229 default: begin 230 err_swsequence = 1'b 0; ==>

Branches:
-1--2--3--4--5--6-StatusTests
StIdle 1 - - - - Covered T24,T25,T26
StIdle 0 - - - - Covered T1,T2,T3
StMsgFeed - 1 - - - Covered T31,T24,T25
StMsgFeed - 0 - - - Covered T1,T2,T12
StProcessing - - 1 - - Not Covered
StProcessing - - 0 - - Covered T1,T2,T12
StAbsorbed - - - 1 - Covered T25,T90,T91
StAbsorbed - - - 0 - Covered T1,T2,T12
StSqueezing - - - - 1 Not Covered
StSqueezing - - - - 0 Covered T13,T15,T27
StTerminalError - - - - - Covered T3,T5,T6
default - - - - - Covered T6,T9,T10


244 if (!rst_ni) sw_cmd_o <= CmdNone; -1- ==> 245 else if (!block_swcmd) sw_cmd_o <= sw_cmd_i; -2- ==> MISSING_ELSE ==>

Branches:
-1--2-StatusTests
1 - Covered T1,T2,T3
0 1 Covered T1,T2,T3
0 0 Covered T31,T24,T25


252 if (st == StIdle && st_d == StMsgFeed) begin -1- 253 // When moving to the next stage, checks the config 254 if (!((cfg_mode_i == Sha3 && -2- 255 cfg_strength_i inside {L224, L256, L384, L512}) || 256 ((cfg_mode_i == Shake || cfg_mode_i == CShake) && 257 (cfg_strength_i inside {L128, L256})))) begin 258 err_modestrength = 1'b 1; ==> 259 end MISSING_ELSE ==> 260 end MISSING_ELSE ==>

Branches:
-1--2-StatusTests
1 1 Covered T31,T24,T25
1 0 Covered T1,T2,T12
0 - Covered T1,T2,T3


268 if (st == StIdle && st_d == StMsgFeed && kmac_en_i) begin -1- 269 if (cfg_prefix_6B_i != EncodedStringKMAC) begin -2- 270 err_prefix = 1'b 1; ==> 271 end MISSING_ELSE ==> 272 end MISSING_ELSE ==>

Branches:
-1--2-StatusTests
1 1 Covered T31,T24,T25
1 0 Covered T1,T2,T12
0 - Covered T1,T2,T3


309 unique case (st) -1- 310 StIdle : stL = StIdleL; ==> 311 StMsgFeed : stL = StMsgFeedL; ==> 312 StProcessing : stL = StProcessingL; ==> 313 StAbsorbed : stL = StAbsorbedL; ==> 314 StSqueezing : stL = StSqueezingL; ==> 315 default : stL = StErrorL; ==>

Branches:
-1-StatusTests
StIdle Covered T1,T2,T3
StMsgFeed Covered T1,T2,T12
StProcessing Covered T1,T2,T12
StAbsorbed Covered T1,T2,T12
StSqueezing Covered T13,T15,T27
default Covered T3,T5,T6


324 priority case (1'b 1) -1- 325 err_swsequence: begin 326 err = '{ valid: 1'b 1, ==> 327 code: ErrSwCmdSequence, 328 info: {5'h0, 329 {err_swsequence, err_modestrength, err_prefix}, 330 {5'h 0, stL}, 331 {2'b0, sw_cmd_i} 332 } 333 }; 334 end 335 336 err_modestrength: begin 337 err = '{ valid: 1'b 1, ==> 338 code: ErrUnexpectedModeStrength, 339 info: { 5'h 0, 340 {err_swsequence, err_modestrength, err_prefix}, 341 8'h 0, 342 {2'b 00, cfg_mode_i}, 343 {1'b 0, cfg_strength_i} 344 } 345 }; 346 end 347 348 err_prefix: begin 349 err = '{ valid: 1'b 1, ==> 350 code: ErrIncorrectFunctionName, 351 info: { 5'h 0, 352 {err_swsequence, err_modestrength, err_prefix}, 353 16'h 0000 354 } 355 }; 356 end 357 358 err_entropy_ready: begin 359 err = '{ valid: 1'b 1, ==> (Unreachable) 360 code: ErrSwHashingWithoutEntropyReady, 361 info: { 8'({ err_entropy_ready, 362 err_swsequence, 363 err_modestrength, 364 err_prefix}), 365 16'({kmac_en_i, cfg_entropy_ready}) 366 } 367 }; 368 end 369 370 default: begin 371 err = '{valid: 1'b0, code: ErrNone, info: '0}; ==>

Branches:
-1-StatusTests
err_swsequence Covered T31,T24,T25
err_modestrength Covered T31,T24,T25
err_prefix Covered T31,T24,T25
err_entropy_ready Unreachable
default Covered T1,T2,T3


391 `PRIM_FLOP_SPARSE_FSM(u_state_regs, st_gated_d, st, st_e, StIdle) -1- ==> ==>

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


404 unique case (st) -1- 405 StIdle: begin 406 if (!app_active_i && sw_cmd_i == CmdStart) begin -2- 407 // Proceed to the next state only when the SW issues the Start command 408 // in a valid period. 409 st_d = StMsgFeed; ==> 410 end MISSING_ELSE ==> 411 end 412 413 StMsgFeed: begin 414 if (sw_cmd_i == CmdProcess) begin -3- 415 st_d = StProcessing; ==> 416 end MISSING_ELSE ==> 417 end 418 419 StProcessing: begin 420 if (prim_mubi_pkg::mubi4_test_true_strict(sha3_absorbed_i)) begin -4- 421 st_d = StAbsorbed; ==> 422 end MISSING_ELSE ==> 423 end 424 425 StAbsorbed: begin 426 if (sw_cmd_i == CmdManualRun) begin -5- 427 st_d = StSqueezing; ==> 428 end else if (sw_cmd_i == CmdDone) begin -6- 429 st_d = StIdle; ==> 430 end MISSING_ELSE ==> 431 end 432 433 StSqueezing: begin 434 if (keccak_done_i) begin -7- 435 st_d = StAbsorbed; ==> 436 end MISSING_ELSE ==> 437 end 438 439 StTerminalError: begin 440 // this state is terminal 441 st_d = st; ==> 442 end 443 444 default: begin 445 // this state is terminal 446 st_d = StTerminalError; ==>

Branches:
-1--2--3--4--5--6--7-StatusTests
StIdle 1 - - - - - Covered T1,T2,T12
StIdle 0 - - - - - Covered T1,T2,T3
StMsgFeed - 1 - - - - Covered T1,T2,T12
StMsgFeed - 0 - - - - Covered T1,T2,T12
StProcessing - - 1 - - - Covered T1,T2,T12
StProcessing - - 0 - - - Covered T1,T2,T12
StAbsorbed - - - 1 - - Covered T13,T15,T27
StAbsorbed - - - 0 1 - Covered T1,T2,T12
StAbsorbed - - - 0 0 - Covered T1,T2,T12
StSqueezing - - - - - 1 Covered T13,T15,T27
StSqueezing - - - - - 0 Covered T13,T15,T27
StTerminalError - - - - - - Covered T3,T5,T6
default - - - - - - Covered T6,T9,T10


453 if (lc_ctrl_pkg::lc_tx_test_true_loose(lc_escalate_en_i)) begin -1- 454 st_d = StTerminalError; ==> 455 end MISSING_ELSE ==>

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


457 if (st_d != StTerminalError && -1- 458 prim_mubi_pkg::mubi4_test_true_strict(clear_after_error_i)) begin 459 st_d = StIdle; ==> 460 end MISSING_ELSE ==>

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


Assert Coverage for Module : kmac_errchk
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 4 4 100.00 4 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 4 4 100.00 4 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
ExpectedModeStrengthBits_A 669 669 0 0
ExpectedStSwCmdBits_A 669 669 0 0
StKnown_A 586954827 586808995 0 0
u_state_regs_A 586954827 586808995 0 0


ExpectedModeStrengthBits_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 669 669 0 0
T1 1 1 0 0
T2 1 1 0 0
T3 1 1 0 0
T4 1 1 0 0
T11 1 1 0 0
T12 1 1 0 0
T13 1 1 0 0
T14 1 1 0 0
T15 1 1 0 0
T18 1 1 0 0

ExpectedStSwCmdBits_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 669 669 0 0
T1 1 1 0 0
T2 1 1 0 0
T3 1 1 0 0
T4 1 1 0 0
T11 1 1 0 0
T12 1 1 0 0
T13 1 1 0 0
T14 1 1 0 0
T15 1 1 0 0
T18 1 1 0 0

StKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 586954827 586808995 0 0
T1 3191 3109 0 0
T2 2553 2484 0 0
T3 3118 2970 0 0
T4 75687 75626 0 0
T11 95001 94910 0 0
T12 47249 47176 0 0
T13 95132 95061 0 0
T14 61890 61794 0 0
T15 138198 138099 0 0
T18 1056 979 0 0

u_state_regs_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 586954827 586808995 0 0
T1 3191 3109 0 0
T2 2553 2484 0 0
T3 3118 2970 0 0
T4 75687 75626 0 0
T11 95001 94910 0 0
T12 47249 47176 0 0
T13 95132 95061 0 0
T14 61890 61794 0 0
T15 138198 138099 0 0
T18 1056 979 0 0

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