I am thinking of a way to count the number of times grant is high using SVA. By doing that I want the assertion to throw an error if the count is more than 4. Is there any way of doing this in SVA?
The below code doesn’t work because ‘count = count + 1’ is not allowed. But I am looking for a property that works similarly to the below property.
property p1;
bit [2:0] count;
@(posedge(clk)) $rose(grant) |-> (1, count = count + 1);
endproperty : p1