下面的Tcl脚本来自动内存初始化文件(MIF)为十六进制(Intel格式)一个名为mif2hex一个Quartus®II软件实用程序文件(.HEX)的转换。将下面的脚本复制并粘贴到名为mif_to_hex.tcl的文件中,并使用以下命令运行它: quartus_sh -t mif_to_hex.tcl *.mif
全球范围
if {0 == [llength(args)]} {
post_message“用法:quartus_sh -t [info script] <文件名模式>”
} else {
set file_pattern [lindex(args)0]
foreach mif_name [glob] {
#重命名为.hex
设置rootname [文件rootname]
设置hex_name .hex
if {[catch {qexec“[file join(binpath)mif2hex]
“} res]} {
post_message -type错误
打破
} else {
post_message“转换为”
}
}
}





没有回复内容