wtr
Full Member level 5
I want to be able to run a simulation with a test vector located in a repository. The repository will be determined by users credentials. The repository will not necessarily be a relative path to where the script is executed from.
I've read the following
https://stackoverflow.com/questions/26288793/verilog-preprocessor-string-concatenation
It didn't help.
Questasim command has the following
vlog (stuff) +define+FILENAME_PATH="/home/path" "+incdir+..etc/etc"
(tried with and without quotation)
Then in a Verilog file I have the following
Questasim bombs out with
# ** Error (suppressible): (vopt-7063) ../../../../../../../../source/PCIe_blk/bench/tb_PCIe_lib/read_file_tasks.vh(4): Failed to find 'FILENAME_PATH' in hierarchical name '/FILENAME_PATH'
Basically the end goal is to make the stimulus script path agnostic. Relative path could be one solution, however I prefer a solution that is loaded/set during compile based on user credentials.
Regards,
I've read the following
https://stackoverflow.com/questions/26288793/verilog-preprocessor-string-concatenation
It didn't help.
Questasim command has the following
vlog (stuff) +define+FILENAME_PATH="/home/path" "+incdir+..etc/etc"
(tried with and without quotation)
Then in a Verilog file I have the following
Code Verilog - [expand] 1 2 3 4 5 6 `ifdef FILENAME_PATH `define FILENAME1 ``FILENAME_PATH/test1.txt // fail - what does double `` even do? `define FILENAME2 {`FILENAME_PATH, /test2.txt} // fail `define FILENAME3 {"`FILENAME_PATH`","/test3.txt"} // compiles but gives vsim-pli-3084 ($feof, fscanf etc argument 1 not valid file descriptor) `else `define FILENAME1 /home/hard/coded/path/test1.txt //works, but not flexible for different users.
Questasim bombs out with
# ** Error (suppressible): (vopt-7063) ../../../../../../../../source/PCIe_blk/bench/tb_PCIe_lib/read_file_tasks.vh(4): Failed to find 'FILENAME_PATH' in hierarchical name '/FILENAME_PATH'
Basically the end goal is to make the stimulus script path agnostic. Relative path could be one solution, however I prefer a solution that is loaded/set during compile based on user credentials.
Regards,