In reply to sowmya.ragav:
Requiremens In my assertion, an offset should determine how much earlier to send a signal prior to a signal with value incrementing in every clock cycle.
That requirement is ambiguous. Do you mean to say:
Following the rise of signal “a”, the 32-bit signal “b” should be incremented after an offset of a number of system clocks. The value of that offset is stored in an 8-bit register. During that offset time, signal “a” shall remain in the logical high state.
With the above requirements, I would write:
property delay_assert(a,offset,b);
bit[7:0] v_offset;
bit[[31:0] v_b;
@(posedge clk) disable iff(reset)
($rose(a), v_offset= offset, v_b=b) |->
first_match((a,v_offset=v_offset - 1'b1)[*0:$] ##1 v_offset==0) ##0
$changed(b) && b==v_b+1'b1);
endproperty
I understand that you hastily wrote your requirements for the assertion for this forum. However, requirements really need to be better defined. For your benefit and this audience, I recommend that you take a look at my book (below) that goes ito great details about defining requirements and verification plans.
FREE BOOK: Component Design by Example
… A Step-by-Step Process Using VHDL with UART as Vehicle
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
- https://verificationacademy.com/news/verification-horizons-march-2018-issue
- SVA: Package for dynamic and range delays and repeats - SystemVerilog - Verification Academy
- SVA in a UVM Class-based Environment
https://verificationacademy.com/verification-horizons/february-2013-volume-9-issue-1/SVA-in-a-UVM-Class-based-Environment