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



Module Instance : tb.dut.u_spid_dpram.gen_ram2p.u_memory_2p

Instance :
SCORELINECONDTOGGLEFSMBRANCHASSERT
100.00 100.00 100.00 100.00 100.00


Instance's subtree :
SCORELINECONDTOGGLEFSMBRANCHASSERT
100.00 100.00 100.00 100.00 100.00


Parent :
SCORELINECONDTOGGLEFSMBRANCHASSERTNAME
91.67 100.00 75.00 100.00 u_spid_dpram


Subtrees :
NAMESCORELINECONDTOGGLEFSMBRANCHASSERT
u_mem 100.00 100.00 100.00 100.00


Since this is the module's only instance, the coverage report is the same as for the module.
Line Coverage for Module : prim_ram_2p_async_adv
Line No.TotalCoveredPercent
TOTAL5151100.00
ALWAYS13633100.00
ALWAYS14333100.00
CONT_ASSIGN15011100.00
CONT_ASSIGN15111100.00
CONT_ASSIGN15211100.00
CONT_ASSIGN15311100.00
CONT_ASSIGN15411100.00
CONT_ASSIGN15511100.00
CONT_ASSIGN15711100.00
CONT_ASSIGN15811100.00
CONT_ASSIGN15911100.00
CONT_ASSIGN16011100.00
CONT_ASSIGN16111100.00
CONT_ASSIGN16211100.00
ALWAYS2331515100.00
CONT_ASSIGN26711100.00
CONT_ASSIGN26811100.00
CONT_ASSIGN30711100.00
CONT_ASSIGN30811100.00
CONT_ASSIGN30911100.00
CONT_ASSIGN31011100.00
CONT_ASSIGN31111100.00
CONT_ASSIGN31311100.00
CONT_ASSIGN31411100.00
CONT_ASSIGN31511100.00
CONT_ASSIGN31611100.00
CONT_ASSIGN31711100.00
CONT_ASSIGN34711100.00
CONT_ASSIGN34811100.00
CONT_ASSIGN35011100.00
CONT_ASSIGN35211100.00
CONT_ASSIGN35311100.00
CONT_ASSIGN35511100.00

135 always_ff @(posedge clk_a_i or negedge rst_a_ni) begin 136 1/1 if (!rst_a_ni) begin Tests: T1 T2 T3  137 1/1 a_rvalid_sram_q <= 1'b0; Tests: T1 T2 T3  138 end else begin 139 1/1 a_rvalid_sram_q <= a_req_q & ~a_write_q; Tests: T1 T2 T3  140 end 141 end 142 always_ff @(posedge clk_b_i or negedge rst_b_ni) begin 143 1/1 if (!rst_b_ni) begin Tests: T1 T2 T3  144 1/1 b_rvalid_sram_q <= 1'b0; Tests: T1 T2 T3  145 end else begin 146 1/1 b_rvalid_sram_q <= b_req_q & ~b_write_q; Tests: T4 T6 T9  147 end 148 end 149 150 1/1 assign a_req_d = a_req_i; Tests: T1 T2 T3  151 1/1 assign a_write_d = a_write_i; Tests: T1 T2 T3  152 1/1 assign a_addr_d = a_addr_i; Tests: T1 T2 T3  153 1/1 assign a_rvalid_o = a_rvalid_q; Tests: T1 T2 T3  154 1/1 assign a_rdata_o = a_rdata_q; Tests: T5 T6 T28  155 1/1 assign a_rerror_o = a_rerror_q; Tests: T1 T2 T3  156 157 1/1 assign b_req_d = b_req_i; Tests: T1 T2 T3  158 1/1 assign b_write_d = b_write_i; Tests: T1 T2 T3  159 1/1 assign b_addr_d = b_addr_i; Tests: T1 T2 T3  160 1/1 assign b_rvalid_o = b_rvalid_q; Tests: T1 T2 T3  161 1/1 assign b_rdata_o = b_rdata_q; Tests: T6 T12 T13  162 1/1 assign b_rerror_o = b_rerror_q; Tests: T1 T2 T3  163 164 ///////////////////////////// 165 // ECC / Parity Generation // 166 ///////////////////////////// 167 168 if (EnableParity == 0 && EnableECC) begin : gen_secded 169 170 // check supported widths 171 `ASSERT_INIT(SecDecWidth_A, Width inside {32}) 172 173 // the wmask is constantly set to 1 in this case 174 `ASSERT(OnlyWordWritePossibleWithEccPortA_A, a_req_i |-> 175 a_wmask_i == {Width{1'b1}}, clk_a_i, rst_a_ni) 176 `ASSERT(OnlyWordWritePossibleWithEccPortB_A, b_req_i |-> 177 b_wmask_i == {Width{1'b1}}, clk_b_i, rst_b_ni) 178 179 assign a_wmask_d = {TotalWidth{1'b1}}; 180 assign b_wmask_d = {TotalWidth{1'b1}}; 181 182 if (Width == 32) begin : gen_secded_39_32 183 if (HammingECC) begin : gen_hamming 184 prim_secded_inv_hamming_39_32_enc u_enc_a ( 185 .data_i(a_wdata_i), 186 .data_o(a_wdata_d) 187 ); 188 prim_secded_inv_hamming_39_32_dec u_dec_a ( 189 .data_i (a_rdata_sram), 190 .data_o (a_rdata_d[0+:Width]), 191 .syndrome_o ( ), 192 .err_o (a_rerror_d) 193 ); 194 prim_secded_inv_hamming_39_32_enc u_enc_b ( 195 .data_i(b_wdata_i), 196 .data_o(b_wdata_d) 197 ); 198 prim_secded_inv_hamming_39_32_dec u_dec_b ( 199 .data_i (b_rdata_sram), 200 .data_o (b_rdata_d[0+:Width]), 201 .syndrome_o ( ), 202 .err_o (b_rerror_d) 203 ); 204 end else begin : gen_hsiao 205 prim_secded_inv_39_32_enc u_enc_a ( 206 .data_i(a_wdata_i), 207 .data_o(a_wdata_d) 208 ); 209 prim_secded_inv_39_32_dec u_dec_a ( 210 .data_i (a_rdata_sram), 211 .data_o (a_rdata_d[0+:Width]), 212 .syndrome_o ( ), 213 .err_o (a_rerror_d) 214 ); 215 prim_secded_inv_39_32_enc u_enc_b ( 216 .data_i(b_wdata_i), 217 .data_o(b_wdata_d) 218 ); 219 prim_secded_inv_39_32_dec u_dec_b ( 220 .data_i (b_rdata_sram), 221 .data_o (b_rdata_d[0+:Width]), 222 .syndrome_o ( ), 223 .err_o (b_rerror_d) 224 ); 225 end 226 end 227 end else if (EnableParity) begin : gen_byte_parity 228 229 `ASSERT_INIT(ParityNeedsByteWriteMask_A, DataBitsPerMask == 8) 230 `ASSERT_INIT(WidthNeedsToBeByteAligned_A, Width % 8 == 0) 231 232 always_comb begin : p_parity 233 1/1 a_rerror_d = '0; Tests: T1 T2 T3  234 1/1 b_rerror_d = '0; Tests: T1 T2 T3  235 1/1 for (int i = 0; i < Width/8; i ++) begin Tests: T1 T2 T3  236 // Data mapping. We have to make 8+1 = 9 bit groups 237 // that have the same write enable such that FPGA tools 238 // can map this correctly to BRAM resources. 239 1/1 a_wmask_d[i*9 +: 8] = a_wmask_i[i*8 +: 8]; Tests: T1 T2 T3  240 1/1 a_wdata_d[i*9 +: 8] = a_wdata_i[i*8 +: 8]; Tests: T1 T2 T3  241 1/1 a_rdata_d[i*8 +: 8] = a_rdata_sram[i*9 +: 8]; Tests: T1 T2 T3  242 1/1 b_wmask_d[i*9 +: 8] = b_wmask_i[i*8 +: 8]; Tests: T1 T2 T3  243 1/1 b_wdata_d[i*9 +: 8] = b_wdata_i[i*8 +: 8]; Tests: T1 T2 T3  244 1/1 b_rdata_d[i*8 +: 8] = b_rdata_sram[i*9 +: 8]; Tests: T1 T2 T3  245 246 // parity generation (odd parity) 247 1/1 a_wdata_d[i*9 + 8] = ~(^a_wdata_i[i*8 +: 8]); Tests: T1 T2 T3  248 1/1 a_wmask_d[i*9 + 8] = &a_wmask_i[i*8 +: 8]; Tests: T1 T2 T3  249 1/1 b_wdata_d[i*9 + 8] = ~(^b_wdata_i[i*8 +: 8]); Tests: T1 T2 T3  250 1/1 b_wmask_d[i*9 + 8] = &b_wmask_i[i*8 +: 8]; Tests: T1 T2 T3  251 // parity decoding (errors are always uncorrectable) 252 1/1 a_rerror_d[1] |= ~(^{a_rdata_sram[i*9 +: 8], a_rdata_sram[i*9 + 8]}); Tests: T1 T2 T3  253 1/1 b_rerror_d[1] |= ~(^{b_rdata_sram[i*9 +: 8], b_rdata_sram[i*9 + 8]}); Tests: T1 T2 T3  254 end 255 end 256 end else begin : gen_nosecded_noparity 257 assign a_wmask_d = a_wmask_i; 258 assign b_wmask_d = b_wmask_i; 259 assign a_wdata_d = a_wdata_i; 260 assign b_wdata_d = b_wdata_i; 261 assign a_rdata_d = a_rdata_sram[0+:Width]; 262 assign b_rdata_d = b_rdata_sram[0+:Width]; 263 assign a_rerror_d = '0; 264 assign b_rerror_d = '0; 265 end 266 267 1/1 assign a_rvalid_d = a_rvalid_sram_q; Tests: T1 T2 T3  268 1/1 assign b_rvalid_d = b_rvalid_sram_q; Tests: T1 T2 T3  269 270 ///////////////////////////////////// 271 // Input/Output Pipeline Registers // 272 ///////////////////////////////////// 273 274 if (EnableInputPipeline) begin : gen_regslice_input 275 // Put the register slices between ECC encoding to SRAM port 276 always_ff @(posedge clk_a_i or negedge rst_a_ni) begin 277 if (!rst_a_ni) begin 278 a_req_q <= '0; 279 a_write_q <= '0; 280 a_addr_q <= '0; 281 a_wdata_q <= '0; 282 a_wmask_q <= '0; 283 end else begin 284 a_req_q <= a_req_d; 285 a_write_q <= a_write_d; 286 a_addr_q <= a_addr_d; 287 a_wdata_q <= a_wdata_d; 288 a_wmask_q <= a_wmask_d; 289 end 290 end 291 always_ff @(posedge clk_b_i or negedge rst_b_ni) begin 292 if (!rst_b_ni) begin 293 b_req_q <= '0; 294 b_write_q <= '0; 295 b_addr_q <= '0; 296 b_wdata_q <= '0; 297 b_wmask_q <= '0; 298 end else begin 299 b_req_q <= b_req_d; 300 b_write_q <= b_write_d; 301 b_addr_q <= b_addr_d; 302 b_wdata_q <= b_wdata_d; 303 b_wmask_q <= b_wmask_d; 304 end 305 end 306 end else begin : gen_dirconnect_input 307 1/1 assign a_req_q = a_req_d; Tests: T1 T2 T3  308 1/1 assign a_write_q = a_write_d; Tests: T1 T2 T3  309 1/1 assign a_addr_q = a_addr_d; Tests: T1 T2 T3  310 1/1 assign a_wdata_q = a_wdata_d; Tests: T1 T2 T3  311 1/1 assign a_wmask_q = a_wmask_d; Tests: T1 T2 T3  312 313 1/1 assign b_req_q = b_req_d; Tests: T1 T2 T3  314 1/1 assign b_write_q = b_write_d; Tests: T1 T2 T3  315 1/1 assign b_addr_q = b_addr_d; Tests: T1 T2 T3  316 1/1 assign b_wdata_q = b_wdata_d; Tests: T1 T2 T3  317 1/1 assign b_wmask_q = b_wmask_d; Tests: T1 T2 T3  318 end 319 320 if (EnableOutputPipeline) begin : gen_regslice_output 321 // Put the register slices between ECC decoding to output 322 always_ff @(posedge clk_a_i or negedge rst_a_ni) begin 323 if (!rst_a_ni) begin 324 a_rvalid_q <= '0; 325 a_rdata_q <= '0; 326 a_rerror_q <= '0; 327 end else begin 328 a_rvalid_q <= a_rvalid_d; 329 a_rdata_q <= a_rdata_d; 330 // tie to zero if the read data is not valid 331 a_rerror_q <= a_rerror_d & {2{a_rvalid_d}}; 332 end 333 end 334 always_ff @(posedge clk_b_i or negedge rst_b_ni) begin 335 if (!rst_b_ni) begin 336 b_rvalid_q <= '0; 337 b_rdata_q <= '0; 338 b_rerror_q <= '0; 339 end else begin 340 b_rvalid_q <= b_rvalid_d; 341 b_rdata_q <= b_rdata_d; 342 // tie to zero if the read data is not valid 343 b_rerror_q <= b_rerror_d & {2{b_rvalid_d}}; 344 end 345 end 346 end else begin : gen_dirconnect_output 347 1/1 assign a_rvalid_q = a_rvalid_d; Tests: T1 T2 T3  348 1/1 assign a_rdata_q = a_rdata_d; Tests: T5 T6 T28  349 // tie to zero if the read data is not valid 350 1/1 assign a_rerror_q = a_rerror_d & {2{a_rvalid_d}}; Tests: T1 T2 T3  351 352 1/1 assign b_rvalid_q = b_rvalid_d; Tests: T1 T2 T3  353 1/1 assign b_rdata_q = b_rdata_d; Tests: T6 T12 T13  354 // tie to zero if the read data is not valid 355 1/1 assign b_rerror_q = b_rerror_d & {2{b_rvalid_d}}; Tests: T1 T2 T3 

Cond Coverage for Module : prim_ram_2p_async_adv
TotalCoveredPercent
Conditions66100.00
Logical66100.00
Non-Logical00
Event00

 LINE       139
 EXPRESSION (a_req_q & ((~a_write_q)))
             ---1---   -------2------
-1--2-StatusTests
01CoveredT1,T2,T3
10CoveredT5,T6,T7
11CoveredT5,T6,T28

 LINE       146
 EXPRESSION (b_req_q & ((~b_write_q)))
             ---1---   -------2------
-1--2-StatusTests
01CoveredT4,T6,T9
10CoveredT6,T16,T30
11CoveredT6,T12,T13

Branch Coverage for Module : prim_ram_2p_async_adv
Line No.TotalCoveredPercent
Branches 4 4 100.00
IF 136 2 2 100.00
IF 143 2 2 100.00


136 if (!rst_a_ni) begin -1- 137 a_rvalid_sram_q <= 1'b0; ==> 138 end else begin 139 a_rvalid_sram_q <= a_req_q & ~a_write_q; ==>

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


143 if (!rst_b_ni) begin -1- 144 b_rvalid_sram_q <= 1'b0; ==> 145 end else begin 146 b_rvalid_sram_q <= b_req_q & ~b_write_q; ==>

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


Assert Coverage for Module : prim_ram_2p_async_adv
TotalAttemptedPercentSucceeded/MatchedPercent
Assertions 3 3 100.00 3 100.00
Cover properties 0 0 0
Cover sequences 0 0 0
Total 3 3 100.00 3 100.00




Assertion Details

NameAttemptsReal SuccessesFailuresIncomplete
CannotHaveEccAndParity_A 976 976 0 0
gen_byte_parity.ParityNeedsByteWriteMask_A 976 976 0 0
gen_byte_parity.WidthNeedsToBeByteAligned_A 976 976 0 0


CannotHaveEccAndParity_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 976 976 0 0
T1 1 1 0 0
T2 1 1 0 0
T3 1 1 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T7 1 1 0 0
T8 1 1 0 0
T9 1 1 0 0
T10 1 1 0 0

gen_byte_parity.ParityNeedsByteWriteMask_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 976 976 0 0
T1 1 1 0 0
T2 1 1 0 0
T3 1 1 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T7 1 1 0 0
T8 1 1 0 0
T9 1 1 0 0
T10 1 1 0 0

gen_byte_parity.WidthNeedsToBeByteAligned_A
NameAttemptsReal SuccessesFailuresIncomplete
Total 976 976 0 0
T1 1 1 0 0
T2 1 1 0 0
T3 1 1 0 0
T4 1 1 0 0
T5 1 1 0 0
T6 1 1 0 0
T7 1 1 0 0
T8 1 1 0 0
T9 1 1 0 0
T10 1 1 0 0

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