01-24-2017 07:40 AM
I use statement below to load data for running simulation. I would like to know if there is a way can do to declare some variable or what, so that I can simply use it to represent ../Sim/test_TB/CMD_packages/move_L2R.
#2000
file1 = $fopen("../Sim/test_TB/CMD_packages/move_L2R/cmds_10_reg_80.bin","rb");
#2000
file1 = $fopen("../Sim/test_TB/CMD_packages/move_L2R/cmds_10_reg_84.bin","rb");
#2000
file1 = $fopen("../Sim/test_TB/CMD_packages/move_L2R/cmds_10_reg_A0.bin","rb");
======================================
For example :
declare PATH_1 as ../Sim/test_TB/CMD_packages/move_L2R
#2000
file1 = $fopen("PATH_1/cmds_10_reg_80.bin","rb");
#2000
file1 = $fopen("PATH_1/cmds_10_reg_84.bin","rb");
#2000
file1 = $fopen("PATH_1/cmds_10_reg_A0.bin","rb");
01-24-2017 08:04 AM
parameter PATH = "../Sim/test_TB/CMD_packages/move_L2R"; ... file1 = $fopen({PATH, "/cmds_10_reg_80.bin"}, "rb"); ...
Best Regards,
Stephan
01-24-2017 08:04 AM
parameter PATH = "../Sim/test_TB/CMD_packages/move_L2R"; ... file1 = $fopen({PATH, "/cmds_10_reg_80.bin"}, "rb"); ...
Best Regards,
Stephan
01-24-2017 08:39 AM
it works. Thanks a lot.
01-25-2017 09:25 AM
Please close this thread by marking appropriate post as "Accept as solution"
Regards,
Sravanthi
02-01-2017 09:37 PM - edited 02-01-2017 11:15 PM
can I use similar way in including statement ? or what is the right way to do it ? because what I put below isn't work
parameter TB_DataFile_Location = "../Sim/test_TB";
`include "{TB_DataFile_Location, "/TB_INI_CLK_nReset_2017_0109.v"}"
origianlly include statement is like
`include "../Sim/test_TB/TB_INI_CLK_nReset_2017_0109.v"
02-04-2017 05:56 AM
any suggestion on my problem above?
Thanks a lot.
02-04-2017 01:51 PM
@chienpingwong try just `include PATH.
02-04-2017 09:37 PM
02-05-2017 06:14 PM - edited 02-05-2017 06:26 PM
I try following statement, but it doesn't work. For your information. Anyway thanks for the help. It seems like macro cannot work on prodefine.
==========================================================
parameter PATH_1 = "../Sim/test_TB/TB_INI_CLK_nReset_2017_0109.v";
`include PATH_1
==========================================================