Ana içeriğe geç

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
Yazar
Kerim Turak
Digital IC Design & Verification Engineer
Table of Contents
SystemVerilog Tasarım Serisi - This article is part of a series.
Part 36: This Article

🔗 Sequence Nedir?
#

SVA’da sequence, bir veya birden fazla temporal ifadenin sıralı şekilde yazılmasıdır. Sequence kullanarak zaman tabanlı ilişkiler tanımlarız.

Örnek:

sequence s_handshake;
  req ##1 ack;
endsequence

Burada:

  • req geldikten bir cycle sonra ack sinyali beklenir.

🔀 Sequence Implication
#

Bir sequence ile property yazarken sequence implication kullanılır. Bu, bir sequence’in gerçekleşmesi durumunda başka bir sequence’in gerçekleşmesini bekleriz.

assert property (@(posedge clk) s_handshake |-> data_valid);

⏸️ Overlapping ve Non-Overlapping Sequence Implication
#

✅ Overlapping Sequence Implication (|->)
#

  • Sequence sağ tarafı, sol tarafın bittiği cycle ile overlap ederek başlar.
  • Yani: “Sol taraf bittiğinde hemen sağ taraf başlar.”

Örnek:

assert property (@(posedge clk) s1 |-> s2);

✅ Non-Overlapping Sequence Implication (|=>)
#

  • Sequence sağ tarafı, sol taraf tamamlandıktan bir sonraki cycle’da başlar.
  • Yani: “Sol taraf bitti, bir sonraki cycle sağ taraf başlar.”

Örnek:

assert property (@(posedge clk) s1 |=> s2);

📝 Conditional ve Unconditional Properties
#

  • Unconditional Property: Doğrudan sequence veya expression ile başlar.

    assert property (@(posedge clk) count < 5);
    
  • Conditional Property: if...else yapısına benzer şekildedir, eğer enable ise data_valid olmalı.

    assert property (@(posedge clk) (enable |-> data_valid));
    

Burada disable iff kısmı assertion’ı reset durumunda devre dışı bırakır.


🚫 Never Properties
#

Bazen bir olayın asla gerçekleşmemesini isteriz. Bunu not keyword’ü ile sağlayabiliriz.

Örnek:

assert property (@(posedge clk) not (error));

Bu property, error sinyali asla 1 olmamalıdır anlamına gelir.


⚡ $rose ve $fell Sequence Kullanımı
#

$rose() ve $fell() fonksiyonları sequence’lerde de kullanılır ve sinyal geçişlerini yakalar.

Örnek:

sequence s_rising_edge;
  $rose(signal);
endsequence

Bu sequence, signal’in 0’dan 1’e geçişini yakalar.


🚦 Disabling Properties
#

Bir assertion’ın belirli koşullarda devre dışı bırakılması için disable iff kullanılır.

Örnek:

assert property (@(posedge clk) disable iff (reset) (req |-> ack));

Burada reset aktifken assertion devre dışı kalır.


⚙️ Default Disable Statement
#

Birden fazla property için tek tek disable iff yazmak yerine global disable tanımı yapılabilir:

default disable iff (reset);

Bu durumda:

  • Tüm property’ler reset aktifken devre dışı kalır.
  • Kodun okunabilirliği artar.

SystemVerilog Tasarım Serisi - This article is part of a series.
Part 36: 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 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
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'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