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

After moving to pathlib, searching for modelsim.ini is done in a different directory #632

Closed
suoto opened this issue Mar 6, 2020 · 3 comments

Comments

@suoto
Copy link
Contributor

suoto commented Mar 6, 2020

When moving to using pathlib (commit 1af5128) I believe there's a mistake here

def has_modelsim_ini(path):
return os.path.isfile(str(Path(path) / "modelsim.ini"))

The previous code searched for modelsim.ini one level above the executable:

def has_modelsim_ini(path): 
     return os.path.isfile(join(path, "..", "modelsim.ini")) 

A suggested fix would be

def has_modelsim_ini(path):
    return os.path.isfile(str(Path(path).parent / "modelsim.ini"))
@suoto
Copy link
Contributor Author

suoto commented Mar 6, 2020

If the vsim executable can be located, one could use vmap to work out where modelsim.ini is (it also respects the MODELSIM environment variable)

$ vmap
Reading /home/souto/modelsim/modeltech/linux_x86_64/../modelsim.ini
"std" maps to directory /home/souto/modelsim/modeltech/linux_x86_64/../std.
"ieee" maps to directory /home/souto/modelsim/modeltech/linux_x86_64/../ieee.
...

eine added a commit to eine/vunit that referenced this issue Mar 7, 2020
@eine
Copy link
Collaborator

eine commented Mar 7, 2020

I applied the suggested fix. Thanks for reporting!

@eine eine closed this as completed Mar 7, 2020
@bjornfor
Copy link

bjornfor commented Nov 7, 2023

If the vsim executable can be located, one could use vmap to work out where modelsim.ini is (it also respects the MODELSIM environment variable)

Implemented in #975. Thanks for the idea!

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

No branches or pull requests

3 participants