Le script Tcl suivant automatise le fichier d’initialisation de la mémoire(. mif) en fichier Hexociœux (Intel-Format)(.hex)avec un utilitaire logiciel Quartus® II appelé mif2hex. Copiez et collez le script ci-dessous dans un fichier nommé mif_to_hex.tclet utilisez la commande suivante pour l’exécuter : 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 " } } }