記事 ID: 000077004 コンテンツタイプ: 製品情報 & ドキュメント 最終改訂日: 2021/08/28

ModelTech のプログラミング言語インターフェイス (PLI)、convert_hex2ver.c をコンパイルして、ROM または初期化された RAM を含むデザインのMAX PLUS® II 出力ファイルをシミュレートするにはどうすればよいですか?

環境

    インテル® Quartus® II サブスクリプション・エディション
BUILT IN - ARTICLE INTRO SECOND COMPONENT
詳細

EDIF のウェブサイト(http://www.edif.org/lpmweb/convert_hex2ver.c)からconvert_hex2ver.cファイルをダウンロードします。

 

  • という名前のファイルを作成します。 veriuser_mti.c 以下の内容で表示されます。
    #include "veriuser.h"
    #include "acc_user.h"
    
    extern convert_hex2ver();
    
    s_tfcell veriusertfs[] =
    {
        /*** Template for an entry:
        { usertask|userfunction, data,
          checktf(), sizetf(), calltf(), misctf(),
          ""},
        Example:
        { usertask, 0, check, 0, func, misctf, "" },
        ***/
    
        /*** add customer task entries here ***/
        /* This converts intel binary bit patterns to a verilog readmemb format*/
        {usertask, 0, 0, 0, convert_hex2ver,   0,  "",  1},
        
    {0} /*** final entry must be 0 ***/
    };
    
    /* mti interface */
    void init_usertfs()
    {
     p_tfcell usertf;
     for (usertf = veriusertfs; usertf; usertf  ) {
      if(usertf->type == 0)
        return;
      mti_RegisterUserTF(usertf);
     }
    }
    
  • 2 つの C ソースファイルをコンパイルしてリンクします (veriuser_mti.c そして convert_hex2ver.c).例えば:

     

    gcc -c -I/>full_path_to_modelsim< /include convert_hex2ver.c
    gcc -c -I/
    /include veriuser_mti.c
    ld -G -o altera.sl convert_hex2ver.o veriuser_mti.o

  • ローカルコピーの作成と編集 modelsim.ini 次の情報を含める場合:

     

    Veriuser = /<full_path_to_where_you_created_altera.sl>/altera.sl

  • 次を使用して Verilog ソースファイルをコンパイルします。 ビデオブログ コマンド。を使用してファイルを分析すると、次のメッセージが表示されます。 ビデオブログ:

    Loading work.full_path_to_where_you_created_altera.sl><>design_name< Loading / /altera.sl

  • シミュレーションに進みます。

関連製品

本記事の適用対象: 1 製品

インテル® プログラマブル・デバイス

1

このページのコンテンツは、元の英語のコンテンツを人力翻訳および機械翻訳したものが混在しています。この内容は参考情報および一般的な情報を提供するためものであり、情報の正確さと完全性を保証するものではありません。インテルは不正確な翻訳があった場合でもいかなる責任を負いません。このページの英語版と翻訳の間に矛盾がある場合は、英語版に準拠します。 このページの英語版をご覧ください。