cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
akshath@13
Visitor
Visitor
2,491 Views
Registered: ‎06-26-2017

How to pass arguments to TCL while using xsim command?

Hello,

 

How can we pass a arguments to the TCL file while using xsim command to simulate the source files in Vivado 2017.1

 Thanks in Advance.

 

Regards,

Akshath Kumar

0 Kudos
1 Reply
hpoetzl
Voyager
Voyager
2,416 Views
Registered: ‎06-24-2013

You can use the environment to pass variables to the TCL script like this:

 

TEST=foo xsim --tclbatch test.tcl sim

****** xsim v2017.2 (64-bit)
  **** SW Build 1909853 on Thu Jun 15 18:39:10 MDT 2017
  **** IP Build 1909766 on Thu Jun 15 19:58:00 MDT 2017
    ** Copyright 1986-2017 Xilinx, Inc. All Rights Reserved.

source xsim.dir/sim/xsim_script.tcl
# xsim {sim} -autoloadwcfg -tclbatch {test.tcl}
Vivado Simulator 2017.2
Time resolution is 1 ps
source test.tcl
## puts $::env(TEST)
foo

Hope that helps,

Herbert

-------------- Yes, I do this for fun!
0 Kudos