Ana içeriğe geç

UVM'de uvm_sequencer Nedir ve Nasıl Kullanılır?

· loading · loading · ·
Kerim Turak
Eğitim UVM Doğrulama UVM Doğrulama SystemVerilog Uvm_sequencer Stimulus Yönetimi
Eğitim UVM Doğrulama
Yazar
Kerim Turak
Digital IC Design & Verification Engineer
Table of Contents
UVM Serisi - This article is part of a series.
Part 13: This Article

📚 UVM Sequencer Nedir?
#

UVM sequencer, bir testbench’te sequence item’ların driver’a düzenli ve kontrollü şekilde gönderilmesini sağlayan bir bileşendir. Sequencer, test senaryolarında üretilen item’ları alıp driver’a sırayla iletir ve senkronizasyonu sağlar.

🔎 Sequencer’ın Temel Görevleri
#

Sequence item’ları alır ve sıralı bir şekilde driver’a gönderir.Arbitre (sequence arbitration) yaparak hangi sequence’in driver’a veri göndereceğine karar verir. ✅ Driver ile handshake (başlat ve bitir) protokolünü yönetir. ✅ Sequence item’ları driver’a start_item() ve finish_item() mekanizması ile taşır.

📦 Kullanımı
#

UVM’de sequencer genellikle şu şekilde tanımlanır:

class my_sequencer extends uvm_sequencer #(my_packet);
  `uvm_component_utils(my_sequencer)

  function new(string name, uvm_component parent);
    super.new(name, parent);
  endfunction
endclass
  • uvm_sequencer parametreli bir base class’tır:

    class uvm_sequencer #(type REQ = uvm_sequence_item, RSP = REQ)
      extends uvm_sequencer_param_base #(REQ, RSP);
    

    Yani genelde:

    • REQ = gönderilecek item tipi
    • RSP = response (varsayılan: REQ) şeklinde kullanılır.

🧩 Örnek: adder_sequencer
#

Aşağıda 4-bit toplama için basit bir adder sequencer örneği paylaşıyorum:

class adder_sequencer extends uvm_sequencer #(adder_packet);

  `uvm_component_utils(adder_sequencer)

  function new(string name, uvm_component parent);
    super.new(name, parent);
  endfunction

  function void start_of_simulation_phase(uvm_phase phase);
    `uvm_info(get_type_name(),
              {"start of simulation for ", get_full_name()},
              UVM_HIGH)
  endfunction

endclass : adder_sequencer

✅ Bu sequencer:

  • adder_packet türündeki item’ları driver’a iletir.
  • start_of_simulation_phase() fonksiyonunda log mesajı basarak simülasyon başlarken bilgi verir.

📝 Notlar:
#

  • Sequencer driver’a item’ları bağlantılı bir virtual interface üzerinden göndermez; bu bağlantı driver içinde yapılır.
  • Sequencer genelde agent’ın içinde tanımlanır ve driver ile birlikte kullanılır.

UVM Serisi - This article is part of a series.
Part 13: This Article

Related

UVM'de _decl Makrosu Kullanımı
· loading · loading
Kerim Turak
Eğitim UVM Doğrulama UVM Doğrulama SystemVerilog _Decl Makrosu Analysis Port
Eğitim UVM Doğrulama
UVM RAL (Register Abstraction Layer) Kullanımı ve Özellikleri
· loading · loading
Kerim Turak
Eğitim UVM Doğrulama UVM RAL Register Abstraction Layer Doğrulama SystemVerilog Register Modeling
Eğitim UVM Doğrulama
UVM RAL Modeli ile Sequencer ve Monitor Bağlantısı
· loading · loading
Kerim Turak
Eğitim UVM Doğrulama UVM RAL Sequencer Monitor Predictor Register Verification SystemVerilog Testbench Doğrulama
Eğitim UVM Doğrulama
UVM RAL Predictor Kullanımı: Register Modelini Senkronize Tutma
· loading · loading
Kerim Turak
Eğitim UVM Doğrulama UVM RAL Predictor Register Verification Bus Monitor SystemVerilog Testbench Doğrulama
Eğitim UVM Doğrulama
UVM RAL Register API Kullanımı: Frontdoor ve Backdoor Erişim
· loading · loading
Kerim Turak
Eğitim UVM Doğrulama UVM RAL Register Access Frontdoor Backdoor SystemVerilog Testbench Doğrulama
Eğitim UVM Doğrulama
UVM RAL Register Modeli Oluşturma ve UVM Ortamına Entegrasyonu
· loading · loading
Kerim Turak
Eğitim UVM Doğrulama UVM RAL Register Modeling SystemVerilog Adapter Bus Interface Verification Doğrulama
Eğitim UVM Doğrulama