📄 run_cam_sim_regr.scr
字号:
#!/bin/csh -fset arg_num = $#; # number of arguments# current iterrationset iter = 1;# number of tests with DEFINES + test with user defined constants!set all_iterations = 2;# Process argumentset arg_waves = 0;set arg_regression = 0;if ($arg_num == 0) then echo " Verification without any parameter !"else if ($arg_num == 1) then if ($1 == "waves") then @ arg_waves = 1; echo " Verification with parameter : waves !" else if ($1 == "regression") then @ arg_regression = 1; echo " Verification with parameter : regression !" else echo " Not correct parameter ( $1 )" echo " Correct parameters are:" echo " - waves" echo " - regression" exit endif endif else if ($arg_num == 2) then if ($1 == "waves") then @ arg_waves = 1; if ($2 == "regression") then @ arg_regression = 1; echo " Verification with parameter : waves, regression !" else echo " Not correct parameter ( $2 )" echo " Correct 2. parameter is:" echo " - regression" exit endif else if ($1 == "regression") then @ arg_regression = 1; if ($2 == "waves") then @ arg_waves = 1; echo " Verification with parameter : waves, regression !" else echo " Not correct parameter ( $2 )" echo " Correct 2. parameter is:" echo " - waves" exit endif else echo " Not correct parameter ( $1 )" echo " Correct parameters are:" echo " - waves" echo " - regression" exit endif endif else echo " Too many parameters ( $arg_num )" echo " Maximum number of parameters is 2:" echo " - waves" echo " - regression" exit endif endifendifecho ""echo "<<<"echo "<<< Camera VERIFICATION "echo "<<<" # ITERATION LOOPiteration: echo ""echo "<<<"echo "<<< Iteration ${iter}"echo "<<<"if ($arg_regression == 1) then if ($iter <= $all_iterations) then if ($iter == 1) then echo "<<< Defines:" echo "\tHITACHI_CAM" echo "-DEFINE REGR -DEFINE HITACHI_CAM" > ./defines.args endif if ($iter == 2) then echo "<<< Defines:" echo "\tOMNIVISION_CAM" echo "-DEFINE REGR -DEFINE OMNIVISION_CAM" > ./defines.args endif endifendif# Run NC-Verilog compilerecho ""echo "\t@@@"echo "\t@@@ Compiling sources"echo "\t@@@"# creating .args file for ncvlog and adding main parametersecho "-cdslib ../bin/cds.lib" > ./ncvlog.argsecho "-hdlvar ../bin/hdl.var" >> ./ncvlog.argsecho "-logfile ../log/ncvlog.log" >> ./ncvlog.argsecho "-update" >> ./ncvlog.argsecho "-messages" >> ./ncvlog.argsecho "-INCDIR ../../../bench/verilog" >> ./ncvlog.argsecho "-INCDIR ../../../rtl/verilog" >> ./ncvlog.argsecho "-DEFINE SIM" >> ./ncvlog.args# adding defines to .args fileif ($arg_regression == 1) then cat ./defines.args >> ./ncvlog.argsendif# adding RTL and Sim files to .args filecat ../bin/rtl_file_list.lst >> ./ncvlog.argscat ../bin/sim_file_list.lst >> ./ncvlog.args # adding device dependent files to .args filecat ../bin/xilinx_file_list.lst >> ./ncvlog.argsncvlog -file ./ncvlog.args# > /dev/null;echo ""# Run the NC-Verilog elaborator (build the design hierarchy)echo ""echo "\t@@@"echo "\t@@@ Building design hierarchy (elaboration)"echo "\t@@@"ncelab -file ../bin/ncelab_xilinx.args# > /dev/null;echo ""# Run the NC-Verilog simulator (simulate the design)echo ""echo "\t###"echo "\t### Running tests (this takes a long time!)"echo "\t###"# creating ncsim.args file for ncsim and adding main parametersecho "-cdslib ../bin/cds.lib" > ./ncsim.argsecho "-hdlvar ../bin/hdl.var" >> ./ncsim.argsecho "-logfile ../log/ncsim.log" >> ./ncsim.argsecho "-messages" >> ./ncsim.argsif ($arg_waves == 1) then echo "-input ../bin/ncsim_waves.rc" >> ./ncsim.argselse echo "-input ../bin/ncsim.rc" >> ./ncsim.args endifecho "worklib.camera:fun" >> ./ncsim.argsncsim -file ./ncsim.args# > /dev/nullif ($status != 0) then echo "" echo "TESTS couldn't start due to Errors!" echo "" exitelse if ($arg_regression == 1) then if ($arg_waves == 1) then mv ../out/waves.shm ../out/i${iter}_waves.shm endif mv ../log/cam_tb.log ../log/i${iter}_cam_tb.log endifendifecho "" @ iter += 1; if (($arg_regression == 1) && ($iter <= $all_iterations)) then goto iterationelse rm ./defines.args echo "" echo "<<<" echo "<<< End of VERIFICATION" echo "<<<" echo "<<<" echo "<<< -------------------------------------------------" echo "<<<"endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -