Skip to content

sim_if/modelsim: use vmap to find modelsim.ini#975

Open
bjornfor wants to merge 1 commit intoVUnit:masterfrom
bjornfor:use-vmap-to-find-modelsim-ini
Open

sim_if/modelsim: use vmap to find modelsim.ini#975
bjornfor wants to merge 1 commit intoVUnit:masterfrom
bjornfor:use-vmap-to-find-modelsim-ini

Conversation

@bjornfor
Copy link
Copy Markdown

@bjornfor bjornfor commented Nov 7, 2023

  • 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 bjornfor force-pushed the use-vmap-to-find-modelsim-ini branch 2 times, most recently from 250d9c2 to 62d5fb4 Compare November 7, 2023 10:51
@bjornfor bjornfor marked this pull request as ready for review November 7, 2023 10:52
@bjornfor
Copy link
Copy Markdown
Author

@LarsAsplund: Friendly ping?

@LarsAsplund
Copy link
Copy Markdown
Collaborator

@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.

@bjornfor bjornfor force-pushed the use-vmap-to-find-modelsim-ini branch from 62d5fb4 to a2e423d Compare December 18, 2024 20:03
@bjornfor
Copy link
Copy Markdown
Author

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

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 bjornfor force-pushed the use-vmap-to-find-modelsim-ini branch from a2e423d to 8ea9c7d Compare December 19, 2024 09:07
* 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 bjornfor force-pushed the use-vmap-to-find-modelsim-ini branch from 8ea9c7d to 587a620 Compare December 19, 2024 09:09
@bjornfor
Copy link
Copy Markdown
Author

I think I've fixed the linter issues now.

@bjornfor
Copy link
Copy Markdown
Author

Friendly ping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants