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

Use absolute path for CurrentWorkingDirectory #34

Closed
f-markus opened this issue Nov 4, 2022 · 3 comments
Closed

Use absolute path for CurrentWorkingDirectory #34

f-markus opened this issue Nov 4, 2022 · 3 comments

Comments

@f-markus
Copy link

f-markus commented Nov 4, 2022

I found that my wave.do is sourced twice, because the checks in proc SimulateRunScripts (OsvvmProjectScript.tcl) fail due to the fact that said variable is just set to '.' (currect directory), while the other paths are absolute.
I thus suggest to use the absolute path for CurrentWorkingDirectory as well:

proc include {Path_Or_File} {
  ...
  set JoinName [file join ${StartingPath} ${Path_Or_File}]
  set NormName [file normalize $JoinName] # <--
  set RootDir  [file dirname $NormName]

Having said this, maybe the proc ReducePath can be removed entirely? I realize that you changed [file normalize] to [ReducePath] at some locations explicitly, but I don't know why. Most probably I am missing something, but maybe it's worth regarding anyway

@f-markus
Copy link
Author

f-markus commented Nov 4, 2022

Now part of PR 35 (#35)

@JimLewis
Copy link
Member

JimLewis commented Nov 4, 2022

This would be the easy way to handle paths. At one point OSVVM did it this way.

Unfortunately ModelSim/QuestaSim had a bug that caused them to crash when a testbench has a space in the path and you tried to simulate it.

On windows it is not uncommon for someone's design to be located in a directory that has space in the path at an upper level. So relative paths for these is a requirement.

OTOH, there is a place where we check whether to search CurrentWorkingDirectory or not - it will be addressed there.

@JimLewis JimLewis closed this as completed Nov 4, 2022
@JimLewis
Copy link
Member

JimLewis commented Nov 4, 2022

A alternative fix for this is in dev branch

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

2 participants