# Assertion for a signal until a sequence is triggered

**URL:** <https://verificationacademy.com/forums/t/assertion-for-a-signal-until-a-sequence-is-triggered/49047>\
**Category:** SystemVerilog\
**Tags:** assertion\
**Created:** [November 25, 2024, 5:06pm UTC](https://verificationacademy.com/forums/t/assertion-for-a-signal-until-a-sequence-is-triggered/49047 "2024-11-25T17:06:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dibya\_1819](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@dibya\_1819](https://verificationacademy.com/forums/u/dibya_1819)\
**Post date:** [November 25, 2024, 5:06pm UTC](https://verificationacademy.com/forums/t/assertion-for-a-signal-until-a-sequence-is-triggered/49047/1 "2024-11-25T17:06:37Z")

</div>

Hi all, how to model this requirement using assertion?

Once Seq 1 is triggered(Antecedent), signal b should remain constant until Seq 2 is triggered

---

<div class="post-metadata">

**Author:** ![flyant](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/f/7cd45c/32.png) [@flyant](https://verificationacademy.com/forums/u/flyant)\
**Post date:** [November 26, 2024, 2:40pm UTC](https://verificationacademy.com/forums/t/assertion-for-a-signal-until-a-sequence-is-triggered/49047/2 "2024-11-26T14:40:21Z")

</div>

property P1;  
@(posedge clk)  
seq1.triggered |-\> ($stable(signb) throughout seq2.triggered);  
endproperty

---

<div class="post-metadata">

**Author:** ![dibya\_1819](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@dibya\_1819](https://verificationacademy.com/forums/u/dibya_1819)\
**Post date:** [November 26, 2024, 3:35pm UTC](https://verificationacademy.com/forums/t/assertion-for-a-signal-until-a-sequence-is-triggered/49047/3 "2024-11-26T15:35:04Z")

</div>

Hi @flyant , i think it will fail always because once the antecedent is matched, it will just check that seq2 has reached it’s endpoint or not in the same cycle (as you have used |-\> ), if not then assertion will fail. It will not check the actual intended behavior that until seq2 is triggered, signal b should remain stable.

---

<div class="post-metadata">

**Author:** ![flyant](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/f/7cd45c/32.png) [@flyant](https://verificationacademy.com/forums/u/flyant)\
**Post date:** [November 26, 2024, 3:55pm UTC](https://verificationacademy.com/forums/t/assertion-for-a-signal-until-a-sequence-is-triggered/49047/4 "2024-11-26T15:55:27Z")

</div>

I will double check with throughout, I remember if we use the sequence here, it will wait until seq2 is triggered.

but you can try this way instead.  
property P1;  
@(posedge clk)  
seq1.triggered |-\> ($stable(signb) throughout seq2.triggered[-\>1]);  
endproperty

---

<div class="post-metadata">

**Author:** ![dibya\_1819](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@dibya\_1819](https://verificationacademy.com/forums/u/dibya_1819)\
**Post date:** [November 26, 2024, 4:01pm UTC](https://verificationacademy.com/forums/t/assertion-for-a-signal-until-a-sequence-is-triggered/49047/5 "2024-11-26T16:01:13Z")

</div>

Yes, this will work. But i am not sure that if it is legal to use goto operator with sequence. Let me try.

---

<div class="post-metadata">

**Author:** ![dibya\_1819](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@dibya\_1819](https://verificationacademy.com/forums/u/dibya_1819)\
**Post date:** [November 26, 2024, 4:08pm UTC](https://verificationacademy.com/forums/t/assertion-for-a-signal-until-a-sequence-is-triggered/49047/6 "2024-11-26T16:08:16Z")

</div>

Thanks @flyant . It’s working. GOTO operator is illegal when we use with sequence but as we’re using triggered method for the sequence which returns a Boolean value, so it can be used.

---

<div class="post-metadata">

**Author:** ![user49](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/user49/32/1084_2.png) [@user49](https://verificationacademy.com/forums/u/user49)\
**Post date:** [November 27, 2024, 11:15pm UTC](https://verificationacademy.com/forums/t/assertion-for-a-signal-until-a-sequence-is-triggered/49047/7 "2024-11-27T23:15:35Z")

</div>

You may be interested in my  
SVA paper: (intersect) vs (throughout, until, until\_with, within) \*\*\* MUST READ FOR REAL SVA USERS!!! \*\*\* It addresses misunderstandings in the use of these operators, often caused by inherent misconceptions arising from their English-like syntax. [https://lnkd.in/g5sREUuk](https://www.linkedin.com/safety/go?url=https%3A%2F%2Flnkd.in%2Fg5sREUuk%3Ftrk%3Dfeed-detail_main-feed-card-text)
