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: 
Participant andrems
Participant
110 Views
Registered: ‎04-14-2008

Vivado IP packager and target specific properties

I have a project that might be simulated on ModelSim or Vivado Simulator and based on that I want to build a different simulation. Moreover, I'd like to be able to use some properties of the project that the IP is being instantiated on.

Vivado IP Packager is very much undocumented, UG1118 unfortunately only covers the basics.

The rationale is this IP has a testbench can run using methods A or B. Method A is more complete, but method B is a reasonable fallback. Since Vivado Simulator does not support running method A, I'd like to package the IP in such a way that if the user has "XSim" selected as target simulator, the testbench falls back to using method B instead of asking the user to intervene.

Regardless of this particular case, there are commands to get target family and target device that the IP is being instantiated on, so there should be a way to get other project properties as well.

Thanks in advance!


EDIT: I think I wasn't clear in my original question. What I'd like to accomplish is

  1. I package an IP using the IP Packager
  2. User starts Vivado, creates a project and sets the simulator to ModelSim or XSim
  3. User adds the IP I packaged on their IP repo
  4. User creates an instance of the IP
  5. User opens the example design
  6. User simulates the example design
  7. Simulation runs using method A if during step (2) the user selected ModelSim or using method B if during step (2) the user selected XSim
0 Kudos
2 Replies
Xilinx Employee
Xilinx Employee
56 Views
Registered: ‎01-30-2019

Re: Vivado IP packager and target specific properties

Hi @andrems ,

please correct me if I am wrong, but I don't think that Vivado IP packager will allow such conditional dependency of adding simulation files in file sets based on a property which will be obtained from the target project in which IP is to be used ( later ) with the current procedure of packaging an IP.

For now as a workaround what you can do is create two IP's IP_A with Simulation test bench A and IP_B with Simulation test bench B.

when you are trying to add IP to the project do the following in tcl console ( might need syntax checking of tcl commands)

set target_sim [get_property TARGET_SIMULATOR [ current_project] ]

if (targe_sim = xsim / modelsim ) #set simulator as per your use case 

<add IP_A to the project >

else

< add IP_B to the project >

please let us know if this will work for you.

 

--Suraj

0 Kudos
Participant andrems
Participant
28 Views
Registered: ‎04-14-2008

Re: Vivado IP packager and target specific properties

I think I wasn't clear in my original question. What I'd like to accomplish is

  1. I package an IP using the IP Packager
  2. User starts Vivado, creates a project and sets the simulator to ModelSim or XSim
  3. User adds the IP I packaged on their IP repo
  4. User creates an instance of the IP
  5. User opens the example design
  6. User simulates the example design
  7. Simulation runs using method A if during step (2) the user selected ModelSim or using method B if during step (2) the user selected XSim

I'm sure there is a way to do this, and if I had a view or flow chart showing how file groups are used and when, I'd be able to work out a solution.

0 Kudos