Verification Engineerの戯言
ovm_sequenceクラスは、ovm_sequence_itemクラスを継承します。
class ovm_sequence extends ovm_sequence_item; function new (input string name="ovm_sequence", ovm_sequencer_base sequencer = null, ovm_sequence parent_seq = null); // User Hook Interface event started; event ended; virtual task pre_body(); virtual task body(); virtual task post_body(); virtual task pre_do(bit is_item); virtual function void mid_do(ovm_sequence_item this_item); virtual function void post_do(ovm_sequence_item this_item); task apply(ovm_sequence_item req, output ovm_sequence_rsp rsp); virtual task pre_apply(); virtual task mid_apply(); virtual task post_apply(); task start(ovm_sequencer_base sequencer, ovm_sequence parent_seq = null); function void stop(); virtual function bit is_relevant(); virtual task wait_for_relevant(); // Random Sequence Selection Interface rand int unsigned seq_kind; function int unsigned get_seq_kind(string type_name); function ovm_sequence get_sequence(int unsigned req_kind); task do_sequence_kind(int unsigned req_kind); // Status Interface function bit is_blocked(); function int get_id(); endclass
ovm_sequenceクラスの例題は、examples/sequence/simple_seq_lib.svにあります。
このファイルでは、4つのクラス(simple_seq_do、simple_seq_do_with、simple_seq_do_with_vars、simple_seq_sub_seqs)を定義しています。
simple_seq_doクラスを見てみましょう!simple_seq_doクラスは、simple_itemクラスをメンバーを持ちます。
(simple_sequencerクラスは、ovm_sequencerクラスを継承したもので、examples/sequence/simple_sequencer.svにあります)
このsimple_itemメンバーは、[ ovm_sequenct_itemクラス]の説明の例題に出てきたものです。
bodyタスクも定義しています。このbodyタスクはovm_threaded_componentクラスのrunタスクのような働きをします。
ovm_doマクロを引数(item)を呼んでいます。
このファイルでは、4つのクラス(simple_seq_do、simple_seq_do_with、simple_seq_do_with_vars、simple_seq_sub_seqs)を定義しています。
simple_seq_doクラスを見てみましょう!simple_seq_doクラスは、simple_itemクラスをメンバーを持ちます。
class simple_seq_do extends ovm_sequence; function new(string name="simple_seq_do"); super.new(name); endfunction `ovm_sequence_utils(simple_seq_do, simple_sequencer) simple_item item; virtual task body(); ovm_report_info(m_name, $psprintf("In body() of %s", get_name()),1000); `ovm_do(item) endtask endclass : simple_seq_doovm_sequence_utilsマクロは、simple_sequecerクラスにsimple_seq_doクラスを登録します。
(simple_sequencerクラスは、ovm_sequencerクラスを継承したもので、examples/sequence/simple_sequencer.svにあります)
このsimple_itemメンバーは、[ ovm_sequenct_itemクラス]の説明の例題に出てきたものです。
bodyタスクも定義しています。このbodyタスクはovm_threaded_componentクラスのrunタスクのような働きをします。
ovm_doマクロを引数(item)を呼んでいます。
次回は、ovm_doマクロを見ていきます。
検証、Verification、SystemVerilog、OVM、Open Verification Methodology