Hi,
I’m writing an SystemVerilog assertion where I need to use indefinite cycles for a event to happen. But, clock delay range operator gives me issue when used with $. See below snippet,
//This works fine(pass/fail happens)!
//As the delay between two reads vary, I need to use indefinite delay (using $) but
//as it does not work, I've been using 500 cycles assuming events will occure
//within this range.
property prop_name(bit [23:0] ADDR_, int POS_);
@(posedge HCLK) disable iff(!HRESETn)
(HTRANS == 2) && (HADDR == ADDR_ ) && !HWRITE ##1
!HREADYOUT[*0:16] ##1 (HRDATA[(( ADDR_ - (int' (ADDR_ /4)*4))*8) +: 8] == 8'h55) ##[0:500]
(HTRANS == 2) && (HADDR == ADDR_ + 1) && !HWRITE ##1
!HREADYOUT[*0:16] ##1 (HRDATA[(((ADDR_+1) - (int'((ADDR_+1)/4)*4))*8) +: 8] == 8'hAA)
|->
##[1:500] EndLockCheck ##0 Lock[POS_];
endproperty
//But this does not work
//This assertion gets activated but never passes/fails
property prop_name(bit [23:0] ADDR_, int POS_);
@(posedge HCLK) disable iff(!HRESETn)
(HTRANS == 2) && (HADDR == ADDR_ ) && !HWRITE ##1
!HREADYOUT[*0:16] ##1 (HRDATA[(( ADDR_ - (int' (ADDR_ /4)*4))*8) +: 8] == 8'h55) ##[0:$]
(HTRANS == 2) && (HADDR == ADDR_ + 1) && !HWRITE ##1
!HREADYOUT[*0:16] ##1 (HRDATA[(((ADDR_+1) - (int'((ADDR_+1)/4)*4))*8) +: 8] == 8'hAA)
|->
##[1:$] EndLockCheck ##0 Lock[POS_];
endproperty