Forum Discussion
Altera_Forum
Honored Contributor
17 years agoOK, I have spent a bit of time deciding how to proceed on this and have a rough framework for my pre-flow interactive script.
To make the script run pre-flow you need to add the following line to your projects .qsf file ********************** project.qsf **********************
set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:first.tcl"
********************** project.qsf ********************** ********************** first.tcl ********************** # Create a standard Yes/No message box dialog passing in the # dialog title and text.
proc CreateDialog {title text} {
tk_messageBox
-type yesno
-title $title
-default yes
-message $text
-icon question
}
# Do this when user clicks Yes
proc Yes {} {
post_message -type info "User request to continue compiling."
}
# Do this when user clicks No
proc No {} {
post_message -type error "User request to stop compiling."
}
# ################# Program Start# # ################
init_tk
set dialogTitle "My Message Box"
set dialogText "Are you sure you want to continue compiling?"
if { == yes} {
Yes
} else {
No
}
********************** first.tcl ********************** Notes: * The puts command seems to do nothing, but post_message prints out to the processing tab of the Messages utility window. This is how I stop the compilation in the No process by causing a error message. * This is an example of an interactive script, but any script could be used. If you ever plan to to do script driven batch compilations interactive script will obviously disrupt the process. * I managed to inadvertently avoid the need for the tkwait command by using a standard dialog. Comments, corrections, or improvements welcome. Steve