what is the difference between cover property and assert property? when to use cover property? explain with an example?
In reply to sh88:
The difference is there is no failure with a cover directive. When you cover a property, you expect it to be true at some point, but it is OK to be false. If you assert a property, it can never be false.
For example, to make sure you have tested back-to-back-write operations, you would write a cover directive:
cover property (@(posedge clk) op==Write |=> op==Write);
If you have a Write followed by a Read, that is OK, so you would not write this as an assertion.
If you wanted to test that after a Read operation, you must get a data Valid signal between 1-4 clock cycle later, you would write an assertion.
assert property (@(posedge clk) op==Read |-> ##[1:4] Valid);