In reply to muralidar:
Your requirements are ambiguous; the following comments may help you in clarifying your requirements.
-
I have 3 signals a,b,c which are asynchronous.
[Ben] So they are not derived from any clock? Do you mean that a, b, c are generated from different clocks or are they derived from flops going through combinational signals? Could they be glitchy? -
a signal changes 4 times for a operation i.e i need to calculate time for 4 pulses of a
[Ben] you did not state that your assertion needs to calculate “time”. ??? -
b has some default value which i can use direct value.
[Ben] what does the default value has to do with your assertion? Is it fixed all the time, or does it change. How does “b” play in your requirements? - [quote]c signal should start after 4 pulses of a + .Ho w can i write assertion check for the signal C that is dependent on a and b.I see write a separate a sequence for calculating the signal a change for 4 times, and then use that sequence inside a property to check the c condition.
[Ben]SVA needs clocks or events. If you want to say that after 4 pulses of “a”, then if(b) then c changes, then you can do something like the following, but you need clocks or you need to generate events.
// assuming that a, b, c are generated from separate clocks
module t;
bit clka, clkb, clkc;
bit a, b, c; // single pulses
bit go; // to start the checking process. More on that after you clarify your requirements
ap_abc: assert property(@(posedge clka) go && a ##1 a[->3]
|-> @(posedge clkb) b[->1] ##0 @(posedge clkc) c[->1]);
endmodule
GBGO; clarify what you requirements and the clocking scheme.
Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
- 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