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



Module Instance : tb.dut.u_upload.u_arbiter

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
70.00 100.00 40.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
75.84 95.89 54.76 80.00 72.73


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
98.52 100.00 96.88 100.00 95.74 100.00 u_upload


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_arb_ppc.u_reqarb 93.75 100.00 100.00 100.00 75.00
u_req_fifo 67.46 91.67 44.83 66.67 66.67



Module Instance : tb.dut.u_spi_tpm.u_arbiter

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
91.67 100.00 83.33


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
89.41 100.00 82.98 92.86 81.82


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
96.34 99.29 93.36 91.67 97.40 100.00 u_spi_tpm


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_arb_ppc.u_reqarb 88.12 100.00 87.50 90.00 75.00
u_req_fifo 94.07 100.00 81.82 94.44 100.00



Module Instance : tb.dut.u_sys_sram_arbiter

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
100.00 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
96.59 100.00 100.00 100.00 86.36


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
95.10 95.20 93.48 97.84 93.55 95.45 dut


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_arb_ppc.u_reqarb 95.31 100.00 100.00 100.00 81.25
u_req_fifo 100.00 100.00 100.00 100.00 100.00

Line Coverage for Module : prim_sram_arbiter ( parameter N=3,SramDw=32,SramAw=10,ArbiterImpl="PPC",EnMask=1 )
Line Coverage for Module self-instances :
SCORELINE
70.00 100.00
tb.dut.u_upload.u_arbiter

Line No.TotalCoveredPercent
TOTAL1515100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN6711100.00
CONT_ASSIGN6811100.00
CONT_ASSIGN6911100.00
CONT_ASSIGN7011100.00
CONT_ASSIGN12511100.00
CONT_ASSIGN14711100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15111100.00
CONT_ASSIGN15111100.00
CONT_ASSIGN15111100.00

55 for (genvar i = 0 ; i < N ; i++) begin : gen_reqs 56 3/3 assign req_packed[i] = { Tests: T1 T2 T3  | T1 T2 T3  | T1 T2 T3  57 req_write_i[i], 58 req_addr_i [i], 59 req_wdata_i[i], 60 (EnMask) ? req_wmask_i[i] : {SramDw{1'b1}} 61 }; 62 end 63 64 localparam int ARB_DW = $bits(req_t); 65 66 req_t sram_packed; 67 1/1 assign sram_write_o = sram_packed.write; Tests: T1 T2 T3  68 1/1 assign sram_addr_o = sram_packed.addr; Tests: T1 T2 T3  69 1/1 assign sram_wdata_o = sram_packed.wdata; Tests: T1 T2 T3  70 1/1 assign sram_wmask_o = (EnMask) ? sram_packed.wmask : {SramDw{1'b1}}; Tests: T1 T2 T3  71 72 if (EnMask == 1'b 0) begin : g_unused 73 logic unused_wmask; 74 75 always_comb begin 76 unused_wmask = 1'b 1; 77 for (int unsigned i = 0 ; i < N ; i++) begin 78 unused_wmask ^= ^req_wmask_i[i]; 79 end 80 unused_wmask ^= ^sram_packed.wmask; 81 end 82 end 83 84 85 if (ArbiterImpl == "PPC") begin : gen_arb_ppc 86 prim_arbiter_ppc #( 87 .N (N), 88 .DW(ARB_DW) 89 ) u_reqarb ( 90 .clk_i, 91 .rst_ni, 92 .req_chk_i ( 1'b1 ), 93 .req_i, 94 .data_i ( req_packed ), 95 .gnt_o, 96 .idx_o ( ), 97 .valid_o ( sram_req_o ), 98 .data_o ( sram_packed ), 99 .ready_i ( 1'b1 ) 100 ); 101 end else if (ArbiterImpl == "BINTREE") begin : gen_tree_arb 102 prim_arbiter_tree #( 103 .N (N), 104 .DW(ARB_DW) 105 ) u_reqarb ( 106 .clk_i, 107 .rst_ni, 108 .req_chk_i ( 1'b1 ), 109 .req_i, 110 .data_i ( req_packed ), 111 .gnt_o, 112 .idx_o ( ), 113 .valid_o ( sram_req_o ), 114 .data_o ( sram_packed ), 115 .ready_i ( 1'b1 ) 116 ); 117 end else begin : gen_unknown 118 `ASSERT_INIT(UnknownArbImpl_A, 0) 119 end 120 121 122 logic [N-1:0] steer; // Steering sram_rvalid_i 123 logic sram_ack; // Ack for rvalid. |sram_rvalid_i 124 125 1/1 assign sram_ack = sram_rvalid_i & (|steer); Tests: T1 T2 T3  126 127 // Request FIFO 128 prim_fifo_sync #( 129 .Width (N), 130 .Pass (1'b0), 131 .Depth (4) // Assume at most 4 pipelined 132 ) u_req_fifo ( 133 .clk_i, 134 .rst_ni, 135 .clr_i (1'b0), 136 .wvalid_i (sram_req_o & ~sram_write_o), // Push only for read 137 .wready_o (), // TODO: Generate Error 138 .wdata_i (gnt_o), 139 .rvalid_o (), // TODO; Generate error if sram_rvalid_i but rvalid==0 140 .rready_i (sram_ack), 141 .rdata_o (steer), 142 .full_o (), 143 .depth_o (), // Not used 144 .err_o () 145 ); 146 147 1/1 assign rsp_rvalid_o = steer & {N{sram_rvalid_i}}; Tests: T1 T2 T3  148 149 for (genvar i = 0 ; i < N ; i++) begin : gen_rsp 150 3/3 assign rsp_rdata_o[i] = sram_rdata_i; Tests: T1 T2 T3  | T1 T2 T3  | T1 T2 T3  151 3/3 assign rsp_error_o[i] = sram_rerror_i; // No SECDED yet Tests: T1 T2 T3  | T1 T2 T3  | T1 T2 T3 

Line Coverage for Module : prim_sram_arbiter ( parameter N=2,SramDw=32,SramAw=10,ArbiterImpl="PPC",EnMask=1 )
Line Coverage for Module self-instances :
SCORELINE
91.67 100.00
tb.dut.u_spi_tpm.u_arbiter

Line No.TotalCoveredPercent
TOTAL1212100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN6711100.00
CONT_ASSIGN6811100.00
CONT_ASSIGN6911100.00
CONT_ASSIGN7011100.00
CONT_ASSIGN12511100.00
CONT_ASSIGN14711100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15111100.00
CONT_ASSIGN15111100.00

55 for (genvar i = 0 ; i < N ; i++) begin : gen_reqs 56 2/2 assign req_packed[i] = { Tests: T1 T2 T3  | T1 T2 T3  57 req_write_i[i], 58 req_addr_i [i], 59 req_wdata_i[i], 60 (EnMask) ? req_wmask_i[i] : {SramDw{1'b1}} 61 }; 62 end 63 64 localparam int ARB_DW = $bits(req_t); 65 66 req_t sram_packed; 67 1/1 assign sram_write_o = sram_packed.write; Tests: T1 T2 T3  68 1/1 assign sram_addr_o = sram_packed.addr; Tests: T1 T2 T3  69 1/1 assign sram_wdata_o = sram_packed.wdata; Tests: T1 T2 T3  70 1/1 assign sram_wmask_o = (EnMask) ? sram_packed.wmask : {SramDw{1'b1}}; Tests: T1 T2 T3  71 72 if (EnMask == 1'b 0) begin : g_unused 73 logic unused_wmask; 74 75 always_comb begin 76 unused_wmask = 1'b 1; 77 for (int unsigned i = 0 ; i < N ; i++) begin 78 unused_wmask ^= ^req_wmask_i[i]; 79 end 80 unused_wmask ^= ^sram_packed.wmask; 81 end 82 end 83 84 85 if (ArbiterImpl == "PPC") begin : gen_arb_ppc 86 prim_arbiter_ppc #( 87 .N (N), 88 .DW(ARB_DW) 89 ) u_reqarb ( 90 .clk_i, 91 .rst_ni, 92 .req_chk_i ( 1'b1 ), 93 .req_i, 94 .data_i ( req_packed ), 95 .gnt_o, 96 .idx_o ( ), 97 .valid_o ( sram_req_o ), 98 .data_o ( sram_packed ), 99 .ready_i ( 1'b1 ) 100 ); 101 end else if (ArbiterImpl == "BINTREE") begin : gen_tree_arb 102 prim_arbiter_tree #( 103 .N (N), 104 .DW(ARB_DW) 105 ) u_reqarb ( 106 .clk_i, 107 .rst_ni, 108 .req_chk_i ( 1'b1 ), 109 .req_i, 110 .data_i ( req_packed ), 111 .gnt_o, 112 .idx_o ( ), 113 .valid_o ( sram_req_o ), 114 .data_o ( sram_packed ), 115 .ready_i ( 1'b1 ) 116 ); 117 end else begin : gen_unknown 118 `ASSERT_INIT(UnknownArbImpl_A, 0) 119 end 120 121 122 logic [N-1:0] steer; // Steering sram_rvalid_i 123 logic sram_ack; // Ack for rvalid. |sram_rvalid_i 124 125 1/1 assign sram_ack = sram_rvalid_i & (|steer); Tests: T1 T2 T3  126 127 // Request FIFO 128 prim_fifo_sync #( 129 .Width (N), 130 .Pass (1'b0), 131 .Depth (4) // Assume at most 4 pipelined 132 ) u_req_fifo ( 133 .clk_i, 134 .rst_ni, 135 .clr_i (1'b0), 136 .wvalid_i (sram_req_o & ~sram_write_o), // Push only for read 137 .wready_o (), // TODO: Generate Error 138 .wdata_i (gnt_o), 139 .rvalid_o (), // TODO; Generate error if sram_rvalid_i but rvalid==0 140 .rready_i (sram_ack), 141 .rdata_o (steer), 142 .full_o (), 143 .depth_o (), // Not used 144 .err_o () 145 ); 146 147 1/1 assign rsp_rvalid_o = steer & {N{sram_rvalid_i}}; Tests: T1 T2 T3  148 149 for (genvar i = 0 ; i < N ; i++) begin : gen_rsp 150 2/2 assign rsp_rdata_o[i] = sram_rdata_i; Tests: T1 T2 T3  | T1 T2 T3  151 2/2 assign rsp_error_o[i] = sram_rerror_i; // No SECDED yet Tests: T1 T2 T3  | T1 T2 T3 

Line Coverage for Module : prim_sram_arbiter ( parameter N=5,SramDw=32,SramAw=10,ArbiterImpl="PPC",EnMask=1 )
Line Coverage for Module self-instances :
SCORELINE
100.00 100.00
tb.dut.u_sys_sram_arbiter

Line No.TotalCoveredPercent
TOTAL2121100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN6711100.00
CONT_ASSIGN6811100.00
CONT_ASSIGN6911100.00
CONT_ASSIGN7011100.00
CONT_ASSIGN12511100.00
CONT_ASSIGN14711100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15111100.00
CONT_ASSIGN15111100.00
CONT_ASSIGN15111100.00
CONT_ASSIGN15111100.00
CONT_ASSIGN15111100.00

55 for (genvar i = 0 ; i < N ; i++) begin : gen_reqs 56 5/5 assign req_packed[i] = { Tests: T2 T3 T4  | T2 T3 T4  | T1 T2 T3  | T1 T2 T3  | T1 T2 T3  57 req_write_i[i], 58 req_addr_i [i], 59 req_wdata_i[i], 60 (EnMask) ? req_wmask_i[i] : {SramDw{1'b1}} 61 }; 62 end 63 64 localparam int ARB_DW = $bits(req_t); 65 66 req_t sram_packed; 67 1/1 assign sram_write_o = sram_packed.write; Tests: T1 T2 T3  68 1/1 assign sram_addr_o = sram_packed.addr; Tests: T1 T2 T3  69 1/1 assign sram_wdata_o = sram_packed.wdata; Tests: T1 T2 T3  70 1/1 assign sram_wmask_o = (EnMask) ? sram_packed.wmask : {SramDw{1'b1}}; Tests: T1 T2 T3  71 72 if (EnMask == 1'b 0) begin : g_unused 73 logic unused_wmask; 74 75 always_comb begin 76 unused_wmask = 1'b 1; 77 for (int unsigned i = 0 ; i < N ; i++) begin 78 unused_wmask ^= ^req_wmask_i[i]; 79 end 80 unused_wmask ^= ^sram_packed.wmask; 81 end 82 end 83 84 85 if (ArbiterImpl == "PPC") begin : gen_arb_ppc 86 prim_arbiter_ppc #( 87 .N (N), 88 .DW(ARB_DW) 89 ) u_reqarb ( 90 .clk_i, 91 .rst_ni, 92 .req_chk_i ( 1'b1 ), 93 .req_i, 94 .data_i ( req_packed ), 95 .gnt_o, 96 .idx_o ( ), 97 .valid_o ( sram_req_o ), 98 .data_o ( sram_packed ), 99 .ready_i ( 1'b1 ) 100 ); 101 end else if (ArbiterImpl == "BINTREE") begin : gen_tree_arb 102 prim_arbiter_tree #( 103 .N (N), 104 .DW(ARB_DW) 105 ) u_reqarb ( 106 .clk_i, 107 .rst_ni, 108 .req_chk_i ( 1'b1 ), 109 .req_i, 110 .data_i ( req_packed ), 111 .gnt_o, 112 .idx_o ( ), 113 .valid_o ( sram_req_o ), 114 .data_o ( sram_packed ), 115 .ready_i ( 1'b1 ) 116 ); 117 end else begin : gen_unknown 118 `ASSERT_INIT(UnknownArbImpl_A, 0) 119 end 120 121 122 logic [N-1:0] steer; // Steering sram_rvalid_i 123 logic sram_ack; // Ack for rvalid. |sram_rvalid_i 124 125 1/1 assign sram_ack = sram_rvalid_i & (|steer); Tests: T1 T2 T3  126 127 // Request FIFO 128 prim_fifo_sync #( 129 .Width (N), 130 .Pass (1'b0), 131 .Depth (4) // Assume at most 4 pipelined 132 ) u_req_fifo ( 133 .clk_i, 134 .rst_ni, 135 .clr_i (1'b0), 136 .wvalid_i (sram_req_o & ~sram_write_o), // Push only for read 137 .wready_o (), // TODO: Generate Error 138 .wdata_i (gnt_o), 139 .rvalid_o (), // TODO; Generate error if sram_rvalid_i but rvalid==0 140 .rready_i (sram_ack), 141 .rdata_o (steer), 142 .full_o (), 143 .depth_o (), // Not used 144 .err_o () 145 ); 146 147 1/1 assign rsp_rvalid_o = steer & {N{sram_rvalid_i}}; Tests: T1 T2 T3  148 149 for (genvar i = 0 ; i < N ; i++) begin : gen_rsp 150 5/5 assign rsp_rdata_o[i] = sram_rdata_i; Tests: T5 T14 T26  | T5 T14 T26  | T5 T14 T26  | T5 T14 T26  | T5 T14 T26  151 5/5 assign rsp_error_o[i] = sram_rerror_i; // No SECDED yet Tests: T1 T2 T3  | T1 T2 T3  | T1 T2 T3  | T1 T2 T3  | T1 T2 T3 

Cond Coverage for Module : prim_sram_arbiter
TotalCoveredPercent
Conditions6583.33
Logical6583.33
Non-Logical00
Event00

 LINE       125
 EXPRESSION (sram_rvalid_i & ((|steer)))
             ------1------   -----2----
-1--2-StatusTests
01Not Covered
10CoveredT69,T36,T71
11CoveredT5,T14,T26

 LINE       132
 EXPRESSION (sram_req_o & ((~sram_write_o)))
             -----1----   --------2--------
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT5,T11,T14
11CoveredT5,T14,T26
Line Coverage for Instance : tb.dut.u_upload.u_arbiter
Line No.TotalCoveredPercent
TOTAL1515100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN6711100.00
CONT_ASSIGN6811100.00
CONT_ASSIGN6911100.00
CONT_ASSIGN7011100.00
CONT_ASSIGN12511100.00
CONT_ASSIGN14711100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15111100.00
CONT_ASSIGN15111100.00
CONT_ASSIGN15111100.00

55 for (genvar i = 0 ; i < N ; i++) begin : gen_reqs 56 3/3 assign req_packed[i] = { Tests: T1 T2 T3  | T1 T2 T3  | T1 T2 T3  57 req_write_i[i], 58 req_addr_i [i], 59 req_wdata_i[i], 60 (EnMask) ? req_wmask_i[i] : {SramDw{1'b1}} 61 }; 62 end 63 64 localparam int ARB_DW = $bits(req_t); 65 66 req_t sram_packed; 67 1/1 assign sram_write_o = sram_packed.write; Tests: T1 T2 T3  68 1/1 assign sram_addr_o = sram_packed.addr; Tests: T1 T2 T3  69 1/1 assign sram_wdata_o = sram_packed.wdata; Tests: T1 T2 T3  70 1/1 assign sram_wmask_o = (EnMask) ? sram_packed.wmask : {SramDw{1'b1}}; Tests: T1 T2 T3  71 72 if (EnMask == 1'b 0) begin : g_unused 73 logic unused_wmask; 74 75 always_comb begin 76 unused_wmask = 1'b 1; 77 for (int unsigned i = 0 ; i < N ; i++) begin 78 unused_wmask ^= ^req_wmask_i[i]; 79 end 80 unused_wmask ^= ^sram_packed.wmask; 81 end 82 end 83 84 85 if (ArbiterImpl == "PPC") begin : gen_arb_ppc 86 prim_arbiter_ppc #( 87 .N (N), 88 .DW(ARB_DW) 89 ) u_reqarb ( 90 .clk_i, 91 .rst_ni, 92 .req_chk_i ( 1'b1 ), 93 .req_i, 94 .data_i ( req_packed ), 95 .gnt_o, 96 .idx_o ( ), 97 .valid_o ( sram_req_o ), 98 .data_o ( sram_packed ), 99 .ready_i ( 1'b1 ) 100 ); 101 end else if (ArbiterImpl == "BINTREE") begin : gen_tree_arb 102 prim_arbiter_tree #( 103 .N (N), 104 .DW(ARB_DW) 105 ) u_reqarb ( 106 .clk_i, 107 .rst_ni, 108 .req_chk_i ( 1'b1 ), 109 .req_i, 110 .data_i ( req_packed ), 111 .gnt_o, 112 .idx_o ( ), 113 .valid_o ( sram_req_o ), 114 .data_o ( sram_packed ), 115 .ready_i ( 1'b1 ) 116 ); 117 end else begin : gen_unknown 118 `ASSERT_INIT(UnknownArbImpl_A, 0) 119 end 120 121 122 logic [N-1:0] steer; // Steering sram_rvalid_i 123 logic sram_ack; // Ack for rvalid. |sram_rvalid_i 124 125 1/1 assign sram_ack = sram_rvalid_i & (|steer); Tests: T1 T2 T3  126 127 // Request FIFO 128 prim_fifo_sync #( 129 .Width (N), 130 .Pass (1'b0), 131 .Depth (4) // Assume at most 4 pipelined 132 ) u_req_fifo ( 133 .clk_i, 134 .rst_ni, 135 .clr_i (1'b0), 136 .wvalid_i (sram_req_o & ~sram_write_o), // Push only for read 137 .wready_o (), // TODO: Generate Error 138 .wdata_i (gnt_o), 139 .rvalid_o (), // TODO; Generate error if sram_rvalid_i but rvalid==0 140 .rready_i (sram_ack), 141 .rdata_o (steer), 142 .full_o (), 143 .depth_o (), // Not used 144 .err_o () 145 ); 146 147 1/1 assign rsp_rvalid_o = steer & {N{sram_rvalid_i}}; Tests: T1 T2 T3  148 149 for (genvar i = 0 ; i < N ; i++) begin : gen_rsp 150 3/3 assign rsp_rdata_o[i] = sram_rdata_i; Tests: T1 T2 T3  | T1 T2 T3  | T1 T2 T3  151 3/3 assign rsp_error_o[i] = sram_rerror_i; // No SECDED yet Tests: T1 T2 T3  | T1 T2 T3  | T1 T2 T3 

Cond Coverage for Instance : tb.dut.u_upload.u_arbiter
TotalCoveredPercent
Conditions5240.00
Logical5240.00
Non-Logical00
Event00

 LINE       125
 EXPRESSION (sram_rvalid_i & ((|steer)))
             ------1------   -----2----
-1--2-StatusTests
01Not Covered
10Not Covered
11Not Covered

 LINE       132
 EXPRESSION (sram_req_o & ((~sram_write_o)))
             -----1----   --------2--------
-1--2-StatusTestsExclude Annotation
01CoveredT1,T2,T3
10CoveredT41,T46,T49
11Excluded vcs_gen_start:i=2:vcs_gen_end:VC_COV_UNR
Line Coverage for Instance : tb.dut.u_spi_tpm.u_arbiter
Line No.TotalCoveredPercent
TOTAL1212100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN6711100.00
CONT_ASSIGN6811100.00
CONT_ASSIGN6911100.00
CONT_ASSIGN7011100.00
CONT_ASSIGN12511100.00
CONT_ASSIGN14711100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15111100.00
CONT_ASSIGN15111100.00

55 for (genvar i = 0 ; i < N ; i++) begin : gen_reqs 56 2/2 assign req_packed[i] = { Tests: T1 T2 T3  | T1 T2 T3  57 req_write_i[i], 58 req_addr_i [i], 59 req_wdata_i[i], 60 (EnMask) ? req_wmask_i[i] : {SramDw{1'b1}} 61 }; 62 end 63 64 localparam int ARB_DW = $bits(req_t); 65 66 req_t sram_packed; 67 1/1 assign sram_write_o = sram_packed.write; Tests: T1 T2 T3  68 1/1 assign sram_addr_o = sram_packed.addr; Tests: T1 T2 T3  69 1/1 assign sram_wdata_o = sram_packed.wdata; Tests: T1 T2 T3  70 1/1 assign sram_wmask_o = (EnMask) ? sram_packed.wmask : {SramDw{1'b1}}; Tests: T1 T2 T3  71 72 if (EnMask == 1'b 0) begin : g_unused 73 logic unused_wmask; 74 75 always_comb begin 76 unused_wmask = 1'b 1; 77 for (int unsigned i = 0 ; i < N ; i++) begin 78 unused_wmask ^= ^req_wmask_i[i]; 79 end 80 unused_wmask ^= ^sram_packed.wmask; 81 end 82 end 83 84 85 if (ArbiterImpl == "PPC") begin : gen_arb_ppc 86 prim_arbiter_ppc #( 87 .N (N), 88 .DW(ARB_DW) 89 ) u_reqarb ( 90 .clk_i, 91 .rst_ni, 92 .req_chk_i ( 1'b1 ), 93 .req_i, 94 .data_i ( req_packed ), 95 .gnt_o, 96 .idx_o ( ), 97 .valid_o ( sram_req_o ), 98 .data_o ( sram_packed ), 99 .ready_i ( 1'b1 ) 100 ); 101 end else if (ArbiterImpl == "BINTREE") begin : gen_tree_arb 102 prim_arbiter_tree #( 103 .N (N), 104 .DW(ARB_DW) 105 ) u_reqarb ( 106 .clk_i, 107 .rst_ni, 108 .req_chk_i ( 1'b1 ), 109 .req_i, 110 .data_i ( req_packed ), 111 .gnt_o, 112 .idx_o ( ), 113 .valid_o ( sram_req_o ), 114 .data_o ( sram_packed ), 115 .ready_i ( 1'b1 ) 116 ); 117 end else begin : gen_unknown 118 `ASSERT_INIT(UnknownArbImpl_A, 0) 119 end 120 121 122 logic [N-1:0] steer; // Steering sram_rvalid_i 123 logic sram_ack; // Ack for rvalid. |sram_rvalid_i 124 125 1/1 assign sram_ack = sram_rvalid_i & (|steer); Tests: T1 T2 T3  126 127 // Request FIFO 128 prim_fifo_sync #( 129 .Width (N), 130 .Pass (1'b0), 131 .Depth (4) // Assume at most 4 pipelined 132 ) u_req_fifo ( 133 .clk_i, 134 .rst_ni, 135 .clr_i (1'b0), 136 .wvalid_i (sram_req_o & ~sram_write_o), // Push only for read 137 .wready_o (), // TODO: Generate Error 138 .wdata_i (gnt_o), 139 .rvalid_o (), // TODO; Generate error if sram_rvalid_i but rvalid==0 140 .rready_i (sram_ack), 141 .rdata_o (steer), 142 .full_o (), 143 .depth_o (), // Not used 144 .err_o () 145 ); 146 147 1/1 assign rsp_rvalid_o = steer & {N{sram_rvalid_i}}; Tests: T1 T2 T3  148 149 for (genvar i = 0 ; i < N ; i++) begin : gen_rsp 150 2/2 assign rsp_rdata_o[i] = sram_rdata_i; Tests: T1 T2 T3  | T1 T2 T3  151 2/2 assign rsp_error_o[i] = sram_rerror_i; // No SECDED yet Tests: T1 T2 T3  | T1 T2 T3 

Cond Coverage for Instance : tb.dut.u_spi_tpm.u_arbiter
TotalCoveredPercent
Conditions6583.33
Logical6583.33
Non-Logical00
Event00

 LINE       125
 EXPRESSION (sram_rvalid_i & ((|steer)))
             ------1------   -----2----
-1--2-StatusTests
01Not Covered
10CoveredT69,T36,T71
11CoveredT5,T14,T26

 LINE       132
 EXPRESSION (sram_req_o & ((~sram_write_o)))
             -----1----   --------2--------
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT5,T14,T26
11CoveredT5,T14,T26
Line Coverage for Instance : tb.dut.u_sys_sram_arbiter
Line No.TotalCoveredPercent
TOTAL2121100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN5611100.00
CONT_ASSIGN6711100.00
CONT_ASSIGN6811100.00
CONT_ASSIGN6911100.00
CONT_ASSIGN7011100.00
CONT_ASSIGN12511100.00
CONT_ASSIGN14711100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15111100.00
CONT_ASSIGN15111100.00
CONT_ASSIGN15111100.00
CONT_ASSIGN15111100.00
CONT_ASSIGN15111100.00

55 for (genvar i = 0 ; i < N ; i++) begin : gen_reqs 56 5/5 assign req_packed[i] = { Tests: T2 T3 T4  | T2 T3 T4  | T1 T2 T3  | T1 T2 T3  | T1 T2 T3  57 req_write_i[i], 58 req_addr_i [i], 59 req_wdata_i[i], 60 (EnMask) ? req_wmask_i[i] : {SramDw{1'b1}} 61 }; 62 end 63 64 localparam int ARB_DW = $bits(req_t); 65 66 req_t sram_packed; 67 1/1 assign sram_write_o = sram_packed.write; Tests: T1 T2 T3  68 1/1 assign sram_addr_o = sram_packed.addr; Tests: T1 T2 T3  69 1/1 assign sram_wdata_o = sram_packed.wdata; Tests: T1 T2 T3  70 1/1 assign sram_wmask_o = (EnMask) ? sram_packed.wmask : {SramDw{1'b1}}; Tests: T1 T2 T3  71 72 if (EnMask == 1'b 0) begin : g_unused 73 logic unused_wmask; 74 75 always_comb begin 76 unused_wmask = 1'b 1; 77 for (int unsigned i = 0 ; i < N ; i++) begin 78 unused_wmask ^= ^req_wmask_i[i]; 79 end 80 unused_wmask ^= ^sram_packed.wmask; 81 end 82 end 83 84 85 if (ArbiterImpl == "PPC") begin : gen_arb_ppc 86 prim_arbiter_ppc #( 87 .N (N), 88 .DW(ARB_DW) 89 ) u_reqarb ( 90 .clk_i, 91 .rst_ni, 92 .req_chk_i ( 1'b1 ), 93 .req_i, 94 .data_i ( req_packed ), 95 .gnt_o, 96 .idx_o ( ), 97 .valid_o ( sram_req_o ), 98 .data_o ( sram_packed ), 99 .ready_i ( 1'b1 ) 100 ); 101 end else if (ArbiterImpl == "BINTREE") begin : gen_tree_arb 102 prim_arbiter_tree #( 103 .N (N), 104 .DW(ARB_DW) 105 ) u_reqarb ( 106 .clk_i, 107 .rst_ni, 108 .req_chk_i ( 1'b1 ), 109 .req_i, 110 .data_i ( req_packed ), 111 .gnt_o, 112 .idx_o ( ), 113 .valid_o ( sram_req_o ), 114 .data_o ( sram_packed ), 115 .ready_i ( 1'b1 ) 116 ); 117 end else begin : gen_unknown 118 `ASSERT_INIT(UnknownArbImpl_A, 0) 119 end 120 121 122 logic [N-1:0] steer; // Steering sram_rvalid_i 123 logic sram_ack; // Ack for rvalid. |sram_rvalid_i 124 125 1/1 assign sram_ack = sram_rvalid_i & (|steer); Tests: T1 T2 T3  126 127 // Request FIFO 128 prim_fifo_sync #( 129 .Width (N), 130 .Pass (1'b0), 131 .Depth (4) // Assume at most 4 pipelined 132 ) u_req_fifo ( 133 .clk_i, 134 .rst_ni, 135 .clr_i (1'b0), 136 .wvalid_i (sram_req_o & ~sram_write_o), // Push only for read 137 .wready_o (), // TODO: Generate Error 138 .wdata_i (gnt_o), 139 .rvalid_o (), // TODO; Generate error if sram_rvalid_i but rvalid==0 140 .rready_i (sram_ack), 141 .rdata_o (steer), 142 .full_o (), 143 .depth_o (), // Not used 144 .err_o () 145 ); 146 147 1/1 assign rsp_rvalid_o = steer & {N{sram_rvalid_i}}; Tests: T1 T2 T3  148 149 for (genvar i = 0 ; i < N ; i++) begin : gen_rsp 150 5/5 assign rsp_rdata_o[i] = sram_rdata_i; Tests: T5 T14 T26  | T5 T14 T26  | T5 T14 T26  | T5 T14 T26  | T5 T14 T26  151 5/5 assign rsp_error_o[i] = sram_rerror_i; // No SECDED yet Tests: T1 T2 T3  | T1 T2 T3  | T1 T2 T3  | T1 T2 T3  | T1 T2 T3 

Cond Coverage for Instance : tb.dut.u_sys_sram_arbiter
TotalCoveredPercent
Conditions44100.00
Logical44100.00
Non-Logical00
Event00

 LINE       125
 EXPRESSION (sram_rvalid_i & ((|steer)))
             ------1------   -----2----
-1--2-StatusTestsExclude Annotation
01Excluded VC_COV_UNR
10Excluded VC_COV_UNR
11CoveredT5,T14,T26

 LINE       132
 EXPRESSION (sram_req_o & ((~sram_write_o)))
             -----1----   --------2--------
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT5,T11,T14
11CoveredT5,T14,T26
0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%