08-12-2019 02:07 AM - edited 08-19-2019 04:38 AM
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
08-15-2019 11:43 PM - edited 08-15-2019 11:48 PM
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 >
< add IP_B to the project >
please let us know if this will work for you.
08-19-2019 04:35 AM - edited 08-19-2019 04:37 AM
I think I wasn't clear in my original question. What I'd like to accomplish is
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.