vim配置

***************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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值