文章 ID: 000076049 内容类型: 产品信息和文件 上次审核日期: 2021 年 08 月 28 日

如何将 MIF 文件批处理转换为 HEX 文件?

环境

BUILT IN - ARTICLE INTRO SECOND COMPONENT
说明

以下 Tcl 脚本可自动执行内存初始化文件 (mif) 以 Hexadecimal (Intel-Format) 文件(.hex)为一个称为mif2hex的 Quartus® II 软件实用程序进行转换。将下面的脚本复制并粘贴到名为mif_to_hex.tcl的文件中,并使用以下命令运行:quartus_sh -t mif_to_hex.tcl *.mif

global quartus



if { 0 == [llength (args)] } {

    post_message "Usage: quartus_sh -t [info script] "

} else {

    set file_pattern [lindex (args) 0]

    foreach mif_name [glob ] {

    

        # Rename to .hex

        set rootname [file rootname ]

        set hex_name .hex

        

        if { [catch { qexec "[file join (binpath) mif2hex] 
             " } res] } {

            post_message -type error 

            break

        } else {

            post_message "Converted  to "

        }

    }

}



相关产品

本文适用于 1 产品

英特尔® 可编程设备

1

本页面上的内容是原始英文内容的人工翻译与计算机翻译的组合。我们提供此内容是为了您的便利并且仅供参考,未必完整或准确。如果本页面的英文版与翻译版之间存在任何冲突,应以英文版为准。 查看此页面的英语版本。