Vengineerの妄想(準備期間)

人生は短いけど、長いです。人生を楽しみましょう!

UVM 1.0 : Objection mechansm debugとは?


uvm_componentクラスを継承したクラスがrun_phaseタスクを実装した場合、
下記のように最初phase.raise_objection(this)と最後phase.drop_objection(this)
にObjection関連のコードを入れます。
    virtual task run_phase(uvm_phase phase); 
        phase.raise_objection(this);   
        ....
        phase.drop_objection(this);   
    endtask
このコードは、uvm_objection.svhuvm_objectionクラスのメンバー関数で次のように
宣言されています。
    virtual function void raise_objection (uvm_object obj,
                                           string description = "",
                                           int count = 1 );

    virtual function void drop_objection (uvm_object obj,
                                          string description = "",
                                          int count = 1 );
この2つの関数は常にペアで使うようになっています。

一般的には、第一引数にthisを指定します。
また、第二引数のdescriptionはデフォルトでは""になっていますが、この引数に適当な文字列を指定しておくと、
コマンドラインの引数として、(+UVM_OBJECTION_TRACE)を指定すると、
Objection mechanism debug が有効になり、descriptionで指定した文字列がこの時、利用されるようです。

検証、Verification、SystemVerilog、OVM、UVM、Unified Verification Methodology