In reply to MICRO_91:
I like the way you clearly expressed the requirements. However, I am critical of the way you try to resolve each piece in a collective way by combining them in complex properties.
In general, it is best to write smaller assertions than larger more complex ones. Thius is my solution.
// 1) When request is asserted that grant is asserted the very next clock .
// grant must have been de-asserted prior to it's assertion
$rose( req ) |-> ##1 $rose( grant);
// 2) grant must remain asserted as long as request is asserted
$rose( grant) |-> grant && req[*0:$] ##1 !req;
// Same as
$rose( grant) |-> grant && req s_until ##1 !req;
// 3) grant must de-assert the very next clock after request is de-asserted
$fell(req) |-> ##1 $fell(grant);
I committed the strong in the qualification of the consequent. If this is of importance, then add the strong; for example: rose( grant) |-> strong(grant && req[*0:] ##1 !req);
/If the strong or weak operator is omitted, then the evaluation of the sequence_expr (interpreted as a property) depends on the assertion statement in which it is used. If the assertion statement is assert property or assume property, then the sequence_expr is evaluated as weak(sequence_expr). Otherwise, the sequence_expr is evaluated as strong(sequence_expr)./
I believe using a property as antecedent of Implication Operator is Illegal .
You are correct. However, the implies has a similar connotation to the |-> but with differences.
The implies has the form: property_expr1 implies property_expr2
It evaluates to true if either property_expr1 evaluates to false or property_expr2 evaluates to true. With the exception of vacuity, it is equivalent to : (not property_expr1) or (property_expr2). Thus, with the implies property operator, both sides of the operator are properties start at the same evaluation time and may end at different cycles.
Also, An evaluation attempt of a property of the form property_expr1 implies property_expr2 is nonvacuous if, and only if, the underlying evaluation attempt of property_expr1 is true and nonvacuous, and the underlying evaluation attempt of property_expr2 is nonvacuous.
Ben Cohen http://www.systemverilog.us/ben@systemverilog.us
** SVA Handbook 4th Edition, 2016 ISBN 978-1518681448
…
Yes because the & & is an expression operator.
The expression grant && req is first evaluated before the sequential repeat operator.
However, the following is differen because of the ‘and’ sequential operator.
grant and req[*0:] ##1 !req; // same as
(grant) and (req[*0:] ##1 !req) ;
For the property to be true, both concurrent sequences starting at the same cycle must be true.