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

Line Coverage for Module : otp_ctrl_part_unbuf ( parameter Info=65616,DigestOffset=56,StateWidth=10 )
Line Coverage for Module self-instances :
SCORELINE
96.23 100.00
tb.dut.gen_partitions[0].gen_unbuffered.u_part_unbuf

Line No.TotalCoveredPercent
TOTAL938692.47
CONT_ASSIGN13811100.00
ALWAYS15333100.00
ALWAYS164686189.71
CONT_ASSIGN33411100.00
CONT_ASSIGN33611100.00
CONT_ASSIGN33911100.00
CONT_ASSIGN34911100.00
CONT_ASSIGN35011100.00
CONT_ASSIGN35411100.00
CONT_ASSIGN35811100.00
CONT_ASSIGN39511100.00
CONT_ASSIGN42011100.00
CONT_ASSIGN45411100.00
ALWAYS46133100.00
ALWAYS46488100.00

137 // Output partition error state. 138 1/1 assign error_o = error_q; Tests: T1 T2 T3  139 140 // This partition cannot do any write accesses, hence we tie this 141 // constantly off. 142 assign otp_wdata_o = '0; 143 // Depending on the partition configuration, the wrapper is instructed to ignore integrity 144 // calculations and checks. To be on the safe side, the partition filters error responses at this 145 // point and does not report any integrity errors if integrity is disabled. 146 otp_err_e otp_err; 147 if (Info.integrity) begin : gen_integrity 148 assign otp_cmd_o = prim_otp_pkg::Read; 149 assign otp_err = otp_err_e'(otp_err_i); 150 end else begin : gen_no_integrity 151 assign otp_cmd_o = prim_otp_pkg::ReadRaw; 152 always_comb begin 153 1/1 if (otp_err_e'(otp_err_i) inside {MacroEccCorrError, MacroEccUncorrError}) begin Tests: T1 T2 T3  154 1/1 otp_err = NoError; Tests: T2 T5 T104  155 end else begin 156 1/1 otp_err = otp_err_e'(otp_err_i); Tests: T1 T2 T3  157 end 158 end 159 end 160 161 `ASSERT_KNOWN(FsmStateKnown_A, state_q) 162 always_comb begin : p_fsm 163 // Default assignments 164 1/1 state_d = state_q; Tests: T1 T2 T3  165 166 // Response to init request 167 1/1 init_done_o = 1'b0; Tests: T1 T2 T3  168 169 // OTP signals 170 1/1 otp_req_o = 1'b0; Tests: T1 T2 T3  171 1/1 otp_addr_sel = DigestAddrSel; Tests: T1 T2 T3  172 173 // TL-UL signals 174 1/1 tlul_gnt_o = 1'b0; Tests: T1 T2 T3  175 1/1 tlul_rvalid_o = 1'b0; Tests: T1 T2 T3  176 1/1 tlul_rerror_o = '0; Tests: T1 T2 T3  177 178 // Enable for buffered digest register 179 1/1 digest_reg_en = 1'b0; Tests: T1 T2 T3  180 181 // Error Register 182 1/1 error_d = error_q; Tests: T1 T2 T3  183 1/1 pending_tlul_error_d = 1'b0; Tests: T1 T2 T3  184 1/1 fsm_err_o = 1'b0; Tests: T1 T2 T3  185 186 1/1 unique case (state_q) Tests: T1 T2 T3  187 /////////////////////////////////////////////////////////////////// 188 // State right after reset. Wait here until we get a an 189 // initialization request. 190 ResetSt: begin 191 1/1 if (init_req_i) begin Tests: T1 T2 T3  192 // If the partition does not have a digest, no initialization is necessary. 193 1/1 if (Info.sw_digest) begin Tests: T1 T2 T3  194 1/1 state_d = InitSt; Tests: T1 T2 T3  195 end else begin 196 unreachable state_d = IdleSt; 197 end 198 end MISSING_ELSE 199 end 200 /////////////////////////////////////////////////////////////////// 201 // Initialization reads out the digest only in unbuffered 202 // partitions. Wait here until the OTP request has been granted. 203 // And then wait until the OTP word comes back. 204 InitSt: begin 205 1/1 otp_req_o = 1'b1; Tests: T1 T2 T3  206 1/1 if (otp_gnt_i) begin Tests: T1 T2 T3  207 1/1 state_d = InitWaitSt; Tests: T1 T2 T3  208 end ==> MISSING_ELSE 209 end 210 /////////////////////////////////////////////////////////////////// 211 // Wait for OTP response and write to digest buffer register. In 212 // case an OTP transaction fails, latch the OTP error code and 213 // jump to a terminal error state. 214 InitWaitSt: begin 215 1/1 if (otp_rvalid_i) begin Tests: T1 T2 T3  216 1/1 digest_reg_en = 1'b1; Tests: T1 T2 T3  217 1/1 if (otp_err inside {NoError, MacroEccCorrError}) begin Tests: T1 T2 T3  218 1/1 state_d = IdleSt; Tests: T1 T2 T3  219 // At this point the only error that we could have gotten are correctable ECC errors. 220 1/1 if (otp_err != NoError) begin Tests: T1 T2 T3  221 0/1 ==> error_d = MacroEccCorrError; 222 end MISSING_ELSE 223 end else begin 224 0/1 ==> state_d = ErrorSt; 225 0/1 ==> error_d = otp_err; 226 end 227 end MISSING_ELSE 228 end 229 /////////////////////////////////////////////////////////////////// 230 // Wait for TL-UL requests coming in. 231 // Then latch address and go to readout state. 232 IdleSt: begin 233 1/1 init_done_o = 1'b1; Tests: T1 T2 T3  234 1/1 if (tlul_req_i) begin Tests: T1 T2 T3  235 1/1 error_d = NoError; // clear recoverable soft errors. Tests: T2 T3 T4  236 1/1 state_d = ReadSt; Tests: T2 T3 T4  237 1/1 tlul_gnt_o = 1'b1; Tests: T2 T3 T4  238 end MISSING_ELSE 239 end 240 /////////////////////////////////////////////////////////////////// 241 // If the address is out of bounds, or if the partition is 242 // locked, signal back a bus error. Note that such an error does 243 // not cause the partition to go into error state. Otherwise if 244 // these checks pass, an OTP word is requested. 245 ReadSt: begin 246 1/1 init_done_o = 1'b1; Tests: T2 T3 T4  247 // Double check the address range. 248 1/1 if (tlul_addr_in_range && mubi8_test_false_strict(access_o.read_lock)) begin Tests: T2 T3 T4  249 1/1 otp_req_o = 1'b1; Tests: T2 T3 T4  250 1/1 otp_addr_sel = DataAddrSel; Tests: T2 T3 T4  251 1/1 if (otp_gnt_i) begin Tests: T2 T3 T4  252 1/1 state_d = ReadWaitSt; Tests: T2 T3 T4  253 end MISSING_ELSE 254 end else begin 255 1/1 state_d = IdleSt; Tests: T12 T17 T93  256 1/1 error_d = AccessError; // Signal this error, but do not go into terminal error state. Tests: T12 T17 T93  257 1/1 tlul_rvalid_o = 1'b1; Tests: T12 T17 T93  258 1/1 tlul_rerror_o = 2'b11; // This causes the TL-UL adapter to return a bus error. Tests: T12 T17 T93  259 end 260 end 261 /////////////////////////////////////////////////////////////////// 262 // Wait for OTP response and release the TL-UL response. In 263 // case an OTP transaction fails, latch the OTP error code, 264 // signal a TL-Ul bus error and jump to a terminal error state. 265 ReadWaitSt: begin 266 1/1 init_done_o = 1'b1; Tests: T2 T3 T4  267 1/1 if (otp_rvalid_i) begin Tests: T2 T3 T4  268 1/1 tlul_rvalid_o = 1'b1; Tests: T2 T3 T4  269 1/1 if (otp_err inside {NoError, MacroEccCorrError}) begin Tests: T2 T3 T4  270 1/1 state_d = IdleSt; Tests: T2 T3 T4  271 // At this point the only error that we could have gotten are correctable ECC errors. 272 1/1 if (otp_err != NoError) begin Tests: T2 T3 T4  273 0/1 ==> error_d = MacroEccCorrError; 274 end MISSING_ELSE 275 end else begin 276 0/1 ==> state_d = ErrorSt; 277 0/1 ==> error_d = otp_err; 278 // This causes the TL-UL adapter to return a bus error. 279 0/1 ==> tlul_rerror_o = 2'b11; 280 end 281 end MISSING_ELSE 282 end 283 /////////////////////////////////////////////////////////////////// 284 // Terminal Error State. This locks access to the partition. 285 // Make sure the partition signals an error state if no error 286 // code has been latched so far. 287 ErrorSt: begin 288 1/1 if (error_q == NoError) begin Tests: T2 T4 T5  289 1/1 error_d = FsmStateError; Tests: T26 T27 T28  290 end MISSING_ELSE 291 292 // Return bus errors if there are pending TL-UL requests. 293 1/1 if (pending_tlul_error_q) begin Tests: T2 T4 T5  294 1/1 tlul_rerror_o = 2'b11; Tests: T4 T5 T101  295 1/1 tlul_rvalid_o = 1'b1; Tests: T4 T5 T101  296 1/1 end else if (tlul_req_i) begin Tests: T2 T4 T5  297 1/1 tlul_gnt_o = 1'b1; Tests: T4 T5 T101  298 1/1 pending_tlul_error_d = 1'b1; Tests: T4 T5 T101  299 end MISSING_ELSE 300 end 301 /////////////////////////////////////////////////////////////////// 302 // We should never get here. If we do (e.g. via a malicious 303 // glitch), error out immediately. 304 default: begin 305 state_d = ErrorSt; 306 fsm_err_o = 1'b1; 307 end 308 /////////////////////////////////////////////////////////////////// 309 endcase // state_q 310 311 // Unconditionally jump into the terminal error state in case of 312 // an ECC error or escalation, and lock access to the partition down. 313 // SEC_CM: PART.FSM.LOCAL_ESC 314 1/1 if (ecc_err) begin Tests: T1 T2 T3  315 1/1 state_d = ErrorSt; Tests: T109 T152  316 1/1 if (state_q != ErrorSt) begin Tests: T109 T152  317 1/1 error_d = CheckFailError; Tests: T109 T152  318 end MISSING_ELSE 319 end MISSING_ELSE 320 // SEC_CM: PART.FSM.GLOBAL_ESC 321 1/1 if (lc_ctrl_pkg::lc_tx_test_true_loose(escalate_en_i)) begin Tests: T1 T2 T3  322 1/1 state_d = ErrorSt; Tests: T2 T4 T5  323 1/1 fsm_err_o = 1'b1; Tests: T2 T4 T5  324 1/1 if (state_q != ErrorSt) begin Tests: T2 T4 T5  325 1/1 error_d = FsmStateError; Tests: T2 T4 T5  326 end MISSING_ELSE 327 end MISSING_ELSE 328 end 329 330 /////////////////////////////////// 331 // Signals to/from TL-UL Adapter // 332 /////////////////////////////////// 333 334 1/1 assign tlul_addr_d = tlul_addr_i; Tests: T1 T2 T3  335 // Do not forward data in case of an error. 336 1/1 assign tlul_rdata_o = (tlul_rvalid_o && tlul_rerror_o == '0) ? otp_rdata_i[31:0] : '0; Tests: T1 T2 T3  337 338 if (Info.offset == 0) begin : gen_zero_offset 339 1/1 assign tlul_addr_in_range = {1'b0, tlul_addr_q, 2'b00} < PartEnd; Tests: T1 T2 T3  340 341 end else begin : gen_nonzero_offset 342 assign tlul_addr_in_range = {tlul_addr_q, 2'b00} >= Info.offset && 343 {1'b0, tlul_addr_q, 2'b00} < PartEnd; 344 end 345 346 // Note that OTP works on halfword (16bit) addresses, hence need to 347 // shift the addresses appropriately. 348 logic [OtpByteAddrWidth-1:0] addr_calc; 349 1/1 assign addr_calc = (otp_addr_sel == DigestAddrSel) ? DigestOffset : {tlul_addr_q, 2'b00}; Tests: T1 T2 T3  350 1/1 assign otp_addr_o = addr_calc[OtpByteAddrWidth-1:OtpAddrShift]; Tests: T1 T2 T3  351 352 if (OtpAddrShift > 0) begin : gen_unused 353 logic unused_bits; 354 1/1 assign unused_bits = ^addr_calc[OtpAddrShift-1:0]; Tests: T1 T2 T3  355 end 356 357 // Request 32bit except in case of the digest. 358 1/1 assign otp_size_o = (otp_addr_sel == DigestAddrSel) ? Tests: T1 T2 T3  359 OtpSizeWidth'(unsigned'(ScrmblBlockWidth / OtpWidth - 1)) : 360 OtpSizeWidth'(unsigned'(32 / OtpWidth - 1)); 361 362 //////////////// 363 // Digest Reg // 364 //////////////// 365 366 if (Info.sw_digest) begin : gen_ecc_reg 367 // SEC_CM: PART.DATA_REG.INTEGRITY 368 otp_ctrl_ecc_reg #( 369 .Width ( ScrmblBlockWidth ), 370 .Depth ( 1 ) 371 ) u_otp_ctrl_ecc_reg ( 372 .clk_i, 373 .rst_ni, 374 .wren_i ( digest_reg_en ), 375 .addr_i ( '0 ), 376 .wdata_i ( otp_rdata_i ), 377 .rdata_o ( ), 378 .data_o ( digest_o ), 379 .ecc_err_o ( ecc_err ) 380 ); 381 end else begin : gen_no_ecc_reg 382 logic unused_digest_reg_en; 383 logic unused_rdata; 384 assign unused_digest_reg_en = digest_reg_en; 385 assign unused_rdata = ^otp_rdata_i[32 +: 32]; // Upper word is not connected in this case. 386 assign digest_o = '0; 387 assign ecc_err = 1'b0; 388 end 389 390 //////////////////////// 391 // DAI Access Control // 392 //////////////////////// 393 394 mubi8_t init_locked; 395 1/1 assign init_locked = (~init_done_o) ? MuBi8True : MuBi8False; Tests: T1 T2 T3  396 397 // Aggregate all possible DAI write locks. The partition is also locked when uninitialized. 398 // Note that the locks are redundantly encoded values. 399 part_access_t access_pre; 400 prim_mubi8_sender #( 401 .AsyncOn(0) 402 ) u_prim_mubi8_sender_write_lock_pre ( 403 .clk_i, 404 .rst_ni, 405 .mubi_i(mubi8_and_lo(init_locked, access_i.write_lock)), 406 .mubi_o(access_pre.write_lock) 407 ); 408 prim_mubi8_sender #( 409 .AsyncOn(0) 410 ) u_prim_mubi8_sender_read_lock_pre ( 411 .clk_i, 412 .rst_ni, 413 .mubi_i(mubi8_and_lo(init_locked, access_i.read_lock)), 414 .mubi_o(access_pre.read_lock) 415 ); 416 417 // SEC_CM: PART.MEM.SW_UNWRITABLE 418 if (Info.write_lock) begin : gen_digest_write_lock 419 mubi8_t digest_locked; 420 1/1 assign digest_locked = (digest_o != '0) ? MuBi8True : MuBi8False; Tests: T1 T2 T3  421 422 // This prevents the synthesis tool from optimizing the multibit signal. 423 prim_mubi8_sender #( 424 .AsyncOn(0) 425 ) u_prim_mubi8_sender_write_lock ( 426 .clk_i, 427 .rst_ni, 428 .mubi_i(mubi8_and_lo(access_pre.write_lock, digest_locked)), 429 .mubi_o(access_o.write_lock) 430 ); 431 432 `ASSERT(DigestWriteLocksPartition_A, digest_o |-> mubi8_test_true_loose(access_o.write_lock)) 433 end else begin : gen_no_digest_write_lock 434 assign access_o.write_lock = access_pre.write_lock; 435 end 436 437 // SEC_CM: PART.MEM.SW_UNREADABLE 438 if (Info.read_lock) begin : gen_digest_read_lock 439 mubi8_t digest_locked; 440 assign digest_locked = (digest_o != '0) ? MuBi8True : MuBi8False; 441 442 // This prevents the synthesis tool from optimizing the multibit signal. 443 prim_mubi8_sender #( 444 .AsyncOn(0) 445 ) u_prim_mubi8_sender_read_lock ( 446 .clk_i, 447 .rst_ni, 448 .mubi_i(mubi8_and_lo(access_pre.read_lock, digest_locked)), 449 .mubi_o(access_o.read_lock) 450 ); 451 452 `ASSERT(DigestReadLocksPartition_A, digest_o |-> mubi8_test_true_loose(access_o.read_lock)) 453 end else begin : gen_no_digest_read_lock 454 1/1 assign access_o.read_lock = access_pre.read_lock; Tests: T1 T2 T3  455 end 456 457 /////////////// 458 // Registers // 459 /////////////// 460 461 3/3 `PRIM_FLOP_SPARSE_FSM(u_state_regs, state_d, state_q, state_e, ResetSt) Tests: T1 T2 T3  | T1 T2 T3  | T1 T2 T3 
PRIM_FLOP_SPARSE_FSM(u_state_regs, state_d, state_q, state_e, ResetSt): 461.1 `ifdef SIMULATION 461.2 prim_sparse_fsm_flop #( 461.3 .StateEnumT(state_e), 461.4 .Width($bits(state_e)), 461.5 .ResetValue($bits(state_e)'(ResetSt)), 461.6 .EnableAlertTriggerSVA(1), 461.7 .CustomForceName("state_q") 461.8 ) u_state_regs ( 461.9 .clk_i ( clk_i ), 461.10 .rst_ni ( rst_ni ), 461.11 .state_i ( state_d ), 461.12 .state_o ( ) 461.13 ); 461.14 always_ff @(posedge clk_i or negedge rst_ni) begin 461.15 1/1 if (!rst_ni) begin Tests: T1 T2 T3  461.16 1/1 state_q <= ResetSt; Tests: T1 T2 T3  461.17 end else begin 461.18 1/1 state_q <= state_d; Tests: T1 T2 T3  461.19 end 461.20 end 461.21 u_state_regs_A: assert property (@(posedge clk_i) disable iff ((!rst_ni) !== '0) (state_q === u_state_regs.state_o)) 461.22 else begin 461.23 `ifdef UVM 461.24 uvm_pkg::uvm_report_error("ASSERT FAILED", "u_state_regs_A", uvm_pkg::UVM_NONE, 461.25 "../src/lowrisc_ip_otp_ctrl_1.0/rtl/otp_ctrl_part_unbuf.sv", 461, "", 1); 461.26 `else 461.27 $error("%0t: (%0s:%0d) [%m] [ASSERT FAILED] %0s", $time, `__FILE__, `__LINE__, 461.28 `PRIM_STRINGIFY(u_state_regs_A)); 461.29 `endif 461.30 end 461.31 `else 461.32 prim_sparse_fsm_flop #( 461.33 .StateEnumT(state_e), 461.34 .Width($bits(state_e)), 461.35 .ResetValue($bits(state_e)'(ResetSt)), 461.36 .EnableAlertTriggerSVA(1) 461.37 ) u_state_regs ( 461.38 .clk_i ( `PRIM_FLOP_CLK ), 461.39 .rst_ni ( `PRIM_FLOP_RST ), 461.40 .state_i ( state_d ), 461.41 .state_o ( state_q ) 461.42 ); 461.43 `endif462 463 always_ff @(posedge clk_i or negedge rst_ni) begin : p_regs 464 1/1 if (!rst_ni) begin Tests: T1 T2 T3  465 1/1 error_q <= NoError; Tests: T1 T2 T3  466 1/1 tlul_addr_q <= '0; Tests: T1 T2 T3  467 1/1 pending_tlul_error_q <= 1'b0; Tests: T1 T2 T3  468 end else begin 469 1/1 error_q <= error_d; Tests: T1 T2 T3  470 1/1 pending_tlul_error_q <= pending_tlul_error_d; Tests: T1 T2 T3  471 1/1 if (tlul_gnt_o) begin Tests: T1 T2 T3  472 1/1 tlul_addr_q <= tlul_addr_d; Tests: T2 T3 T4  473 end MISSING_ELSE

Line Coverage for Module : otp_ctrl_part_unbuf ( parameter Info=134594644,DigestOffset=424,StateWidth=10 )
Line Coverage for Module self-instances :
SCORELINE
98.33 100.00
tb.dut.gen_partitions[1].gen_unbuffered.u_part_unbuf

Line No.TotalCoveredPercent
TOTAL9191100.00
CONT_ASSIGN13811100.00
CONT_ASSIGN14911100.00
ALWAYS1646868100.00
CONT_ASSIGN33411100.00
CONT_ASSIGN33611100.00
CONT_ASSIGN34211100.00
CONT_ASSIGN34911100.00
CONT_ASSIGN35011100.00
CONT_ASSIGN35411100.00
CONT_ASSIGN35811100.00
CONT_ASSIGN39511100.00
CONT_ASSIGN42011100.00
CONT_ASSIGN45411100.00
ALWAYS46133100.00
ALWAYS46488100.00

137 // Output partition error state. 138 1/1 assign error_o = error_q; Tests: T1 T2 T3  139 140 // This partition cannot do any write accesses, hence we tie this 141 // constantly off. 142 assign otp_wdata_o = '0; 143 // Depending on the partition configuration, the wrapper is instructed to ignore integrity 144 // calculations and checks. To be on the safe side, the partition filters error responses at this 145 // point and does not report any integrity errors if integrity is disabled. 146 otp_err_e otp_err; 147 if (Info.integrity) begin : gen_integrity 148 assign otp_cmd_o = prim_otp_pkg::Read; 149 1/1 assign otp_err = otp_err_e'(otp_err_i); Tests: T1 T2 T3  150 end else begin : gen_no_integrity 151 assign otp_cmd_o = prim_otp_pkg::ReadRaw; 152 always_comb begin 153 if (otp_err_e'(otp_err_i) inside {MacroEccCorrError, MacroEccUncorrError}) begin 154 otp_err = NoError; 155 end else begin 156 otp_err = otp_err_e'(otp_err_i); 157 end 158 end 159 end 160 161 `ASSERT_KNOWN(FsmStateKnown_A, state_q) 162 always_comb begin : p_fsm 163 // Default assignments 164 1/1 state_d = state_q; Tests: T1 T2 T3  165 166 // Response to init request 167 1/1 init_done_o = 1'b0; Tests: T1 T2 T3  168 169 // OTP signals 170 1/1 otp_req_o = 1'b0; Tests: T1 T2 T3  171 1/1 otp_addr_sel = DigestAddrSel; Tests: T1 T2 T3  172 173 // TL-UL signals 174 1/1 tlul_gnt_o = 1'b0; Tests: T1 T2 T3  175 1/1 tlul_rvalid_o = 1'b0; Tests: T1 T2 T3  176 1/1 tlul_rerror_o = '0; Tests: T1 T2 T3  177 178 // Enable for buffered digest register 179 1/1 digest_reg_en = 1'b0; Tests: T1 T2 T3  180 181 // Error Register 182 1/1 error_d = error_q; Tests: T1 T2 T3  183 1/1 pending_tlul_error_d = 1'b0; Tests: T1 T2 T3  184 1/1 fsm_err_o = 1'b0; Tests: T1 T2 T3  185 186 1/1 unique case (state_q) Tests: T1 T2 T3  187 /////////////////////////////////////////////////////////////////// 188 // State right after reset. Wait here until we get a an 189 // initialization request. 190 ResetSt: begin 191 1/1 if (init_req_i) begin Tests: T1 T2 T3  192 // If the partition does not have a digest, no initialization is necessary. 193 1/1 if (Info.sw_digest) begin Tests: T1 T2 T3  194 1/1 state_d = InitSt; Tests: T1 T2 T3  195 end else begin 196 unreachable state_d = IdleSt; 197 end 198 end MISSING_ELSE 199 end 200 /////////////////////////////////////////////////////////////////// 201 // Initialization reads out the digest only in unbuffered 202 // partitions. Wait here until the OTP request has been granted. 203 // And then wait until the OTP word comes back. 204 InitSt: begin 205 1/1 otp_req_o = 1'b1; Tests: T1 T2 T3  206 1/1 if (otp_gnt_i) begin Tests: T1 T2 T3  207 1/1 state_d = InitWaitSt; Tests: T1 T2 T3  208 end MISSING_ELSE 209 end 210 /////////////////////////////////////////////////////////////////// 211 // Wait for OTP response and write to digest buffer register. In 212 // case an OTP transaction fails, latch the OTP error code and 213 // jump to a terminal error state. 214 InitWaitSt: begin 215 1/1 if (otp_rvalid_i) begin Tests: T1 T2 T3  216 1/1 digest_reg_en = 1'b1; Tests: T1 T2 T3  217 1/1 if (otp_err inside {NoError, MacroEccCorrError}) begin Tests: T1 T2 T3  218 1/1 state_d = IdleSt; Tests: T1 T2 T3  219 // At this point the only error that we could have gotten are correctable ECC errors. 220 1/1 if (otp_err != NoError) begin Tests: T1 T2 T3  221 1/1 error_d = MacroEccCorrError; Tests: T33 T153 T154  222 end MISSING_ELSE 223 end else begin 224 1/1 state_d = ErrorSt; Tests: T2 T104 T117  225 1/1 error_d = otp_err; Tests: T2 T104 T117  226 end 227 end MISSING_ELSE 228 end 229 /////////////////////////////////////////////////////////////////// 230 // Wait for TL-UL requests coming in. 231 // Then latch address and go to readout state. 232 IdleSt: begin 233 1/1 init_done_o = 1'b1; Tests: T1 T2 T3  234 1/1 if (tlul_req_i) begin Tests: T1 T2 T3  235 1/1 error_d = NoError; // clear recoverable soft errors. Tests: T2 T4 T5  236 1/1 state_d = ReadSt; Tests: T2 T4 T5  237 1/1 tlul_gnt_o = 1'b1; Tests: T2 T4 T5  238 end MISSING_ELSE 239 end 240 /////////////////////////////////////////////////////////////////// 241 // If the address is out of bounds, or if the partition is 242 // locked, signal back a bus error. Note that such an error does 243 // not cause the partition to go into error state. Otherwise if 244 // these checks pass, an OTP word is requested. 245 ReadSt: begin 246 1/1 init_done_o = 1'b1; Tests: T2 T4 T5  247 // Double check the address range. 248 1/1 if (tlul_addr_in_range && mubi8_test_false_strict(access_o.read_lock)) begin Tests: T2 T4 T5  249 1/1 otp_req_o = 1'b1; Tests: T2 T4 T5  250 1/1 otp_addr_sel = DataAddrSel; Tests: T2 T4 T5  251 1/1 if (otp_gnt_i) begin Tests: T2 T4 T5  252 1/1 state_d = ReadWaitSt; Tests: T2 T4 T5  253 end MISSING_ELSE 254 end else begin 255 1/1 state_d = IdleSt; Tests: T12 T102 T19  256 1/1 error_d = AccessError; // Signal this error, but do not go into terminal error state. Tests: T12 T102 T19  257 1/1 tlul_rvalid_o = 1'b1; Tests: T12 T102 T19  258 1/1 tlul_rerror_o = 2'b11; // This causes the TL-UL adapter to return a bus error. Tests: T12 T102 T19  259 end 260 end 261 /////////////////////////////////////////////////////////////////// 262 // Wait for OTP response and release the TL-UL response. In 263 // case an OTP transaction fails, latch the OTP error code, 264 // signal a TL-Ul bus error and jump to a terminal error state. 265 ReadWaitSt: begin 266 1/1 init_done_o = 1'b1; Tests: T2 T4 T5  267 1/1 if (otp_rvalid_i) begin Tests: T2 T4 T5  268 1/1 tlul_rvalid_o = 1'b1; Tests: T2 T4 T5  269 1/1 if (otp_err inside {NoError, MacroEccCorrError}) begin Tests: T2 T4 T5  270 1/1 state_d = IdleSt; Tests: T2 T4 T5  271 // At this point the only error that we could have gotten are correctable ECC errors. 272 1/1 if (otp_err != NoError) begin Tests: T2 T4 T5  273 1/1 error_d = MacroEccCorrError; Tests: T5 T40 T155  274 end MISSING_ELSE 275 end else begin 276 1/1 state_d = ErrorSt; Tests: T155 T156 T157  277 1/1 error_d = otp_err; Tests: T155 T156 T157  278 // This causes the TL-UL adapter to return a bus error. 279 1/1 tlul_rerror_o = 2'b11; Tests: T155 T156 T157  280 end 281 end MISSING_ELSE 282 end 283 /////////////////////////////////////////////////////////////////// 284 // Terminal Error State. This locks access to the partition. 285 // Make sure the partition signals an error state if no error 286 // code has been latched so far. 287 ErrorSt: begin 288 1/1 if (error_q == NoError) begin Tests: T2 T4 T5  289 1/1 error_d = FsmStateError; Tests: T26 T27 T28  290 end MISSING_ELSE 291 292 // Return bus errors if there are pending TL-UL requests. 293 1/1 if (pending_tlul_error_q) begin Tests: T2 T4 T5  294 1/1 tlul_rerror_o = 2'b11; Tests: T4 T101 T102  295 1/1 tlul_rvalid_o = 1'b1; Tests: T4 T101 T102  296 1/1 end else if (tlul_req_i) begin Tests: T2 T4 T5  297 1/1 tlul_gnt_o = 1'b1; Tests: T4 T101 T102  298 1/1 pending_tlul_error_d = 1'b1; Tests: T4 T101 T102  299 end MISSING_ELSE 300 end 301 /////////////////////////////////////////////////////////////////// 302 // We should never get here. If we do (e.g. via a malicious 303 // glitch), error out immediately. 304 default: begin 305 state_d = ErrorSt; 306 fsm_err_o = 1'b1; 307 end 308 /////////////////////////////////////////////////////////////////// 309 endcase // state_q 310 311 // Unconditionally jump into the terminal error state in case of 312 // an ECC error or escalation, and lock access to the partition down. 313 // SEC_CM: PART.FSM.LOCAL_ESC 314 1/1 if (ecc_err) begin Tests: T1 T2 T3  315 1/1 state_d = ErrorSt; Tests: T109 T110  316 1/1 if (state_q != ErrorSt) begin Tests: T109 T110  317 1/1 error_d = CheckFailError; Tests: T109 T110  318 end MISSING_ELSE 319 end MISSING_ELSE 320 // SEC_CM: PART.FSM.GLOBAL_ESC 321 1/1 if (lc_ctrl_pkg::lc_tx_test_true_loose(escalate_en_i)) begin Tests: T1 T2 T3  322 1/1 state_d = ErrorSt; Tests: T2 T4 T5  323 1/1 fsm_err_o = 1'b1; Tests: T2 T4 T5  324 1/1 if (state_q != ErrorSt) begin Tests: T2 T4 T5  325 1/1 error_d = FsmStateError; Tests: T4 T5 T101  326 end MISSING_ELSE 327 end MISSING_ELSE 328 end 329 330 /////////////////////////////////// 331 // Signals to/from TL-UL Adapter // 332 /////////////////////////////////// 333 334 1/1 assign tlul_addr_d = tlul_addr_i; Tests: T1 T2 T3  335 // Do not forward data in case of an error. 336 1/1 assign tlul_rdata_o = (tlul_rvalid_o && tlul_rerror_o == '0) ? otp_rdata_i[31:0] : '0; Tests: T1 T2 T3  337 338 if (Info.offset == 0) begin : gen_zero_offset 339 assign tlul_addr_in_range = {1'b0, tlul_addr_q, 2'b00} < PartEnd; 340 341 end else begin : gen_nonzero_offset 342 1/1 assign tlul_addr_in_range = {tlul_addr_q, 2'b00} >= Info.offset && Tests: T1 T2 T3  343 {1'b0, tlul_addr_q, 2'b00} < PartEnd; 344 end 345 346 // Note that OTP works on halfword (16bit) addresses, hence need to 347 // shift the addresses appropriately. 348 logic [OtpByteAddrWidth-1:0] addr_calc; 349 1/1 assign addr_calc = (otp_addr_sel == DigestAddrSel) ? DigestOffset : {tlul_addr_q, 2'b00}; Tests: T1 T2 T3  350 1/1 assign otp_addr_o = addr_calc[OtpByteAddrWidth-1:OtpAddrShift]; Tests: T1 T2 T3  351 352 if (OtpAddrShift > 0) begin : gen_unused 353 logic unused_bits; 354 1/1 assign unused_bits = ^addr_calc[OtpAddrShift-1:0]; Tests: T1 T2 T3  355 end 356 357 // Request 32bit except in case of the digest. 358 1/1 assign otp_size_o = (otp_addr_sel == DigestAddrSel) ? Tests: T1 T2 T3  359 OtpSizeWidth'(unsigned'(ScrmblBlockWidth / OtpWidth - 1)) : 360 OtpSizeWidth'(unsigned'(32 / OtpWidth - 1)); 361 362 //////////////// 363 // Digest Reg // 364 //////////////// 365 366 if (Info.sw_digest) begin : gen_ecc_reg 367 // SEC_CM: PART.DATA_REG.INTEGRITY 368 otp_ctrl_ecc_reg #( 369 .Width ( ScrmblBlockWidth ), 370 .Depth ( 1 ) 371 ) u_otp_ctrl_ecc_reg ( 372 .clk_i, 373 .rst_ni, 374 .wren_i ( digest_reg_en ), 375 .addr_i ( '0 ), 376 .wdata_i ( otp_rdata_i ), 377 .rdata_o ( ), 378 .data_o ( digest_o ), 379 .ecc_err_o ( ecc_err ) 380 ); 381 end else begin : gen_no_ecc_reg 382 logic unused_digest_reg_en; 383 logic unused_rdata; 384 assign unused_digest_reg_en = digest_reg_en; 385 assign unused_rdata = ^otp_rdata_i[32 +: 32]; // Upper word is not connected in this case. 386 assign digest_o = '0; 387 assign ecc_err = 1'b0; 388 end 389 390 //////////////////////// 391 // DAI Access Control // 392 //////////////////////// 393 394 mubi8_t init_locked; 395 1/1 assign init_locked = (~init_done_o) ? MuBi8True : MuBi8False; Tests: T1 T2 T3  396 397 // Aggregate all possible DAI write locks. The partition is also locked when uninitialized. 398 // Note that the locks are redundantly encoded values. 399 part_access_t access_pre; 400 prim_mubi8_sender #( 401 .AsyncOn(0) 402 ) u_prim_mubi8_sender_write_lock_pre ( 403 .clk_i, 404 .rst_ni, 405 .mubi_i(mubi8_and_lo(init_locked, access_i.write_lock)), 406 .mubi_o(access_pre.write_lock) 407 ); 408 prim_mubi8_sender #( 409 .AsyncOn(0) 410 ) u_prim_mubi8_sender_read_lock_pre ( 411 .clk_i, 412 .rst_ni, 413 .mubi_i(mubi8_and_lo(init_locked, access_i.read_lock)), 414 .mubi_o(access_pre.read_lock) 415 ); 416 417 // SEC_CM: PART.MEM.SW_UNWRITABLE 418 if (Info.write_lock) begin : gen_digest_write_lock 419 mubi8_t digest_locked; 420 1/1 assign digest_locked = (digest_o != '0) ? MuBi8True : MuBi8False; Tests: T1 T2 T3  421 422 // This prevents the synthesis tool from optimizing the multibit signal. 423 prim_mubi8_sender #( 424 .AsyncOn(0) 425 ) u_prim_mubi8_sender_write_lock ( 426 .clk_i, 427 .rst_ni, 428 .mubi_i(mubi8_and_lo(access_pre.write_lock, digest_locked)), 429 .mubi_o(access_o.write_lock) 430 ); 431 432 `ASSERT(DigestWriteLocksPartition_A, digest_o |-> mubi8_test_true_loose(access_o.write_lock)) 433 end else begin : gen_no_digest_write_lock 434 assign access_o.write_lock = access_pre.write_lock; 435 end 436 437 // SEC_CM: PART.MEM.SW_UNREADABLE 438 if (Info.read_lock) begin : gen_digest_read_lock 439 mubi8_t digest_locked; 440 assign digest_locked = (digest_o != '0) ? MuBi8True : MuBi8False; 441 442 // This prevents the synthesis tool from optimizing the multibit signal. 443 prim_mubi8_sender #( 444 .AsyncOn(0) 445 ) u_prim_mubi8_sender_read_lock ( 446 .clk_i, 447 .rst_ni, 448 .mubi_i(mubi8_and_lo(access_pre.read_lock, digest_locked)), 449 .mubi_o(access_o.read_lock) 450 ); 451 452 `ASSERT(DigestReadLocksPartition_A, digest_o |-> mubi8_test_true_loose(access_o.read_lock)) 453 end else begin : gen_no_digest_read_lock 454 1/1 assign access_o.read_lock = access_pre.read_lock; Tests: T1 T2 T3  455 end 456 457 /////////////// 458 // Registers // 459 /////////////// 460 461 3/3 `PRIM_FLOP_SPARSE_FSM(u_state_regs, state_d, state_q, state_e, ResetSt) Tests: T1 T2 T3  | T1 T2 T3  | T1 T2 T3 
PRIM_FLOP_SPARSE_FSM(u_state_regs, state_d, state_q, state_e, ResetSt): 461.1 `ifdef SIMULATION 461.2 prim_sparse_fsm_flop #( 461.3 .StateEnumT(state_e), 461.4 .Width($bits(state_e)), 461.5 .ResetValue($bits(state_e)'(ResetSt)), 461.6 .EnableAlertTriggerSVA(1), 461.7 .CustomForceName("state_q") 461.8 ) u_state_regs ( 461.9 .clk_i ( clk_i ), 461.10 .rst_ni ( rst_ni ), 461.11 .state_i ( state_d ), 461.12 .state_o ( ) 461.13 ); 461.14 always_ff @(posedge clk_i or negedge rst_ni) begin 461.15 1/1 if (!rst_ni) begin Tests: T1 T2 T3  461.16 1/1 state_q <= ResetSt; Tests: T1 T2 T3  461.17 end else begin 461.18 1/1 state_q <= state_d; Tests: T1 T2 T3  461.19 end 461.20 end 461.21 u_state_regs_A: assert property (@(posedge clk_i) disable iff ((!rst_ni) !== '0) (state_q === u_state_regs.state_o)) 461.22 else begin 461.23 `ifdef UVM 461.24 uvm_pkg::uvm_report_error("ASSERT FAILED", "u_state_regs_A", uvm_pkg::UVM_NONE, 461.25 "../src/lowrisc_ip_otp_ctrl_1.0/rtl/otp_ctrl_part_unbuf.sv", 461, "", 1); 461.26 `else 461.27 $error("%0t: (%0s:%0d) [%m] [ASSERT FAILED] %0s", $time, `__FILE__, `__LINE__, 461.28 `PRIM_STRINGIFY(u_state_regs_A)); 461.29 `endif 461.30 end 461.31 `else 461.32 prim_sparse_fsm_flop #( 461.33 .StateEnumT(state_e), 461.34 .Width($bits(state_e)), 461.35 .ResetValue($bits(state_e)'(ResetSt)), 461.36 .EnableAlertTriggerSVA(1) 461.37 ) u_state_regs ( 461.38 .clk_i ( `PRIM_FLOP_CLK ), 461.39 .rst_ni ( `PRIM_FLOP_RST ), 461.40 .state_i ( state_d ), 461.41 .state_o ( state_q ) 461.42 ); 461.43 `endif462 463 always_ff @(posedge clk_i or negedge rst_ni) begin : p_regs 464 1/1 if (!rst_ni) begin Tests: T1 T2 T3  465 1/1 error_q <= NoError; Tests: T1 T2 T3  466 1/1 tlul_addr_q <= '0; Tests: T1 T2 T3  467 1/1 pending_tlul_error_q <= 1'b0; Tests: T1 T2 T3  468 end else begin 469 1/1 error_q <= error_d; Tests: T1 T2 T3  470 1/1 pending_tlul_error_q <= pending_tlul_error_d; Tests: T1 T2 T3  471 1/1 if (tlul_gnt_o) begin Tests: T1 T2 T3  472 1/1 tlul_addr_q <= tlul_addr_d; Tests: T2 T4 T5  473 end MISSING_ELSE

Line Coverage for Module : otp_ctrl_part_unbuf ( parameter Info=906698836,DigestOffset=1136,StateWidth=10 )
Line Coverage for Module self-instances :
SCORELINE
97.75 100.00
tb.dut.gen_partitions[2].gen_unbuffered.u_part_unbuf

Line No.TotalCoveredPercent
TOTAL9191100.00
CONT_ASSIGN13811100.00
CONT_ASSIGN14911100.00
ALWAYS1646868100.00
CONT_ASSIGN33411100.00
CONT_ASSIGN33611100.00
CONT_ASSIGN34211100.00
CONT_ASSIGN34911100.00
CONT_ASSIGN35011100.00
CONT_ASSIGN35411100.00
CONT_ASSIGN35811100.00
CONT_ASSIGN39511100.00
CONT_ASSIGN42011100.00
CONT_ASSIGN45411100.00
ALWAYS46133100.00
ALWAYS46488100.00

137 // Output partition error state. 138 1/1 assign error_o = error_q; Tests: T1 T2 T3  139 140 // This partition cannot do any write accesses, hence we tie this 141 // constantly off. 142 assign otp_wdata_o = '0; 143 // Depending on the partition configuration, the wrapper is instructed to ignore integrity 144 // calculations and checks. To be on the safe side, the partition filters error responses at this 145 // point and does not report any integrity errors if integrity is disabled. 146 otp_err_e otp_err; 147 if (Info.integrity) begin : gen_integrity 148 assign otp_cmd_o = prim_otp_pkg::Read; 149 1/1 assign otp_err = otp_err_e'(otp_err_i); Tests: T1 T2 T3  150 end else begin : gen_no_integrity 151 assign otp_cmd_o = prim_otp_pkg::ReadRaw; 152 always_comb begin 153 if (otp_err_e'(otp_err_i) inside {MacroEccCorrError, MacroEccUncorrError}) begin 154 otp_err = NoError; 155 end else begin 156 otp_err = otp_err_e'(otp_err_i); 157 end 158 end 159 end 160 161 `ASSERT_KNOWN(FsmStateKnown_A, state_q) 162 always_comb begin : p_fsm 163 // Default assignments 164 1/1 state_d = state_q; Tests: T1 T2 T3  165 166 // Response to init request 167 1/1 init_done_o = 1'b0; Tests: T1 T2 T3  168 169 // OTP signals 170 1/1 otp_req_o = 1'b0; Tests: T1 T2 T3  171 1/1 otp_addr_sel = DigestAddrSel; Tests: T1 T2 T3  172 173 // TL-UL signals 174 1/1 tlul_gnt_o = 1'b0; Tests: T1 T2 T3  175 1/1 tlul_rvalid_o = 1'b0; Tests: T1 T2 T3  176 1/1 tlul_rerror_o = '0; Tests: T1 T2 T3  177 178 // Enable for buffered digest register 179 1/1 digest_reg_en = 1'b0; Tests: T1 T2 T3  180 181 // Error Register 182 1/1 error_d = error_q; Tests: T1 T2 T3  183 1/1 pending_tlul_error_d = 1'b0; Tests: T1 T2 T3  184 1/1 fsm_err_o = 1'b0; Tests: T1 T2 T3  185 186 1/1 unique case (state_q) Tests: T1 T2 T3  187 /////////////////////////////////////////////////////////////////// 188 // State right after reset. Wait here until we get a an 189 // initialization request. 190 ResetSt: begin 191 1/1 if (init_req_i) begin Tests: T1 T2 T3  192 // If the partition does not have a digest, no initialization is necessary. 193 1/1 if (Info.sw_digest) begin Tests: T1 T2 T3  194 1/1 state_d = InitSt; Tests: T1 T2 T3  195 end else begin 196 unreachable state_d = IdleSt; 197 end 198 end MISSING_ELSE 199 end 200 /////////////////////////////////////////////////////////////////// 201 // Initialization reads out the digest only in unbuffered 202 // partitions. Wait here until the OTP request has been granted. 203 // And then wait until the OTP word comes back. 204 InitSt: begin 205 1/1 otp_req_o = 1'b1; Tests: T1 T2 T3  206 1/1 if (otp_gnt_i) begin Tests: T1 T2 T3  207 1/1 state_d = InitWaitSt; Tests: T1 T2 T3  208 end MISSING_ELSE 209 end 210 /////////////////////////////////////////////////////////////////// 211 // Wait for OTP response and write to digest buffer register. In 212 // case an OTP transaction fails, latch the OTP error code and 213 // jump to a terminal error state. 214 InitWaitSt: begin 215 1/1 if (otp_rvalid_i) begin Tests: T1 T2 T3  216 1/1 digest_reg_en = 1'b1; Tests: T1 T2 T3  217 1/1 if (otp_err inside {NoError, MacroEccCorrError}) begin Tests: T1 T2 T3  218 1/1 state_d = IdleSt; Tests: T1 T2 T3  219 // At this point the only error that we could have gotten are correctable ECC errors. 220 1/1 if (otp_err != NoError) begin Tests: T1 T2 T3  221 1/1 error_d = MacroEccCorrError; Tests: T33 T103 T158  222 end MISSING_ELSE 223 end else begin 224 1/1 state_d = ErrorSt; Tests: T159 T160 T161  225 1/1 error_d = otp_err; Tests: T159 T160 T161  226 end 227 end MISSING_ELSE 228 end 229 /////////////////////////////////////////////////////////////////// 230 // Wait for TL-UL requests coming in. 231 // Then latch address and go to readout state. 232 IdleSt: begin 233 1/1 init_done_o = 1'b1; Tests: T1 T2 T3  234 1/1 if (tlul_req_i) begin Tests: T1 T2 T3  235 1/1 error_d = NoError; // clear recoverable soft errors. Tests: T2 T3 T6  236 1/1 state_d = ReadSt; Tests: T2 T3 T6  237 1/1 tlul_gnt_o = 1'b1; Tests: T2 T3 T6  238 end MISSING_ELSE 239 end 240 /////////////////////////////////////////////////////////////////// 241 // If the address is out of bounds, or if the partition is 242 // locked, signal back a bus error. Note that such an error does 243 // not cause the partition to go into error state. Otherwise if 244 // these checks pass, an OTP word is requested. 245 ReadSt: begin 246 1/1 init_done_o = 1'b1; Tests: T2 T3 T6  247 // Double check the address range. 248 1/1 if (tlul_addr_in_range && mubi8_test_false_strict(access_o.read_lock)) begin Tests: T2 T3 T6  249 1/1 otp_req_o = 1'b1; Tests: T2 T3 T6  250 1/1 otp_addr_sel = DataAddrSel; Tests: T2 T3 T6  251 1/1 if (otp_gnt_i) begin Tests: T2 T3 T6  252 1/1 state_d = ReadWaitSt; Tests: T2 T3 T6  253 end MISSING_ELSE 254 end else begin 255 1/1 state_d = IdleSt; Tests: T12 T101 T105  256 1/1 error_d = AccessError; // Signal this error, but do not go into terminal error state. Tests: T12 T101 T105  257 1/1 tlul_rvalid_o = 1'b1; Tests: T12 T101 T105  258 1/1 tlul_rerror_o = 2'b11; // This causes the TL-UL adapter to return a bus error. Tests: T12 T101 T105  259 end 260 end 261 /////////////////////////////////////////////////////////////////// 262 // Wait for OTP response and release the TL-UL response. In 263 // case an OTP transaction fails, latch the OTP error code, 264 // signal a TL-Ul bus error and jump to a terminal error state. 265 ReadWaitSt: begin 266 1/1 init_done_o = 1'b1; Tests: T2 T3 T6  267 1/1 if (otp_rvalid_i) begin Tests: T2 T3 T6  268 1/1 tlul_rvalid_o = 1'b1; Tests: T2 T3 T6  269 1/1 if (otp_err inside {NoError, MacroEccCorrError}) begin Tests: T2 T3 T6  270 1/1 state_d = IdleSt; Tests: T2 T3 T6  271 // At this point the only error that we could have gotten are correctable ECC errors. 272 1/1 if (otp_err != NoError) begin Tests: T2 T3 T6  273 1/1 error_d = MacroEccCorrError; Tests: T37 T40 T52  274 end MISSING_ELSE 275 end else begin 276 1/1 state_d = ErrorSt; Tests: T157 T162 T163  277 1/1 error_d = otp_err; Tests: T157 T162 T163  278 // This causes the TL-UL adapter to return a bus error. 279 1/1 tlul_rerror_o = 2'b11; Tests: T157 T162 T163  280 end 281 end MISSING_ELSE 282 end 283 /////////////////////////////////////////////////////////////////// 284 // Terminal Error State. This locks access to the partition. 285 // Make sure the partition signals an error state if no error 286 // code has been latched so far. 287 ErrorSt: begin 288 1/1 if (error_q == NoError) begin Tests: T2 T4 T5  289 1/1 error_d = FsmStateError; Tests: T26 T27 T28  290 end MISSING_ELSE 291 292 // Return bus errors if there are pending TL-UL requests. 293 1/1 if (pending_tlul_error_q) begin Tests: T2 T4 T5  294 1/1 tlul_rerror_o = 2'b11; Tests: T4 T5 T101  295 1/1 tlul_rvalid_o = 1'b1; Tests: T4 T5 T101  296 1/1 end else if (tlul_req_i) begin Tests: T2 T4 T5  297 1/1 tlul_gnt_o = 1'b1; Tests: T4 T5 T101  298 1/1 pending_tlul_error_d = 1'b1; Tests: T4 T5 T101  299 end MISSING_ELSE 300 end 301 /////////////////////////////////////////////////////////////////// 302 // We should never get here. If we do (e.g. via a malicious 303 // glitch), error out immediately. 304 default: begin 305 state_d = ErrorSt; 306 fsm_err_o = 1'b1; 307 end 308 /////////////////////////////////////////////////////////////////// 309 endcase // state_q 310 311 // Unconditionally jump into the terminal error state in case of 312 // an ECC error or escalation, and lock access to the partition down. 313 // SEC_CM: PART.FSM.LOCAL_ESC 314 1/1 if (ecc_err) begin Tests: T1 T2 T3  315 1/1 state_d = ErrorSt; Tests: T109 T164 T152  316 1/1 if (state_q != ErrorSt) begin Tests: T109 T164 T152  317 1/1 error_d = CheckFailError; Tests: T109 T164 T152  318 end MISSING_ELSE 319 end MISSING_ELSE 320 // SEC_CM: PART.FSM.GLOBAL_ESC 321 1/1 if (lc_ctrl_pkg::lc_tx_test_true_loose(escalate_en_i)) begin Tests: T1 T2 T3  322 1/1 state_d = ErrorSt; Tests: T2 T4 T5  323 1/1 fsm_err_o = 1'b1; Tests: T2 T4 T5  324 1/1 if (state_q != ErrorSt) begin Tests: T2 T4 T5  325 1/1 error_d = FsmStateError; Tests: T2 T4 T5  326 end MISSING_ELSE 327 end MISSING_ELSE 328 end 329 330 /////////////////////////////////// 331 // Signals to/from TL-UL Adapter // 332 /////////////////////////////////// 333 334 1/1 assign tlul_addr_d = tlul_addr_i; Tests: T1 T2 T3  335 // Do not forward data in case of an error. 336 1/1 assign tlul_rdata_o = (tlul_rvalid_o && tlul_rerror_o == '0) ? otp_rdata_i[31:0] : '0; Tests: T1 T2 T3  337 338 if (Info.offset == 0) begin : gen_zero_offset 339 assign tlul_addr_in_range = {1'b0, tlul_addr_q, 2'b00} < PartEnd; 340 341 end else begin : gen_nonzero_offset 342 1/1 assign tlul_addr_in_range = {tlul_addr_q, 2'b00} >= Info.offset && Tests: T1 T2 T3  343 {1'b0, tlul_addr_q, 2'b00} < PartEnd; 344 end 345 346 // Note that OTP works on halfword (16bit) addresses, hence need to 347 // shift the addresses appropriately. 348 logic [OtpByteAddrWidth-1:0] addr_calc; 349 1/1 assign addr_calc = (otp_addr_sel == DigestAddrSel) ? DigestOffset : {tlul_addr_q, 2'b00}; Tests: T1 T2 T3  350 1/1 assign otp_addr_o = addr_calc[OtpByteAddrWidth-1:OtpAddrShift]; Tests: T1 T2 T3  351 352 if (OtpAddrShift > 0) begin : gen_unused 353 logic unused_bits; 354 1/1 assign unused_bits = ^addr_calc[OtpAddrShift-1:0]; Tests: T1 T2 T3  355 end 356 357 // Request 32bit except in case of the digest. 358 1/1 assign otp_size_o = (otp_addr_sel == DigestAddrSel) ? Tests: T1 T2 T3  359 OtpSizeWidth'(unsigned'(ScrmblBlockWidth / OtpWidth - 1)) : 360 OtpSizeWidth'(unsigned'(32 / OtpWidth - 1)); 361 362 //////////////// 363 // Digest Reg // 364 //////////////// 365 366 if (Info.sw_digest) begin : gen_ecc_reg 367 // SEC_CM: PART.DATA_REG.INTEGRITY 368 otp_ctrl_ecc_reg #( 369 .Width ( ScrmblBlockWidth ), 370 .Depth ( 1 ) 371 ) u_otp_ctrl_ecc_reg ( 372 .clk_i, 373 .rst_ni, 374 .wren_i ( digest_reg_en ), 375 .addr_i ( '0 ), 376 .wdata_i ( otp_rdata_i ), 377 .rdata_o ( ), 378 .data_o ( digest_o ), 379 .ecc_err_o ( ecc_err ) 380 ); 381 end else begin : gen_no_ecc_reg 382 logic unused_digest_reg_en; 383 logic unused_rdata; 384 assign unused_digest_reg_en = digest_reg_en; 385 assign unused_rdata = ^otp_rdata_i[32 +: 32]; // Upper word is not connected in this case. 386 assign digest_o = '0; 387 assign ecc_err = 1'b0; 388 end 389 390 //////////////////////// 391 // DAI Access Control // 392 //////////////////////// 393 394 mubi8_t init_locked; 395 1/1 assign init_locked = (~init_done_o) ? MuBi8True : MuBi8False; Tests: T1 T2 T3  396 397 // Aggregate all possible DAI write locks. The partition is also locked when uninitialized. 398 // Note that the locks are redundantly encoded values. 399 part_access_t access_pre; 400 prim_mubi8_sender #( 401 .AsyncOn(0) 402 ) u_prim_mubi8_sender_write_lock_pre ( 403 .clk_i, 404 .rst_ni, 405 .mubi_i(mubi8_and_lo(init_locked, access_i.write_lock)), 406 .mubi_o(access_pre.write_lock) 407 ); 408 prim_mubi8_sender #( 409 .AsyncOn(0) 410 ) u_prim_mubi8_sender_read_lock_pre ( 411 .clk_i, 412 .rst_ni, 413 .mubi_i(mubi8_and_lo(init_locked, access_i.read_lock)), 414 .mubi_o(access_pre.read_lock) 415 ); 416 417 // SEC_CM: PART.MEM.SW_UNWRITABLE 418 if (Info.write_lock) begin : gen_digest_write_lock 419 mubi8_t digest_locked; 420 1/1 assign digest_locked = (digest_o != '0) ? MuBi8True : MuBi8False; Tests: T1 T2 T3  421 422 // This prevents the synthesis tool from optimizing the multibit signal. 423 prim_mubi8_sender #( 424 .AsyncOn(0) 425 ) u_prim_mubi8_sender_write_lock ( 426 .clk_i, 427 .rst_ni, 428 .mubi_i(mubi8_and_lo(access_pre.write_lock, digest_locked)), 429 .mubi_o(access_o.write_lock) 430 ); 431 432 `ASSERT(DigestWriteLocksPartition_A, digest_o |-> mubi8_test_true_loose(access_o.write_lock)) 433 end else begin : gen_no_digest_write_lock 434 assign access_o.write_lock = access_pre.write_lock; 435 end 436 437 // SEC_CM: PART.MEM.SW_UNREADABLE 438 if (Info.read_lock) begin : gen_digest_read_lock 439 mubi8_t digest_locked; 440 assign digest_locked = (digest_o != '0) ? MuBi8True : MuBi8False; 441 442 // This prevents the synthesis tool from optimizing the multibit signal. 443 prim_mubi8_sender #( 444 .AsyncOn(0) 445 ) u_prim_mubi8_sender_read_lock ( 446 .clk_i, 447 .rst_ni, 448 .mubi_i(mubi8_and_lo(access_pre.read_lock, digest_locked)), 449 .mubi_o(access_o.read_lock) 450 ); 451 452 `ASSERT(DigestReadLocksPartition_A, digest_o |-> mubi8_test_true_loose(access_o.read_lock)) 453 end else begin : gen_no_digest_read_lock 454 1/1 assign access_o.read_lock = access_pre.read_lock; Tests: T1 T2 T3  455 end 456 457 /////////////// 458 // Registers // 459 /////////////// 460 461 3/3 `PRIM_FLOP_SPARSE_FSM(u_state_regs, state_d, state_q, state_e, ResetSt) Tests: T1 T2 T3  | T1 T2 T3  | T1 T2 T3 
PRIM_FLOP_SPARSE_FSM(u_state_regs, state_d, state_q, state_e, ResetSt): 461.1 `ifdef SIMULATION 461.2 prim_sparse_fsm_flop #( 461.3 .StateEnumT(state_e), 461.4 .Width($bits(state_e)), 461.5 .ResetValue($bits(state_e)'(ResetSt)), 461.6 .EnableAlertTriggerSVA(1), 461.7 .CustomForceName("state_q") 461.8 ) u_state_regs ( 461.9 .clk_i ( clk_i ), 461.10 .rst_ni ( rst_ni ), 461.11 .state_i ( state_d ), 461.12 .state_o ( ) 461.13 ); 461.14 always_ff @(posedge clk_i or negedge rst_ni) begin 461.15 1/1 if (!rst_ni) begin Tests: T1 T2 T3  461.16 1/1 state_q <= ResetSt; Tests: T1 T2 T3  461.17 end else begin 461.18 1/1 state_q <= state_d; Tests: T1 T2 T3  461.19 end 461.20 end 461.21 u_state_regs_A: assert property (@(posedge clk_i) disable iff ((!rst_ni) !== '0) (state_q === u_state_regs.state_o)) 461.22 else begin 461.23 `ifdef UVM 461.24 uvm_pkg::uvm_report_error("ASSERT FAILED", "u_state_regs_A", uvm_pkg::UVM_NONE, 461.25 "../src/lowrisc_ip_otp_ctrl_1.0/rtl/otp_ctrl_part_unbuf.sv", 461, "", 1); 461.26 `else 461.27 $error("%0t: (%0s:%0d) [%m] [ASSERT FAILED] %0s", $time, `__FILE__, `__LINE__, 461.28 `PRIM_STRINGIFY(u_state_regs_A)); 461.29 `endif 461.30 end 461.31 `else 461.32 prim_sparse_fsm_flop #( 461.33 .StateEnumT(state_e), 461.34 .Width($bits(state_e)), 461.35 .ResetValue($bits(state_e)'(ResetSt)), 461.36 .EnableAlertTriggerSVA(1) 461.37 ) u_state_regs ( 461.38 .clk_i ( `PRIM_FLOP_CLK ), 461.39 .rst_ni ( `PRIM_FLOP_RST ), 461.40 .state_i ( state_d ), 461.41 .state_o ( state_q ) 461.42 ); 461.43 `endif462 463 always_ff @(posedge clk_i or negedge rst_ni) begin : p_regs 464 1/1 if (!rst_ni) begin Tests: T1 T2 T3  465 1/1 error_q <= NoError; Tests: T1 T2 T3  466 1/1 tlul_addr_q <= '0; Tests: T1 T2 T3  467 1/1 pending_tlul_error_q <= 1'b0; Tests: T1 T2 T3  468 end else begin 469 1/1 error_q <= error_d; Tests: T1 T2 T3  470 1/1 pending_tlul_error_q <= pending_tlul_error_d; Tests: T1 T2 T3  471 1/1 if (tlul_gnt_o) begin Tests: T1 T2 T3  472 1/1 tlul_addr_q <= tlul_addr_d; Tests: T2 T3 T4  473 end MISSING_ELSE

Line Coverage for Module : otp_ctrl_part_unbuf ( parameter Info=-1,DigestOffset=1608,StateWidth=10 )
Line Coverage for Module self-instances :
SCORELINE
98.33 100.00
tb.dut.gen_partitions[3].gen_unbuffered.u_part_unbuf

Line No.TotalCoveredPercent
TOTAL9191100.00
CONT_ASSIGN13811100.00
CONT_ASSIGN14911100.00
ALWAYS1646868100.00
CONT_ASSIGN33411100.00
CONT_ASSIGN33611100.00
CONT_ASSIGN34211100.00
CONT_ASSIGN34911100.00
CONT_ASSIGN35011100.00
CONT_ASSIGN35411100.00
CONT_ASSIGN35811100.00
CONT_ASSIGN39511100.00
CONT_ASSIGN42011100.00
CONT_ASSIGN45411100.00
ALWAYS46133100.00
ALWAYS46488100.00

137 // Output partition error state. 138 1/1 assign error_o = error_q; Tests: T1 T2 T3  139 140 // This partition cannot do any write accesses, hence we tie this 141 // constantly off. 142 assign otp_wdata_o = '0; 143 // Depending on the partition configuration, the wrapper is instructed to ignore integrity 144 // calculations and checks. To be on the safe side, the partition filters error responses at this 145 // point and does not report any integrity errors if integrity is disabled. 146 otp_err_e otp_err; 147 if (Info.integrity) begin : gen_integrity 148 assign otp_cmd_o = prim_otp_pkg::Read; 149 1/1 assign otp_err = otp_err_e'(otp_err_i); Tests: T1 T2 T3  150 end else begin : gen_no_integrity 151 assign otp_cmd_o = prim_otp_pkg::ReadRaw; 152 always_comb begin 153 if (otp_err_e'(otp_err_i) inside {MacroEccCorrError, MacroEccUncorrError}) begin 154 otp_err = NoError; 155 end else begin 156 otp_err = otp_err_e'(otp_err_i); 157 end 158 end 159 end 160 161 `ASSERT_KNOWN(FsmStateKnown_A, state_q) 162 always_comb begin : p_fsm 163 // Default assignments 164 1/1 state_d = state_q; Tests: T1 T2 T3  165 166 // Response to init request 167 1/1 init_done_o = 1'b0; Tests: T1 T2 T3  168 169 // OTP signals 170 1/1 otp_req_o = 1'b0; Tests: T1 T2 T3  171 1/1 otp_addr_sel = DigestAddrSel; Tests: T1 T2 T3  172 173 // TL-UL signals 174 1/1 tlul_gnt_o = 1'b0; Tests: T1 T2 T3  175 1/1 tlul_rvalid_o = 1'b0; Tests: T1 T2 T3  176 1/1 tlul_rerror_o = '0; Tests: T1 T2 T3  177 178 // Enable for buffered digest register 179 1/1 digest_reg_en = 1'b0; Tests: T1 T2 T3  180 181 // Error Register 182 1/1 error_d = error_q; Tests: T1 T2 T3  183 1/1 pending_tlul_error_d = 1'b0; Tests: T1 T2 T3  184 1/1 fsm_err_o = 1'b0; Tests: T1 T2 T3  185 186 1/1 unique case (state_q) Tests: T1 T2 T3  187 /////////////////////////////////////////////////////////////////// 188 // State right after reset. Wait here until we get a an 189 // initialization request. 190 ResetSt: begin 191 1/1 if (init_req_i) begin Tests: T1 T2 T3  192 // If the partition does not have a digest, no initialization is necessary. 193 1/1 if (Info.sw_digest) begin Tests: T1 T2 T3  194 1/1 state_d = InitSt; Tests: T1 T2 T3  195 end else begin 196 unreachable state_d = IdleSt; 197 end 198 end MISSING_ELSE 199 end 200 /////////////////////////////////////////////////////////////////// 201 // Initialization reads out the digest only in unbuffered 202 // partitions. Wait here until the OTP request has been granted. 203 // And then wait until the OTP word comes back. 204 InitSt: begin 205 1/1 otp_req_o = 1'b1; Tests: T1 T2 T3  206 1/1 if (otp_gnt_i) begin Tests: T1 T2 T3  207 1/1 state_d = InitWaitSt; Tests: T1 T2 T3  208 end MISSING_ELSE 209 end 210 /////////////////////////////////////////////////////////////////// 211 // Wait for OTP response and write to digest buffer register. In 212 // case an OTP transaction fails, latch the OTP error code and 213 // jump to a terminal error state. 214 InitWaitSt: begin 215 1/1 if (otp_rvalid_i) begin Tests: T1 T2 T3  216 1/1 digest_reg_en = 1'b1; Tests: T1 T2 T3  217 1/1 if (otp_err inside {NoError, MacroEccCorrError}) begin Tests: T1 T2 T3  218 1/1 state_d = IdleSt; Tests: T1 T2 T3  219 // At this point the only error that we could have gotten are correctable ECC errors. 220 1/1 if (otp_err != NoError) begin Tests: T1 T2 T3  221 1/1 error_d = MacroEccCorrError; Tests: T32 T103 T165  222 end MISSING_ELSE 223 end else begin 224 1/1 state_d = ErrorSt; Tests: T166 T154 T167  225 1/1 error_d = otp_err; Tests: T166 T154 T167  226 end 227 end MISSING_ELSE 228 end 229 /////////////////////////////////////////////////////////////////// 230 // Wait for TL-UL requests coming in. 231 // Then latch address and go to readout state. 232 IdleSt: begin 233 1/1 init_done_o = 1'b1; Tests: T1 T2 T3  234 1/1 if (tlul_req_i) begin Tests: T1 T2 T3  235 1/1 error_d = NoError; // clear recoverable soft errors. Tests: T2 T3 T5  236 1/1 state_d = ReadSt; Tests: T2 T3 T5  237 1/1 tlul_gnt_o = 1'b1; Tests: T2 T3 T5  238 end MISSING_ELSE 239 end 240 /////////////////////////////////////////////////////////////////// 241 // If the address is out of bounds, or if the partition is 242 // locked, signal back a bus error. Note that such an error does 243 // not cause the partition to go into error state. Otherwise if 244 // these checks pass, an OTP word is requested. 245 ReadSt: begin 246 1/1 init_done_o = 1'b1; Tests: T2 T3 T5  247 // Double check the address range. 248 1/1 if (tlul_addr_in_range && mubi8_test_false_strict(access_o.read_lock)) begin Tests: T2 T3 T5  249 1/1 otp_req_o = 1'b1; Tests: T2 T3 T5  250 1/1 otp_addr_sel = DataAddrSel; Tests: T2 T3 T5  251 1/1 if (otp_gnt_i) begin Tests: T2 T3 T5  252 1/1 state_d = ReadWaitSt; Tests: T2 T3 T5  253 end MISSING_ELSE 254 end else begin 255 1/1 state_d = IdleSt; Tests: T12 T93 T105  256 1/1 error_d = AccessError; // Signal this error, but do not go into terminal error state. Tests: T12 T93 T105  257 1/1 tlul_rvalid_o = 1'b1; Tests: T12 T93 T105  258 1/1 tlul_rerror_o = 2'b11; // This causes the TL-UL adapter to return a bus error. Tests: T12 T93 T105  259 end 260 end 261 /////////////////////////////////////////////////////////////////// 262 // Wait for OTP response and release the TL-UL response. In 263 // case an OTP transaction fails, latch the OTP error code, 264 // signal a TL-Ul bus error and jump to a terminal error state. 265 ReadWaitSt: begin 266 1/1 init_done_o = 1'b1; Tests: T2 T3 T5  267 1/1 if (otp_rvalid_i) begin Tests: T2 T3 T5  268 1/1 tlul_rvalid_o = 1'b1; Tests: T2 T3 T5  269 1/1 if (otp_err inside {NoError, MacroEccCorrError}) begin Tests: T2 T3 T5  270 1/1 state_d = IdleSt; Tests: T2 T3 T5  271 // At this point the only error that we could have gotten are correctable ECC errors. 272 1/1 if (otp_err != NoError) begin Tests: T2 T3 T5  273 1/1 error_d = MacroEccCorrError; Tests: T5 T40 T53  274 end MISSING_ELSE 275 end else begin 276 1/1 state_d = ErrorSt; Tests: T118 T168 T169  277 1/1 error_d = otp_err; Tests: T118 T168 T169  278 // This causes the TL-UL adapter to return a bus error. 279 1/1 tlul_rerror_o = 2'b11; Tests: T118 T168 T169  280 end 281 end MISSING_ELSE 282 end 283 /////////////////////////////////////////////////////////////////// 284 // Terminal Error State. This locks access to the partition. 285 // Make sure the partition signals an error state if no error 286 // code has been latched so far. 287 ErrorSt: begin 288 1/1 if (error_q == NoError) begin Tests: T2 T4 T5  289 1/1 error_d = FsmStateError; Tests: T26 T27 T28  290 end MISSING_ELSE 291 292 // Return bus errors if there are pending TL-UL requests. 293 1/1 if (pending_tlul_error_q) begin Tests: T2 T4 T5  294 1/1 tlul_rerror_o = 2'b11; Tests: T4 T102 T129  295 1/1 tlul_rvalid_o = 1'b1; Tests: T4 T102 T129  296 1/1 end else if (tlul_req_i) begin Tests: T2 T4 T5  297 1/1 tlul_gnt_o = 1'b1; Tests: T4 T102 T129  298 1/1 pending_tlul_error_d = 1'b1; Tests: T4 T102 T129  299 end MISSING_ELSE 300 end 301 /////////////////////////////////////////////////////////////////// 302 // We should never get here. If we do (e.g. via a malicious 303 // glitch), error out immediately. 304 default: begin 305 state_d = ErrorSt; 306 fsm_err_o = 1'b1; 307 end 308 /////////////////////////////////////////////////////////////////// 309 endcase // state_q 310 311 // Unconditionally jump into the terminal error state in case of 312 // an ECC error or escalation, and lock access to the partition down. 313 // SEC_CM: PART.FSM.LOCAL_ESC 314 1/1 if (ecc_err) begin Tests: T1 T2 T3  315 1/1 state_d = ErrorSt; Tests: T109  316 1/1 if (state_q != ErrorSt) begin Tests: T109  317 1/1 error_d = CheckFailError; Tests: T109  318 end MISSING_ELSE 319 end MISSING_ELSE 320 // SEC_CM: PART.FSM.GLOBAL_ESC 321 1/1 if (lc_ctrl_pkg::lc_tx_test_true_loose(escalate_en_i)) begin Tests: T1 T2 T3  322 1/1 state_d = ErrorSt; Tests: T2 T4 T5  323 1/1 fsm_err_o = 1'b1; Tests: T2 T4 T5  324 1/1 if (state_q != ErrorSt) begin Tests: T2 T4 T5  325 1/1 error_d = FsmStateError; Tests: T2 T4 T5  326 end MISSING_ELSE 327 end MISSING_ELSE 328 end 329 330 /////////////////////////////////// 331 // Signals to/from TL-UL Adapter // 332 /////////////////////////////////// 333 334 1/1 assign tlul_addr_d = tlul_addr_i; Tests: T1 T2 T3  335 // Do not forward data in case of an error. 336 1/1 assign tlul_rdata_o = (tlul_rvalid_o && tlul_rerror_o == '0) ? otp_rdata_i[31:0] : '0; Tests: T1 T2 T3  337 338 if (Info.offset == 0) begin : gen_zero_offset 339 assign tlul_addr_in_range = {1'b0, tlul_addr_q, 2'b00} < PartEnd; 340 341 end else begin : gen_nonzero_offset 342 1/1 assign tlul_addr_in_range = {tlul_addr_q, 2'b00} >= Info.offset && Tests: T1 T2 T3  343 {1'b0, tlul_addr_q, 2'b00} < PartEnd; 344 end 345 346 // Note that OTP works on halfword (16bit) addresses, hence need to 347 // shift the addresses appropriately. 348 logic [OtpByteAddrWidth-1:0] addr_calc; 349 1/1 assign addr_calc = (otp_addr_sel == DigestAddrSel) ? DigestOffset : {tlul_addr_q, 2'b00}; Tests: T1 T2 T3  350 1/1 assign otp_addr_o = addr_calc[OtpByteAddrWidth-1:OtpAddrShift]; Tests: T1 T2 T3  351 352 if (OtpAddrShift > 0) begin : gen_unused 353 logic unused_bits; 354 1/1 assign unused_bits = ^addr_calc[OtpAddrShift-1:0]; Tests: T1 T2 T3  355 end 356 357 // Request 32bit except in case of the digest. 358 1/1 assign otp_size_o = (otp_addr_sel == DigestAddrSel) ? Tests: T1 T2 T3  359 OtpSizeWidth'(unsigned'(ScrmblBlockWidth / OtpWidth - 1)) : 360 OtpSizeWidth'(unsigned'(32 / OtpWidth - 1)); 361 362 //////////////// 363 // Digest Reg // 364 //////////////// 365 366 if (Info.sw_digest) begin : gen_ecc_reg 367 // SEC_CM: PART.DATA_REG.INTEGRITY 368 otp_ctrl_ecc_reg #( 369 .Width ( ScrmblBlockWidth ), 370 .Depth ( 1 ) 371 ) u_otp_ctrl_ecc_reg ( 372 .clk_i, 373 .rst_ni, 374 .wren_i ( digest_reg_en ), 375 .addr_i ( '0 ), 376 .wdata_i ( otp_rdata_i ), 377 .rdata_o ( ), 378 .data_o ( digest_o ), 379 .ecc_err_o ( ecc_err ) 380 ); 381 end else begin : gen_no_ecc_reg 382 logic unused_digest_reg_en; 383 logic unused_rdata; 384 assign unused_digest_reg_en = digest_reg_en; 385 assign unused_rdata = ^otp_rdata_i[32 +: 32]; // Upper word is not connected in this case. 386 assign digest_o = '0; 387 assign ecc_err = 1'b0; 388 end 389 390 //////////////////////// 391 // DAI Access Control // 392 //////////////////////// 393 394 mubi8_t init_locked; 395 1/1 assign init_locked = (~init_done_o) ? MuBi8True : MuBi8False; Tests: T1 T2 T3  396 397 // Aggregate all possible DAI write locks. The partition is also locked when uninitialized. 398 // Note that the locks are redundantly encoded values. 399 part_access_t access_pre; 400 prim_mubi8_sender #( 401 .AsyncOn(0) 402 ) u_prim_mubi8_sender_write_lock_pre ( 403 .clk_i, 404 .rst_ni, 405 .mubi_i(mubi8_and_lo(init_locked, access_i.write_lock)), 406 .mubi_o(access_pre.write_lock) 407 ); 408 prim_mubi8_sender #( 409 .AsyncOn(0) 410 ) u_prim_mubi8_sender_read_lock_pre ( 411 .clk_i, 412 .rst_ni, 413 .mubi_i(mubi8_and_lo(init_locked, access_i.read_lock)), 414 .mubi_o(access_pre.read_lock) 415 ); 416 417 // SEC_CM: PART.MEM.SW_UNWRITABLE 418 if (Info.write_lock) begin : gen_digest_write_lock 419 mubi8_t digest_locked; 420 1/1 assign digest_locked = (digest_o != '0) ? MuBi8True : MuBi8False; Tests: T1 T2 T3  421 422 // This prevents the synthesis tool from optimizing the multibit signal. 423 prim_mubi8_sender #( 424 .AsyncOn(0) 425 ) u_prim_mubi8_sender_write_lock ( 426 .clk_i, 427 .rst_ni, 428 .mubi_i(mubi8_and_lo(access_pre.write_lock, digest_locked)), 429 .mubi_o(access_o.write_lock) 430 ); 431 432 `ASSERT(DigestWriteLocksPartition_A, digest_o |-> mubi8_test_true_loose(access_o.write_lock)) 433 end else begin : gen_no_digest_write_lock 434 assign access_o.write_lock = access_pre.write_lock; 435 end 436 437 // SEC_CM: PART.MEM.SW_UNREADABLE 438 if (Info.read_lock) begin : gen_digest_read_lock 439 mubi8_t digest_locked; 440 assign digest_locked = (digest_o != '0) ? MuBi8True : MuBi8False; 441 442 // This prevents the synthesis tool from optimizing the multibit signal. 443 prim_mubi8_sender #( 444 .AsyncOn(0) 445 ) u_prim_mubi8_sender_read_lock ( 446 .clk_i, 447 .rst_ni, 448 .mubi_i(mubi8_and_lo(access_pre.read_lock, digest_locked)), 449 .mubi_o(access_o.read_lock) 450 ); 451 452 `ASSERT(DigestReadLocksPartition_A, digest_o |-> mubi8_test_true_loose(access_o.read_lock)) 453 end else begin : gen_no_digest_read_lock 454 1/1 assign access_o.read_lock = access_pre.read_lock; Tests: T1 T2 T3  455 end 456 457 /////////////// 458 // Registers // 459 /////////////// 460 461 3/3 `PRIM_FLOP_SPARSE_FSM(u_state_regs, state_d, state_q, state_e, ResetSt) Tests: T1 T2 T3  | T1 T2 T3  | T1 T2 T3 
PRIM_FLOP_SPARSE_FSM(u_state_regs, state_d, state_q, state_e, ResetSt): 461.1 `ifdef SIMULATION 461.2 prim_sparse_fsm_flop #( 461.3 .StateEnumT(state_e), 461.4 .Width($bits(state_e)), 461.5 .ResetValue($bits(state_e)'(ResetSt)), 461.6 .EnableAlertTriggerSVA(1), 461.7 .CustomForceName("state_q") 461.8 ) u_state_regs ( 461.9 .clk_i ( clk_i ), 461.10 .rst_ni ( rst_ni ), 461.11 .state_i ( state_d ), 461.12 .state_o ( ) 461.13 ); 461.14 always_ff @(posedge clk_i or negedge rst_ni) begin 461.15 1/1 if (!rst_ni) begin Tests: T1 T2 T3  461.16 1/1 state_q <= ResetSt; Tests: T1 T2 T3  461.17 end else begin 461.18 1/1 state_q <= state_d; Tests: T1 T2 T3  461.19 end 461.20 end 461.21 u_state_regs_A: assert property (@(posedge clk_i) disable iff ((!rst_ni) !== '0) (state_q === u_state_regs.state_o)) 461.22 else begin 461.23 `ifdef UVM 461.24 uvm_pkg::uvm_report_error("ASSERT FAILED", "u_state_regs_A", uvm_pkg::UVM_NONE, 461.25 "../src/lowrisc_ip_otp_ctrl_1.0/rtl/otp_ctrl_part_unbuf.sv", 461, "", 1); 461.26 `else 461.27 $error("%0t: (%0s:%0d) [%m] [ASSERT FAILED] %0s", $time, `__FILE__, `__LINE__, 461.28 `PRIM_STRINGIFY(u_state_regs_A)); 461.29 `endif 461.30 end 461.31 `else 461.32 prim_sparse_fsm_flop #( 461.33 .StateEnumT(state_e), 461.34 .Width($bits(state_e)), 461.35 .ResetValue($bits(state_e)'(ResetSt)), 461.36 .EnableAlertTriggerSVA(1) 461.37 ) u_state_regs ( 461.38 .clk_i ( `PRIM_FLOP_CLK ), 461.39 .rst_ni ( `PRIM_FLOP_RST ), 461.40 .state_i ( state_d ), 461.41 .state_o ( state_q ) 461.42 ); 461.43 `endif462 463 always_ff @(posedge clk_i or negedge rst_ni) begin : p_regs 464 1/1 if (!rst_ni) begin Tests: T1 T2 T3  465 1/1 error_q <= NoError; Tests: T1 T2 T3  466 1/1 tlul_addr_q <= '0; Tests: T1 T2 T3  467 1/1 pending_tlul_error_q <= 1'b0; Tests: T1 T2 T3  468 end else begin 469 1/1 error_q <= error_d; Tests: T1 T2 T3  470 1/1 pending_tlul_error_q <= pending_tlul_error_d; Tests: T1 T2 T3  471 1/1 if (tlul_gnt_o) begin Tests: T1 T2 T3  472 1/1 tlul_addr_q <= tlul_addr_d; Tests: T2 T3 T4  473 end MISSING_ELSE

Line Coverage for Module : otp_ctrl_part_unbuf ( parameter Info=-1,DigestOffset=1648,StateWidth=10 )
Line Coverage for Module self-instances :
SCORELINE
98.33 100.00
tb.dut.gen_partitions[4].gen_unbuffered.u_part_unbuf

Line No.TotalCoveredPercent
TOTAL9191100.00
CONT_ASSIGN13811100.00
CONT_ASSIGN14911100.00
ALWAYS1646868100.00
CONT_ASSIGN33411100.00
CONT_ASSIGN33611100.00
CONT_ASSIGN34211100.00
CONT_ASSIGN34911100.00
CONT_ASSIGN35011100.00
CONT_ASSIGN35411100.00
CONT_ASSIGN35811100.00
CONT_ASSIGN39511100.00
CONT_ASSIGN42011100.00
CONT_ASSIGN45411100.00
ALWAYS46133100.00
ALWAYS46488100.00

137 // Output partition error state. 138 1/1 assign error_o = error_q; Tests: T1 T2 T3  139 140 // This partition cannot do any write accesses, hence we tie this 141 // constantly off. 142 assign otp_wdata_o = '0; 143 // Depending on the partition configuration, the wrapper is instructed to ignore integrity 144 // calculations and checks. To be on the safe side, the partition filters error responses at this 145 // point and does not report any integrity errors if integrity is disabled. 146 otp_err_e otp_err; 147 if (Info.integrity) begin : gen_integrity 148 assign otp_cmd_o = prim_otp_pkg::Read; 149 1/1 assign otp_err = otp_err_e'(otp_err_i); Tests: T1 T2 T3  150 end else begin : gen_no_integrity 151 assign otp_cmd_o = prim_otp_pkg::ReadRaw; 152 always_comb begin 153 if (otp_err_e'(otp_err_i) inside {MacroEccCorrError, MacroEccUncorrError}) begin 154 otp_err = NoError; 155 end else begin 156 otp_err = otp_err_e'(otp_err_i); 157 end 158 end 159 end 160 161 `ASSERT_KNOWN(FsmStateKnown_A, state_q) 162 always_comb begin : p_fsm 163 // Default assignments 164 1/1 state_d = state_q; Tests: T1 T2 T3  165 166 // Response to init request 167 1/1 init_done_o = 1'b0; Tests: T1 T2 T3  168 169 // OTP signals 170 1/1 otp_req_o = 1'b0; Tests: T1 T2 T3  171 1/1 otp_addr_sel = DigestAddrSel; Tests: T1 T2 T3  172 173 // TL-UL signals 174 1/1 tlul_gnt_o = 1'b0; Tests: T1 T2 T3  175 1/1 tlul_rvalid_o = 1'b0; Tests: T1 T2 T3  176 1/1 tlul_rerror_o = '0; Tests: T1 T2 T3  177 178 // Enable for buffered digest register 179 1/1 digest_reg_en = 1'b0; Tests: T1 T2 T3  180 181 // Error Register 182 1/1 error_d = error_q; Tests: T1 T2 T3  183 1/1 pending_tlul_error_d = 1'b0; Tests: T1 T2 T3  184 1/1 fsm_err_o = 1'b0; Tests: T1 T2 T3  185 186 1/1 unique case (state_q) Tests: T1 T2 T3  187 /////////////////////////////////////////////////////////////////// 188 // State right after reset. Wait here until we get a an 189 // initialization request. 190 ResetSt: begin 191 1/1 if (init_req_i) begin Tests: T1 T2 T3  192 // If the partition does not have a digest, no initialization is necessary. 193 1/1 if (Info.sw_digest) begin Tests: T1 T2 T3  194 1/1 state_d = InitSt; Tests: T1 T2 T3  195 end else begin 196 unreachable state_d = IdleSt; 197 end 198 end MISSING_ELSE 199 end 200 /////////////////////////////////////////////////////////////////// 201 // Initialization reads out the digest only in unbuffered 202 // partitions. Wait here until the OTP request has been granted. 203 // And then wait until the OTP word comes back. 204 InitSt: begin 205 1/1 otp_req_o = 1'b1; Tests: T1 T2 T3  206 1/1 if (otp_gnt_i) begin Tests: T1 T2 T3  207 1/1 state_d = InitWaitSt; Tests: T1 T2 T3  208 end MISSING_ELSE 209 end 210 /////////////////////////////////////////////////////////////////// 211 // Wait for OTP response and write to digest buffer register. In 212 // case an OTP transaction fails, latch the OTP error code and 213 // jump to a terminal error state. 214 InitWaitSt: begin 215 1/1 if (otp_rvalid_i) begin Tests: T1 T2 T3  216 1/1 digest_reg_en = 1'b1; Tests: T1 T2 T3  217 1/1 if (otp_err inside {NoError, MacroEccCorrError}) begin Tests: T1 T2 T3  218 1/1 state_d = IdleSt; Tests: T1 T2 T3  219 // At this point the only error that we could have gotten are correctable ECC errors. 220 1/1 if (otp_err != NoError) begin Tests: T1 T2 T3  221 1/1 error_d = MacroEccCorrError; Tests: T33 T46 T140  222 end MISSING_ELSE 223 end else begin 224 1/1 state_d = ErrorSt; Tests: T158 T165 T153  225 1/1 error_d = otp_err; Tests: T158 T165 T153  226 end 227 end MISSING_ELSE 228 end 229 /////////////////////////////////////////////////////////////////// 230 // Wait for TL-UL requests coming in. 231 // Then latch address and go to readout state. 232 IdleSt: begin 233 1/1 init_done_o = 1'b1; Tests: T1 T2 T3  234 1/1 if (tlul_req_i) begin Tests: T1 T2 T3  235 1/1 error_d = NoError; // clear recoverable soft errors. Tests: T2 T4 T6  236 1/1 state_d = ReadSt; Tests: T2 T4 T6  237 1/1 tlul_gnt_o = 1'b1; Tests: T2 T4 T6  238 end MISSING_ELSE 239 end 240 /////////////////////////////////////////////////////////////////// 241 // If the address is out of bounds, or if the partition is 242 // locked, signal back a bus error. Note that such an error does 243 // not cause the partition to go into error state. Otherwise if 244 // these checks pass, an OTP word is requested. 245 ReadSt: begin 246 1/1 init_done_o = 1'b1; Tests: T2 T4 T6  247 // Double check the address range. 248 1/1 if (tlul_addr_in_range && mubi8_test_false_strict(access_o.read_lock)) begin Tests: T2 T4 T6  249 1/1 otp_req_o = 1'b1; Tests: T2 T4 T6  250 1/1 otp_addr_sel = DataAddrSel; Tests: T2 T4 T6  251 1/1 if (otp_gnt_i) begin Tests: T2 T4 T6  252 1/1 state_d = ReadWaitSt; Tests: T2 T4 T6  253 end MISSING_ELSE 254 end else begin 255 1/1 state_d = IdleSt; Tests: T12 T13 T93  256 1/1 error_d = AccessError; // Signal this error, but do not go into terminal error state. Tests: T12 T13 T93  257 1/1 tlul_rvalid_o = 1'b1; Tests: T12 T13 T93  258 1/1 tlul_rerror_o = 2'b11; // This causes the TL-UL adapter to return a bus error. Tests: T12 T13 T93  259 end 260 end 261 /////////////////////////////////////////////////////////////////// 262 // Wait for OTP response and release the TL-UL response. In 263 // case an OTP transaction fails, latch the OTP error code, 264 // signal a TL-Ul bus error and jump to a terminal error state. 265 ReadWaitSt: begin 266 1/1 init_done_o = 1'b1; Tests: T2 T4 T6  267 1/1 if (otp_rvalid_i) begin Tests: T2 T4 T6  268 1/1 tlul_rvalid_o = 1'b1; Tests: T2 T4 T6  269 1/1 if (otp_err inside {NoError, MacroEccCorrError}) begin Tests: T2 T4 T6  270 1/1 state_d = IdleSt; Tests: T2 T4 T6  271 // At this point the only error that we could have gotten are correctable ECC errors. 272 1/1 if (otp_err != NoError) begin Tests: T2 T4 T6  273 1/1 error_d = MacroEccCorrError; Tests: T155 T91 T52  274 end MISSING_ELSE 275 end else begin 276 1/1 state_d = ErrorSt; Tests: T170 T171 T172  277 1/1 error_d = otp_err; Tests: T170 T171 T172  278 // This causes the TL-UL adapter to return a bus error. 279 1/1 tlul_rerror_o = 2'b11; Tests: T170 T171 T172  280 end 281 end MISSING_ELSE 282 end 283 /////////////////////////////////////////////////////////////////// 284 // Terminal Error State. This locks access to the partition. 285 // Make sure the partition signals an error state if no error 286 // code has been latched so far. 287 ErrorSt: begin 288 1/1 if (error_q == NoError) begin Tests: T2 T4 T5  289 1/1 error_d = FsmStateError; Tests: T26 T27 T28  290 end MISSING_ELSE 291 292 // Return bus errors if there are pending TL-UL requests. 293 1/1 if (pending_tlul_error_q) begin Tests: T2 T4 T5  294 1/1 tlul_rerror_o = 2'b11; Tests: T4 T129 T37  295 1/1 tlul_rvalid_o = 1'b1; Tests: T4 T129 T37  296 1/1 end else if (tlul_req_i) begin Tests: T2 T4 T5  297 1/1 tlul_gnt_o = 1'b1; Tests: T4 T129 T37  298 1/1 pending_tlul_error_d = 1'b1; Tests: T4 T129 T37  299 end MISSING_ELSE 300 end 301 /////////////////////////////////////////////////////////////////// 302 // We should never get here. If we do (e.g. via a malicious 303 // glitch), error out immediately. 304 default: begin 305 state_d = ErrorSt; 306 fsm_err_o = 1'b1; 307 end 308 /////////////////////////////////////////////////////////////////// 309 endcase // state_q 310 311 // Unconditionally jump into the terminal error state in case of 312 // an ECC error or escalation, and lock access to the partition down. 313 // SEC_CM: PART.FSM.LOCAL_ESC 314 1/1 if (ecc_err) begin Tests: T1 T2 T3  315 1/1 state_d = ErrorSt; Tests: T109 T164  316 1/1 if (state_q != ErrorSt) begin Tests: T109 T164  317 1/1 error_d = CheckFailError; Tests: T109 T164  318 end MISSING_ELSE 319 end MISSING_ELSE 320 // SEC_CM: PART.FSM.GLOBAL_ESC 321 1/1 if (lc_ctrl_pkg::lc_tx_test_true_loose(escalate_en_i)) begin Tests: T1 T2 T3  322 1/1 state_d = ErrorSt; Tests: T2 T4 T5  323 1/1 fsm_err_o = 1'b1; Tests: T2 T4 T5  324 1/1 if (state_q != ErrorSt) begin Tests: T2 T4 T5  325 1/1 error_d = FsmStateError; Tests: T2 T4 T5  326 end MISSING_ELSE 327 end MISSING_ELSE 328 end 329 330 /////////////////////////////////// 331 // Signals to/from TL-UL Adapter // 332 /////////////////////////////////// 333 334 1/1 assign tlul_addr_d = tlul_addr_i; Tests: T1 T2 T3  335 // Do not forward data in case of an error. 336 1/1 assign tlul_rdata_o = (tlul_rvalid_o && tlul_rerror_o == '0) ? otp_rdata_i[31:0] : '0; Tests: T1 T2 T3  337 338 if (Info.offset == 0) begin : gen_zero_offset 339 assign tlul_addr_in_range = {1'b0, tlul_addr_q, 2'b00} < PartEnd; 340 341 end else begin : gen_nonzero_offset 342 1/1 assign tlul_addr_in_range = {tlul_addr_q, 2'b00} >= Info.offset && Tests: T1 T2 T3  343 {1'b0, tlul_addr_q, 2'b00} < PartEnd; 344 end 345 346 // Note that OTP works on halfword (16bit) addresses, hence need to 347 // shift the addresses appropriately. 348 logic [OtpByteAddrWidth-1:0] addr_calc; 349 1/1 assign addr_calc = (otp_addr_sel == DigestAddrSel) ? DigestOffset : {tlul_addr_q, 2'b00}; Tests: T1 T2 T3  350 1/1 assign otp_addr_o = addr_calc[OtpByteAddrWidth-1:OtpAddrShift]; Tests: T1 T2 T3  351 352 if (OtpAddrShift > 0) begin : gen_unused 353 logic unused_bits; 354 1/1 assign unused_bits = ^addr_calc[OtpAddrShift-1:0]; Tests: T1 T2 T3  355 end 356 357 // Request 32bit except in case of the digest. 358 1/1 assign otp_size_o = (otp_addr_sel == DigestAddrSel) ? Tests: T1 T2 T3  359 OtpSizeWidth'(unsigned'(ScrmblBlockWidth / OtpWidth - 1)) : 360 OtpSizeWidth'(unsigned'(32 / OtpWidth - 1)); 361 362 //////////////// 363 // Digest Reg // 364 //////////////// 365 366 if (Info.sw_digest) begin : gen_ecc_reg 367 // SEC_CM: PART.DATA_REG.INTEGRITY 368 otp_ctrl_ecc_reg #( 369 .Width ( ScrmblBlockWidth ), 370 .Depth ( 1 ) 371 ) u_otp_ctrl_ecc_reg ( 372 .clk_i, 373 .rst_ni, 374 .wren_i ( digest_reg_en ), 375 .addr_i ( '0 ), 376 .wdata_i ( otp_rdata_i ), 377 .rdata_o ( ), 378 .data_o ( digest_o ), 379 .ecc_err_o ( ecc_err ) 380 ); 381 end else begin : gen_no_ecc_reg 382 logic unused_digest_reg_en; 383 logic unused_rdata; 384 assign unused_digest_reg_en = digest_reg_en; 385 assign unused_rdata = ^otp_rdata_i[32 +: 32]; // Upper word is not connected in this case. 386 assign digest_o = '0; 387 assign ecc_err = 1'b0; 388 end 389 390 //////////////////////// 391 // DAI Access Control // 392 //////////////////////// 393 394 mubi8_t init_locked; 395 1/1 assign init_locked = (~init_done_o) ? MuBi8True : MuBi8False; Tests: T1 T2 T3  396 397 // Aggregate all possible DAI write locks. The partition is also locked when uninitialized. 398 // Note that the locks are redundantly encoded values. 399 part_access_t access_pre; 400 prim_mubi8_sender #( 401 .AsyncOn(0) 402 ) u_prim_mubi8_sender_write_lock_pre ( 403 .clk_i, 404 .rst_ni, 405 .mubi_i(mubi8_and_lo(init_locked, access_i.write_lock)), 406 .mubi_o(access_pre.write_lock) 407 ); 408 prim_mubi8_sender #( 409 .AsyncOn(0) 410 ) u_prim_mubi8_sender_read_lock_pre ( 411 .clk_i, 412 .rst_ni, 413 .mubi_i(mubi8_and_lo(init_locked, access_i.read_lock)), 414 .mubi_o(access_pre.read_lock) 415 ); 416 417 // SEC_CM: PART.MEM.SW_UNWRITABLE 418 if (Info.write_lock) begin : gen_digest_write_lock 419 mubi8_t digest_locked; 420 1/1 assign digest_locked = (digest_o != '0) ? MuBi8True : MuBi8False; Tests: T1 T2 T3  421 422 // This prevents the synthesis tool from optimizing the multibit signal. 423 prim_mubi8_sender #( 424 .AsyncOn(0) 425 ) u_prim_mubi8_sender_write_lock ( 426 .clk_i, 427 .rst_ni, 428 .mubi_i(mubi8_and_lo(access_pre.write_lock, digest_locked)), 429 .mubi_o(access_o.write_lock) 430 ); 431 432 `ASSERT(DigestWriteLocksPartition_A, digest_o |-> mubi8_test_true_loose(access_o.write_lock)) 433 end else begin : gen_no_digest_write_lock 434 assign access_o.write_lock = access_pre.write_lock; 435 end 436 437 // SEC_CM: PART.MEM.SW_UNREADABLE 438 if (Info.read_lock) begin : gen_digest_read_lock 439 mubi8_t digest_locked; 440 assign digest_locked = (digest_o != '0) ? MuBi8True : MuBi8False; 441 442 // This prevents the synthesis tool from optimizing the multibit signal. 443 prim_mubi8_sender #( 444 .AsyncOn(0) 445 ) u_prim_mubi8_sender_read_lock ( 446 .clk_i, 447 .rst_ni, 448 .mubi_i(mubi8_and_lo(access_pre.read_lock, digest_locked)), 449 .mubi_o(access_o.read_lock) 450 ); 451 452 `ASSERT(DigestReadLocksPartition_A, digest_o |-> mubi8_test_true_loose(access_o.read_lock)) 453 end else begin : gen_no_digest_read_lock 454 1/1 assign access_o.read_lock = access_pre.read_lock; Tests: T1 T2 T3  455 end 456 457 /////////////// 458 // Registers // 459 /////////////// 460 461 3/3 `PRIM_FLOP_SPARSE_FSM(u_state_regs, state_d, state_q, state_e, ResetSt) Tests: T1 T2 T3  | T1 T2 T3  | T1 T2 T3 
PRIM_FLOP_SPARSE_FSM(u_state_regs, state_d, state_q, state_e, ResetSt): 461.1 `ifdef SIMULATION 461.2 prim_sparse_fsm_flop #( 461.3 .StateEnumT(state_e), 461.4 .Width($bits(state_e)), 461.5 .ResetValue($bits(state_e)'(ResetSt)), 461.6 .EnableAlertTriggerSVA(1), 461.7 .CustomForceName("state_q") 461.8 ) u_state_regs ( 461.9 .clk_i ( clk_i ), 461.10 .rst_ni ( rst_ni ), 461.11 .state_i ( state_d ), 461.12 .state_o ( ) 461.13 ); 461.14 always_ff @(posedge clk_i or negedge rst_ni) begin 461.15 1/1 if (!rst_ni) begin Tests: T1 T2 T3  461.16 1/1 state_q <= ResetSt; Tests: T1 T2 T3  461.17 end else begin 461.18 1/1 state_q <= state_d; Tests: T1 T2 T3  461.19 end 461.20 end 461.21 u_state_regs_A: assert property (@(posedge clk_i) disable iff ((!rst_ni) !== '0) (state_q === u_state_regs.state_o)) 461.22 else begin 461.23 `ifdef UVM 461.24 uvm_pkg::uvm_report_error("ASSERT FAILED", "u_state_regs_A", uvm_pkg::UVM_NONE, 461.25 "../src/lowrisc_ip_otp_ctrl_1.0/rtl/otp_ctrl_part_unbuf.sv", 461, "", 1); 461.26 `else 461.27 $error("%0t: (%0s:%0d) [%m] [ASSERT FAILED] %0s", $time, `__FILE__, `__LINE__, 461.28 `PRIM_STRINGIFY(u_state_regs_A)); 461.29 `endif 461.30 end 461.31 `else 461.32 prim_sparse_fsm_flop #( 461.33 .StateEnumT(state_e), 461.34 .Width($bits(state_e)), 461.35 .ResetValue($bits(state_e)'(ResetSt)), 461.36 .EnableAlertTriggerSVA(1) 461.37 ) u_state_regs ( 461.38 .clk_i ( `PRIM_FLOP_CLK ), 461.39 .rst_ni ( `PRIM_FLOP_RST ), 461.40 .state_i ( state_d ), 461.41 .state_o ( state_q ) 461.42 ); 461.43 `endif462 463 always_ff @(posedge clk_i or negedge rst_ni) begin : p_regs 464 1/1 if (!rst_ni) begin Tests: T1 T2 T3  465 1/1 error_q <= NoError; Tests: T1 T2 T3  466 1/1 tlul_addr_q <= '0; Tests: T1 T2 T3  467 1/1 pending_tlul_error_q <= 1'b0; Tests: T1 T2 T3  468 end else begin 469 1/1 error_q <= error_d; Tests: T1 T2 T3  470 1/1 pending_tlul_error_q <= pending_tlul_error_d; Tests: T1 T2 T3  471 1/1 if (tlul_gnt_o) begin Tests: T1 T2 T3  472 1/1 tlul_addr_q <= tlul_addr_d; Tests: T2 T4 T6  473 end MISSING_ELSE

Cond Coverage for Module : otp_ctrl_part_unbuf ( parameter Info=-1,DigestOffset=1608,StateWidth=10 )
Cond Coverage for Module self-instances :
SCORECOND
98.33 100.00
tb.dut.gen_partitions[3].gen_unbuffered.u_part_unbuf

TotalCoveredPercent
Conditions343397.06
Logical343397.06
Non-Logical00
Event00

 LINE       220
 EXPRESSION (otp_err != NoError)
            ----------1---------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT32,T103,T165

 LINE       272
 EXPRESSION (otp_err != NoError)
            ----------1---------
-1-StatusTests
0CoveredT2,T3,T6
1CoveredT5,T40,T53

 LINE       288
 EXPRESSION (error_q == NoError)
            ----------1---------
-1-StatusTests
0CoveredT2,T4,T5
1CoveredT26,T27,T28

 LINE       316
 EXPRESSION (state_q != ErrorSt)
            ----------1---------
-1-StatusTests
0CoveredT109
1CoveredT109

 LINE       324
 EXPRESSION (state_q != ErrorSt)
            ----------1---------
-1-StatusTests
0CoveredT2,T4,T5
1CoveredT2,T4,T5

 LINE       336
 EXPRESSION ((tlul_rvalid_o && (tlul_rerror_o == '0)) ? otp_rdata_i[31:0] : '0)
             --------------------1-------------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT2,T3,T5

 LINE       336
 SUB-EXPRESSION (tlul_rvalid_o && (tlul_rerror_o == '0))
                 ------1------    ----------2----------
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT4,T12,T93
11CoveredT2,T3,T5

 LINE       336
 SUB-EXPRESSION (tlul_rerror_o == '0)
                ----------1----------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       342
 EXPRESSION (({tlul_addr_q, 2'b0} >= 11'b10001111000) && ({1'b0, tlul_addr_q, 2'b0} < PartEnd))
             --------------------1-------------------    ------------------2------------------
-1--2-StatusTests
01CoveredT1,T2,T3
10Not Covered
11CoveredT2,T3,T4

 LINE       349
 EXPRESSION ((otp_addr_sel == DigestAddrSel) ? DigestOffset : ({tlul_addr_q, 2'b0}))
             ---------------1---------------
-1-StatusTests
0CoveredT2,T3,T5
1CoveredT1,T2,T3

 LINE       349
 SUB-EXPRESSION (otp_addr_sel == DigestAddrSel)
                ---------------1---------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       358
 EXPRESSION 
 Number  Term
      1  (otp_addr_sel == DigestAddrSel) ? (2'((unsigned'(((otp_ctrl_pkg::ScrmblBlockWidth / otp_ctrl_pkg::OtpWidth) - 1))))) : (2'((unsigned'(((32 / otp_ctrl_pkg::OtpWidth) - 1))))))
-1-StatusTests
0CoveredT2,T3,T5
1CoveredT1,T2,T3

 LINE       358
 SUB-EXPRESSION (otp_addr_sel == DigestAddrSel)
                ---------------1---------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       395
 EXPRESSION (((~init_done_o)) ? MuBi8True : MuBi8False)
             --------1-------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       420
 EXPRESSION ((digest_o != '0) ? MuBi8True : MuBi8False)
             --------1-------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT4,T12,T13

 LINE       420
 SUB-EXPRESSION (digest_o != '0)
                --------1-------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT4,T12,T13

Cond Coverage for Module : otp_ctrl_part_unbuf ( parameter Info=65616,DigestOffset=56,StateWidth=10 )
Cond Coverage for Module self-instances :
SCORECOND
96.23 100.00
tb.dut.gen_partitions[0].gen_unbuffered.u_part_unbuf

TotalCoveredPercent
Conditions312993.55
Logical312993.55
Non-Logical00
Event00

 LINE       220
 EXPRESSION (otp_err != NoError)
            ----------1---------
-1-StatusTests
0CoveredT1,T2,T3
1Not Covered

 LINE       272
 EXPRESSION (otp_err != NoError)
            ----------1---------
-1-StatusTests
0CoveredT2,T3,T4
1Not Covered

 LINE       288
 EXPRESSION (error_q == NoError)
            ----------1---------
-1-StatusTests
0CoveredT2,T4,T5
1CoveredT26,T27,T28

 LINE       316
 EXPRESSION (state_q != ErrorSt)
            ----------1---------
-1-StatusTests
0CoveredT109,T152
1CoveredT109,T152

 LINE       324
 EXPRESSION (state_q != ErrorSt)
            ----------1---------
-1-StatusTests
0CoveredT2,T4,T5
1CoveredT2,T4,T5

 LINE       336
 EXPRESSION ((tlul_rvalid_o && (tlul_rerror_o == '0)) ? otp_rdata_i[31:0] : '0)
             --------------------1-------------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT2,T3,T4

 LINE       336
 SUB-EXPRESSION (tlul_rvalid_o && (tlul_rerror_o == '0))
                 ------1------    ----------2----------
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT4,T5,T12
11CoveredT2,T3,T4

 LINE       336
 SUB-EXPRESSION (tlul_rerror_o == '0)
                ----------1----------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       349
 EXPRESSION ((otp_addr_sel == DigestAddrSel) ? DigestOffset : ({tlul_addr_q, 2'b0}))
             ---------------1---------------
-1-StatusTests
0CoveredT2,T3,T4
1CoveredT1,T2,T3

 LINE       349
 SUB-EXPRESSION (otp_addr_sel == DigestAddrSel)
                ---------------1---------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       358
 EXPRESSION 
 Number  Term
      1  (otp_addr_sel == DigestAddrSel) ? (2'((unsigned'(((otp_ctrl_pkg::ScrmblBlockWidth / otp_ctrl_pkg::OtpWidth) - 1))))) : (2'((unsigned'(((32 / otp_ctrl_pkg::OtpWidth) - 1))))))
-1-StatusTests
0CoveredT2,T3,T4
1CoveredT1,T2,T3

 LINE       358
 SUB-EXPRESSION (otp_addr_sel == DigestAddrSel)
                ---------------1---------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       395
 EXPRESSION (((~init_done_o)) ? MuBi8True : MuBi8False)
             --------1-------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       420
 EXPRESSION ((digest_o != '0) ? MuBi8True : MuBi8False)
             --------1-------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT2,T4,T12

 LINE       420
 SUB-EXPRESSION (digest_o != '0)
                --------1-------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT2,T4,T12

Cond Coverage for Module : otp_ctrl_part_unbuf ( parameter Info=134594644,DigestOffset=424,StateWidth=10 )
Cond Coverage for Module self-instances :
SCORECOND
98.33 100.00
tb.dut.gen_partitions[1].gen_unbuffered.u_part_unbuf

TotalCoveredPercent
Conditions343397.06
Logical343397.06
Non-Logical00
Event00

 LINE       220
 EXPRESSION (otp_err != NoError)
            ----------1---------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT33,T153,T154

 LINE       272
 EXPRESSION (otp_err != NoError)
            ----------1---------
-1-StatusTests
0CoveredT2,T4,T6
1CoveredT5,T40,T155

 LINE       288
 EXPRESSION (error_q == NoError)
            ----------1---------
-1-StatusTests
0CoveredT2,T4,T5
1CoveredT26,T27,T28

 LINE       316
 EXPRESSION (state_q != ErrorSt)
            ----------1---------
-1-StatusTests
0CoveredT109,T110
1CoveredT109,T110

 LINE       324
 EXPRESSION (state_q != ErrorSt)
            ----------1---------
-1-StatusTests
0CoveredT2,T4,T5
1CoveredT4,T5,T101

 LINE       336
 EXPRESSION ((tlul_rvalid_o && (tlul_rerror_o == '0)) ? otp_rdata_i[31:0] : '0)
             --------------------1-------------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT2,T4,T5

 LINE       336
 SUB-EXPRESSION (tlul_rvalid_o && (tlul_rerror_o == '0))
                 ------1------    ----------2----------
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT4,T12,T101
11CoveredT2,T4,T5

 LINE       336
 SUB-EXPRESSION (tlul_rerror_o == '0)
                ----------1----------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       342
 EXPRESSION (({tlul_addr_q, 2'b0} >= 11'b00001000000) && ({1'b0, tlul_addr_q, 2'b0} < PartEnd))
             --------------------1-------------------    ------------------2------------------
-1--2-StatusTests
01CoveredT1,T2,T3
10Not Covered
11CoveredT2,T4,T5

 LINE       349
 EXPRESSION ((otp_addr_sel == DigestAddrSel) ? DigestOffset : ({tlul_addr_q, 2'b0}))
             ---------------1---------------
-1-StatusTests
0CoveredT2,T4,T5
1CoveredT1,T2,T3

 LINE       349
 SUB-EXPRESSION (otp_addr_sel == DigestAddrSel)
                ---------------1---------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       358
 EXPRESSION 
 Number  Term
      1  (otp_addr_sel == DigestAddrSel) ? (2'((unsigned'(((otp_ctrl_pkg::ScrmblBlockWidth / otp_ctrl_pkg::OtpWidth) - 1))))) : (2'((unsigned'(((32 / otp_ctrl_pkg::OtpWidth) - 1))))))
-1-StatusTests
0CoveredT2,T4,T5
1CoveredT1,T2,T3

 LINE       358
 SUB-EXPRESSION (otp_addr_sel == DigestAddrSel)
                ---------------1---------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       395
 EXPRESSION (((~init_done_o)) ? MuBi8True : MuBi8False)
             --------1-------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       420
 EXPRESSION ((digest_o != '0) ? MuBi8True : MuBi8False)
             --------1-------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT2,T4,T12

 LINE       420
 SUB-EXPRESSION (digest_o != '0)
                --------1-------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT2,T4,T12

Cond Coverage for Module : otp_ctrl_part_unbuf ( parameter Info=906698836,DigestOffset=1136,StateWidth=10 )
Cond Coverage for Module self-instances :
SCORECOND
97.75 97.06
tb.dut.gen_partitions[2].gen_unbuffered.u_part_unbuf

TotalCoveredPercent
Conditions343397.06
Logical343397.06
Non-Logical00
Event00

 LINE       220
 EXPRESSION (otp_err != NoError)
            ----------1---------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT33,T103,T158

 LINE       272
 EXPRESSION (otp_err != NoError)
            ----------1---------
-1-StatusTests
0CoveredT2,T3,T6
1CoveredT37,T40,T52

 LINE       288
 EXPRESSION (error_q == NoError)
            ----------1---------
-1-StatusTests
0CoveredT2,T4,T5
1CoveredT26,T27,T28

 LINE       316
 EXPRESSION (state_q != ErrorSt)
            ----------1---------
-1-StatusTests
0CoveredT109,T164,T152
1CoveredT109,T164,T152

 LINE       324
 EXPRESSION (state_q != ErrorSt)
            ----------1---------
-1-StatusTests
0CoveredT2,T4,T5
1CoveredT2,T4,T5

 LINE       336
 EXPRESSION ((tlul_rvalid_o && (tlul_rerror_o == '0)) ? otp_rdata_i[31:0] : '0)
             --------------------1-------------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT2,T3,T6

 LINE       336
 SUB-EXPRESSION (tlul_rvalid_o && (tlul_rerror_o == '0))
                 ------1------    ----------2----------
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT4,T5,T12
11CoveredT2,T3,T6

 LINE       336
 SUB-EXPRESSION (tlul_rerror_o == '0)
                ----------1----------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       342
 EXPRESSION (({tlul_addr_q, 2'b0} >= 11'b00110110000) && ({1'b0, tlul_addr_q, 2'b0} < PartEnd))
             --------------------1-------------------    ------------------2------------------
-1--2-StatusTests
01CoveredT1,T2,T3
10Not Covered
11CoveredT2,T3,T4

 LINE       349
 EXPRESSION ((otp_addr_sel == DigestAddrSel) ? DigestOffset : ({tlul_addr_q, 2'b0}))
             ---------------1---------------
-1-StatusTests
0CoveredT2,T3,T6
1CoveredT1,T2,T3

 LINE       349
 SUB-EXPRESSION (otp_addr_sel == DigestAddrSel)
                ---------------1---------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       358
 EXPRESSION 
 Number  Term
      1  (otp_addr_sel == DigestAddrSel) ? (2'((unsigned'(((otp_ctrl_pkg::ScrmblBlockWidth / otp_ctrl_pkg::OtpWidth) - 1))))) : (2'((unsigned'(((32 / otp_ctrl_pkg::OtpWidth) - 1))))))
-1-StatusTests
0CoveredT2,T3,T6
1CoveredT1,T2,T3

 LINE       358
 SUB-EXPRESSION (otp_addr_sel == DigestAddrSel)
                ---------------1---------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       395
 EXPRESSION (((~init_done_o)) ? MuBi8True : MuBi8False)
             --------1-------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       420
 EXPRESSION ((digest_o != '0) ? MuBi8True : MuBi8False)
             --------1-------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT4,T12,T13

 LINE       420
 SUB-EXPRESSION (digest_o != '0)
                --------1-------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT4,T12,T13

Cond Coverage for Module : otp_ctrl_part_unbuf ( parameter Info=-1,DigestOffset=1648,StateWidth=10 )
Cond Coverage for Module self-instances :
SCORECOND
98.33 100.00
tb.dut.gen_partitions[4].gen_unbuffered.u_part_unbuf

TotalCoveredPercent
Conditions343397.06
Logical343397.06
Non-Logical00
Event00

 LINE       220
 EXPRESSION (otp_err != NoError)
            ----------1---------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT33,T46,T140

 LINE       272
 EXPRESSION (otp_err != NoError)
            ----------1---------
-1-StatusTests
0CoveredT2,T4,T6
1CoveredT155,T91,T52

 LINE       288
 EXPRESSION (error_q == NoError)
            ----------1---------
-1-StatusTests
0CoveredT2,T4,T5
1CoveredT26,T27,T28

 LINE       316
 EXPRESSION (state_q != ErrorSt)
            ----------1---------
-1-StatusTests
0CoveredT109,T164
1CoveredT109,T164

 LINE       324
 EXPRESSION (state_q != ErrorSt)
            ----------1---------
-1-StatusTests
0CoveredT2,T4,T5
1CoveredT2,T4,T5

 LINE       336
 EXPRESSION ((tlul_rvalid_o && (tlul_rerror_o == '0)) ? otp_rdata_i[31:0] : '0)
             --------------------1-------------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT2,T4,T6

 LINE       336
 SUB-EXPRESSION (tlul_rvalid_o && (tlul_rerror_o == '0))
                 ------1------    ----------2----------
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT4,T12,T13
11CoveredT2,T4,T6

 LINE       336
 SUB-EXPRESSION (tlul_rerror_o == '0)
                ----------1----------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       342
 EXPRESSION (({tlul_addr_q, 2'b0} >= 11'b11001010000) && ({1'b0, tlul_addr_q, 2'b0} < PartEnd))
             --------------------1-------------------    ------------------2------------------
-1--2-StatusTests
01CoveredT1,T2,T3
10Not Covered
11CoveredT2,T4,T6

 LINE       349
 EXPRESSION ((otp_addr_sel == DigestAddrSel) ? DigestOffset : ({tlul_addr_q, 2'b0}))
             ---------------1---------------
-1-StatusTests
0CoveredT2,T4,T6
1CoveredT1,T2,T3

 LINE       349
 SUB-EXPRESSION (otp_addr_sel == DigestAddrSel)
                ---------------1---------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       358
 EXPRESSION 
 Number  Term
      1  (otp_addr_sel == DigestAddrSel) ? (2'((unsigned'(((otp_ctrl_pkg::ScrmblBlockWidth / otp_ctrl_pkg::OtpWidth) - 1))))) : (2'((unsigned'(((32 / otp_ctrl_pkg::OtpWidth) - 1))))))
-1-StatusTests
0CoveredT2,T4,T6
1CoveredT1,T2,T3

 LINE       358
 SUB-EXPRESSION (otp_addr_sel == DigestAddrSel)
                ---------------1---------------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       395
 EXPRESSION (((~init_done_o)) ? MuBi8True : MuBi8False)
             --------1-------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT1,T2,T3

 LINE       420
 EXPRESSION ((digest_o != '0) ? MuBi8True : MuBi8False)
             --------1-------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT17,T105,T19

 LINE       420
 SUB-EXPRESSION (digest_o != '0)
                --------1-------
-1-StatusTests
0CoveredT1,T2,T3
1CoveredT17,T105,T19

FSM Coverage for Module : otp_ctrl_part_unbuf
Summary for FSM :: state_q
TotalCoveredPercent
States 7 7 100.00 (Not included in score)
Transitions 14 12 85.71
Sequences 0 0

State, Transition and Sequence Details for FSM :: state_q
statesLine No.CoveredTests
ErrorSt 224 Covered T2,T4,T5
IdleSt 196 Covered T1,T2,T3
InitSt 194 Covered T1,T2,T3
InitWaitSt 207 Covered T1,T2,T3
ReadSt 236 Covered T2,T3,T4
ReadWaitSt 252 Covered T2,T3,T4
ResetSt 190 Covered T1,T2,T3


transitionsLine No.CoveredTests
IdleSt->ErrorSt 315 Covered T2,T4,T5
IdleSt->ReadSt 236 Covered T2,T3,T4
InitSt->ErrorSt 315 Covered T2,T104,T117
InitSt->InitWaitSt 207 Covered T1,T2,T3
InitWaitSt->ErrorSt 224 Covered T2,T104,T117
InitWaitSt->IdleSt 218 Covered T1,T2,T3
ReadSt->ErrorSt 315 Not Covered
ReadSt->IdleSt 255 Covered T12,T13,T17
ReadSt->ReadWaitSt 252 Covered T2,T3,T4
ReadWaitSt->ErrorSt 276 Covered T118,T155,T170
ReadWaitSt->IdleSt 270 Covered T2,T3,T4
ResetSt->ErrorSt 315 Covered T109,T110,T111
ResetSt->IdleSt 196 Not Covered
ResetSt->InitSt 194 Covered T1,T2,T3


Summary for FSM :: error_q
TotalCoveredPercent
States 5 5 100.00 (Not included in score)
Transitions 20 10 50.00
Sequences 0 0

State, Transition and Sequence Details for FSM :: error_q
statesLine No.CoveredTests
AccessError 256 Covered T12,T13,T17
CheckFailError 317 Covered T109,T110,T164
FsmStateError 289 Covered T2,T4,T5
MacroEccCorrError 221 Covered T5,T37,T32
NoError 235 Covered T1,T2,T3


transitionsLine No.CoveredTests
AccessError->CheckFailError 317 Not Covered
AccessError->FsmStateError 325 Covered T121,T8,T9
AccessError->MacroEccCorrError 221 Not Covered
AccessError->NoError 235 Covered T12,T13,T17
CheckFailError->AccessError 256 Not Covered
CheckFailError->FsmStateError 325 Not Covered
CheckFailError->MacroEccCorrError 221 Not Covered
CheckFailError->NoError 235 Covered T109,T110,T164
FsmStateError->AccessError 256 Not Covered
FsmStateError->CheckFailError 317 Not Covered
FsmStateError->MacroEccCorrError 221 Not Covered
FsmStateError->NoError 235 Covered T2,T4,T5
MacroEccCorrError->AccessError 256 Not Covered
MacroEccCorrError->CheckFailError 317 Not Covered
MacroEccCorrError->FsmStateError 325 Covered T5,T32,T155
MacroEccCorrError->NoError 235 Covered T37,T40,T91
NoError->AccessError 256 Covered T12,T13,T17
NoError->CheckFailError 317 Covered T109,T110,T164
NoError->FsmStateError 289 Covered T2,T4,T5
NoError->MacroEccCorrError 221 Covered T5,T37,T32



Branch Coverage for Module : otp_ctrl_part_unbuf ( parameter Info=65616,DigestOffset=56,StateWidth=10 )
Branch Coverage for Module self-instances :
SCOREBRANCH
96.23 100.00
tb.dut.gen_partitions[0].gen_unbuffered.u_part_unbuf

Line No.TotalCoveredPercent
Branches 46 41 89.13
TERNARY 336 2 2 100.00
TERNARY 349 2 2 100.00
TERNARY 358 2 2 100.00
TERNARY 395 2 2 100.00
TERNARY 420 2 2 100.00
CASE 186 23 18 78.26
IF 314 3 3 100.00
IF 321 3 3 100.00
IF 461 2 2 100.00
IF 464 3 3 100.00
IF 153 2 2 100.00


336 assign tlul_rdata_o = (tlul_rvalid_o && tlul_rerror_o == '0) ? otp_rdata_i[31:0] : '0; -1- ==> ==>

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


349 assign addr_calc = (otp_addr_sel == DigestAddrSel) ? DigestOffset : {tlul_addr_q, 2'b00}; -1- ==> ==>

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


358 assign otp_size_o = (otp_addr_sel == DigestAddrSel) ? -1- ==> ==>

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


395 assign init_locked = (~init_done_o) ? MuBi8True : MuBi8False; -1- ==> ==>

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


420 assign digest_locked = (digest_o != '0) ? MuBi8True : MuBi8False; -1- ==> ==>

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


186 unique case (state_q) -1- 187 /////////////////////////////////////////////////////////////////// 188 // State right after reset. Wait here until we get a an 189 // initialization request. 190 ResetSt: begin 191 if (init_req_i) begin -2- 192 // If the partition does not have a digest, no initialization is necessary. 193 if (Info.sw_digest) begin -3- 194 state_d = InitSt; ==> 195 end else begin 196 state_d = IdleSt; ==> (Unreachable) 197 end 198 end MISSING_ELSE ==> 199 end 200 /////////////////////////////////////////////////////////////////// 201 // Initialization reads out the digest only in unbuffered 202 // partitions. Wait here until the OTP request has been granted. 203 // And then wait until the OTP word comes back. 204 InitSt: begin 205 otp_req_o = 1'b1; 206 if (otp_gnt_i) begin -4- 207 state_d = InitWaitSt; ==> 208 end MISSING_ELSE ==> 209 end 210 /////////////////////////////////////////////////////////////////// 211 // Wait for OTP response and write to digest buffer register. In 212 // case an OTP transaction fails, latch the OTP error code and 213 // jump to a terminal error state. 214 InitWaitSt: begin 215 if (otp_rvalid_i) begin -5- 216 digest_reg_en = 1'b1; 217 if (otp_err inside {NoError, MacroEccCorrError}) begin -6- 218 state_d = IdleSt; 219 // At this point the only error that we could have gotten are correctable ECC errors. 220 if (otp_err != NoError) begin -7- 221 error_d = MacroEccCorrError; ==> 222 end MISSING_ELSE ==> 223 end else begin 224 state_d = ErrorSt; ==> 225 error_d = otp_err; 226 end 227 end MISSING_ELSE ==> 228 end 229 /////////////////////////////////////////////////////////////////// 230 // Wait for TL-UL requests coming in. 231 // Then latch address and go to readout state. 232 IdleSt: begin 233 init_done_o = 1'b1; 234 if (tlul_req_i) begin -8- 235 error_d = NoError; // clear recoverable soft errors. ==> 236 state_d = ReadSt; 237 tlul_gnt_o = 1'b1; 238 end MISSING_ELSE ==> 239 end 240 /////////////////////////////////////////////////////////////////// 241 // If the address is out of bounds, or if the partition is 242 // locked, signal back a bus error. Note that such an error does 243 // not cause the partition to go into error state. Otherwise if 244 // these checks pass, an OTP word is requested. 245 ReadSt: begin 246 init_done_o = 1'b1; 247 // Double check the address range. 248 if (tlul_addr_in_range && mubi8_test_false_strict(access_o.read_lock)) begin -9- 249 otp_req_o = 1'b1; 250 otp_addr_sel = DataAddrSel; 251 if (otp_gnt_i) begin -10- 252 state_d = ReadWaitSt; ==> 253 end MISSING_ELSE ==> 254 end else begin 255 state_d = IdleSt; ==> 256 error_d = AccessError; // Signal this error, but do not go into terminal error state. 257 tlul_rvalid_o = 1'b1; 258 tlul_rerror_o = 2'b11; // This causes the TL-UL adapter to return a bus error. 259 end 260 end 261 /////////////////////////////////////////////////////////////////// 262 // Wait for OTP response and release the TL-UL response. In 263 // case an OTP transaction fails, latch the OTP error code, 264 // signal a TL-Ul bus error and jump to a terminal error state. 265 ReadWaitSt: begin 266 init_done_o = 1'b1; 267 if (otp_rvalid_i) begin -11- 268 tlul_rvalid_o = 1'b1; 269 if (otp_err inside {NoError, MacroEccCorrError}) begin -12- 270 state_d = IdleSt; 271 // At this point the only error that we could have gotten are correctable ECC errors. 272 if (otp_err != NoError) begin -13- 273 error_d = MacroEccCorrError; ==> 274 end MISSING_ELSE ==> 275 end else begin 276 state_d = ErrorSt; ==> 277 error_d = otp_err; 278 // This causes the TL-UL adapter to return a bus error. 279 tlul_rerror_o = 2'b11; 280 end 281 end MISSING_ELSE ==> 282 end 283 /////////////////////////////////////////////////////////////////// 284 // Terminal Error State. This locks access to the partition. 285 // Make sure the partition signals an error state if no error 286 // code has been latched so far. 287 ErrorSt: begin 288 if (error_q == NoError) begin -14- 289 error_d = FsmStateError; ==> 290 end MISSING_ELSE ==> 291 292 // Return bus errors if there are pending TL-UL requests. 293 if (pending_tlul_error_q) begin -15- 294 tlul_rerror_o = 2'b11; ==> 295 tlul_rvalid_o = 1'b1; 296 end else if (tlul_req_i) begin -16- 297 tlul_gnt_o = 1'b1; ==> 298 pending_tlul_error_d = 1'b1; 299 end MISSING_ELSE ==> 300 end 301 /////////////////////////////////////////////////////////////////// 302 // We should never get here. If we do (e.g. via a malicious 303 // glitch), error out immediately. 304 default: begin 305 state_d = ErrorSt; ==>

Branches:
-1--2--3--4--5--6--7--8--9--10--11--12--13--14--15--16-StatusTests
ResetSt 1 1 - - - - - - - - - - - - - Covered T1,T2,T3
ResetSt 1 0 - - - - - - - - - - - - - Unreachable
ResetSt 0 - - - - - - - - - - - - - - Covered T1,T2,T3
InitSt - - 1 - - - - - - - - - - - - Covered T1,T2,T3
InitSt - - 0 - - - - - - - - - - - - Not Covered
InitWaitSt - - - 1 1 1 - - - - - - - - - Not Covered
InitWaitSt - - - 1 1 0 - - - - - - - - - Covered T1,T2,T3
InitWaitSt - - - 1 0 - - - - - - - - - - Not Covered
InitWaitSt - - - 0 - - - - - - - - - - - Covered T1,T2,T3
IdleSt - - - - - - 1 - - - - - - - - Covered T2,T3,T4
IdleSt - - - - - - 0 - - - - - - - - Covered T1,T2,T3
ReadSt - - - - - - - 1 1 - - - - - - Covered T2,T3,T4
ReadSt - - - - - - - 1 0 - - - - - - Covered T12,T13,T125
ReadSt - - - - - - - 0 - - - - - - - Covered T12,T17,T93
ReadWaitSt - - - - - - - - - 1 1 1 - - - Not Covered
ReadWaitSt - - - - - - - - - 1 1 0 - - - Covered T2,T3,T4
ReadWaitSt - - - - - - - - - 1 0 - - - - Not Covered
ReadWaitSt - - - - - - - - - 0 - - - - - Covered T2,T3,T4
ErrorSt - - - - - - - - - - - - 1 - - Covered T26,T27,T28
ErrorSt - - - - - - - - - - - - 0 - - Covered T2,T4,T5
ErrorSt - - - - - - - - - - - - - 1 - Covered T4,T5,T101
ErrorSt - - - - - - - - - - - - - 0 1 Covered T4,T5,T101
ErrorSt - - - - - - - - - - - - - 0 0 Covered T2,T4,T5
default - - - - - - - - - - - - - - - Covered T26,T27,T28


314 if (ecc_err) begin -1- 315 state_d = ErrorSt; 316 if (state_q != ErrorSt) begin -2- 317 error_d = CheckFailError; ==> 318 end MISSING_ELSE ==> 319 end MISSING_ELSE ==>

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


321 if (lc_ctrl_pkg::lc_tx_test_true_loose(escalate_en_i)) begin -1- 322 state_d = ErrorSt; 323 fsm_err_o = 1'b1; 324 if (state_q != ErrorSt) begin -2- 325 error_d = FsmStateError; ==> 326 end MISSING_ELSE ==> 327 end MISSING_ELSE ==>

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


461 `PRIM_FLOP_SPARSE_FSM(u_state_regs, state_d, state_q, state_e, ResetSt) -1- ==> ==>

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


464 if (!rst_ni) begin -1- 465 error_q <= NoError; ==> 466 tlul_addr_q <= '0; 467 pending_tlul_error_q <= 1'b0; 468 end else begin 469 error_q <= error_d; 470 pending_tlul_error_q <= pending_tlul_error_d; 471 if (tlul_gnt_o) begin -2- 472 tlul_addr_q <= tlul_addr_d; ==> 473 end MISSING_ELSE ==>

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


153 if (otp_err_e'(otp_err_i) inside {MacroEccCorrError, MacroEccUncorrError}) begin -1- 154 otp_err = NoError; ==> 155 end else begin 156 otp_err = otp_err_e'(otp_err_i); ==>

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


Branch Coverage for Module : otp_ctrl_part_unbuf ( parameter Info=134594644,DigestOffset=424,StateWidth=10 + Info=906698836,DigestOffset=1136,StateWidth=10 + Info=-1,DigestOffset=1608,StateWidth=10 + Info=-1,DigestOffset=1648,StateWidth=10 )
Branch Coverage for Module self-instances :
SCOREBRANCH
98.33 100.00
tb.dut.gen_partitions[1].gen_unbuffered.u_part_unbuf

SCOREBRANCH
97.75 100.00
tb.dut.gen_partitions[2].gen_unbuffered.u_part_unbuf

SCOREBRANCH
98.33 100.00
tb.dut.gen_partitions[3].gen_unbuffered.u_part_unbuf

SCOREBRANCH
98.33 100.00
tb.dut.gen_partitions[4].gen_unbuffered.u_part_unbuf

Line No.TotalCoveredPercent
Branches 44 44 100.00
TERNARY 336 2 2 100.00
TERNARY 349 2 2 100.00
TERNARY 358 2 2 100.00
TERNARY 395 2 2 100.00
TERNARY 420 2 2 100.00
CASE 186 23 23 100.00
IF 314 3 3 100.00
IF 321 3 3 100.00
IF 461 2 2 100.00
IF 464 3 3 100.00


336 assign tlul_rdata_o = (tlul_rvalid_o && tlul_rerror_o == '0) ? otp_rdata_i[31:0] : '0; -1- ==> ==>

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


349 assign addr_calc = (otp_addr_sel == DigestAddrSel) ? DigestOffset : {tlul_addr_q, 2'b00}; -1- ==> ==>

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


358 assign otp_size_o = (otp_addr_sel == DigestAddrSel) ? -1- ==> ==>

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


395 assign init_locked = (~init_done_o) ? MuBi8True : MuBi8False; -1- ==> ==>

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


420 assign digest_locked = (digest_o != '0) ? MuBi8True : MuBi8False; -1- ==> ==>

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


186 unique case (state_q) -1- 187 /////////////////////////////////////////////////////////////////// 188 // State right after reset. Wait here until we get a an 189 // initialization request. 190 ResetSt: begin 191 if (init_req_i) begin -2- 192 // If the partition does not have a digest, no initialization is necessary. 193 if (Info.sw_digest) begin -3- 194 state_d = InitSt; ==> 195 end else begin 196 state_d = IdleSt; ==> (Unreachable) 197 end 198 end MISSING_ELSE ==> 199 end 200 /////////////////////////////////////////////////////////////////// 201 // Initialization reads out the digest only in unbuffered 202 // partitions. Wait here until the OTP request has been granted. 203 // And then wait until the OTP word comes back. 204 InitSt: begin 205 otp_req_o = 1'b1; 206 if (otp_gnt_i) begin -4- 207 state_d = InitWaitSt; ==> 208 end MISSING_ELSE ==> 209 end 210 /////////////////////////////////////////////////////////////////// 211 // Wait for OTP response and write to digest buffer register. In 212 // case an OTP transaction fails, latch the OTP error code and 213 // jump to a terminal error state. 214 InitWaitSt: begin 215 if (otp_rvalid_i) begin -5- 216 digest_reg_en = 1'b1; 217 if (otp_err inside {NoError, MacroEccCorrError}) begin -6- 218 state_d = IdleSt; 219 // At this point the only error that we could have gotten are correctable ECC errors. 220 if (otp_err != NoError) begin -7- 221 error_d = MacroEccCorrError; ==> 222 end MISSING_ELSE ==> 223 end else begin 224 state_d = ErrorSt; ==> 225 error_d = otp_err; 226 end 227 end MISSING_ELSE ==> 228 end 229 /////////////////////////////////////////////////////////////////// 230 // Wait for TL-UL requests coming in. 231 // Then latch address and go to readout state. 232 IdleSt: begin 233 init_done_o = 1'b1; 234 if (tlul_req_i) begin -8- 235 error_d = NoError; // clear recoverable soft errors. ==> 236 state_d = ReadSt; 237 tlul_gnt_o = 1'b1; 238 end MISSING_ELSE ==> 239 end 240 /////////////////////////////////////////////////////////////////// 241 // If the address is out of bounds, or if the partition is 242 // locked, signal back a bus error. Note that such an error does 243 // not cause the partition to go into error state. Otherwise if 244 // these checks pass, an OTP word is requested. 245 ReadSt: begin 246 init_done_o = 1'b1; 247 // Double check the address range. 248 if (tlul_addr_in_range && mubi8_test_false_strict(access_o.read_lock)) begin -9- 249 otp_req_o = 1'b1; 250 otp_addr_sel = DataAddrSel; 251 if (otp_gnt_i) begin -10- 252 state_d = ReadWaitSt; ==> 253 end MISSING_ELSE ==> 254 end else begin 255 state_d = IdleSt; ==> 256 error_d = AccessError; // Signal this error, but do not go into terminal error state. 257 tlul_rvalid_o = 1'b1; 258 tlul_rerror_o = 2'b11; // This causes the TL-UL adapter to return a bus error. 259 end 260 end 261 /////////////////////////////////////////////////////////////////// 262 // Wait for OTP response and release the TL-UL response. In 263 // case an OTP transaction fails, latch the OTP error code, 264 // signal a TL-Ul bus error and jump to a terminal error state. 265 ReadWaitSt: begin 266 init_done_o = 1'b1; 267 if (otp_rvalid_i) begin -11- 268 tlul_rvalid_o = 1'b1; 269 if (otp_err inside {NoError, MacroEccCorrError}) begin -12- 270 state_d = IdleSt; 271 // At this point the only error that we could have gotten are correctable ECC errors. 272 if (otp_err != NoError) begin -13- 273 error_d = MacroEccCorrError; ==> 274 end MISSING_ELSE ==> 275 end else begin 276 state_d = ErrorSt; ==> 277 error_d = otp_err; 278 // This causes the TL-UL adapter to return a bus error. 279 tlul_rerror_o = 2'b11; 280 end 281 end MISSING_ELSE ==> 282 end 283 /////////////////////////////////////////////////////////////////// 284 // Terminal Error State. This locks access to the partition. 285 // Make sure the partition signals an error state if no error 286 // code has been latched so far. 287 ErrorSt: begin 288 if (error_q == NoError) begin -14- 289 error_d = FsmStateError; ==> 290 end MISSING_ELSE ==> 291 292 // Return bus errors if there are pending TL-UL requests. 293 if (pending_tlul_error_q) begin -15- 294 tlul_rerror_o = 2'b11; ==> 295 tlul_rvalid_o = 1'b1; 296 end else if (tlul_req_i) begin -16- 297 tlul_gnt_o = 1'b1; ==> 298 pending_tlul_error_d = 1'b1; 299 end MISSING_ELSE ==> 300 end 301 /////////////////////////////////////////////////////////////////// 302 // We should never get here. If we do (e.g. via a malicious 303 // glitch), error out immediately. 304 default: begin 305 state_d = ErrorSt; ==>

Branches:
-1--2--3--4--5--6--7--8--9--10--11--12--13--14--15--16-StatusTests
ResetSt 1 1 - - - - - - - - - - - - - Covered T1,T2,T3
ResetSt 1 0 - - - - - - - - - - - - - Unreachable
ResetSt 0 - - - - - - - - - - - - - - Covered T1,T2,T3
InitSt - - 1 - - - - - - - - - - - - Covered T1,T2,T3
InitSt - - 0 - - - - - - - - - - - - Covered T1,T2,T3
InitWaitSt - - - 1 1 1 - - - - - - - - - Covered T32,T33,T103
InitWaitSt - - - 1 1 0 - - - - - - - - - Covered T1,T2,T3
InitWaitSt - - - 1 0 - - - - - - - - - - Covered T2,T104,T117
InitWaitSt - - - 0 - - - - - - - - - - - Covered T1,T2,T3
IdleSt - - - - - - 1 - - - - - - - - Covered T2,T3,T4
IdleSt - - - - - - 0 - - - - - - - - Covered T1,T2,T3
ReadSt - - - - - - - 1 1 - - - - - - Covered T2,T3,T4
ReadSt - - - - - - - 1 0 - - - - - - Covered T12,T13,T125
ReadSt - - - - - - - 0 - - - - - - - Covered T12,T13,T101
ReadWaitSt - - - - - - - - - 1 1 1 - - - Covered T5,T37,T40
ReadWaitSt - - - - - - - - - 1 1 0 - - - Covered T2,T3,T4
ReadWaitSt - - - - - - - - - 1 0 - - - - Covered T118,T155,T170
ReadWaitSt - - - - - - - - - 0 - - - - - Covered T2,T3,T4
ErrorSt - - - - - - - - - - - - 1 - - Covered T26,T27,T28
ErrorSt - - - - - - - - - - - - 0 - - Covered T2,T4,T5
ErrorSt - - - - - - - - - - - - - 1 - Covered T4,T5,T101
ErrorSt - - - - - - - - - - - - - 0 1 Covered T4,T5,T101
ErrorSt - - - - - - - - - - - - - 0 0 Covered T2,T4,T5
default - - - - - - - - - - - - - - - Covered T26,T27,T28


314 if (ecc_err) begin -1- 315 state_d = ErrorSt; 316 if (state_q != ErrorSt) begin -2- 317 error_d = CheckFailError; ==> 318 end MISSING_ELSE ==> 319 end MISSING_ELSE ==>

Branches:
-1--2-StatusTests
1 1 Covered T109,T110,T164
1 0 Covered T109,T110,T164
0 - Covered T1,T2,T3


321 if (lc_ctrl_pkg::lc_tx_test_true_loose(escalate_en_i)) begin -1- 322 state_d = ErrorSt; 323 fsm_err_o = 1'b1; 324 if (state_q != ErrorSt) begin -2- 325 error_d = FsmStateError; ==> 326 end MISSING_ELSE ==> 327 end MISSING_ELSE ==>

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


461 `PRIM_FLOP_SPARSE_FSM(u_state_regs, state_d, state_q, state_e, ResetSt) -1- ==> ==>

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


464 if (!rst_ni) begin -1- 465 error_q <= NoError; ==> 466 tlul_addr_q <= '0; 467 pending_tlul_error_q <= 1'b0; 468 end else begin 469 error_q <= error_d; 470 pending_tlul_error_q <= pending_tlul_error_d; 471 if (tlul_gnt_o) begin -2- 472 tlul_addr_q <= tlul_addr_d; ==> 473 end MISSING_ELSE ==>

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


Assert Coverage for Module : otp_ctrl_part_unbuf
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 26 26 100.00 26 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 26 26 100.00 26 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
AccessKnown_A 441448740 437319670 0 0
DigestKnown_A 441448740 437319670 0 0
DigestOffsetMustBeRepresentable_A 5630 5630 0 0
EccErrorState_A 441448740 39909 0 0
ErrorKnown_A 441448740 437319670 0 0
FsmStateKnown_A 441448740 437319670 0 0
InitDoneKnown_A 441448740 437319670 0 0
InitReadLocksPartition_A 441448740 88837809 0 0
InitWriteLocksPartition_A 441448740 88837809 0 0
OffsetMustBeBlockAligned_A 5630 5630 0 0
OtpAddrKnown_A 441448740 437319670 0 0
OtpCmdKnown_A 441448740 437319670 0 0
OtpErrorState_A 441448740 195 0 0
OtpReqKnown_A 441448740 437319670 0 0
OtpSizeKnown_A 441448740 437319670 0 0
OtpWdataKnown_A 441448740 437319670 0 0
ReadLockPropagation_A 441448740 88136507 0 0
SizeMustBeBlockAligned_A 5630 5630 0 0
TlulGntKnown_A 441448740 437319670 0 0
TlulRdataKnown_A 441448740 437319670 0 0
TlulReadOnReadLock_A 441448740 32504 0 0
TlulRerrorKnown_A 441448740 437319670 0 0
TlulRvalidKnown_A 441448740 437319670 0 0
WriteLockPropagation_A 441448740 9293332 0 0
gen_digest_write_lock.DigestWriteLocksPartition_A 441448740 112787982 0 0
u_state_regs_A 441448740 437319670 0 0


AccessKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 437319670 0 0
T1 23280 22915 0 0
T2 50705 49825 0 0
T3 77520 76520 0 0
T4 60945 59330 0 0
T5 88375 86185 0 0
T6 105155 103735 0 0
T10 36035 35760 0 0
T11 190380 190060 0 0
T12 227315 223155 0 0
T13 65340 63165 0 0

DigestKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 437319670 0 0
T1 23280 22915 0 0
T2 50705 49825 0 0
T3 77520 76520 0 0
T4 60945 59330 0 0
T5 88375 86185 0 0
T6 105155 103735 0 0
T10 36035 35760 0 0
T11 190380 190060 0 0
T12 227315 223155 0 0
T13 65340 63165 0 0

DigestOffsetMustBeRepresentable_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 5630 5630 0 0
T1 5 5 0 0
T2 5 5 0 0
T3 5 5 0 0
T4 5 5 0 0
T5 5 5 0 0
T6 5 5 0 0
T10 5 5 0 0
T11 5 5 0 0
T12 5 5 0 0
T13 5 5 0 0

EccErrorState_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 39909 0 0
T38 331455 0 0 0
T109 63600 18715 0 0
T110 0 3643 0 0
T152 0 5248 0 0
T164 0 5858 0 0
T173 0 2542 0 0
T174 0 3903 0 0
T175 554260 0 0 0
T176 757130 0 0 0
T177 118130 0 0 0
T178 199425 0 0 0
T179 129015 0 0 0
T180 88305 0 0 0
T181 436985 0 0 0
T182 30480 0 0 0

ErrorKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 437319670 0 0
T1 23280 22915 0 0
T2 50705 49825 0 0
T3 77520 76520 0 0
T4 60945 59330 0 0
T5 88375 86185 0 0
T6 105155 103735 0 0
T10 36035 35760 0 0
T11 190380 190060 0 0
T12 227315 223155 0 0
T13 65340 63165 0 0

FsmStateKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 437319670 0 0
T1 23280 22915 0 0
T2 50705 49825 0 0
T3 77520 76520 0 0
T4 60945 59330 0 0
T5 88375 86185 0 0
T6 105155 103735 0 0
T10 36035 35760 0 0
T11 190380 190060 0 0
T12 227315 223155 0 0
T13 65340 63165 0 0

InitDoneKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 437319670 0 0
T1 23280 22915 0 0
T2 50705 49825 0 0
T3 77520 76520 0 0
T4 60945 59330 0 0
T5 88375 86185 0 0
T6 105155 103735 0 0
T10 36035 35760 0 0
T11 190380 190060 0 0
T12 227315 223155 0 0
T13 65340 63165 0 0

InitReadLocksPartition_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 88837809 0 0
T1 23280 485 0 0
T2 50705 16298 0 0
T3 77520 1180 0 0
T4 60945 11263 0 0
T5 88375 11010 0 0
T6 105155 20735 0 0
T10 36035 3705 0 0
T11 190380 750 0 0
T12 227315 19775 0 0
T13 65340 2770 0 0

InitWriteLocksPartition_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 88837809 0 0
T1 23280 485 0 0
T2 50705 16298 0 0
T3 77520 1180 0 0
T4 60945 11263 0 0
T5 88375 11010 0 0
T6 105155 20735 0 0
T10 36035 3705 0 0
T11 190380 750 0 0
T12 227315 19775 0 0
T13 65340 2770 0 0

OffsetMustBeBlockAligned_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 5630 5630 0 0
T1 5 5 0 0
T2 5 5 0 0
T3 5 5 0 0
T4 5 5 0 0
T5 5 5 0 0
T6 5 5 0 0
T10 5 5 0 0
T11 5 5 0 0
T12 5 5 0 0
T13 5 5 0 0

OtpAddrKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 437319670 0 0
T1 23280 22915 0 0
T2 50705 49825 0 0
T3 77520 76520 0 0
T4 60945 59330 0 0
T5 88375 86185 0 0
T6 105155 103735 0 0
T10 36035 35760 0 0
T11 190380 190060 0 0
T12 227315 223155 0 0
T13 65340 63165 0 0

OtpCmdKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 437319670 0 0
T1 23280 22915 0 0
T2 50705 49825 0 0
T3 77520 76520 0 0
T4 60945 59330 0 0
T5 88375 86185 0 0
T6 105155 103735 0 0
T10 36035 35760 0 0
T11 190380 190060 0 0
T12 227315 223155 0 0
T13 65340 63165 0 0

OtpErrorState_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 195 0 0
T2 10141 1 0 0
T3 15504 0 0 0
T4 12189 0 0 0
T5 17675 0 0 0
T6 21031 0 0 0
T10 7207 0 0 0
T11 38076 0 0 0
T12 45463 0 0 0
T13 13068 0 0 0
T34 15031 0 0 0
T104 14461 1 0 0
T117 0 1 0 0
T118 51664 1 0 0
T134 43515 0 0 0
T148 86464 0 0 0
T154 0 1 0 0
T155 0 1 0 0
T156 0 1 0 0
T157 82840 2 0 0
T159 0 1 0 0
T160 0 1 0 0
T162 0 1 0 0
T163 0 1 0 0
T166 0 1 0 0
T168 0 1 0 0
T169 0 5 0 0
T183 0 1 0 0
T184 0 1 0 0
T185 0 3 0 0
T186 0 2 0 0
T187 0 1 0 0
T188 0 1 0 0
T189 10588 0 0 0
T190 100809 0 0 0
T191 12742 0 0 0
T192 71204 0 0 0
T193 49888 0 0 0
T194 29929 0 0 0

OtpReqKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 437319670 0 0
T1 23280 22915 0 0
T2 50705 49825 0 0
T3 77520 76520 0 0
T4 60945 59330 0 0
T5 88375 86185 0 0
T6 105155 103735 0 0
T10 36035 35760 0 0
T11 190380 190060 0 0
T12 227315 223155 0 0
T13 65340 63165 0 0

OtpSizeKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 437319670 0 0
T1 23280 22915 0 0
T2 50705 49825 0 0
T3 77520 76520 0 0
T4 60945 59330 0 0
T5 88375 86185 0 0
T6 105155 103735 0 0
T10 36035 35760 0 0
T11 190380 190060 0 0
T12 227315 223155 0 0
T13 65340 63165 0 0

OtpWdataKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 437319670 0 0
T1 23280 22915 0 0
T2 50705 49825 0 0
T3 77520 76520 0 0
T4 60945 59330 0 0
T5 88375 86185 0 0
T6 105155 103735 0 0
T10 36035 35760 0 0
T11 190380 190060 0 0
T12 227315 223155 0 0
T13 65340 63165 0 0

ReadLockPropagation_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 88136507 0 0
T4 12189 1481 0 0
T5 17675 0 0 0
T6 21031 0 0 0
T10 7207 0 0 0
T11 38076 0 0 0
T12 227315 9212 0 0
T13 65340 3264 0 0
T17 385755 20280 0 0
T19 0 106629 0 0
T37 0 10480 0 0
T93 366356 31157 0 0
T96 0 9605 0 0
T97 123944 0 0 0
T98 151636 12170 0 0
T101 58824 3739 0 0
T102 0 11909 0 0
T104 72305 0 0 0
T105 0 11464 0 0
T120 0 15611 0 0
T127 299975 0 0 0
T128 56420 0 0 0

SizeMustBeBlockAligned_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 5630 5630 0 0
T1 5 5 0 0
T2 5 5 0 0
T3 5 5 0 0
T4 5 5 0 0
T5 5 5 0 0
T6 5 5 0 0
T10 5 5 0 0
T11 5 5 0 0
T12 5 5 0 0
T13 5 5 0 0

TlulGntKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 437319670 0 0
T1 23280 22915 0 0
T2 50705 49825 0 0
T3 77520 76520 0 0
T4 60945 59330 0 0
T5 88375 86185 0 0
T6 105155 103735 0 0
T10 36035 35760 0 0
T11 190380 190060 0 0
T12 227315 223155 0 0
T13 65340 63165 0 0

TlulRdataKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 437319670 0 0
T1 23280 22915 0 0
T2 50705 49825 0 0
T3 77520 76520 0 0
T4 60945 59330 0 0
T5 88375 86185 0 0
T6 105155 103735 0 0
T10 36035 35760 0 0
T11 190380 190060 0 0
T12 227315 223155 0 0
T13 65340 63165 0 0

TlulReadOnReadLock_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 32504 0 0
T4 60945 22 0 0
T5 88375 3 0 0
T6 105155 0 0 0
T10 36035 0 0 0
T11 190380 0 0 0
T12 227315 8 0 0
T13 65340 2 0 0
T17 385755 1 0 0
T19 0 13 0 0
T37 0 5 0 0
T93 0 4 0 0
T101 0 4 0 0
T102 0 20 0 0
T104 72305 0 0 0
T105 0 9 0 0
T118 0 3 0 0
T120 0 41 0 0
T121 0 13 0 0
T122 0 8 0 0
T127 299975 0 0 0
T129 0 98 0 0

TlulRerrorKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 437319670 0 0
T1 23280 22915 0 0
T2 50705 49825 0 0
T3 77520 76520 0 0
T4 60945 59330 0 0
T5 88375 86185 0 0
T6 105155 103735 0 0
T10 36035 35760 0 0
T11 190380 190060 0 0
T12 227315 223155 0 0
T13 65340 63165 0 0

TlulRvalidKnown_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 437319670 0 0
T1 23280 22915 0 0
T2 50705 49825 0 0
T3 77520 76520 0 0
T4 60945 59330 0 0
T5 88375 86185 0 0
T6 105155 103735 0 0
T10 36035 35760 0 0
T11 190380 190060 0 0
T12 227315 223155 0 0
T13 65340 63165 0 0

WriteLockPropagation_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 9293332 0 0
T12 136389 2889 0 0
T13 39204 0 0 0
T17 231453 23919 0 0
T18 13480 0 0 0
T19 124550 16707 0 0
T20 0 24234 0 0
T37 358074 0 0 0
T93 366356 21553 0 0
T96 55272 4470 0 0
T97 92958 0 0 0
T98 113727 0 0 0
T99 0 5256 0 0
T101 44118 0 0 0
T102 30181 3959 0 0
T104 43383 0 0 0
T105 89138 0 0 0
T116 20604 0 0 0
T117 26046 0 0 0
T118 103328 0 0 0
T119 15535 0 0 0
T120 0 3099 0 0
T122 0 19676 0 0
T123 0 7122 0 0
T124 0 2496 0 0
T125 0 2571 0 0
T126 0 2282 0 0
T127 179985 0 0 0
T128 42315 0 0 0
T129 33379 0 0 0
T130 0 1870 0 0
T131 0 10531 0 0
T134 0 1843 0 0
T148 0 5925 0 0
T149 0 6876 0 0
T195 0 14844 0 0
T196 0 1107 0 0

gen_digest_write_lock.DigestWriteLocksPartition_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 112787982 0 0
T2 20282 4975 0 0
T3 31008 0 0 0
T4 48756 21687 0 0
T5 70700 0 0 0
T6 84124 0 0 0
T10 28828 0 0 0
T11 152304 0 0 0
T12 181852 133602 0 0
T13 52272 31048 0 0
T17 231453 198552 0 0
T19 0 47376 0 0
T37 0 123955 0 0
T93 91589 313808 0 0
T96 0 43587 0 0
T97 30986 0 0 0
T98 37909 44645 0 0
T101 14706 0 0 0
T102 30181 69496 0 0
T104 57844 7765 0 0
T105 44569 96198 0 0
T108 0 43973 0 0
T117 0 3391 0 0
T118 0 5801 0 0
T120 0 53526 0 0
T122 0 81290 0 0
T123 0 67442 0 0
T124 0 26326 0 0
T127 179985 0 0 0
T128 14105 0 0 0
T129 33379 0 0 0
T197 0 2706 0 0

u_state_regs_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 441448740 437319670 0 0
T1 23280 22915 0 0
T2 50705 49825 0 0
T3 77520 76520 0 0
T4 60945 59330 0 0
T5 88375 86185 0 0
T6 105155 103735 0 0
T10 36035 35760 0 0
T11 190380 190060 0 0
T12 227315 223155 0 0
T13 65340 63165 0 0

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