Ben Cohen
Ben@systemverilog.us
Link to the list of papers and books that I wrote, many are now donated.
https://systemverilog.us/vf/Cohen_Links_to_papers_books.pdf
could you please explain me, what is the mean in the last line?
// The following has formal arguments.
property Tclk (logic SCLK,time tclk);
The property has formal arguments that can be replace with actual arguments when you assert the property. I rewrote as follows:
in addition, I need to assert the above assertion in a loop, something like (pseudo code)
@(posedge en) repeat(20) begin @(posedge CLK) assert… end
You probably mean that you need to instantiate this property with 20 separate assertions.
You can use the generate statement. Example:
module m;
..
// Create 15 instances of this arbiter assertion for each indexed req and grnt.
generate for (genvar i=0; i<=15; i++)
begin
property p_arbiter;
bit[16:0] v;
(req[i]==1'b1, v=0, v[i+1]=1'b1) ##0 req < v |->
grnt[i]==1'b1 ##0 $onehot(grnt);
endproperty : p_arbiter
ap_arbiter: assert property(@(posedge clk) p_arbiter);
end
endgenerate
If this is not what you meant, please explain what you need.
the problem is regard the last clock for each CS go down,
the assertion check the clock from posedge to posedge, and the last posedge of clock in one CS, failed in the assertion, because the next posedge in clock is in the next CS negedge, .
I try to avoid the last posedge clock in each CS negedge.
What about an assertion as follows: