Recently i have been asked to write assertion for below checker If req is they Rsp_1 should be asserted for 2 clock cycle and if req is not there then Rsp_2 should be asserted for 2 clock cycle?
So I have written Assertion property as below
So now i am confused which is better method and
i am also unclear about below questions
Is rsp_1[*2] is same as $stable(rsp_1) ? How above codes differ each other ?
Here i am using select operator in both cases and since we are not using any delay or implication operator How condition statement will executed will rsp_1 expression considered from same clock tick of req or will it take 1 clock cycle delay ?
Your requirements say nothing about when the 2 clock cycles rsp_1 must be asserted in relation to when req is asserted, or what rsp_1 should be if req is not true
In reply to SUNODH:
You said “rsp_1 should be asserted for 2 clock cycle(s)”. If “asserted” means Resp_1 has the value true or non-zero, then *rsp_1[2] represent that. $stable(rsp_1) means true for consecutive cycles or false for consecutive cycles.
You cannot use the conditional operator except in a non-temporal expression. I has to be evaluated in a single point in time. Sequences or a series of expressions that get evaluated over a time span, that is what temporal means.