I am trying to figure out the best way to simulate an FPGA project in modelsim that contains multiple Xilinx Vivado IP. I have gone through the process of "Generating Output Products" for each IP block, and then running the "compile.do" scripts that are generated. This results in multiple directories (1 for each IP type) with its own library directories. I have to do it this way because the compile.do files have relative file paths, so I have to 'cd' into each directory and then run compile.do, which creates its own local libraries instead of just adding to a single master simulation folder.

The HDL code references all the IP using the same library: ex: "work.atan2", so naturally I try to import the compiled library:

vmap work {pathToIPLibrary1}
vmap work {pathToIPLibrary2}
vmap work {pathToIPLibrary3}

But unfortunately this doesn't "add" each library to "work", it just overrides it with the last library (all that is in the work library is the files from {pathToIPLibrary3}.

Is there a way to merge libraries from different directories into the same library namespace?


1 Answer 1


I can see what you are trying to do and why.

But I'm afraid not, there is no 'merge libraries' function in ModelSim. It expects you to compile source files to get them into libraries.

  • \$\begingroup\$ I wonder if I'm going about this the wrong way, or if trying to get modelsim and Vivado working together is just a giant PITA \$\endgroup\$ Commented Jul 5, 2022 at 18:21
  • \$\begingroup\$ @SittinHawk, although it has projects, can be launched by synthesis tools etc, I've always treated ModelSim as very much a manually-driven thing. So going through the scripts, using a column editor to modify the subdirectory names in piles of compile lines and so on just come with the territory for me. It also doesn't usually take that long to do, once you get stuck in. Using an editor with decent column editing makes it a lot easier :-) \$\endgroup\$
    – TonyM
    Commented Jul 5, 2022 at 18:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.