//Whenever my clk_gate_cfg is 0 my clk will stop after 2:3 cycle
// for the particular block and will remain stop/zero till clk_gate_cfg will not assert.
// Like in my env i have reg "clk_gate_cfg" .It has 8 bit register.
property clk_gating
@(posedge top_th.ref_clk)
$fell(top_th.abc.abc_core.cfg_reg.clk_gate_cfg[1]) |->
##[2:3] top_th.abc.abc_core.trif_core[1].clk_i ==0 [*1:$] intersect
(top_th.abc.abc_core.cfg_reg.clk_gate_cfg[1]==1)[->1];
endproperty
How many times Assertion print will come ?
Or Will it come when "clk_gate_cfg[1]==1) ?
Above assertion is not failing when i am doing clock disable for fist bit and checking clock for another block .In my desgin 1 bit is gating clock for 1 instance of core. Like
In reply to kuldeep sharma:
I went overboard on the use of the intersect
// !a[*1:$] intersect a[->1] should fail
// !a[*1:$] ##1 a intersect a[->1] // ok
// but then you don't need the intersect
$fell(top_th.abc.abc_core.cfg_reg.clk_gate_cfg[1]) |->
##[2:3] top_th.abc.abc_core.trif_core[1].clk_i ==0 [*1:$] ##1
(top_th.abc.abc_core.cfg_reg.clk_gate_cfg[1];
Am not reading the requirements correctly, but you get the ideas of options.
Hopefully it’s a guide
BTW, in the consequent you should consider it first_match.