vunit icon indicating copy to clipboard operation
vunit copied to clipboard

sim_if/modelsim: use vmap to find modelsim.ini

Open bjornfor opened this issue 2 years ago • 5 comments

  • This creates a single source of truth for finding modelsim.ini. It is now possible to use MODELSIM=/path/to/custom/modelsim.ini and both ModelSim and vunit will use that. (The VUNIT_MODELSIM_INI environment variable can still be used to override modelsim.ini only for vunit.)
  • This fixes detecting modelsim.ini in the quartus-prime-lite package from https://github.com/nixos/nixpkgs, which exposes binaries at $prefix/bin, but has no $prefix/modelsim.ini, because the latter would be an FHS violation.

bjornfor avatar Nov 07 '23 10:11 bjornfor

@LarsAsplund: Friendly ping?

bjornfor avatar Sep 25 '24 13:09 bjornfor

@bjornfor Sounds like a good idea but there is a problem that needs to be solved. Removing the constraint from the find_toolchain call means that it will find the first vsim executable on the path. That can be both a Riviera-PRO and an Active-HDL installation. If you look into the simulator interfaces of those simulators and see how they use find_toolchain, you will see how they avoid finding each other and ModelSim/Questa. That should give you some ideas on how you can write a not_aldec_simulator constraint function.

LarsAsplund avatar Dec 13 '24 14:12 LarsAsplund

I pushed a new version, and fixed the unit tests, which I didn't realize this PR was breaking :sweat_smile:

I don't have a way to test find_prefix_from_path() yet (which uses the new not_aldec_simulator() function). So beware. (My integration test setup from a year ago is lost. And I don't have access to non-ModelSim/Questa simulators.)

bjornfor avatar Dec 18 '24 20:12 bjornfor

I think I've fixed the linter issues now.

bjornfor avatar Dec 19 '24 09:12 bjornfor

Friendly ping.

bjornfor avatar Jan 13 '25 22:01 bjornfor