How to pass arguments to tcl script in Vivado GUI tcl console -
i trying execute tcl script in vivado gui tcl console , script takes argument decide type of run (synth, impl, bitgen etc.) has configured. know that, using -tclargs
1 pass arguments if script executed in vivado command-line mode. like:
vivado -mode batch -source <filename> -tclargs <arguments>
i tried same in vivado gui mode , got error.
error: [common 17-170] unknown option '-tclargs', please type 'source -help' usage info.
running 'source -help'
:
syntax: source [-encoding <arg>] [-notrace] [-quiet] [-verbose] <file> usage: name description ------------------------ [-encoding] specify encoding of data stored in filename [-notrace] disable tracing of sourced commands [-quiet] ignore command errors [-verbose] suspend message limits during command execution <file> script source
by looking @ -help
getting feeling not possible so. also, can't find documents doing so. know if there way of achieving this.
the source
command doesn't set arguments; it's more c's #include
else really. because of that, if script source
ing expects argv
, argc
set — if script run program — should set
them before source
. ordinary variables far tcl's concerned; happen set default.
you might need set argv0
script. programs expect when running in non-interactive mode.
set argv [list "a b c" foo bar 123] set argc [llength $argv] set argv0 thescript.tcl source $argv0
Comments
Post a Comment