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



Module Instance : tb.dut.u_upload.u_arbiter

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
66.67 100.00 33.33


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
70.34 92.11 45.10 71.43 72.73


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
96.37 100.00 86.11 100.00 95.74 100.00 u_upload


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_arb_ppc.u_reqarb 90.97 100.00 88.89 100.00 75.00
u_req_fifo 60.74 84.62 36.11 55.56 66.67



Module Instance : tb.dut.u_sys_sram_arbiter

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
83.33 100.00 66.67


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
89.82 100.00 76.47 96.43 86.36


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
92.52 95.20 84.31 97.00 90.62 95.45 dut


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_arb_ppc.u_reqarb 92.53 100.00 88.89 100.00 81.25
u_req_fifo 92.36 100.00 75.00 94.44 100.00



Module Instance : tb.dut.u_spi_tpm.u_arbiter

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
91.67 100.00 83.33


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
87.79 100.00 76.47 92.86 81.82


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
95.79 99.29 91.20 91.67 96.77 100.00 u_spi_tpm


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
gen_arb_ppc.u_reqarb 85.69 100.00 77.78 90.00 75.00
u_req_fifo 92.36 100.00 75.00 94.44 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
66.67 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
83.33 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: T1 T2 T3  | T1 T2 T3  | 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 T10 T27  | T5 T10 T27  | T5 T10 T27  | T5 T10 T27  | T5 T10 T27  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
10CoveredT50,T64,T47
11CoveredT5,T10,T27

 LINE       132
 EXPRESSION (sram_req_o & ((~sram_write_o)))
             -----1----   --------2--------
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT5,T6,T8
11CoveredT5,T10,T27
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
Conditions6233.33
Logical6233.33
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-StatusTests
01CoveredT1,T2,T3
10CoveredT10,T41,T29
11Not Covered
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: T1 T2 T3  | T1 T2 T3  | 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 T10 T27  | T5 T10 T27  | T5 T10 T27  | T5 T10 T27  | T5 T10 T27  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
Conditions6466.67
Logical6466.67
Non-Logical00
Event00

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

 LINE       132
 EXPRESSION (sram_req_o & ((~sram_write_o)))
             -----1----   --------2--------
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT5,T6,T8
11CoveredT5,T10,T27
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
10CoveredT50,T64,T47
11CoveredT5,T27,T29

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