SystemVerilog assertions without clock

For all i know till now about assertion based verifation ,
Syntax are like

assert property (@posedge clk) ($rose(start) ##1 transfer)

means that transfer should come after one clock cycle if posedge of start comes at clk.
Now in my case there is no clock .
So i want to specify timings say 5ns .
How do i do that ?

In reply to aman.21:

I guess SystemVerilog simulator do needs a triggering point. If no clock is provided then It may take simulation clock as a reference. The assertion with no clock will be triggered at each simulation clock.
In order to answer above question you can move second half into sequence and call a sequence from property.

assert property (@posedge clk) ($rose(start) ##1 transfer)
means that transfer should come after one clock cycle if posedge of start comes at clk.
Now in my case there is no clock. So i want to specify timings say 5ns .
How do i do that ?

Every assertion needs a leading clocking event. in your example above, the leading clocking event is @(posedge clk). BTW, this is a poorly written assertion; you need an implication operator.

ap_start_xfr: assert property (@posedge clk) ($rose(start) |=>  transfer);

If what you want to do is that start is clocked by @(posedge clk), and 5ns later you want to check that transfer is a 1’b1. Below is an example on how you can do that (basically create an event that occurs 5ns after the @(posedge clk). I did it after the occurrence of “a”.

module lce1; 
	bit a, b, clk;
	event e; 
	 initial forever #50 clk=!clk; 
	 always @(posedge clk) begin 
	 	if (!randomize(a, b)) $error(); 
	 	if(a) begin 
	 		#5;
	 		-> e;
	 	end
	 end
	 
	 assert property(@(posedge clk) $rose(a) |-> @e b );
endmodule

http://systemverilog.us/lce1.png shows the sim results.

Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us

  • SystemVerilog Assertions Handbook 3rd Edition, 2013 ISBN 878-0-9705394-3-6
  • A Pragmatic Approach to VMM Adoption 2006 ISBN 0-9705394-9-5
  • Using PSL/SUGAR for Formal and Dynamic Verification 2nd Edition, 2004, ISBN 0-9705394-6-0
  • Real Chip Design and Verification Using Verilog and VHDL, 2002 isbn 0-9705394-2-8
  • Component Design by Example ", 2001 ISBN 0-9705394-0-1
  • VHDL Coding Styles and Methodologies, 2nd Edition, 1999 ISBN 0-7923-8474-1
  • VHDL Answers to Frequently Asked Questions, 2nd Edition ISBN 0-7923-8115