sim_if/modelsim: use vmap to find modelsim.ini
- 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.
@LarsAsplund: Friendly ping?
@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.
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.)
I think I've fixed the linter issues now.
Friendly ping.