Hi Ben,
Thanks for the reply
I want to ask the requirement of assertion as follows:
1:Upon a rose of all idles, we should check for that they remain high for dynamic number of clockedges which is defined by variable logic [7:0] dynamic .
2.if this condition passes we will check for variable clockgate/clock_en to be zero…
2. if it fails at any clock edge suppose dynamic clock edge value is 14 and one of the idles toggle to zero,the assertion shoul fail at the next clockedge no moving forward.
3.clockgate variable is directly related to clock_en that is if clock_en goes low it goes low immediately
code tried
sequence sq_rpt_simple_count(sq, count);
int v=count;
(1, v=count) ##0 ( v>0 ##0 sq, v=v-1) [1:$] ##0 v<=0;
endsequence // sq_rpt_simple_count
module m;
import sva_delay_repeat_range_pkg::;
bit clk, a, b, c, d, e, w;
int duration;
sequence q_abcde; @(posedge clk) a && b && c && d && e; endsequence
assert property(@(posedge clk)
q_abcde ##0 sq_rpt_simple_count(q_abcde,duration) |-> q_abcde ##1 clk_en==0;
endmodule
This code is working fine ,but it doesn’t catch the error which it should suppose all idles are not high during the whole duration of dynamic variable ,but it catches after the certain number of clock edge and requirement is to comes out immediately if either of a,b,c,d,e is not high representing idle or clock_en suddenly goes low in the period when all a,b,c,d,e are high.
Request you to add a control to catch to catch a scenario if either of a,b,c,d,e which are idle goes low after going to high.it should stop immediately and also in the mean time check for clock_enable to be zeroif either of condition happens it should show error.
so variable a,b,c,d,e are all idles
clock_en and clockgated signals are related to each other directly as clock_en goes low it goes low .
for more reference I have tried your two questions