HVP plan

HVP,hier verification plan,創建整個驗證的plan,在驗證後期,經過vcs的coverage db能夠直接進行反標,app

  包括反標code coverage,function coverage,testcase等。ide

coverage的database,包括vcs產生的db,本身拿到的external的data,ui

hvp提供一個feature list,pri,當前的design phase等信息,最終生成一份反標後的報告。excel

end user app包括兩種方式,urg report,code

                         spreadsheet annotator。(須要反標的excel的狀況下)xml

  

 

通常描述一個verfication plan的方式有:blog

  1) HVP language,經過verdi和dve的gui界面建立有一樣的效果。ip

  2) 使用一個spreadsheet,格式須要是MS excel,openoffice 2.0或更新的版本。(須要保存爲xml格式)rem

 

spreadsheet的方式建立hvp,須要必定格式:string

  

  1) matrics和attri須要單獨的sheet,plan單獨的sheet。

  2) plan的sheet中說明各個feature和sub feature,還有一些內建的attri/annotate。

  3) plan中單獨的column指定,measure source和matics的項。

  

 

使用hvp language的方式建立plan,

plan...endplan,建立一個plan的域,其中能夠聲明其餘的subplan,而且其餘的sub_plan能夠經過include將文件添加進來

plan中的attribute,內建的有:string----owner,int---at_least,int----test_expected,也能夠本身聲明,attribute,主要來用描述feature的一些特性,

plan中的annotation,內建的有:int----weight,string----description,也能夠本身聲明。annotation,也是用來描述feature的一些特性的。

  attribute與annotation的區別主要在於,attribute會按hier的向下傳遞。

  plan的不少信息都是有數據類型的,如enum,real,int,string等,定義時,須要注意。

feature的定義,包括名字,measure名字,其中的matrics類型,source的路徑等。

  feature slave_write;

    weight = 2;

    Group = Group >= 0.8 (override掉內部的額100%的限制。直接大於0.8的時候變綠)

    measure test,Cond Demo;

      source = "**test1**"

    endmeasure

  endfeature

  其中matrics的類型,vcs內部支持的包括,Line,Cond,FSM,Toggle,Branch,Assert,Group,Group.count

              SnpsAvg,AssertResult,test,test.percent,test.compeltion這些。

  measure以後的Demo表示的是當前measure的名字,這個在全部的feature中都是能夠相同的。可是matrics的類型,每一個feature都是不一樣的

    code coverage,使用tree或者instance來指定hier,

    function coverage使用group或者group instance來指定hier,

    assertion使用property來指定hier,

    test直接使用testcase name來指定hier。

    內建的metrics是有本身內部的goal的,Line>80%,Group>90%等,能夠本身設置。

  source中,指定的都是code,coverage group,coverage bin,test等的hier信息,可使用通配符

    ?通配符,表示匹配任何一個字符;

    *表示匹配,0個或多個該hier內部的字符;

    **表示匹配,0個或多個不限制hier的字符;

除了vcs定義的幾種matrics以外,也能夠自定義matrics,這時hvp反標的時候,須要本身加userdata

  metric enum {pass, fail} demo_metric;

    goal = (demo_metric.fail <= 0);

    aggregator = sum;

  endmetric

  metric的數據類型,能夠是ratio,percent,interger,real,enum,

    在定義過程當中,必須執行goal的目標,而且制定計算方式。

    還須要本身創建userdata文件,

user_data的格式:

  HVP metric = demo_metric

  test1 = pass

  test2 = fail

在使用該自定義的metric的時候,與自定義的相同,須要執行source、name。

  measure demo_metric metric_demo;

    source = "**test1**", "**test2**"

  endmeasure

 

HVP language中的comment,一樣使用/*和//來表示註釋。一樣支持`define,`include,`ifdef等宏

HVP language中支持,不一樣的項目階段,能夠對不一樣的HVP文件,在附加不一樣的配置文件;

1) override功能,主要是對attribute,annotation,goal的override。

    override ov_owner;

      topplan.subplan1.feature1.Line > 80%;

    endoverride

2) filter功能,主要針對內部的feature,內部語言刪選順序進行;

    filter my_view;

      remove feature where phase > 2;

      keep feature where phase == 5;

      keep feature where rounter == "N1" || rounter == "N2";   //留下內部還有attri rounter的feature。

    endfilter

3) until功能,創建一個針對時間的選擇block;

    until 1-31-2014;

      override name;

      endoverride

    elseuntil 04-30-2014;

      override name;

      endoverride

    enduntil

 

在寫好hvp文件和mod文件以後,能夠經過hvp的命令,直接生成對應的doc和xls、

1) hvp genxls,生成xls

    -plan <hvpfile>  -outdir <dirname> -lca -expand_subplans 「將plan和subplan生成在同一個sheet中」

2) hvp gendoc,生成doc

3) hvp annotate,對hvp plan進行反標、

    -plan <spreadsheet或者doc xml file>

    -mod <指定modifier文件>

    -usrdata <指定除了db以外的文件>

    -dir <vcs db>

    -elfile <指定exclude file>

    -hvp_no_score_missing <沒有match到的feature不指定爲0>

    -vc_lic_wait,等待lic

    -metric指定某個metric的反標。

相關文章
相關標籤/搜索