Jan 31, 2017 #1 S shaiko Advanced Member level 5 Joined Aug 20, 2011 Messages 2,644 Helped 303 Reputation 608 Reaction score 297 Trophy points 1,363 Activity points 18,302 Hello, I have a VHD testbench file in this location: Code: C:/some_directory/hdl/tb.vhd I also have a stimulus text file in this location: Code: C:/some_directory/text/stimulus.txt In my VHDL testbench I use the absolute path of "stimulus.txt" as follows: Code: file text_file : text open read_mode is "C:\some_directory\text\stimulus.txt" ; Question: What's the syntax to use an absolute path for the same file?
Hello, I have a VHD testbench file in this location: Code: C:/some_directory/hdl/tb.vhd I also have a stimulus text file in this location: Code: C:/some_directory/text/stimulus.txt In my VHDL testbench I use the absolute path of "stimulus.txt" as follows: Code: file text_file : text open read_mode is "C:\some_directory\text\stimulus.txt" ; Question: What's the syntax to use an absolute path for the same file?
Jan 31, 2017 #2 T TrickyDicky Advanced Member level 7 Joined Jun 7, 2010 Messages 7,110 Helped 2,081 Reputation 4,181 Reaction score 2,048 Trophy points 1,393 Activity points 39,769 do you mean relative path? Its the same as the relative path in any OS: . is current folder, .. is up one folder: ".\stimulus.txt" or just "stimulus.txt"
do you mean relative path? Its the same as the relative path in any OS: . is current folder, .. is up one folder: ".\stimulus.txt" or just "stimulus.txt"
Jan 31, 2017 #3 S shaiko Advanced Member level 5 Joined Aug 20, 2011 Messages 2,644 Helped 303 Reputation 608 Reaction score 297 Trophy points 1,363 Activity points 18,302 do you mean relative path? Click to expand... Yes. Sorry for the typo. ".\stimulus.txt" or just "stimulus.txt" Click to expand... I tried that and it didn't work Failed to open VHDL file "./stimulus.txt" in rb mode. # No such file or directory. (errno = ENOENT) Click to expand... Maybe "stimulus.txt" must be added to the project first when using a relative path ?
do you mean relative path? Click to expand... Yes. Sorry for the typo. ".\stimulus.txt" or just "stimulus.txt" Click to expand... I tried that and it didn't work Failed to open VHDL file "./stimulus.txt" in rb mode. # No such file or directory. (errno = ENOENT) Click to expand... Maybe "stimulus.txt" must be added to the project first when using a relative path ?
Jan 31, 2017 #4 T TrickyDicky Advanced Member level 7 Joined Jun 7, 2010 Messages 7,110 Helped 2,081 Reputation 4,181 Reaction score 2,048 Trophy points 1,393 Activity points 39,769 No it doesnt need adding. It just means that the simulation folder is not the folder where stimulus.txt is. Where are you invoking vsim?
No it doesnt need adding. It just means that the simulation folder is not the folder where stimulus.txt is. Where are you invoking vsim?
Jan 31, 2017 #5 S shaiko Advanced Member level 5 Joined Aug 20, 2011 Messages 2,644 Helped 303 Reputation 608 Reaction score 297 Trophy points 1,363 Activity points 18,302 You mean the location I get when I type "pwd" in the console?
Jan 31, 2017 #6 T TrickyDicky Advanced Member level 7 Joined Jun 7, 2010 Messages 7,110 Helped 2,081 Reputation 4,181 Reaction score 2,048 Trophy points 1,393 Activity points 39,769 shaiko said: You mean the location I get when I type "pwd" in the console? Click to expand... No The folder that vsim is run in. Files in your source code are relative to where the simulation is running.
shaiko said: You mean the location I get when I type "pwd" in the console? Click to expand... No The folder that vsim is run in. Files in your source code are relative to where the simulation is running.