ID บทความ: 000077004 ประเภทข้อมูล: ข้อมูลผลิตภัณฑ์และเอกสารประกอบ การตรวจสอบครั้งล่าสุด: 01/01/2015

ฉันจะคอมไพล์ Programming Language Interface (PLI), convert_hex2ver.c ใน ModelTech เพื่อจําลองไฟล์เอาต์พุต MAX PLUS® II สําหรับการออกแบบที่มี ROM หรือ RAM เริ่มต้นได้อย่างไร

สิ่งแวดล้อม

  • Intel® Quartus® II Subscription Edition
  • BUILT IN - ARTICLE INTRO SECOND COMPONENT
    คำอธิบาย

    ดาวน์โหลดไฟล์ convert_hex2ver.c จากเว็บไซต์ EDIF (http://www.edif.org/lpmweb/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);
       }
      }
      
    • คอมไพล์และเชื่อมโยงไฟล์ต้นฉบับ C สองไฟล์ (veriuser_mti.c และ convert_hex2ver.c). ตัวอย่างเช่น:

       

      gcc -c -I/<full_path_to_modelsim>/include convert_hex2ver.c
      gcc -c -I/
      <full_path_to_modelsim>/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 Source โดยใช้ vlog คำ สั่ง คุณจะเห็นข้อความต่อไปนี้ในขณะวิเคราะห์ไฟล์โดยใช้ vlog:

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

    • ดําเนินการต่อด้วยการจําลอง

    ผลิตภัณฑ์ที่เกี่ยวข้อง

    บทความนี้จะนำไปใช้กับ 1 ผลิตภัณฑ์

    อุปกรณ์ที่ตั้งโปรแกรมได้ Intel®

    เนื้อหาในหน้านี้เป็นการผสมผสานระหว่างการแปลเนื้อหาต้นฉบับภาษาอังกฤษโดยมนุษย์และคอมพิวเตอร์ เนื้อหานี้จัดทำขึ้นเพื่อความสะดวกของคุณและเพื่อเป็นข้อมูลทั่วไปเท่านั้นและไม่ควรอ้างอิงว่าสมบูรณ์หรือถูกต้อง หากมีความขัดแย้งใด ๆ ระหว่างเวอร์ชันภาษาอังกฤษของหน้านี้กับคำแปล เวอร์ชันภาษาอังกฤษจะมีผลเหนือกว่าและควบคุม ดูเวอร์ชันภาษาอังกฤษของหน้านี้