Ana içeriğe geç

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

· loading · loading · ·
Eğitim UVM Doğrulama UVM Doğrulama SystemVerilog Uvm_sequencer Stimulus Yönetimi
Eğitim UVM Doğrulama
Axolot Logic
Yazar
Axolot Logic
Sayısal Tasarım Mühendisi
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
Eğitim UVM Doğrulama UVM Doğrulama SystemVerilog _Decl Makrosu Analysis Port
Eğitim UVM Doğrulama
UVM Temel Sınıfları
· loading · loading
Eğitim UVM Doğrulama UVM Doğrulama SystemVerilog Sınıf Hiyerarşisi
Eğitim UVM Doğrulama
UVM Utility Field Makroları
· loading · loading
Eğitim UVM Doğrulama UVM Doğrulama SystemVerilog Utility Makroları
Eğitim UVM Doğrulama
UVM ile Başlarken: Kurulum ve Desteklenen Simülatörler
· loading · loading
Eğitim UVM Doğrulama UVM Doğrulama SystemVerilog Simülasyon
Eğitim UVM Doğrulama
UVM'de Blocking ve Non-blocking Put/Get Port Kullanımı
· loading · loading
Eğitim UVM Doğrulama UVM Doğrulama SystemVerilog Blocking Port Non-Blocking Port TLM
Eğitim UVM Doğrulama
UVM'de Factory Kullanımı
· loading · loading
Eğitim UVM Doğrulama UVM Doğrulama SystemVerilog Factory Pattern
Eğitim UVM Doğrulama