Ana içeriğe geç

SystemVerilog Assertionlar: Delay, Repetition ve Status

· loading · loading · ·
Kerim Turak
Eğitim SystemVerilog Doğrulama SystemVerilog Assertion Verification Repetition Delay Overlap Go-to Repetition Assertion Status
Eğitim SystemVerilog Doğrulama
Yazar
Kerim Turak
Digital IC Design & Verification Engineer
Table of Contents
SystemVerilog Tasarım Serisi - This article is part of a series.
Part 37: This Article

📈 Assertion Status
#

Bir assertion’ın çalışması sırasında çeşitli durumları takip edebiliriz:

  • Succeeded (pass): Assertion beklenen şekilde çalıştı.
  • Failed: Assertion koşulu sağlanmadı.
  • Inactive: Assertion devre dışı veya trigger edilmedi.
  • Active: Assertion koşulu kontrol edilmeye başlandı; assertion tetiklendi ve çalışıyor durumda.
  • Enabled: Assertion tetiklenebilir durumda; assertion enable duruma geldi ve belirli koşullar oluşursa çalışabilir hale geldi.

⏳ Cycle Delay Repetition
#

Bir sequence veya assertion’da cycle delay ifadesi kullanarak ardışık clock cycle’lar boyunca bekleme tanımlayabiliriz.

Örnek:

sequence s_delay;
  a ##2 b;
endsequence

Bu örnekte a gerçekleştikten 2 cycle sonra b kontrol edilir.


🔄 Cycle Delay Repetition Ranges
#

Delay tekrarı için range kullanarak esnek kontroller tanımlayabiliriz:

sequence s_range;
  a ##[2:4] b;
endsequence

Bu örnekte:

  • a gerçekleştikten 2 ila 4 cycle sonra b kontrol edilir.

🔁 Consecutive Repetition
#

Consecutive repetition, bir olayın ardışık cycle’larda gerçekleşip gerçekleşmediğini kontrol eder.

Örnek:

sequence s_consec;
  (a && b)[*3];
endsequence

Burada:

  • a && b ifadesi 3 ardışık cycle boyunca true olmalıdır.

🔂 Consecutive Repetition with Ranges
#

Ardışık repetition’larda da range kullanabiliriz:

sequence s_consec_range;
  (a && b)[*3:5];
endsequence

Bu örnekte:

  • a && b ifadesi 3 ila 5 ardışık cycle boyunca true olmalıdır.

🚦 Consecutive Repetition: Special Ranges
#

Özel repetition’lar için:

  • [*] ➔ 0 veya daha fazla ardışık cycle.
  • [+] ➔ 1 veya daha fazla ardışık cycle.

Örnek:

sequence s_star;
  a[*];
endsequence

sequence s_plus;
  b[+];
endsequence

⏸️ Nonconsecutive Repetition
#

Nonconsecutive repetition (veya gözetimsiz repetition), bir olayın ardışık olmadan istenilen sayıda tekrar edip etmediğini kontrol eder. Bunun için throughout veya within keyword’leri kullanılır (advanced usage). Basit kullanım:

sequence s_nonconsec;
  a ##[1:$] b;
endsequence

Burada:

  • a gerçekleşir ve en az 1 cycle, en fazla sonsuz cycle sonra b kontrol edilir.

🌀 Go-To Repetition
#

Go-To repetition, ardışık cycle’larda olaylar overlap ederek yeni instance başlatabilir. Bu genelde FSM state assertion’larında kullanılır.

Örnek:

sequence s_goto;
  a ##1 b [->3];
endsequence

Bu örnekte:

  • b sinyali 3 defa overlap ederek paralel instance’larla kontrol edilir.

🔀 Go-To ve Nonconsecutive Ranges
#

Go-To repetition range’leri de destekler:

sequence s_goto_range;
  a ##1 b [->2:5];
endsequence

Burada:

  • b sinyali 2 ila 5 defa overlap ederek non-deterministic sayıda instance başlatılabilir.

📊 Repetition Table
#

SyntaxAnlamı
[*]0 veya daha fazla ardışık cycle
[+]1 veya daha fazla ardışık cycle
[N]Tam olarak N ardışık cycle
[N:M]N ila M ardışık cycle
[->N]Go-To, N overlap instance
[->N:M]Go-To, N ila M overlap instance

SystemVerilog Tasarım Serisi - This article is part of a series.
Part 37: This Article

Related

Immediate Assertion
· loading · loading
Kerim Turak
Eğitim SystemVerilog Doğrulama SystemVerilog Assertion Verification Immediate Assertion Deferred Immediate Assertion Doğrulama
Eğitim SystemVerilog Doğrulama
SystemVerilog Assertions: Same Cycle ve Next Cycle İmplication
· loading · loading
Kerim Turak
Eğitim SystemVerilog Doğrulama SystemVerilog Assertion Verification Same Cycle Implication Next Cycle Implication Assertion Overlapping Fonksiyonlar
Eğitim SystemVerilog Doğrulama
SystemVerilog Sequence, Sequence Implication ve Kullanımı
· loading · loading
Kerim Turak
Eğitim SystemVerilog Doğrulama SystemVerilog Assertion Verification Sequence Sequence Implication Overlapping Non-Overlapping Conditional Property Never Property $Rose $Fell Disable Iff
Eğitim SystemVerilog Doğrulama
SystemVerilog'da Boolean İfadeler ve Assertion Kullanımı
· loading · loading
Kerim Turak
Eğitim SystemVerilog Doğrulama SystemVerilog Assertion Verification Doğrulama
Eğitim SystemVerilog Doğrulama
SystemVerilog Assertion (SVA) Nedir ve Neden Kullanılır?
· loading · loading
Kerim Turak
Eğitim SystemVerilog Doğrulama SystemVerilog Assertion Doğrulama Formal Verification Concurrent Assertion Immediate Assertion SVA
Eğitim SystemVerilog Doğrulama
SystemVerilog'da Nesne Yönelimli Programlama
· loading · loading
Kerim Turak
Eğitim Doğrulama SystemVerilog SystemVerilog OOP Nesne Yönelimli Programlama Verification Sınıflar
Eğitim Doğrulama SystemVerilog