bit hresp_count_g;
property scrub_fabric_error_for_ecc_read;
int hresp_count;
@(posedge clk) disable iff(!rstb)
((scrub_in_progress===1'b1)&&(boot_done_d1===1'b1))&&
( (HADDR<=24'hc007d7 && HADDR>=24'hc007b0) ||(HADDR<=24'hc0067f && HADDR>=24'hc0066c) )
&&(HTRANS===2'h2)&&(HREADYOUT===1'h1)&&(HREADY===1'h1)&&((HWRITE===1'b0)||(HWRITE===1'b1))
|=> ##[1:$] ((HRESP===1'b1)) ##1 (1,hresp_count=1'b1) ##0 (1,assign_to_global_var(hresp_count));
endproperty
SCRUB_FABRIC_ERROR_FOR_ECC_READ: assert property(scrub_fabric_error_for_ecc_read)
`uvm_info("scrub_fabric_erro_for_ecc PASS","SCRUB_FABRIC ERROR WILL COME ONLY, IF HRESP ERROR COMES WHILE READING AND WRITING ECC AND CRC REGIONS OF OTP OR SHADOW REGISTERS ",UVM_LOW)
else
`uvm_error("scrub_fabric_error_for_ecc","SCRUB_FABRIC ERROR WILL COME ONLY, IF HRESP ERROR COMES WHILE READING AND WRITING ECC AND CRC REGIONS OF OTP OR SHADOW REGISTERS ")
function void assign_to_global_var(bit temp);
hresp_count_g =temp;
endfunction
/*
my requirement here is - whenever there is read or write for this address(c0066c to c0067f or c007b0 to c007d7),it should check for hresp===1 or not,if hresp is one ,it should make hresp count variable 1;
but when i look into assertion state in wave diagram it enters the active state, if hddr is in given range and htrans is 2 and hready is one and hreadyout is one ,scrub_in_progress is one and boot_done_d1 is one, hwrite =1’b1 or hwrite=1’b0,even though hresp is becoming high after few cycles of this valid transaction,assertion is not entering finished state or property is not evaluated to true .
please help me with this,
Can never fail because if “b” is false, other threads of the consequent will be tested.
An assertion of the form
in reply to above answer:when a is true ,it will keep checking for b==1’b1 from next edge to till the end of simulation ,if b never becomes 1 assertion will fail(is this correct or wrong).
my problem is :when a is one, after few clock cycles delay(take it as ##8) b is also becoming one ,in this scenario also assertion is not passing, it should pass in this scenario.
Hi,
I have similar requirement like when a is 1 then I need to check for b should be 2 and next throughout simulation next value b should b3 3. If b is 3 after 2 my assertion should fail.
Ex: assert propert @(posedge clk) ((a==1) |-> (b==2) → ([1:$] (c==3) && (c=!2)));
end property
Is this correct or anyother better solution?