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: 
Highlighted
Explorer
Explorer
685 Views
Registered: ‎03-26-2010

Set Part in Xilinx Sysgen token from the environment

Hi all,

 

I have a sysgen simulink design in Vivado 2018.2/Matlab 2017b that's used for two different FPGA targets. Is there a way to programmatically set the Xilinx token's Part selection to be something arbitrary? Otherwise, changing the part in the GUI changes the .slx file and will appear as a changed file in revision control.

 

Thanks!

0 Kudos
2 Replies
Moderator
Moderator
598 Views
Registered: ‎08-01-2007

回复: Set Part in Xilinx Sysgen token from the environment

add_part(family, device, speed, package, temperature)

 

An example of an explicit command is add_part(‘Kintex7’, ‘xc7k325t’, ‘-1’ , ‘fbg676’,‘’). If the part-related API’s are not used, the end user can select any device that he wants to choose from the list.

0 Kudos
Explorer
Explorer
585 Views
Registered: ‎03-26-2010

回复: Set Part in Xilinx Sysgen token from the environment

Ran this at Matlab's prompt (started from the Xilinx sysgen launcher, sysgen toolboxes are available) to try to get the xilinx environment class:

 

xilinx.environment.addCompilationTarget('Impl', strcat(pwd, '/Impl'))
addpath(strcat(pwd, '/Impl'))

The Impl directory was created with no problems, path is added.

 

I can now do this at the prompt:

>> obj

obj = 

  Impl with properties:

      tcl_command_list: {}
             file_list: {}
      top_level_module: ''
      compilation_flow: 'Project'
    custom_project_dir: ''
           target_name: {'Impl'}
           device_list: {}
                   hdl: ''
        synth_strategy: ''
         impl_strategy: ''
             create_tb: ''
      create_iface_doc: ''

Moving forward, I still want to set the device, or the HDL, or whatever. Is this what I need to do from now on?

obj = Impl;
setup_sysgen_token(obj)
obj.add_part('ZynqUP', 'xczu9eg', '-2-e', 'ffvb1156'

Last line fails predictably, the auto-generated Impl.m class makes add_part a protected function so the method can't be called from the class instance. 

 

How is this supposed to be handled?

0 Kudos