Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bjornfor
Copy link

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

@LarsAsplund: Friendly ping?

@LarsAsplund
Copy link
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
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
Author

I think I've fixed the linter issues now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants