Looking for the better approach in creating Assertion to Implement below scenario

Hi,

I have planned to create an assertion for the below Scenario.

If I create normal approach, it seems to be very complicated. If I use assertion, this check seems to me better.

Image URL is below:

My specification description as below:

1.My spec is to check the number of clock’s between sig1 and sig2.
2.The count should be between

Min number of clocks:

clk1+clk2 =10, In 10 clk1=6 and clk2=4

Max number of clocks:

clk1+clk2 =15, In 15 clk1=9 and clk2=6

If it is single clock My assertion could have been something like below:

@(posedge clk1)
$rose(sig1) |-> ##[10:15] $rose(sig2)

But the count of minimum number of clocks and maximum number of clocks depends on two Clocks.

Thank you for the help with the assertion.

It appears that you have two conditions… Between $rose (sig1) and $rose(sig2) you need to have 6 to 9 clocks
for clk1 and 4 to 6 clocks for clk2 . Could we not duplicate your asseertion twice one for clk1 and one for clk2.
Maybe I am missing something

Logie Ramachandran
Verikwest Systems Inc.

In reply to logie:

Hi,

Basically, I am expected to count CLK1+CLK2 between Sig1 and Sig2.

I want the cumulative number of clocks must be between the given minimum and the maximum number of clocks.

If the sig2 is not asserted between the given minimum and the maximum number of cumulative clocks, Then the assertion must be failed.

Thank you for the question.