Verification Engineerの戯言 : SystemVerilogの世界へようこそ
OVM-SV/OVM-eとOVM-SC間のデータは、TLM-2のGeneric Payloadベースになります。
このGeneric PayloadをOVMのクラス(ovm_gp)として次のように定義しています。
このGeneric PayloadをOVMのクラス(ovm_gp)として次のように定義しています。
OVM-SC: class ovm_gp : public ovm_object { public: OVM_OBJECT_UTILS(ovm_gp) uint64 m_address; tlm_command m_command; std::vector<unsigned char> m_data; unsigned int m_length; tlm_response_status m_response_status; std::vector<unsigned char> m_byte_enable; unsigned int m_byte_enable_length; unsigned int m_streaming_width; ... }; OVM-SV class ovm_gp extends ovm_sequence_item; rand bit unsigned [63:0] m_address = 0; ... endclass OVM-e struct ovm_gp like any_sequence_item { %m_address : uint(bits:64); ... };
SystemC、SystemVerilog、eはすべてクラスを表現できるので上記のような記述ができます。
これらクラスに対して、独自の拡張を行っています。
その例としては、ovm_gpクラスを継承したextended_burstクラスの例が載っています。
その例としては、ovm_gpクラスを継承したextended_burstクラスの例が載っています。
OVM-SC class extended_burst : public ovm_gp { public: // cache hint sent from initiator to interconnect / target. unsigned char m_cache_hint; // cache status sent from interconnect / target, returned to initiator unsigned char m_cache_status; .. }; OVM-SV class extended_burst extends ovm_gp; rand byte m_cache_hint; rand byte m_cache_status; ... endclass OVM-e: struct extended_burst like ovm_gp { %m_cache_hint: byte; %m_cache_status: byte; ... };
検証、Verification、SystemVerilog、OVM、Open Verification Methodology