Reputation: 23
I want to conditionally append options when calling a Tcl command. I'm using a Xilinx Tcl command synth_design as indicated in UG835 p.1042 using Tcl version 8.5.
For instance, I want to:
-verilog_define MACRO
where -verilog_define
is not a string but an option, andWhere this:
synth_design -top ${top}_top -part ${part} -verilog_define MACRO1 -verilog_define MACRO2
^-------------------------------------------^
Becomes this:
synth_design -top ${top}_top -part ${part} ???
^-^
Upvotes: 0
Views: 314
Reputation: 15163
With {*}$makro
(expansion)
E.g.:
set makro {-verilog_define MACRO1 -verilog_define MACRO2}
synth_design -top ${top}_top -part ${part} {*}$makro
Upvotes: 2