uvm实战-学习笔记_第1页
uvm实战-学习笔记_第2页
uvm实战-学习笔记_第3页
uvm实战-学习笔记_第4页
uvm实战-学习笔记_第5页
已阅读5页,还剩30页未读, 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、UVM实战(卷1)学习笔记看了第1/2/3/4/5/6/8/9.1这几个章节。第一章是综述,第二章是一个具体的例子,学习笔记从第三章相关内容开始。我个人觉得UVM重要的部分(特点的部分):factory 机制(override config_db ) TLM传递phase 机制sequence-sequencer 以及 virtual seq/sqr内容中的截图基本来自于UVM源代码、书自带的例子和uvml.l应用指南及源代码分析 这个PDF里的。 需要结合书(UVM实战(卷1)第1版)来看这个笔记。第3章UVM基础3.1 uvm_component 和 uvm_object常用的类名字:这个

2、图是从作者张强的uvml.l应用指南及源代码分析里截得,不如书上3.1.1里的图好。uvm_sequencer也是代码里必须有的,所以我加了 uvm_sequenceruvm_void 是一个空的虚类。在 src/base/uvm_misc.svh 中定义:virtual class uvm_void; G-ndclass红框的是我们搭testbench的时候用的比较多的基类。常用的uvm.object派生类:sequencer 给 driver 的 transaction 要派生自 uvm-sequencejtem,不要派生自 uvm_transaction所有的sequence要派生自uv

3、m_sequence或者uvm-sequence的派生类,可以理解为 sequence 是 sequencejtem 的组合(集合)。driver 向 sequencer 索要 item, sequencer 检查 是否有sequence要发送item,当发现有item待发送时,就把这个item发给driver.常用的ponent派生类:所有的driver要派生自uvm_driver. driver用来把sequencejtem中的信息驱动到 DUT 端口上,从 transaction-level 向 signal-level 的转换。uvm_driver 需要参数(REQ RSP), 比 u

4、vm_component 增加 了几个成员。重要的是 seqjtem_port 和 req/rsp. (src/comps/uvm_driver.svh )uvm_seq_item_pLilImport tt (REQ , RSF) seq_item_port;uivm_e9q_itGm_pul Import ( REQ , RSP) sq_i tem_prod_i? ; / alias/ Port; rsp_port/ This port provides an alternate may of sending responses back to the/ originating seque

5、ncer. Which port to use depends on which export the / sequencer provides for connectionuvm_analysis_port # (RSP) rsp-port;req;rsp;monitor/scoreboard 以史生自 uvm_monitor 和 uvm_scoreboard 但是 uvm_monitor 和 uvm_scoreboard并没有在uvm_component基础上做扩展。src/comps/uvm_monitor.svhvirtual class uvm_moni-tor extends uv

6、m_componnt;/ Function: new/ Creates and initializes ati instance of this class using the normal/ constructor arguments for ; name is the nanie of the/ instance, and parent* is the handle to the hierarchical parent, if any.function new :string name, uvm_component parent);super.new(name 5 parent);end-

7、functionconst static string type-name =virtual function string ();return ;endfunctionendclasssequencer要派生自uvm_sequencer. sequencer做了很多扩展,但是如果我们自己写的 sequencer里没有增加成员的话,可以直接写如下代码:typedef uvm_sequencer#(传递的 sequencejtem 类名)sequencer 类名;因为sequencer在agent中例化,所以一般写在agent类文件里。reference_model 派生自 uvm_compon

8、ent.agent要派生自uvm_agent. uvm_agent里多了一个is_active的成员。一般根据这个active 来决定是否实例化driver和sequencer. is_active变量的数值需要在env的build_phase里设 置完成(可以直接设置,也可以用uvm_config_db#(int):set)。env 要派生自 uvm_env. uvm_env 没有对 uvm_component 扩展。src/comps/uvm_env.svhk/irrual class uvm_env extends uvm.conponent;/ Function: new/ Creat

9、es and initializes An instance o-P this class using tha normal/ constructor arguments for : naiie* is the name of the/ inGtancc, and parent is tho handle to tho hiorarchical paront, if anyFunction new (string name=env5 uvm_component parent=nul1);super .new(name,parent);endfunctionconst static string

10、 type-name = uvrcenv;virtual function string get_type_nane ();return type_name;end-functionendclass所有的test都要派生自uvm-test或者它的派生类。uvmjest也没扩展 src/comps/uvm_test.svhvirtual class uvm_test extends uzm_component;/ Function: new/ Crootcs and initializes an instanco of this class using tho normal/ construct

11、or arguments For :is tho name oP the/ instance, and parent* Is the handle to the hierarchical parent, if any.Pu net ion new (string name , u y m_ c omponen t parent);super .neuit name parent ;endfunctionconst static string type_narn9 -virtual function string get_type_name ();return type_name:end-Fun

12、ct ionendclassuvm.object 和 ponent 的 macromacro非常重要,事关把这些类的对象注册到factory机制中去。 uvm_object macro1)对于 uvm_sequencejtem 就统一用(假设不用 parameter):uvm_object_utils_begin(item 类名) . field_automation.uvm_object_utils_end2)为j于 uvm_sequence,要力口上xuvm_object_utils(sequence 类名)可能还需要、uvm_declare_p_sequencer(sequencer 类

13、名)的声明uvm_component macro对于 driver monitor reference_model scoreboard sequencer case agent env 这些uvm-component派生类都要加上:、uvm_component_utils(类名)uvm_component里的成员也可以像uvm_object里成员一样,用field_automation机制。u7m_component_utils_toegin (my_d.r iver) ield_int (pre_nunir UVM_ALL_ON)uvm component utils endfield_a

14、utomation 机制:对于uvm_object派生类来说,field_automation机制让对象自动有的copy compare print pack unpack等函数,简化了实现uvm_component派生类里一些function/task的工作量对于uvm_component派生类来说,field_automation机制最重要的是 可以在build_phase中 自动获取 uvm_config_db#():set()的数值(必须加 super.build_phase(phase)一也就是不用 写 uvm_config_db#():get()注意:field-automatio

15、n的macro的类型要和uvm_config_db的参数类型一致:如下示例代码,field J nt vs uvm_config_db#(bit47:0)这个时候 super. build_phase()是不起 作用的。class my_sequencer extends uvm_sequencer it I my_transaction ; bitE47:0 dmac;bitL47:0 smac ;7/int dmac;/int smac; u.vm-component_u.ti ls_begin (my_sequencer) suvm-field-int(dmac, UVH su.vm-f

16、ield_int (smac,sLLvm_component_Liti ls_endQu.nction vo i d my_caseO: :builcLphase u.vm_phase phse);super build-phase ph.3se ;uym_con-Fi(bit 47 :0 ) : : sstCthis ;,):ut(this, “mn” ,二一sgt .sqr: “smmc :想要起作用的话,需要用function void my_cae0: build_phas&( uvm_phas phase); super .bui Ld_phase(phase ;,dmac0, 48

17、hF9765);smac, 48h89F23);481hF9765);48h89F23);/uvm-con-rig_db(bit.47:0 ): :st.(thiSj erw.,/3uvm_conPig_dbt*bit47:0J ): :setjoct uvn_Gtjoct :cion.) object 即t叩 - this create get_rv=me ;XFif rhs -null !env(my_env)国Z1完整的UVM树uvm_component的new/create要注意第一个参数是名字,第二个参数是parent指针。UVM真正的树根是“uvm_top.根据上面这个树结构,可以

18、看出一个个component 的parent是什么。uvm_top的parent是nulL 当一个component在实例化的时候,如果 parent参数设成null,那么parent参数会被仿真器自动设置成uvmoot的实例uvm_top.在6.6.1章节里也提到了,sequence在uvm_config_db# ( ): : get ()的时候,第一个参 数设成“null,实际就是uvm_root:get() 3.5.1章节也提到了这个层次结构函数:get_parent() get_child(string name)这两个分别获取parent指针和指定名字的child指针。get_chi

19、ldren(ref uvm_component children$)获取所有的 child 指针get_num_children()获取 child 个数get_first_child(ref string name) get_next_child(ref string name)获取 child 的名字(反映到 string name ),返回值是0/1两种情况应用参考代码如下(改动的252例子中的my-agent.sv):function void my.agent: :connect_phase uvriuphaae phase uvm_component childrenISJ;uvm

20、_component child string child-name;super connect.phase phase 1if 1 is_active J二 begindrvseq_iten.port.connect:sqr seq_item_export : end ap = man.ap:,this.get_full_name .this get-parent* .thia.get.num.chi 1 dren :this.get.chiIdren children :Foreazh children;!: begin.thia .get_full_narne( i ,i ,chi 1

21、dren. i J .get_name : ) tchildrenLi J .8 et_full_nameendchild this.get.chiId1 iFlchi Id = null) begin.thia get_full_namei); end else besin.this get-full-name1 J); ondiP this.get_fir3t_child child-nane11 begin.this,child_ndme ;this get_next_child child_nae begin,this get-Ful l.nane ? , chi Id-name);e

22、nd end else beginjthis get_full_name endendfunction注意:上述代码是在connet_phase中实现的。上述代码的打印结果如下:my-agents name is uvm_test_top.envi_agt, parents full path is uvm_testop.env, children numis3uvm_test_top.env.i_agt0 child: drv - full path:uvm_test_top.env.i_agt.drvuvm_test_top.env.i_agt1 child: mon - full pat

23、hiuvm-tesWop.env.i-agt.monuvm_test_top.env.i_agt2 child: sqr - full path:uvm_test_top.env.i_agt.sqrThis should be i_agt. my_agent,s name is uvm_test_top.env.i_agt uvm_test_top.env.i_agt first child name is drv uvm_test_top.env.i_agt next child name is mon uvm_test_top.env.i_agt next child name is sq

24、rmy_agents name is uvm_test_top.env.o_agt, parents full path is uvm-test-top.env, children num is1uvm_test_top.env.o_agt0 child: mon - full path:uvm_test_top.env.o_agt.monUVM_WARNING /tools/synopsys/vcs/G-2012.09/etc/uvm/src/base/uvm_component.svh(1846) 0: uvm_test_top.env.o_agt NOCHILD Component wi

25、th name drv is not a child of component uvm_test_top.env.o_agtThis should be o_agt. my_agent,s name is uvm_test_top.env.o_agt uvm_test_top.env.o_agt first child name is monfield automation 机制注意数组类型的field macro比一般的要少real和event的macro. 一般的对于enum类型有3个参数,而数组的只有2个参数。联合数组的macro比较多常用函数需要注意 pack unpack pack_

26、bytes unpack_bytes packjnts unpackjnts 返回值都是 bit个数。field-automation 标记位17bit 中 bitO-copy bitl-no_copy bit2-compare bit3-no_compare bit4-printbit5-no_print bit6玲record bit7今no_record bit8-pack bit9-no_packUVM_ALL_ON 是 zb000000101010101UVM_ALL_ON | UVM_NO_PACK 这样就会忽略掉 pack bit field-automation的macro可以

27、和if结合起来,参考334的代码uvm_object_utils_begin(my_transaction)uvm_fieldjnt(dmacz UVM_ALL_ON) uvm_fieldjnt(smacz UVM_ALL_ON) if(is_vlan)beginuvm_fieldjnt(vlanjnfol, UVM_ALL_ON)xuvm_fieldjnt(vlanjnfo2, UVM_ALL_ON)xuvm_fieldjnt(vlanjnfo3, UVM_ALL_ON)xuvm_fieldjnt(vlanjnfo4, UVM_ALL_ON) enduvm_fieldjnt(ether_ty

28、pez UVM_ALL_ON)uvm_field_arrayjnt(pload, UVM_ALL_ON)uvmjieldjntfcrc, UVM_ALL_ON | UVM_NOPACK)uvmjieldjnt(is_vlan, UVM_ALL_ON | UVM_NOPACK) uvm_object_utils_end这个is_vlan变量可以在sequence里约束成0或1,来实现vlan或非vlanps:我觉得这个地方代码其实写成像3.3.3里的有j个crjerror的rand bit的更合理一些。 然后 crjerror 是 UVM_ALL_ON | UVM_NOPACK,而 crc 是

29、UVM_ALL_ONUVM打印信息控制get_report_verbosityjevel()set_report_verbosity_level(UVM_HIGH)只对当前调用的 component 起作用set_report_verbosity_level_hier(UVM_HIGH)对当前及下面所有的 component 起作用 simv +UVM_VERBOSITY=UVM_HIGH 命令行方式 我觉得用这个就可以了 重载打印信息:set_report_severity_override(UVM_WARNING,UVM_ERROR);上述函数都是在connect-phase及后面的pha

30、se使用 设置UVM_ERROR到达一定数量结束仿真set_report_max_quit_count(int)设成0就是无论多少error都不退出get_report_max_quit_count()返回如果是0,说明无论多少error都不退出 设置在main_phase前调用。simv +U VM_M AX_QU IT_COU NT= 103.4.4 3.4.5 3.4.6 3.4.7我觉得应该用不大到,就不做笔记了config_db 机制uvm_config_db#(类型):set/get(component 指针,变量名字,para4)都是4个参数:第一个参数是一个component指

31、针,如果是null的话,相当于uvm_root:get()第二个参数是个路径字符串,第一和第二两个参数组和成一个完整的路径第三个参数对于set、get要完全一致,是变量名字set的para4是数值,get的para4是变量component中的成员变量如果:component uvm_component_utils 宏注册2)变量用field-automation宏注册3) component 的 build_phase 函数里有 super.build_phase(phase)那么可以省略get语句跨层次多重set的时候,看set的第一个参数,层级越高,优先级越高。调用set的时候,第一个参

32、数尽量使用this同层次设置的时候是时间优先非直线设置的时候注意第一和第二参数的使用,如果需要parent指针,则要用this.m_parentconfig_db机制支持通配符,但是作者不推荐使用通配符。但是在对sequence的成员set 的时候需要用通配符(6.6.1章节)。使用如下函数调试config_dbcheck_config_usage() print_config(l/0)这两个函数在 connect_phase 函数中调simv +UVM_CONFIG_DB_TRACE注意:第二个参数设置错误不会报错! -config_db机制务必要注意参数的书写。第4章UVM中的TLMLO通

33、信TLM 是 Transaction Level Modeling 缩写这章要搞清楚port export imp fifo以及几种操作function/task和对应component中要实现 的 function/task下面的箭头方向都是控制流的方向,不是数据流方向。我觉得作为一个VMM用户会觉得TLM有点难理解,总想用VMM_CHANNEL去套,结果把 自己搞晕。像port等其实是调imp所在component的task/function.我看UVM源代码里有一个uvm_seqjtem_pull_port的class,它的基类是uvm_port_base.在 uvm_driver的成员

34、seqjtem_port就是这个类型的。与它对应的是uvm_seqjtem_pull_imp, uvm_sequencer 的成员 seqjtem_export 就是这种类型。在 my_agent.sv 中会 connect 它们。3function void my_agenc: : coimecc_phase (uviri_phase phase);super.connec c_phas e(phase);3 if Cis_active = UVM_ACTIW begindrv. 5eq icem port. connect (sqr . seq item export); 二 endap

35、= mon.ap;endfunGtiQii端口互连port是动作的发起者,export是动作接收者,但是需要以一个imp来结束。以 portf export今imp port-port-imp 也口J以 port玲imp exportfimpport玲imp用的较多,port-port-imp可以用port指针赋值来实现port-port(4.3.2章节)操作:put get/peek transport, transport 相当于一次 put+一次 getpeek和get的不同(4.3.4章节):使用uvm_tlm_analysis_fifo的时候,get任务会使fifo中 少一个tran

36、saction:而peek任务是fifo把transaction更制一份发出,内部缓存中的transaction 不会减少。一-一般情况下peek完以后,还得调get。上述操作都有阻塞和非阻塞之分。port export imp的类型也有blocking和nonblocking之分。 port/export/imp 类 型: put/get/peek/get_peek/transport blocking/nonblocking/ 不区分 blocking-nonblocking 之分imp要多一个参数,除了声明transaction类型(或者REQRSP类型)以外,还要声明实现这 个接 I

37、I 的 componentconnect 的一定是同类型的 port/export/impTLM的关键在于“与imp对应的component rh task/function的实现假设 A_port.connect(BJmp),那么需要实现的 task/function 为:A_portBJmpTask/functionFunctionuvm_blocking_put_portuvm_blocking_putjmpputnonblocking_putnonblocking_putjmptry_put can_putputputputtry_put can_putblocking_transpo

38、rtblocking_transporttransportnonblocking_transportnonblocking_transportnb_transporttransporttransporttransportnb_transportget_peekget_peekget peektry_getcan_gettry_peek can_peekget/peek/get_peek和put类似,上述task或function必须要实现,如果用不到就写个空函 数(章节429)。注意 上述task或者function的参数 put是一个transaction参数,get/peek是output

39、的 transaction 参数,transport 是一个 req 参数一个 output 的 rsq 参数。连接用connect函数实现,从名字就可以看出来,这个必须在connect_phase中调。通信方式这节应该是本章重点。 实际使用中用analysis-portanalysisjmp还是 port玲tlm_analysis_fifoport可以根据实际情况自己决定。analysis_port(analysis_export)可以连接多个 imp (一对多的通信) put 和 get 系歹 端口与相应imp的通信通常是一对一的(可以一对多,但是本书没有给出一对多的例子4.2.1 章节有

40、介绍)oanalysis_port(analysis_export)更像是一个广播analysis_port(analysis_export)没有阻塞和非阻塞的概念。它是一个广播,不等与它相连 的其他端口的响应。analysis_port (analysis_export) 必须连的 imp 是 analysisjmp. analysisjmp 所在的 component 必须定义个 write 的 function注意:是 function代码示例:4.3.1示例代码的analysis-port文件夹cl=g E extend componentclase A extends uvn.con

41、pcrientu/fi_analy5is_inp ny_ transact i on B B_imp Function new string nane uvirccwiporent parent su per-. new nare parentondflinctionextern function void tuild_ptiase uvm_phr=;e ptiaseextern function void cornect-pherBe1 uvn_ns& extern Aineti on void uritoi rg_transaeticn trextern virtual task nair

42、uphsse u/n_pha=e phase I ; enciclaesrunzticn vci d & bui Ld-phaco uvw_phaoo phase super build_pha=e phase ;B_irp 二 new :, this ;endPunctionruncticn void B ccnnrct.phsse u/n_pha=e phase : super ccnnect.phaee phaee :endPunctionruncticn void B ujiitr my_tranMction truvnvlnrot B 9 r&c617e a trsns-ticri

43、t U/n_lou) tr* print1:);ondfunctian136k B nairuphaee u7n_phaee phaseendtaskuvm_ansl y=i s.port ny_transaction R_ 中 furiction ririg. nwe uvn.conponerit parent 卬3 nsne parent ondruneticnextern rurcticri void build.pn5rse uvn_ftiase。用e extern virtual t匕(n=in_phd8e uvwcprase pha- endelassfunction void A

44、 buiia_phaee u/n_phaee phase super build_pli=i8e phase a_2p - now( , this);cndfunct ion匕 A 3in_Qha- uvffi_pi=i8e phase ny-trsnactian tr: repeat1I beginH20t tr new t assort tr .randwiisc A_cp uritr tr ; erd -eridtskcomponent C 和 B 的代码基本一致。env 的 connect_phase 函数里做 connect:Function void my.env: :connec

45、t_phase uvm_phase phase ; super . connect_phase phase ;A_inst. A_ap . connect (B_i nst.);A-inst. A_ap . connect (C_i nst. C_imp : ;2ndFunctioncomponent中有多个imp的时候,如何实现write函数?给的例子中,scoreboard 有两个 imp,分别从 output_agent 和 reference-model 的 analysis_port获取transaction然后做compare.这个时候需要用:uvm_analysis_imp_de

46、cl(_|K记)这个 macro,然后 “write”函数变成 “m6_标记()” 函数,analysis_port所在component不用变,还是调write。函数即可。代码示例如下:使用macro声明class my_scoreboard extends uvm_scoreboard;my_transaction expect_queue$;uvm_analysis_inp_rnonitoru rny_transaction, my-scoreboard) rnonitor-imp;uvm.analysis-imp.modeltt my-transact ion , ny.scorebo

47、ard made imp;、uvn_cornporiPnt-ut i 1 my_ecorpboard )write函数变名字function void my_ecorAboard : : uritp.model i my_traneaction tr*);expect-_queue . pu.sh_back : tr);end-Functionfunction void my_scoreboard ; : write_monitor ( my-transaction tr);my_transaction tmp_tran;bit result;i-P(expect_queue .size( )

48、 0) begintnp_tran = expect_queue .pop_Front();result = paretmp-tran);i?(result) beginsuvm-inPo( my_scorpboard , Compare SUCCESSFULLY , UVM_LOkl); endanalysis_port 所在 component 实现不变。 TOC o 1-5 h z task mL|_moni tor : : main_phase (uvm_phase phase ) ;Hmy_tpansaction tr;HwhilG-( 1) begin.tr = new(tr);

49、bHcollect_one_pkt(tr).ap.write(tr);Hend.endtaskHtask my.model::main_phasQ(uvm-phase phase);my_transaction tr;my_transaction new.tr;super nain-phase phasewhilef) beginport.gettr);nsw_tr - new(new_tr copy(tr);%uvm_inPo( my-rnodel f get one transaction , copy and print it: t UVM_LOW) neuj_tr print1 i ;

50、ap write* neiu_tr);endsndtask使用 uvm_analysis_fifo(uvm_tlm_analysis_fifo)/ analysis_fifo 的本质是一块缓存+两个 imp. 用 fifo 来实现 port-fifo-port使用fif。最重要的是选好两端的port类型,然后根据选好的两端port类型,来选择fifo 上要连接的 imp/export fifo 本身实现了 write() put() get() peek()等一系列的 function/task, 在两端port所在的component中直接调就可以。连接在fifo两端的都是port,所以co

51、nnect函数的起点是两端。的示例代码:可以看到env里声明的几个fifo都是connect_phase函数中connect函数括号里的参数。i_agt.ap、o_agt.ap 和 mdl.ap 是 analysis_portmdLportx scb.exp_port 和 scb.act_port 都是 blocking_get_portclass my_env extends uvm_Rnv;my-gent i_agt;my_agent o.agt;my_modAl mdl ;my-scoreboard scbULvm_tlm_analysis-f ifo (my_ transact ion

52、) agt_scb_-f ifouvm_t 1 m_ana 1 ysis-f ifo ,(my_tr8nsacion)ifouvm_t 1 m_ana 1 ysis_f iFo 4 (my_transaction) mdl-Scb-fi-PoFunction neuJistring name = rnij-.prv , ponent parent) euppr. m=w(namp ? parent);endPuinctionvirtmal function void bui1d_phase(uvm_phase phase ;super build-phase(phase);i_agt = my

53、.agent: :type-id: :created i_agt 15 this);o.agt = my_agent:type-id::create( o_agt, this);i.agt is.activ/e = Io_agt ie_acti& = Imdl = my_model : : type_id : : create rndl , this scb 二 my_scoreboard:type-id::create(,agt_scb_-f ifo - neuj(i-Po 5 this);agt-rndl-f ifo = new( ogt.mdl.-ifo, this); mdl_scb_

54、fifo = new( rrdl_sclj_r i+o1, this);2ndfunctionextern virtual Function void connoct_phase uvm_phase phasesu.xqn_component_u.ti Is (my_env)endclassfunction void my_enz: : connect_phase uvm_phase phase );super connect-phaseiphase);i_agt ap connect(agt_mdl_Pi-Po analysis_pxport);mdl .port connect agt.m

55、dl.Pi-Po .blocking_get_export1 ;mdl .ap .connect (mdl_scb_f ifo . analysis_export1 ;scb .exp_port .connect ( mdl_5cb_f ifo . blocking_get_export);o_agt ap connect(agt_scb_f ifo .analysis.export);scb act.port .connect agt-scb-fifo blocking_get_export); 2ndfunctionfifo上有很多export,但是这些export实际都是impsrc/t

56、lml/uvm_tlm_fifo_base.svh/ The followingare aliases tothe above purt_exportuvm_put_imp uvm_put_imp竹:T, this_typebl ock mg_puit_export;u :T , this_type nonblocking_puit_ezport;/ The Followingare all aliased to the above get_pceReexport, which provides/ the superset of these interfacesuvm_get_peek_imp

57、 uvm_g9T_peek_imp uvm_get_peek_imp(T,5Tthis.type1 this_type this_typ&1bl ock mg_get_export; nonblocking_get_ezport get-export;uvm_g9T_peek_imp uvm_get_peek_ imp uvm_get_peek_impMT,MLthis_typs thi s_type this.typebl ock inpek_ezpcrt nonblocking_peek_exportpeek.export:uvm_get_peek_ impuvm_get_peek_imp

58、MT,MLthi s_typethis.typeblock ingget_peek_export; nonblocking.get_peek_export;上面连接的agt_mdl_fifo.analysis_export也是一个analysisjmp:源代码中实现如卜:src/tlml/uvm tlm fifos.svhuvm_analysisjmp #( uvm_tlm_analysis_fifo #(T) analysis_export;fifo是一个component,可以调一些函数来debug:used() is_empty() is_full() flush()fifo里缓存深度可

59、以在new的时候用第三个参数设置。问题:fifo的两端是不是一般就是analysis_port和blocking_get_port ? -感觉4.3.5章 节开始一段文字描述是这个意思。使用fifo还是imp自己来把握。各有各的好处。imp可以使用uvm_analysiS_imp_declQ/j;记)的macro,有时候会很方便。而analysis_fifo可以用for循环来操作fifo数组,也可以带来代码的简洁。imp不能在 connect和new的时候用for循环。第5章UVM验证平台的运行5.1 phase 机制所有的phase如下图:buildphaseconnectphasecnd_

60、of_claboration_phasc start_of_simulaiion_phascrun_phascpreresetphascrcsct_phasepost_rcsct_phaseprcconfigurcphascconfigurcphasepost_configurc_phasepremainphasemainphasepost_main_phascprc_shutdoun_phascshutdownphasepast shutdown phaseextract_phasecheckphasereportphasefinal_phas图军2 UVM中所有的phase中间绿色的是ta

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论