Vengineerの妄想(準備期間)

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

OVM : 続、includeとimport

Verification Engineerの戯言

4月28日のブログにも書きましたが、includeimportについて、OVM 1.0.1/1.1のREADME_IUS.txtに次のように書いてありました。

    ##############################################################################
    ###  Using packages versus including OVM into a scope                      ###
    ##############################################################################

    There are two ways to load OVM into a design. OVM can either be included into
    the scope where it will be used by using the form:
      `include "ovm.svh"
    or it may be imported from the OVM package by first compiling the file
    ovm_pkg.sv and then using the form:
      import ovm_pkg::*;

    When class definitions are being shared between scopes (packages, interfaces,
    modules) it is necessary to use the package form. IUS currently has a 
    limitation with respect to using parameterized types and specializations of 
    the types in different scopes, therefore we currently recommend using the
    `include methodology with IUS unless the package methodology is specifically
    required.

    NOTE: because of the scoping rules of SystemVerilog, if the ovm package is
    imported into a scope AND ovm.svh is included in the scope, the local version
    of OVM (the one using the `include of ovm.svh) will take precedence unless the
    scope resolution operator (ovm_pkg::) is used. Thus, it is legal to have a
    precompiled ovm_pkg and still use the `include methodology to load OVM into a
    specific scope.

検証、Verification、SystemVerilog、OVM、Open Verification Methodology