# How to write sv assertion to prove a packet with valid and some txnid in the input inside dut undergoes some translation and come out with same txnid and valid but time between input to output may vary for each request?

**URL:** <https://verificationacademy.com/forums/t/how-to-write-sv-assertion-to-prove-a-packet-with-valid-and-some-txnid-in-the-input-inside-dut-undergoes-some-translation-and-come-out-with-same-txnid-and-valid-but-time-between-input-to-output-may-vary-for-each-request/42438>\
**Category:** SystemVerilog\
**Tags:** Formal-Verification, formal-verification-assertion, system-verilog-assertion, SystemVerilog\
**Created:** [September 22, 2023, 4:32am UTC](https://verificationacademy.com/forums/t/how-to-write-sv-assertion-to-prove-a-packet-with-valid-and-some-txnid-in-the-input-inside-dut-undergoes-some-translation-and-come-out-with-same-txnid-and-valid-but-time-between-input-to-output-may-vary-for-each-request/42438 "2023-09-22T04:32:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![uanthire](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/u/f04885/32.png) [@uanthire](https://verificationacademy.com/forums/u/uanthire)\
**Post date:** [September 22, 2023, 4:32am UTC](https://verificationacademy.com/forums/t/how-to-write-sv-assertion-to-prove-a-packet-with-valid-and-some-txnid-in-the-input-inside-dut-undergoes-some-translation-and-come-out-with-same-txnid-and-valid-but-time-between-input-to-output-may-vary-for-each-request/42438/1 "2023-09-22T04:32:16Z")

</div>

HI all

I am trying to prove below scenario in formal but need some help in writing assertion.

DUT spec:

1. inputs : i\_rxvalid , i\_rxpkt(txnid, srcid, data etc), i\_txcredit

2. output : o\_txvalid , o\_txpkt(txnid, data, etc.) , o\_rxcredit

3. After reset credits are sent by DUT on o\_rxcedit and paralley received from other side on i\_txcredit independently

4. from rx side say 4 requests have come back to back with txnid - 'h1, 'h2, 'h3, 'h4 on i\_rxvalid & i\_rxpkt

5. after some processing these 4 requests would go out of DUT out of order with some random delay between them on o\_txvalid & o\_txpkt say 'h3, 'h2, 'h1, 'h4 but the max delay between input to output is 500 cycles.

How can we write an assertion property to prove that for each valid request with some txn\_id there was valid output with same txn\_id?

Thanks

---

<div class="post-metadata">

**Author:** ![user49](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/user49/32/4533_2.png) [@user49](https://verificationacademy.com/forums/u/user49)\
**Post date:** [September 22, 2023, 5:42am UTC](https://verificationacademy.com/forums/t/how-to-write-sv-assertion-to-prove-a-packet-with-valid-and-some-txnid-in-the-input-inside-dut-undergoes-some-translation-and-come-out-with-same-txnid-and-valid-but-time-between-input-to-output-may-vary-for-each-request/42438/2 "2023-09-22T05:42:29Z")

</div>

_In reply to [uanthire](https://verificationacademy.com/forums/t/how-to-write-sv-assertion-to-prove-a-packet-with-valid-and-some-txnid-in-the-input-inside-dut-undergoes-some-translation-and-come-out-with-same-txnid-and-valid-but-time-between-input-to-output-may-vary-for-each-request/42438):_

You need support logic. See my paper:  
**SUPPORT LOGIC AND THE always PROPERTY**

> **[support\_logic\_always.pdf](https://systemverilog.us/vf/support_logic_always.pdf)**
>
> 371.95 KB

Provides examples of support logic needed for certain types of requirements where the strict use of only SVA does not cover

Your requirements are very loosely written.  
Read the paper on support logic to help in specifying uniqueness in assertions.  
Write code, do a quick TB.  
If unclear, come back here and we’ll take a look at the issues.  
Ben Cohen  
[Ben@systemverilog.us](mailto:Ben@systemverilog.us)  
Link to the list of papers and books that I wrote, many are now donated.

> **[Cohen\_Links\_to\_papers\_books.pdf](https://systemverilog.us/vf/Cohen_Links_to_papers_books.pdf)**
>
> 140.45 KB

or [Links\_to\_papers\_books - Google Docs](https://rb.gy/ibks5p)

Getting started with verification with SystemVerilog

> **[Ben Cohen on LinkedIn: Road map to start with verification: SV, SVA , UVM and TB](https://www.linkedin.com/posts/ben-cohen-1172a0_road-map-to-start-with-verification-sv-activity-7050267628208062464-wnzN?utm_source=share&utm_medium=member_desktop)**
>
> Got this question: 
> Q: I need your advice in getting started with verification with systemverilog. I 've built various projects using Verilog and they was…
