***************terminal command ******************
bjobs -w | grep //owner job find
//***************perl/shell ************************
use Cwd ; my $work_dir = cwd(); //return current workspace
use Getopt::Long ; @ARGV //store the command_line argument
use Data::Dumper ; printf DBG_FILE Dumper($file_hash)."\n"; //dump function print hash value
use YAML ; $file_hash = YAML::Loadfile("$ENV/src/verify/scripts/cfg/proj_step.yml"); //get hash from file
proj_step.yml
page_id:
fuxi: 2020
pangu: 2022
snc: 2024
report_name:
fuxi: "fuxi"
pangu:"pangu"
snc: "snc"
/
.pl
my $proj_step_file = "$ENV{'ANCHOR_fabric'}/src/verify/scripts/cfg/proj_step.yml";
my $proj_step_cfg = "";
if (-f "$proj_step_file"){
$proj_step_cfg = YAML::LoadFile("$proj_step_file");
foreach my $proj_step_info(sort keys %{$proj_step_cfg}){
foreach my $proj_step_name(sort keys $proj_step_cfg->{$proj_step_info}){
if ($proj_step_info eq 'page_id' && $ENV{'PROJ_STEP'} eq $proj_step_name ){
$page_id = $proj_step_cfg->{$proj_step_info}->{$proj_step_name}
}
if($proj_step_info eq 'report_name' && $ENV{'PROJ_STEP'} eq $proj_step_name ){
$Stmp_html = $proj_step_cfg->{$proj_step_info} ->{$proj_step_name};
}
}
}
}
///
$0 //current file name
$_ //the data that is currently being processed
$1 ; s/__(\d+)/$1/g #__17 -> 17
#####################perl################
:v/noc_slaves_info\[\d*\]/d #delete all exclude noc_slaves_info[12]
if($_ =~ /^\s+Version\s+:.*\.\.\.\@(?<cl>\d+)/) # Version :123wd...@5213
$opt_perl_cl=$+{cl}; # 5123
chomp(); #move(\n)
#####################endperl#############
#####################shell###############
$? #exist status $? == 0 ,cmd executed successfully
echo `date` #print date
set my_date = `date |sed -e 's# #_#g'|sed -e 's#:#_#g'`
grep -rn "fabric_ost_cfg" src/verify --exclude-dir={docs,suites}
#fuxi/a0->Fuxi_A0
set proj_step = `echo $PROJ_STEP |awk -F"/" '{for(i=1;i<NF;i++) {sub(".",substr(toupper($i),1,1),$i)}} 1' OFS="_"`
#####################SV/UVM#################
string uvc_name = m_env_cfg.asb_rst_cfg[i].get_name();
uvm_name = uvm_name.substr(0,uvm_name.len()-1-4); #截取字符
int axi_lenth,axi_burst;
std::randmize(axi_size) with {0<=axi_size; axi_size<=clogb2(${DATA_WIDTH}/8);};
std::randmize(axi_burst) with {0<=axi_burst; axi_burst<=2);};
#对AXI VIP使用 激励编写
#1.import axi 相关env/sequence 等
#2.在test中main_phase中声明axi_req_seq
#3.req_seq实例化,做一些随机配置,req_seq.configure(AXI_WRITE,i,axi_lenth,axi_size.....),并发送req_seq.start
vim配置
最新推荐文章于 2024-11-13 16:51:13 发布