2

3 つのトランザクションを並行して実行する仮想シーケンサーがあり、それぞれが対応するシーケンサーで実行されます。だから私はこのようなものを持っています:

class top_vseqr extends uvm_seqr extends uvm_sequencer;
  type_a_seqr seqr_a;
  type_b_seqr seqr_b;
  type_c_seqr seqr_c;

...

endclass: top_vseqr

class simple_vseq extends uvm_sequence;
  `uvm_declare_p_sequencer(top_vseqr)

  type_a_seq seq_a;
  type_b_seq seq_b;
  type_c_seq seq_c;

  ...

  virtual task body();
    fork
      `uvm_do_on(seq_a, p_sequencer.seqr_a)
      `uvm_do_on(seq_b, p_sequencer.seqr_b)
      `uvm_do_on(seq_c, p_sequencer.seqr_c)
    join
  endtask: body

endclass: simple_vseq

しかし今、実行中のテストに応じて、特定のトランザクションを仮想シーケンサーに送り込みたいと考えています。そのために、モニターがインターフェースでトランザクションを確認するたびに更新される分析インポートを持つクラスと、駆動される次のトランザクションを返す関数を用意しました。だから今、私は次のようなことをしたい:

class test extends uvm_test;

  model model_a;
  simple_vseq seq;
  top_vseqr virt_seqr;

  ...

  task run_phase(uvm_phase phase);

    ...

    seq = simple_vseq::type_id::create("seq", this);
    seq.seq_a = model_a.get_sequence();
    seq.start(virt_seqr);

    ...

  endtask: run_phase

UVM のドキュメントを調べてみると、'uvm_send マクロがあることがわかりましたが、シーケンスを実行するシーケンサーを選択することはできません (つまり、'uvm_send_on などは見たことがありません)。私に何ができる?

ありがとう!

4

3 に答える 3

2

uvm_do_on macroを呼び出すことなくrandomize()(2 番目のスニペットで示したように) の内容を心配することなく実装できます。シーケンサー/ドライバーのハンドシェイク メカニズムは非常に単純であるため、これは一部の専門家によって推奨されている方法です。`uvm_do*マクロは標準ではありません。マクロは最初に役立つだけです。

于 2014-03-07T18:10:36.133 に答える
0

I don't think there is a `uvm_send_on macro but there is a `uvm_create_on(SEQ_OR_ITEM, SEQR) macro which you can use. From the UVM documentation, this is the same as `uvm_create except that it also sets the parent sequence to the sequence in which the macro is invoked, and it sets the sequencer to the specified ~SEQR~ argument. In fact, the `uvm_create macro calls `uvm_create_on macro internally by passing m_sequencer by default. You can override it using the `uvm_create_on call.

Alternatively, you could also do a set_sequencer on your sequence_item object so that it sets the m_sequencer variable.

Hope this helps.

于 2014-03-08T04:34:47.683 に答える