UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer lematthias
Observer
235 Views
Registered: ‎09-15-2018

Substitute variable in tcl within apply_bd_automation command

Hello,

I am trying to run apply_bd_automation with variables within the config list. Unfortunately I can't find the right syntax and Vivado throws "Invalid configuration value" errors.

This is the working command:

apply_bd_automation -rule xilinx.com:bd_rule:xdma -config { accel {1} auto_level {IP Level} axi_clk {Maximum Data Width} axi_intf {AXI Memory Mapped} bar_size {1 (Megabytes)} bypass_size {Disable} c2h {1} cache_size {32k} h2c {1} lane_width {X16} link_speed {8.0 GT/s (PCIe Gen 3)}} [get_bd_cells xdma_0]

 

Now let's say I wanted to use a variable for c2h:

set num 2

What do I have to replace "c2h {1}" with, in order to use the value stored in $num ?
I have tried many different variants. Here the complete error message when using "c2h {$num}":

 

apply_bd_automation -rule xilinx.com:bd_rule:xdma -config { accel {1} auto_level {IP Level} axi_clk {Maximum Data Width} axi_intf {AXI Memory Mapped} bar_size {1 (Megabytes)} bypass_size {Disable} c2h {$num} cache_size {32k} h2c {1} lane_width {X16} link_speed {8.0 GT/s (PCIe Gen 3)}} [get_bd_cells xdma_0]
ERROR: [XDMA-105] Invalid configuration value "$num" for "c2h".
ERROR: [Common 17-39] 'send_msg_id' failed due to earlier errors.
ERROR: [#UNDEF] Error found in procedure apply_rule.
ERROR: [Common 17-39] 'send_msg_id' failed due to earlier errors.
INFO: [BD 5-145] Automation rule xilinx.com:bd_rule:xdma was not applied to object xdma_0
INFO: [Common 17-17] undo 'apply_bd_automation -rule xilinx.com:bd_rule:xdma -config { accel {1} auto_level {IP Level} axi_clk {Maximum Data Width} axi_intf {AXI Memory Mapped} bar_size {1 (Megabytes)} bypass_size {Disable} c2h {$num} cache_size {32k} h2c {1} lane_width {X16} link_speed {8.0 GT/s (PCIe Gen 3)}} [get_bd_cells xdma_0]'
ERROR: [Common 17-39] 'apply_bd_automation' failed due to earlier errors.

 

If necessary I can post a minimal example but basically creating an empty block design and running "create_bd_cell -type ip -vlnv xilinx.com:ip:xdma:4.1 xdma_0" and then the command from above should be enough to recreate the error.


Thank you very much in advance!

0 Kudos