In reply to Bhaskar44:
Sorry, but your requirements are not clear.
In your assertion the signals are sampled wth @(posedge clk2). Why are you considering those as “glitches”? If you want just check for (sout == 0) ##[0:$] (sout == 1) you can do one of the followings:
ap_cmd2sout1: assert property(@(posedge clk2)$rose(cmd) |-> sout[->1] ); // use of the goto
// which is same as
ap_cmd2sout1b: assert property(@(posedge clk2)$rose(cmd) |-> !sout[*0:$] ##1 sout);
// What you described with
$rose(cmd) |-> (sout == 0) ##[0:$](sout == 1) ##1
(sout == 0) ##[0:$](sout == 1);
// Is 2 toggles of sout, starting at the next cyle after cmd.
That can also be done with the goto as shown below (starting from same cycle as cmd)
ap_cmd2sout1_2times: assert property(@(posedge clk2)$rose(cmd) |-> sout[->2] );
// which is same as
ap_cmd2sout1b: assert property(@(posedge clk2)$rose(cmd) |->
!sout[*0:$] ##1 sout ##1 !sout[*0:$] ##1 sout);
------------------------
A COMMENT:
a==0 ##[0:$] a==1 is same as
a==0 ##0 a==1 || // This is always false, "a" cannot be 0 and 1 in the same cycle.
// this is confusing and unnecessary
a==0 ##1 a==1 || ..
a==0 ##n a==1
Any glitches between the signal samples is ignored.
Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact Home - My cvcblr
- SVA Handbook 4th Edition, 2016 ISBN 978-1518681448
- 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 978-1539769712
- 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