Aa  `P0PP 0p`p 0 `0pp`@  )Author AccelleraTitleSystemVerilog 3.1/draft 1Subject9PRELIMINARY draft of SystemVerilog 3.1, SUBJECT TO CHANGEH $ d HHZZ̀̀̀ff@  'd Footnote TableFootnote**/ - :;,.!? g; h TOCHeading1Heading25APIsLimitedInteractiveMaxTime SystemVerilogVCsVerilogargs*assert(vpi_data_read_isinloadlist(loadlist"assert(vpi_get(vpiDataReadLoadListassert(vpi_get(vpiTypebig_loadCollection big_scope big_scope;boolcbcbEndofCompile cbValueChange colFilterHdlcolHdlcollection_handlecollectionloadCollectiondata_busdata_write_objdatafile debuggers delieanatedesignCollection designObjdumpvarsenumextension_nameextension_version filterTypefnameftgoto implementorsinlineinstanceHandleintinteroperabilityiteratoritrloadCollection loadedObj loadedVarloadlistmin my_data_fileobj objCollection obj_handle obj_trvs_hdl object_handleobjsp_toolZ_extensionp_vpi_extension p_vpi_time p_vpi_valueprevreader_extension_ptrreader_p reader_pX reader_pYref_hs_toolZ_extensions_vpi_extension scaleunit scopetypesignal_iteratorsize_tsizeof(s_vpi_extensionsome_net some_portsome_regstrstrcmp(hstruct struct_sizestruct_version sub)scope subscopes testbenchestime_ptime_p;timelinetoolXtoolYtoolZ toolZfunctoolZfunc)(inttrvstrvsCollectiontrvsHndltrvsObjtypedef user_datavalue_p value_pointervar(s varCollection var_handle vc_trvs_hdlvctrvsCollectionversion:Versionvpi vpiAccessvpiAccessInteractivevpiAccessLimitedInteractivevpiAccessPostProcess vpiCollection vpiDataLoadedvpiDataReadAccessvpiDataReadAccessInteractivevpiDataReadAccessPostProcessvpiDataReadGotoNextVCvpiDataReadIsLoadedvpiDataReadLoadListvpiDataReadMinTimevpiDataReadTrvsGotoNextVCvpiDataReadTrvsGotoPrevVCvpiDataReadTrvsHasVCvpiDataReadTrvsHndlvpiDataReadTrvsMaxTimevpiDataReadTrvsMinTimevpiDataReadTrvsTimevpiDataWriteFileTypevpiDataWriteType vpiFullName vpiHandle vpiHasNoValuevpiHasVCvpiInExtensionvpiIsExtension vpiIsLoaded vpiMaxTime vpiMember vpiMinTimevpiNamevpiNet vpiNextVCvpiObjCollection vpiParentvpiPort vpiPrevVCvpiRegvpiTimevpiTrvsCollection vpiTrvsHasVCvpiTrvsMaxTimevpiTrvsMinTime vpiTrvsNextVC vpiTrvsObj vpiTrvsPrevVC vpiTrvsTimevpiTypevpiTypes vpi_chk_errorvpi_chk_error)(error_info_p vpi_control!vpi_control(vpiDataReadGotoNextVCvpi_control(vpiDataReadMinTimevpi_control(vpiMinTimevpi_control(vpiNextVCvpi_control(vpiTimevpi_control(vpiTrvsMinTimevpi_control(vpiTrvsNextVCvpi_control(vpiTrvsTimevpi_control(vpiType vpi_createvpi_create(vpiCollectionvpi_create(vpiObjCollectionvpi_create(vpiTrvsCollectionvpi_create(vpiTypevpi_data_addtoloadlistvpi_data_createloadlistvpi_data_isinloadlist vpi_data_read_addtolist(loadlistvpi_data_read_addtoloadlist%vpi_data_read_addtoloadlist(vpiHandlevpi_data_read_createloadlistvpi_data_read_get_timevpi_data_read_get_time(vpiTypevpi_data_read_get_versionvpi_data_read_getversionvpi_data_read_init$vpi_data_read_init(vpiDataReadAccess/vpi_data_read_init(vpiDataReadAccessPostProcessvpi_data_read_init(vpiTypevpi_data_read_isinloadlist$vpi_data_read_isinloadlist(vpiHandlevpi_data_read_jump&vpi_data_read_jump(vpiDataReadTrvsTimevpi_data_read_jump(vpiTypevpi_data_read_loadvpi_data_read_load(loadlistvpi_data_read_load(var_handlevpi_data_read_load(vpiHandlevpi_data_read_readloadlistvpi_data_read_resetloadlistvpi_data_read_unloadvpi_data_read_unload(vpiHandlevpi_data_resetloadlistvpi_data_write_begintree"vpi_data_write_begintree(vpiHandlevpi_data_write_closevpi_data_write_close(vpiHandlevpi_data_write_createscope$vpi_data_write_createscope(vpiHandlevpi_data_write_createtime#vpi_data_write_createtime(vpiHandlevpi_data_write_createupscope&vpi_data_write_createupscope(vpiHandlevpi_data_write_createvalue$vpi_data_write_createvalue(vpiHandlevpi_data_write_createvar"vpi_data_write_createvar(vpiHandlevpi_data_write_endtree vpi_data_write_endtree(vpiHandlevpi_data_write_get_versionvpi_data_write_openvpi_data_write_open(charvpi_data_write_openfilevpi_data_write_setscaleunit%vpi_data_write_setscaleunit(vpiHandle vpi_filtervpi_filter((vpiHandlevpi_filter(vpiHandlevpi_free_objectvpi_getvpi_get(vpiDataLoadedvpi_get(vpiDataReadIsLoadedvpi_get(vpiDataReadTrvsHasVCvpi_get(vpiHasNoValuevpi_get(vpiHasVCvpi_get(vpiInExtensionvpi_get(vpiIsLoadedvpi_get(vpiTrvsHasVC vpi_get_timevpi_get_time(trvsCollectionvpi_get_time(vc_trvs_hdlvpi_get_trvs_time vpi_get_valuevpi_get_value(R`'Yl<u u IIII I I IFJFLFMFOF_yFt Fv Fw Fy F F F F kKYh<t t[&t rn[tvwkL_[\m] ]]s]u]v]]]h= `)`*g ggi0kRkSrpvy  31675: H2,1.1: 29.6 Reading data( *34910: H3,1.1.1: 29.6.3 Reading an object ) H90003: TableTitle: Table291: Usage extensions to existing VPI routines, +35454: H4,1.1.1.1: 29.6.3.2 Jump Behavior / $25024: H3,1.1.1: 29.1.1 Requirements7 .46458: H3,1.1.1: 29.6.6 Time-ordered traversal: &34758: H2,1.1: 29.7 Unloading the data '44643: H3,1.1.1: 29.3.1 Traverse object@ 890473: H2,1.1: 29.9 Reading data from multiple databases* B13614: TableTitle: Table302: VPI routines added in SystemVerilog          @,H $*34910: H3,1.1.1: 29.6.3 Reading an object @,HB13614: TableTitle: Table302: VPI routines added in SystemVerilog@,H$+35454: H4,1.1.1.1: 29.6.3.2 Jump Behavior @,HH90003: TableTitle: Table291: Usage extensions to existing VPI routines@,H$*34910: H3,1.1.1: 29.6.3 Reading an object @,H$.46458: H3,1.1.1: 29.6.6 Time-ordered traversal@,H$&34758: H2,1.1: 29.7 Unloading the data@,H$'44643: H3,1.1.1: 29.3.1 Traverse object@,H$890473: H2,1.1: 29.9 Reading data from multiple databases@,H$890473: H2,1.1: 29.9 Reading data from multiple databases@,H$890473: H2,1.1: 29.9 Reading data from multiple databases$ <$curpagenum><$monthname> <$daynum>, <$year>"<$monthnum>/<$daynum>/<$shortyear>;<$monthname> <$daynum>, <$year> <$hour>:<$minute00> <$ampm>"<$monthnum>/<$daynum>/<$shortyear><$monthname> <$daynum>, <$year>"<$monthnum>/<$daynum>/<$shortyear> <$fullfilename> <$filename> <$paratext[ChapterTitle]> <$paratext[SectionTitle]> <$curpagenum> <$paranumonly[Chapter]><$paranum[Chapter]> (continued)+ (Sheet <$tblsheetnum> of <$tblsheetcount>)Heading & Page <$paratext> on page<$pagenum>Pagepage<$pagenum>See Heading & Page%See <$paratext> on page<$pagenum>. Table All7Table<$paranumonly>, <$paratext>, on page<$pagenum>Table Number & Page'Table<$paranumonly> on page<$pagenum> Draft Number (Draft 1) Draft_title7SystemVerilog 3.1, Accellera Extensions to Verilog-2001VerilogXL version #VerilogXL 1.5c <$volnum>copy2003std#SystemVerilog 3.1 <$chapnum>AnnexAnnex<$paranumonly> $paranumonly<$paranumonly>SectionSection<$paranumonly>TableTable<$paranumonly> $paratext <$paratext>FigureFigure<$paranumonly>ExampleExample<$paranumonly>$paranum<$paranumonly> (HTML Headings++A..A00hh33557@AaacceeAkkmmooArrAuuAww||~~A   AATOC<FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFGGGGGG G GGGGGGGGGGG G"G$G&G(G*G,G.G0G2G4G5G6G8G:G<G>G@GAGBGDGFGHGJGLGNGPGRGTGVGXGZG\G^G`GbGdGfGhGjGlGnGpGrGtGvGxGzG|G~GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGHHHHHH H HHHHHHHHHH H"H%H'H)H+H-H/H1H3H5H7H9H;H=H?HAHCHEHGHJHLHNHPHRHTHVHXHZH\H^H`HcHeHgHiHkHmHoHqHsHuHwHyH{H}HHHHHHHHHHHHHHHHHHHHHH%HHH*HHH*HHH*HHLHHHLF$LF7LF8F?F%F&I$ Section 30HFIFPFQ;LZ730.7.6 M30.2.2 JD30.2.1 Jr30.7.1 KpLL<=La1LL)>3>>>I>T>_>jLr!!OLr!!r !!d!!ZZLLZ`30.8 ]G!!ZdLLuA.ZrLLrLLZx!!Z!LZ!!Z!!Z!!Z!!Z!!r!!Z!!Z!!Z!!Z!!uC5uE.uG5X30.3.1 `LLuQ.uS5R)L Table302: XL1)X 2)X 4)U30.1.1 X&oX 30.3.2.1 fwLLXLp$LYuLY!L]H!!ULRs 30.7.2 Ru a)XLUR R R UUUXLLes 2)Z!!Y$!!Y%!!]I!!Y'!!Y(!!Y)L!]jLLY+!!Y0!!Y1LLY2!!Y4!!r!!ULLVLr!!r!!r!!sf&b)YLLV LV 30.7.3.2 YY5!!vzLLp,LL_t30.5 hg.pB 3)lz.sqLLV 30.7.3.1 srLLX230.7.4 gLLVVd5Lt!!Vhh..lLLt Table303: b!e!!X!LX"LLX&XULtLtt.X>LXgLt5l|5t.t.Z!uM.Z LLZLLuO5uU.ZLL_v30.4 [ LFigure 301 _wLL_x"_yuW5_ Figure 302 ]30.7.7 _L _LL_ Figure 303 \LL]LL] LL]kL]oLl<] 30.9 ]LL]LL^LuLho Table301: `LLiL`LvLLv1!!v4!!pqLLv{LeLLpy!!aSLLpz!!a[!p!!a!!a!!a!!a!!a!!a!k!!a!!bKiLc!!c!!c!NLLl4 30.7.4.3 c!c!!c!!HFFFLF-FRLFWF^LFbFcFdFeFfFrFsFzF{F|LFFFFFLFLH!H"H#H$H%H&H'H(HLI730.2 I30.1 ILv| 30.11 c!!c!!c!!c!!c!!dL#JLJ 30.7.4.1 JJJJJJJJJLMLM 30.2.2.1 J30.2.3 Jd!!K  30.2.2.2 K- 30.2.2.2.1 MKuL30.3 j..k!k!!j!!j!!k!!d!!d!!k!!m9k"!!k+!!k&!k-!!k5&c)kX!!kd!!nke!!kk!!l(Le!!eLL e!!l!kl!!M! a)M"M'&b)M(e!!e!e!!kq!!f!!f!!f!!p!!lLLg| 30.10 hLLg!!g!g!!g!g!!h !!g!!g!!g!!g!!g!!g!!g!!g!!g!!h!!!q.g!!g!!g!!g!!g!!h!h!!m3LLl30.7.5 h!!h!!iLiLLi$LiL#lLkLLk$Lk$ l-LLlLLmsLLl$$lLk$mLLk$mcLLm!Lm!!m!!m!!m!!m!!m!!m!!m!!mL!m!Lm!!m!!m!!m!!m!!m!!m!!m!!m!!pLLq.q5edF*5}seZl[W8seZX DW;3 dTo dFdH HN`@H HN`@HRHRAFootnote Hq<@`@H Hq<@`@HzHzA Single LineH'H  Footnote$H$% HH W, dH* }6F=?6 W- dN }2-F>@2- W. dN }_?F?A_? W/ d }$F@B$ W0 d P:Heading2 }HFACH W1 dH* }6GBD6 W2 dN }2-GCE2- W3 dN }_?GDF_? W4 d }$GEG$ W5 dP:HeadingRunIn }HG FHH W6 dH* }6G GI6 W7 dN }2-G HJ2- W8 dN }_?GIK_? W9 d }$ ,GJL$ , W: d P:Indented } H,GKM H,, ; dP <d Parent = UL Q=d Depth = 0 } 6,GLN 6, W> dN }2 -,GMO2 -, W? dN }_ ?,GNP_ ?, W@ d }$9GOQ$9 WA dP:Mapping Table Cell }9HGPR9H WB dP }96G!QS96 WC dN }29-G#RT29- WD dN }_9?G%SU_9? WE d }$IG'TV$IWF dP:Mapping Table Title }IHG)UWIHWG dP }I6G+VXI6WH dN }2I-G-WY2I-WI dN }_I?G/XZ_I?WJ d }$Y,G1Y[$Y,WK d P:Numbered }YH,G3Z\YH,,L dLI Md Parent = OL QNd Depth = 0 }Y6,G7[]Y6,WO dN }2Y-,G9\^2Y-,WP dN }_Y?,G;]_Y?,WQ d }$b,G= `$b,#WR e P:Numbered1 }bH,G? _abH,,#S eLI Te Parent = OL QUe Depth = 0 }b6,GC `bb6,#WV eN }2b-,GE ac2b-,#WW eN }_b?,GG bd_b?,#WX e }$GI ce$#WY eP:TableFootnote }HGK dfH#WZ eP }6GM eg6#W[ eN }2-GO fh2-#W\ eN }_?GQ gi_?#W] e }$GS hj$#W^ e P:TableTitle }HGU ikH#W_ eH* }6GW jl6#W` eN }2-GY km2-#Wa eN }_?G[ ln_?#Wb e }$G] mo$#Wc eP:Title }HG_ npH#Wd eH* }6Ga oq6#We eN }2-Gc pr2-#Wf eN }_?Ge qs_?#Wg e }$Gg rt$#Wh e C:Emphasis }HGi suH#Wi eEM }6Gk tv6#Wj eN }2-Gm uw2-#Wk eN }_?Go vx_?#Wl e }$Gq wy$#Wm eC:EquationVariables }HGs xzH#Wn eEM }6Gu y{6#Wo eN }2-Gw z|2-#Wp eN }_?Gy {}_?#Wq e }$G{ |~$#Wr eX:Heading & Page }HG} }H#Ws eHeading }6G ~6#Wt eN }2-G 2-#Wu eN }_?G _?#Wv e }$G $#Ww eX:Page }HG H#Wx eHeading }6G 6#Wy eN }2-G 2-#Wz eN }_?G _?#W{ e }$G $#W| eX:See Heading & Page }HG  H#W} e See Also }6G  6#W~ eN }2-G 2-#W eN }_?G _?#W e }$G $#W e X:Table All }HG H#W e Table All }6G 6#W eN }2-G 2-#W eN }_?G _?#W e }$G $#W eX:Table Number & Page }HG H# %Table PENumber }6G 6#W eN }2-G 2-#W  eN }_?G _?#W  e }$B G $B #W eHTML Options Table }B G B #W e }hB G hB #W e }$RG $R#W eControl }RG R#W eValue }hRHG hRH#W e Comments }$bG $b#W e Image Format }bG b#W e0001IMAGGIF GIF }hbHG hbH#W e }$rG  $r#W e!Copy Files Imported by Reference }rG !r#W eN }hrHG "hrH#W e }$G !#$#W eExport Encoding }G "$#W e ISO-8859-1 }hHG #%hH#W e }$G $&$# W eCSS Export Encoding }G %'# W e ISO-8859-1 }hHG &hH# W e }$$ G$,$$ &!WeSystem Macros }$ G$$ &!We }$ G$$ &!We }\$ G$\$ &!W e }$4hG$(-$4h&"W! e Macro Name }4hG$,.4h&"W" e Replace With }4hG$-/4h&"W# eHead }\4BG$.0\4B&"W$ e Comments }$Dh,G$/1$Dh,&#W% e StartOfDoc }Dh,G$02Dh,&#W& e }Dh,G$13Dh,,&#' % ���<$defaulttitle></P���ETITLE> }\��DB,��G�$24��\��DB,&�#W( ���e }$ph��G�$35��$ph&�$�W) ���e EndOfDoc }��ph��G�$46����ph&�$W* ���e }��ph��G�$57����ph&�$W+ ���e }\��pB��G�$68��\��pB&�$W, ���e }$��h,��G�$79��$��h,&�%�W- ���eStartOfSubDoc }����h,��G�$8:������h,&�%W. ���e }����h,��G�$9;������h,,&�%/ ���%<TITLE> ���<$defaulttitle></P���ETITLE> }\����B,��G�$:<��\����B,&�%W0 ���e }$��h��G�$;=��$��h&�&�W1 ���e EndOfSubDoc }����h��G�$<>������h&�&W2 ���e }����h��G�$=?������h&�&W3 ���e }\����B��H�$>@��\����B&�&W4 ���e }$��h,��H�$?A��$��h,&�'�W5 ���eStartOfFirstSubDoc }����h,��H�$@B������h,&�'W6 ���e }����h,��H�$AC������h,,&�'7 ���%<TITLE> ���<$defaulttitle></P���ETITLE> }\����B,��H �$BD��\����B,&�'W8 ���e }$��h��H �$CE��$��h&�(�W9 ���eEndOfFirstSubDoc }����h��H �$DF������h&�(W: ���e }����h��H�$EG������h&�(W; ���e }\����B��H�$FH��\����B&�(W< ���e }$��h,��H�$GI��$��h,&�)�W= ���eStartOfLastSubDoc }����h,��H�$HJ������h,&�)W> ���e }����h,��H�$IK������h,,&�)? ���%<TITLE> ���<$defaulttitle></P���ETITLE> }\����B,��H�$JL��\����B,&�)W@ ���e }$$��h��H�$KM��$$��h&�*�WA ���eEndOfLastSubDoc }��$��h��H�$LN����$��h&�*WB ���e }��$��h��H�$MO����$��h&�*WC ���e }\��$��B��H!�$NP��\��$��B&�*WD ���e }$:���� ��H$�$OS��$:���� &�+�WE���eCross-Reference Macros }��:���� ��H&�$������:���� &�+WF���e }D��:���� ��H(�$����D��:���� &�+WG���e }$J������H*�$PT��$J����&�,�WH ���e Macro Name }��J������H,�$SU����J����&�,WI ���e Replace With }D��J��?��H.�$TV��D��J��?&�,WJ ���e Comments }$Z������H0�$UW��$Z����&�-�WK ���eHeading }��Z������H2�$VX����Z����&�-WL ���e <$paratext> }D��Z��?��H4�$WY��D��Z��?&�-WM ���e }$j������H6�$XZ��$j����&�.�WN ���e See Also }��j������H8�$Y[����j����&�.WO ���eSee <$paratext>. }D��j��?��H:�$Z\��D��j��?&�.WP ���e }$z������H<�$[]��$z����&�/�WQ ���e Table All }��z������H>�$\^����z����&�/R ���%Table <$paranumonly>, P���E <$paratext> }D��z��?��H@�$]_��D��z��?&�/WS ���e }$������HB�$^`��$����&�0�WT ���e Table Number }��������HD�$_a��������&�0WU ���eTable <$paranumonly> }D����?��HF�$`���D����?&�0WV ���e }$$�� ��HI�'�f��$$�� )�1�WW���eGeneral Macros }v$�� ��HK�'����v$�� )�1WX���e }$�� ��HM�'����$�� )�1WY���e }2��$�� ��HO�'����2��$�� )�1WZ���e }$4ev��HQ�'bg��$4ev)�2�W[ ���e Macro Name }v4ev��HS�'fh��v4ev)�2W\ ���e Replace With }4C��HU�'gi��4C)�2W] ���eHead }2��4Q��HW�'hj��2��4Q)�2W^ ���e Comments }$Dev��HY�'ik��$Dev)�3�W_ ���e }vDev��H[�'jl��vDev)�3W` ���e }DC��H]�'km��DC)�3Wa ���e }2��DQ��H_�'ln��2��DQ)�3Wb ���e }$Z�� ��Hb�'mq��$Z�� )�4�Wc���eCharacter Macros }lZ�� ��Hd�'����lZ�� )�4Wd���e }��Z�� ��Hf�'������Z�� )�4We���e }$jH��Hh�'nr��$jH)�5�Wf ���e Character }lj����Hj�'qs��lj��)�5Wg ���e Replace With }��j?��Hl�'rt����j?)�5Wh ���e Comments }$zH��Hn�'su��$zH)�6�Wi ���e }lz����Hp�'tv��lz��)�6Wj ���e¢ }��z?��Hr�'uw����z?)�6Wk ���e }$��H��Ht�'vx��$��H)�7�Wl ���e }l������Hv�'wy��l����)�7Wm ���e© }����?��Hx�'xz������?)�7Wn ���e }$��H��Hz�'y{��$��H)�8�Wo ���e }l������H|�'z|��l����)�8Wp ���e® }����?��H~�'{}������?)�8Wq ���e }$��H��H�'|~��$��H)�9�Wr ���e }l������H�'}��l����)�9Ws ���e° }����?��H�'~�������?)�9Wt ���e }$��H��H�'��$��H)�:�Wu ���e }l������H�'���l����)�:Wv ���e-- }����?��H�'������?)�:Ww ���e }$��H��H�'��$��H)�;�Wx ���e }l������H�'��l����)�;Wy ���e- }����?��H�'������?)�;Wz ���e }$��H��H�'��$��H)�C�W{ ���e }l������H�'��l����)�CW ���e... }����?��H�'�������?)�CW ���e ��d������H��������""����������d������H�������� ��������$$h������H� ����$$h������ �����l��� $$h������H� ����$$h���������� ! ����W��@l }$h�� ��H� ���$h��  �<�W|���dHeadings Table }��h�� ��H� ������h��  �<W}���e }��h�� ��H� ������h��  �<W~���e }$Cl��H� ��$Cl �=�W ���dHeading Level }��Cu��H� ����Cu �=W� ���dParagraph Format }��CH��H� ����CH �=W ���d Comments }$Sl��H� ��$Sl �>�W ���d1 }��Su��H� ����Su �>W ���dTitle }��SH��H� ����SH �>W ���d }$il��H� ��$il �?�W ���d2 }��iu��H� ����iu �?W UTUT���d Heading1 }��iH��H� ����iH �?W ���d }${l��H� ��${l �@�W ���d3 }��{u��H� ����{u �@W  ���d Heading2 }��{H��H� ����{H �@W  ���d }$l��H� ��$l �A�W  ���d4 }��u��H� ����u �AW  ���d HeadingRunIn }��H��H� ����H �AW  ���d }$l��H�  ��$l �B�W ���d4 }��u��H� !����u �BW  ���d TableTitle }��H��H� �����H �BW ���d $$������H� ����$$����%##����l��� $$������H� ����$$�����������_'"�_dinsx} "%(,048<@DHLPSVY\_bfjnqtwz}�����d������H��������%%��������$$������H�$����$$����"(&&�����l��� $$������H�$����$$�������� ���(a%�(,048<@DHLPSVY\_ bfjnqtwz}�����d������H��������(( ��������$$������H�'����$$����%�))����l��� $$������H�'����$$�������� ����b(� bfjnqtwz}���� ���~��F� �+�����~���������>�UH��ˆ����F� *3��UH��ˆ�����22 ����l�����d������F/��������-h�������� ���~��F0� ,�.�����~���������>�Zl��d����F1� ,-0��Zl��d�����//����l��� Zl��d����F2�,����Zl��d����������.����W���e U$����F3� ,.h��U$�����11����l��� U$����F4�,����U$����������0����W���d UH��ˆ����F�����UH��ˆ����������+����W���d U$����F � +5��U$�����44 ����l��� U$����F!�����U$����������3�������d Accellera Q��d-Extensions to Verilog-2001SystemVerilog 3.1 U�w��R��F"� 3���U�w��R���gg ����l��� UH��ˆ����;�����UH��ˆ��„� ��� mm��7����UTUT���  UR���@SystemVerilog Data Read API  ��� oThis chapter extends the SystemVerilog VPI with read facilities so that the Verilog Procedural Interface (VPI) 0����hacts as an Application Programming Interface (API) for data access and tool interaction irrespective of ����rwhether the data is in memory or a persistent form such as a database, and also irrespective of the tool the user ���@is interacting with. 9UTqUL���` Motivation :��� mSystemVerilog is both a design and verification language consequently its VPI has a wealth of design and ver0����oification data access mechanisms. This makes the VPI an ideal vehicle for tool integration in order to replace ����oarcane, inefficient, and error-prone file-based data exchanges with a new mechanism for tool to tool, and user ����nto tool interface. Moreover, a single access API eases the interoperability investments for vendors and users ����nalike. Reducing interoperability barriers allows vendors to focus on tool implementation. Users, on the other ����nhand, will be able to create integrated design flows from a multitude of best-in-class offerings spanning the ��@jrealms of design and verification such as simulators, debuggers, formal, coverage or test bench tools.  9⪙���h/Requirements ���`ISystemVerilog adds several design and verification constructs including:  ���`[C data types such as � int� , � struct� , � union� , and � enum� . ���`7Advanced built-in data types such as � string� . ���`3User defined data types and corresponding methods. ���`VData types and facilities that enhance the creation and functionality of testbenches. U��� mThe access API shall be implemented by all tools as a minimal set for a standard means for user-tool or tool-0`����ntool interaction that involves SystemVerilog object data querying (reading). In other words, there is no need ����qfor a simulator to be running for this API to be in effect; it is a set of API routines that can be used for any ����yinteraction for example between a user and a waveform tool to � read�  the data stored in its database. This usage ���@#flow is shown in the figure below. k�� h4 a9=��`Data read VPI usage model U��� oOur focus in the API is the user view of access. While the API does provide varied facilities to give the user p`����tthe ability to effectively architect his or her application, it does not address the tool level efficiency concerns ����qsuch as time-based incremental load of the data, and/or predicting or learning the user access. It is left up to ����limplementors to make this as easy and seamless as possible on the user. To make this easy on tools, the API ����qprovides an initialization routine where the user specifies access type and design scope. The user should be priUH��ˆ����;� ����UH��ˆ����D66 ����l���}6pey��l]�W^��6peyX �DW<3 ���dUse ��d������Q��������== �������� UH��ˆ����Q�9����UH��ˆ��~�0���0����= �������$\Next step is to specify the elements that will be accessed. This is accomplished by calling ���ivpi_load_init()�  and specifying a scope and/or an item collection. At least one of the two (scope or 2���mcollection) needs to be specified. If both are specified then the union of all the object elements forms the ���D+entire set of objects the user may access. ���$fAccess scope: The specified scope handle, and nesting mode govern the scope that access returns. Data J���kqueries outside this scope (and its sub-scopes as governed by the nesting mode) shall return a fail in the 0���uaccess routines unless the object belongs to � access collection � described below. It can be used either in a ���zcomplementary or in an exclusive fashion to � access collection� . � NULL�  is to be passed to the collection ���D=when � access scope�  is used in an exclusive fashion. )���$gAccess collection: The specified collection stores the traverse object handles to be loaded. It can be ���{used either in a complementary or in an exclusive fashion to � access scope� . � NULL�  is to be passed to the ���DHscope when � access collection � is used in an exclusive fashion. t���$lvpi_load_init() � enables access to the objects stored in the database and can be called multiple times. ���rThe load access specification of a call remains valid until the next call is executed. This routine serves to iniΪ���Dltialize the tool load access and provides an entry point for the tool to perform data access optimizations. 9۪���d%Object selection for traverse access ���$pIn order to select an object for access, we must first obtain the object handle. This can be done using the VPI ���nroutines (that are supported in the tool being used) for traversing the HDL hierarchy and obtaining an object y���DJhandle based on the type of object relationship to another (top) handle. 7���$kAny tool that implements this read API (e.g. waveform tool) shall implement at least a basic subset of the '���mdesign navigation VPI routines that shall include � vpi_handle_by_name()�  to permit the user to get a W���qvpiHandle�  from an object name. It is left up to tool implementation to support additional design navigation "���prelationships. Therefore, if the application wishes to access similar elements from one database to another, it ���|shall use the � name�  of the object, and then call � vpi_handle_by_name()� , to get the object handle from the ���qrelevant database. This level of indirection is always safe to do when switching the database query context, and ���Dshall be guaranteed to work. us���$`It should be noted that an objects � vpiHandle�  depends on the access mode specified in ~���kvpi_load_extension()�  and the database accessed (identified by the returned extension pointer, see Sec2۩��� stion E30.9D). A handle obtained through a post process access mode (� vpiAccessPostProcess� ) from a ���xwaveform tool for example is not interchangeable � in general�  with a handle obtained through interactive access ���jmode (� vpiAccessLimitedInteractive�  or � vpiAccessInteractive� ) from a simulator. Also han���odles obtained through post process access mode of different databases are not interchangeable. This is because ���robjects, their data, and relationships in a stored database could be quite different from those in the simulation ���D&model, and those in other databases. D9ת���dOptionally loading objects C���$qAs mentioned earlier � vpi_load_init()�  allows the tool implementing the reader to load objects in a fash���rion that is invisible to the user. Optionally, if the user chooses to do their own loading at some point in time, e���vthen once the object handle is obtained they can use the VPI data load routine � vpi_load()�  with the objects "���svpiHandle�  to load the data for the specific object onto memory. Alternatively, for efficiency considerations, ���qvpi_load()�  can be called with a design object collection handle of type � vpiObjCollection� . The col"���plection must have already been created with � vpi_create()�  and the (additional) selected object handles ���sadded to the load collection using � vpi_create()�  with the created collection list passed as argument. The ���uobject(s) data is not accessible as of yet to the users read queries; a traverse handle must still be created. This ���L*is presented in Section 30.7.4. 'Z~���$lNote that loading the object means loading the object from a database into memory, or marking it for active e}���puse if it is already in the memory hierarchy. Object loading is the portion that tool implementors need to look p &���qat for efficiency considerations. Reading the data of an object, if loaded in memory, is a simple consequence of ���wthe load initialization (� vpi_load_init()� ) and/or � vpi_load()�  optionally called by the user. The API }UeT��h>�T�(��UeTU=�O�W/3 ���dTo ~U³;��X��l�X����U³;��XŚXi���p(���$k The word trace can be replaced by simulation; we use trace here for generality since a dump file can be \終(0���Dgenerated by several tools. UH��ˆ����Q� 9����UH��ˆ���\L:: ����l���}sZ)��l_�W_?��sZ))X �E�E3 ���$Create a new handle: used to ���D)- create an object (traverse) collection QW���d5- Add a (traverse) object to an existing collection. }6py)��lb�W>b��6py)X �EWX ���d vpi_create() 5 FPF��rJ�0]��5 FPF5|5|�2bool: vpiHasVC~l�@��lB�0|��~l�@��d������E��������DD �������� UH��ˆ����E�B����UH��ˆ��‚�)���)����D�������Dfmarily concerned with the API specified here, and efficiency issues are dealt with behind the scenes. 8UTUS���dExtensions to VPI enumerations H���$qThese extensions shall be appended to the contents of the � vpi_user.h � file, described in IEEE Std. 1364-G���Dv2001, Annex G. The numbers in the range�  800 - 899�  are reserved for the read data access portion of the VPI. #9^���d Object types -t���$wAll objects in VPI have a � vpiType� . This API adds a new object type for data traversal, and two other objects ���D<types for object collection and traverse object collection. F���$2/* vpiHandle type for the data traverse object */ ��D#define vpiTrvsObj 800 /* use in vpi_handle()*/ 0��L#define vpiCollection810 /* Collection of VPI handles*/ ��D#define vpiObjCollection811 /* Collection of traversable ��"design objs*/ ��DQ#define vpiTrvsCollection812 /* Collection of vpiTrvsObjs*/ ,᪜���$rThe other object types that this API references, for example to get a value at a specific time, are all the valid 쪛���utypes in the VPI that can be used as arguments in the � VPI routines for logic and strength value processing such UH���DXas � vpi_get_value(<object_handle>, <value_pointer>)� . � These types include: J���d Constants P���dNets and net arrays K���dRegs and reg arrays L���d Variables M���dMemory N���d Parameters O���d Primitives Q���d Assertions R���$|In other words, any limitation in � vpiType�  of � vpi_get_value()�  will also be reflected in this data access ���DAPI. "9���dObject properties SԪ���d2This section lists the object property VPI calls. T9窍���d Static info Z���$ /* Check */ ���/* use in vpi_get() */ pU ��<#define vpiIsLoaded 820 /* is loaded */ ��;#define vpiHasDataVC821 /* has at least one VC ��%at some point in time ��'in the database */ ��7#define vpiHasVC822 /* has VC at specific ��time */ ��8#define vpiHasNoValue823 /* has no value at ��%specific time */ ��C#define vpiBelong824 /* belong to extension */ ��� UH��ˆ����E� B����UH��ˆ���7GCC  ����l�����d������E��������GG �������� UH��ˆ����E�E����UH��ˆ��z�+���+����G����Z��� /* Access */ ��L#define vpiAccessLimitedInteractive830 /* interactive */ 0��G#define vpiAccessInteractive831 /* interactive: history */ ��DA#define vpiAccessPostProcess832 /* database*/  ���$/* Member of a collection */ G��<#define vpiMember840 /* use in vpi_iterate() */ 0���(/* Iteration on instances for loaded */ ��D@#define vpiDataLoaded850 /* use in vpi_iterate() */ X9s���d Dynamic info Yƪ���dControl constants V���$@/* Control Traverse: use in vpi_goto() for a vpiTrvsObj type */ ��6#define vpiMinTime860/* min time*/ 0⪮��6#define vpiMaxTime864/* max time*/ ��##define vpiPrevVC  868 ��"#define vpiNextVC 870 ��D5#define vpiTime 874/* time jump*/ =���$lThese properties can also be used in � vpi_get_time()�  to enhance the access efficiency. The routine ���lvpi_get_time()�  with a traverse handle argument is extended with the additional ability to get the min, 2���kmax, previous VC, and next VC times of the traverse handle; not just the current time of the handle. These ���msame control constants can then be used for both access and for moving the traverse handle where the context ���D+(get or go to) can distinguish the intent. U90���dSystem callbacks %F���$kThe access API adds no new system callbacks. The reader routines (methods) can be called whenever the user Q���D3application has control and wishes to access data. [UToU<���dVPI object type additions ~9���lTraverse object w���$iTo access the value changes of an object over time, the notion of a Value Change (VC) traverse handle is ���ladded. A value change traverse object is used to traverse and access value changes not just for the current 0S���vvalue (as calling � vpi_get_time()�  or � vpi_get_value()�  on the object handle would) but for any point ���rin time: past, present, or future. To create a value change traverse handle the routine � vpi_handle()�  is ���D,called with a � vpiTrvsObj vpiType� : y٪���$ 媉���-vpiHandle object_handle; /* design object */ 0CsP8���8vpiHandle trvsHndl = vpi_handle(/*vpiType*/vpiTrvsObj, ��D(/*vpiHandle*/ object_handle); 8���$wA traverse object exists from the time it is created until its handle is released. It is the applications responsibil���Ddity to keep a handle to the created traverse object, and to release it when it is no longer needed. ,95���dVPI Collection  K���$nIn order to read data efficiently, we may need to specify a group of objects for example when traversing data V���pwe may wish to specify a list of objects that we want to mark as targets of data traversal. To do this grouping 0=ܹr���xwe need the notion of a � collection� . A collection represents a user-defined collection of VPI handles. The col���xlection is an ordered list of VPI handles. The � vpiType�  of a collection handle can be � vpiCollection� , B���D7vpiObjCollection� , or � vpiTrvsCollection� : UH��ˆ����E� E����UH��ˆ���DJFF ����l�����d������E��������JJ �������� UH��ˆ����E�H����UH��ˆ��u�/���/����J����x���dlA collection of type � vpiCollection�  is a general collection of VPI handles of objects of any type. ���$vThe collection object of type � vpiObjCollection�  represents a collection of VPI � traversable�  objects ���Din the design.  ���d`A � vpiTrvsCollection�  is a collection of traverse objects of type � vpiTrvsObj� . \L���d-Our usage here in the read API is of either:  ]���$mCollections of traversable design objects: Used for example in � vpi_handle()�  to create traverse hani���odles for the collection. A collection of traversable design objects is of type � vpiObjCollection�  (the iUN���Deelements can be any object type in the design except traverse objects of type � vpiTrvsObj� ).  ���$lCollections of data traverse objects: Used for example in � vpi_goto()�  to move the traverse handles ���sof all the objects in the collection (all are of type � vpiTrvsObj� ). A collection of traverse objects is a ���DvpiTrvsCollection� . ���$mThe collection contains a set of member VPI objects and can take on an arbitrary size. The collection may be ���jcreated at any time and existing objects can be added to it. The reader implementation may perform a type 0UI���pcheck on the items being added to the collection and generate an error if the item added does not belong to the ���Dallowed � vpiType� . z몛���$oThe purpose of a collection is to group design objects and permit operating on each element with a single oper���fation applied to the whole collection group. � vpi_iterate(vpiMember, <collection_handle>)�  is 0���uused to create a member iterator. � vpi_scan()�  can then be used to scan the iterator for the elements of the ���D collection. u!���$}A collection object is created with � vpi_create()� . The first call provides � NULL�  handles to the collection ,���oobject and the object to be added. Following calls, which can be performed at any time, provide the collection ���Djhandle and a handle to the object for addition. The return argument is a handle to the collection object. (L���d For example: V���dvpiHandle designCollection; a���dvpiHandle designObj; '|���dvpiHandle trvsCollection; "���dvpiHandle trvsObj;  ��d9/* Create a collection of design objects*/ &���d=designCollection = vpi_create(vpiObjCollection, NULL, NULL); j��d7/* Add design object designObj into it*/ ���dNdesignCollection = vpi_create(vpiObjCollection, designCollection, designObj); !���d #��d5/* Create a collection of traverse objects*/ *���d<trvsCollection = vpi_create(vpiTrvsCollection, NULL, NULL); 6��d8/* Add traverse object trvsObj into it */ )���dItrvsCollection = vpi_create(vpiTrvsCollection, trvsCollection, trvsObj); $���$pSometimes it is necessary to filter a collection and extract a set of handles which meet, or do not meet, a spe���ucific criterion for a given collection. The function � vpi_filter()�  can be used for this purpose in the form A���Dof: ,���$HvpiHandle colFilterHdl = vpi_filter((vpiHandle) colHdl, (PLI_INT32) fil&���DterType, (PLI_INT32) flag); .;���$The first argument of � vpi_filter()� , � colHdl� , shall be the collection on which to apply the filter operation. F���The second argument, � filterType�  can be any � vpiType�  or VPI Boolean property. This argument is the criterion �S����}used for filtering the collection members. The third argument, � flag� , is a Boolean value. If set to � TRUE� , ���{vpi_filter()�  shall return a collection of handles which match the criterion indicated by � filterType� , if set ���~to � FALSE� , � vpi_filter()�  shall return a collection of handles which do not match the criterion indicated by B���DWfilterType� . The original collection passed as a first argument remains unchanged. UH��ˆ����E� H����UH��ˆ���GMII  ����l�����d������E��������MM�������� UH��ˆ����E�K����UH��ˆ��m��������M����+���$vA collection object exists from the time it is created until its handle is released. It is the applications responsi���Dbbility to keep a handle to the created collection, and to release it when it is no longer needed.  9���dOperations on collections %���$uA traverse collection can be obtained (i.e. created) from a design collection using � vpi_handle()� . The call E���Dwould take on the form of: nU���$vpiHandle objCollection; a���>/* Obtain a traverse collection from the object collection */ aUN���D.vpi_handle(vpiTrvsCollection, objCollection); o���lGThe usage of this capability is discussed in Section 930.7.78. A���$pWe define another optional method, used in the case the user wishes to directly control the data load, for load���ying data of objects in a collection: � vpi_load()� . This operation loads all the objects in the collection. It is UJ���Dqequivalent to performing a � vpi_load()�  on every single handle of the object elements in the collection. 8ê���$nWe also define a traversal method on collections of traverse handles i.e. collections of type � vpiTrvsColΪ���D2lection� . The method is � vpi_goto()� . `UTUF���dObject model diagrams b���$zA traverse object of type � vpiTrvsObj�  is related to its parent object; it is a means to access the value data of ���osaid object. An object can have several traverse objects each pointing and moving in a different way along the 0���xvalue data horizon. This is shown graphically in the model diagram below. The � traversable�  class is a represen���D1tational grouping consisting of any object that: c6���d Has a name dH���$jCan take on a value accessible with � vpi_get_value()� , the value must be variable over time (i.e. T���DKnecessitates creation of a traverse object to access the value over time). Q)j���$rThe class includes nets, net arrays, regs, reg arrays, variables, memory, primitive, primitive arrays, concurrent UH��ˆ����E� K����UH��ˆ���JPLL ����l�����d������E��������PP�������� UH��ˆ����E�N����UH��ˆ��=����00��P����)�� Lassertions, and parameters. It also includes part selects of all the design object types that can have part selects.� C f9 ���d!Model diagram of traverse object h$���$tA collection object of type � vpiObjCollection�  groups together a set of design objects Obj (of any type). A /���ttraverse collection object of type � vpiTrvsCollection�  groups together a set of traverse objects trvsObj of P!���Dtype � vpiTrvsObj� . UH��ˆ����E� N����UH��ˆ���MSOO  ����l�����d������E��������SS�������� UH��ˆ����E�Q����UH��ˆ��P����[[��S����i�� l3 j9窪���dModel diagram of collection 9UTUS���d!Usage extensions to VPI routines -���$lSeveral VPI routines, that have existed before SystemVerilog, have been extended in usage with the addition )���oof new object types and/or properties. While the extensions are fairly obvious, they are emphasized here again `���D6to turn the readers attention to the extended usage. W. L���d UH��ˆ����E� Q����UH��ˆ���PVRR ����l�����d������E��������VV�������� UH��ˆ����E�T����UH��ˆ��r���� ��;V����v/��@l8)Usage extensions to Verilog 2001 VPI routines= *UTUS���d$VPI routines added in SystemVerilog ߪ���d@This section lists all the VPI routines added in SystemVerilog. +���d S/��@lVPI routines� -�  UH��ˆ����E� T����UH��ˆ���SYUU  ����l�����d������E��������YY�������� UH��ˆ����E�W����UH��ˆ��|������'Y ����I/��@l* Reader VPI routines YUTYUS���lReading data 9q���d&Reading data is performed in 3 steps: ���dbA design object must be � selected�  for traverse access from a database (or from memory). ���$rIndicate the intent to access data. This is typically done by a � vpi_load_init()�  call as a hint from the ���ouser to the tool on which areas of the design are going to be accessed. The tool will then load the data in an 0UN���linvisible fashion to the user (for example, either right after the call, or at traverse handle creation, or ���uusage). Alternatively, if the user wishes he can (also) choose to add a specific � vpi_load()�  call (this can ���rbe done at any point in time) to load, or force the load of, a specific object or collection of objects. This can ���bbe done either instead of, or in addition to, the objects in the scope or collection specified in ���kvpi_load_init()� ). � vpi_unload()�  can be used by the user to force the tool to unload specific ���Diobjects. It should be noted that traverse handle creation will fail for unloaded objects or collections. ;����$eOnce an object is selected, and marked for load, a traverse object handle can be created and used to  ���D*traverse the design objects stored data.  ���$lAt this point the object is available for reading. The traverse object permits the data value traversal and ,���Daccess. $9D���d7VPI read initialization and load access initialization &Z���d(Selecting an object is done in 3 steps: (m���$r The first step is to initialize the read access with a call to � vpi_load_extension()�  to load the reader Py���Dextension and set: UH��ˆ����E� W����UH��ˆ���V\XX ����l�����d������E��������\\�������� UH��ˆ����E�Z����UH��ˆ��‚�/���/����\ �������$iName of the reader library to be used specified as a character string. This is either a full pathname to ���kthis library or the single filename (without path information) of this library, assuming a vendor specific 0���away of defining the location of such a library. The latter method is more portable and therefore ���erecommended. Neither the full pathname, nor the single filename shall include an extension, the name ���gof the library must be unique and the appropriate extension for the actual platform should be provided ���LTby the application loading this library More details are in Section 230.9'. 1V���$JName of the database holding the stored data or flush database in case of b���jvpiAccessPostProcess�  or � vpiAccessInteractive�  respectively; a � NULL�  can be used in 2EUP���dcase of � vpiAccessLimitedInteractive� . This is the logical name of a database, not the name ���lof a file in the file system. It is implementation dependent whether there is any relationship to an actual ���Dvon-disk object and the provided name� . � See � access mode�  below for more details on the access modes. j���dAAccess mode: The following VPI properties set the mode of access G���$`vpiAccessLimitedInteractive� : Means that the access will be done for the data stored in the ���ktool memory (e.g. simulator), the history (or future) that the tool stores is implementation dependent. If 0� ���hthe tool does not store the requested info then the querying routines shall return a fail. The database ���Dkname argument to � vpi_load_extension()�  in this mode will be ignored (even if not � NULL� ). 䪚���$dvpiAccessInteractive� : Means that the access will be done interactively. The tool will then use ���othe database specified as a flush area for its data. This mode is very similar to the � vpiAccess� Lim0"���iitedInteractive with the additional requirement that all the past history (before current time) shall be ���estored (for the specified scope/collection, see the � access scope/collection�  description of ���Dvpi_load_init()� . &���$bvpiAccessPostProcess� : Means that the access will be done through the specified database. All 2���edata queries shall return the data stored in the specified database. Data history depends on what is Ы���D;stored in the database, and can be nothing (i.e. no data). /T���$hvpi_load_extension() � can be called multiple times for different reader interface libraries (coming _���nfrom different tools), database specification, and/or read access. A call with � vpiAccessInteractive�  0ℬ���lmeans that the user is querying the data stored inside the simulator database and uses the VPI routines sup���nported by the simulator. A call with � vpiAccessPostProcess�  means that the user is accessing the data ���nstored in the database and uses the VPI services provided by the waveform tool. The application, if accessing ���hseveral databases and/or using multiple read API libraries, can use the routine � vpi_get(vpiBelong, ���Dh<vpiHandle>)�  to check whether a handle belongs to that database. The call is performed as follows: s���d7reader_extension_ptr->vpi_get(vpiBelong, <vpiHandle>); =���$[where � reader_extension_ptr�  is the reader library pointer returned by the call to ˪���zvpi_load_extension()� . � TRUE�  is returned if the passed handle belongs to that extension, and � FALSE�  2g���wotherwise. If the application uses the built-in library (i.e. the one provided by the tool it is running under), there ���ris no need to use indirection to call the VPI routines; they can be called directly. An initial call must however ���Dpbe made to set the access mode, specify the database, and check for error indicated by a � NULL�  return. ?���d-vpi_close()�  shall be called in case of: P���$_vpiAcessLimitedInteractive�  to perform any tool cleanup. The validity of VPI handles after ���D>this call is left up to the particular reader implementation. Q0���$avpiAccessPostProcess�  or � vpiAccessInteractive�  mode to perform any tool cleanup and <���iclose the opened database. Handles obtained before the call to � vpi_close()�  are no longer valid W7���Dafter this call. ^���$lMultiple databases, possibly in different access modes (for example a simulator database opened in � vpii~���kAccessInteractive�  and a database opened in � vpiAccessPostProcess� , or two different databases rÇ��� wopened in � vpiAccessPostProcess� ) can be accessed at the same time. Section B30.9A shows an example of ���DOhow to access multiple databases from multiple read interfaces simultaneously. UH��ˆ����E� Z����UH��ˆ���Y=[[  ����l��� h��9PZ�F��r�0@1��h��9PZ�Fh��D��h��D���,�}szZ)��u@�W8_��szZ))X �G�l3 ���$4Perform any tool cleanup. Close database (if opened ���4in � vpiAccessPostProcess�  or � vpiAccessR���DInteractive � mode). }6pzy)��uB�W^>��6pzy)X �GW{ ���d vpi_close() ��d������F ��������ae��������U$����F � `�c��U$�����bb ����l��� U$����F �`����U$����������a������` Accellera Q��`-SystemVerilog 3.1Extensions to Verilog-2001 Uw��R��F� `ae��Uw��R���dd ����l��� Uw��R��F�`����Uw��R��������c����W��lT#Copyright 2003 Accellera. All rights reserved.Running H/F 4 UH��ˆ����F� `c���UH��ˆ�����ff ����l��� UH��ˆ����F�`����UH��ˆ����������e����W���d�  U�w��R��F#�����U�w��R��������5����W��lTRunning H/F 4Copyright 2003 Accellera. All rights reserved.# Zw��R��F5� ,0���Zw��R���ii����l��� Zw��R��F6�,����Zw��R��������h����W��lU Running H/F 4 Copyright 2003 Accellera. All rights reserved.. #  ��d������FA��������ko��������U$����FB� j�m��U$�����ll ����l��� U$����FC�j����U$����������k������d Accellera Q��dSystemVerilog 3.1 Uw��R��FD� jko��Uw��R���nn ����l��� Uw��R��FE�j����Uw��R��������m������lU#Copyright 2003 Accellera. All rights reserved..Running H/F 4 Q���d UH��ˆ����FF� jm���UH��ˆ�����pp ����l��� UH��ˆ����FG�j����UH��ˆ����������o����W���d ��d������FT��������rr��������UH��ˆ����FU� q����UH��ˆ�����ss����l��� UH��ˆ����FV�q����UH��ˆ����������r����W?UTUT���e ��d������FY��������uw��������UH��ˆ����FZ� t�w��UH��ˆ�����vv����l��� UH��ˆ����F[� t����UH��ˆ����������u����W���d U8I��6y��F\� tu���U8I��6y���xx����l��� U8I��6y��F]� t����U8I��6yOJ����yy��w����@�� l  i���d !h���d "UR���d #���$cAll rights reserved. No part of this document may be reproduced or distributed in any medium whatPKe���DHsoever to any third parties without prior written consent of Accellera. UBI��J��F`�t������zz�x�����h ���Fa� y�����h ���h…��d������Fh��������|��������U$����Fi� {�~��U$�����}}����l��� U$����Fj�{����U$����������|����$��d Accellera Q%��d-SystemVerilog 3.1Extensions to Verilog-2001 Uw��R��Fk� {|���Uw��R�������l��� Uw��R��Fl�{����Uw��R��������~����&��lT# Copyright 2003 Accellera. All rights reserved.!Running H/F 4" Q'���d D�;Hˆ����Fm� {~��D�;Hˆ��������l��� D�;Hˆ����Fn�{����D�;Hˆ�������������������UHˆ����Fo� {����UHˆ���������l��� UHˆ����Fp�{����UHˆ��������������W(���d UH�ˆ����Fq�{���UH�ˆ�����d������F~���������������� ��_���F� �����_����������>�D�;Hˆ����F�  � �D�;Hˆ��� � ����l��� D�;Hˆ����F�����D�;Hˆ������������������U$����F�  ��U$�����  ����l��� U$����F�����U$���������� ����)���d Accellera Q*��d-Extensions to Verilog-2001SystemVerilog 3.1 U�w��R��F�  ��U�w��R���  ����l��� U�w��R��F�����U�w��R�������� ����+��lU#Running H/F 4$Copyright 2003 Accellera. All rights reserved..%#& Q,���d UHˆ����F�  ��UHˆ���� ����l��� UHˆ����F�����UHˆ���������� ����W-���d UH�ˆ����F� ���UH�ˆ�� ��d������F����������������UH��ˆ����F� ����UH��ˆ���������l��� UH��ˆ����F�����UH��ˆ��������������W.���d ��d������H����������������HH��ˆ����H� ����HH��ˆ����������l��� HH��ˆ����H� ����HH��ˆ��� ��� ��������/��d"<$paranum><$paratext><$pagenum> 0��d#<$paranum><$paratext><$pagenum> 1��d#<$paranum><$paratext><$pagenum> 2��d#<$paranum><$paratext><$pagenum> 3Z��d$<$paranum><$paratext><$pagenum> 4b��d#<$paranum><$paratext><$pagenum> 5~��d"<$paranum><$paratext><$pagenum> 6��d"<$paranum><$paratext><$pagenum> C7���d ��d������j��������(�������� UH��ˆ����j�����UH��ˆ��|�4���4��������t��of design objects. ��/� vpiHandle scope� : Scope of the load. ��k� PLI_INT32 level� : If 0 then enables read access to scope and all its subscopes, 1 means just the ��scope. ���Related routines� : None. &��� ��� vpi_load() P���kSynopsis: � Load the data of the given object into memory for data access and traversal if object is an ���pobject handle; load the whole collection (i.e. set of objects) if passed handle is an object collection of type ���vpiObjCollection� . P���#Syntax: � vpi_load(vpiHandle h) I���Returns: � PLI_INT32� , 1 for success of loading (all) object(s) (in collection), 0 for fail of loading (any) object (in J��� collection). ��� Arguments: "��_� vpiHandle h� : Handle to a design object (of any valid type) or object collection of ��type � vpiObjCollection. ���DRelated routines� : None B˪���$ vpi_unload() Pת���kSynopsis: � Unload the given object data from (active) memory if object is an object handle, unload the 2z��� wwhole collection if passed object is a collection of type � vpiObjCollection� . See Section <30.8; for a ���description of data unloading. P���%Syntax: � vpi_unload(vpiHandle h) I���9Returns: � PLI_INT32� , 1 for success, 0 for fail. ��� Arguments: ��`� vpiHandle h� : Handle to an object or collection (of type � vpiObjCollection� ). ���DRelated routines� : None. C<���$ vpi_create() PH���BSynopsis: � Create or add to an object or traverse collection. ���BSyntax: � vpi_create(vpiType prop, vpiHandle h, vpiHandle obj) I��gReturns: � vpiHandle�  of type � vpiObjCollection�  for success, � NULL�  for fail. "��� Arguments: ��$� vpiType�  � prop� : "��Y� vpiObjCollection� : Create (or add to) object (� vpiObjCollection� ) or ��5traverse (� vpiTrvsCollection� ) collection. ��f� vpiHandle h� : Handle to a (object) traverse collection of type (� vpiObjCollection� ) ��8vpiTrvsCollection� , NULL for first call (creation) ��b� vpiHandle obj� : Handle of object to add, NULL if for first time creation of collection. ���DRelated routines� : None. DѪ���$ vpi_goto() Pݪ���iSynopsis: � Try to move to min, max or specified time. A new traverse (collection) handle is returned 2ݕ ���jpointing to the specified time. If the traverse handle (members of collection) has a VC at that time then ���mthe returned handle (members of returned collection) is updated to point to the specified time, otherwise it ���jis not updated. If the passed handle has no VC (for collection this means no VC for any object) a fail is ���jindicated, otherwise a success is indicated. In case of a jump to a specified time, and there is no value ���hchange at the specified time, then the value change traverse index of the returned (new) handle (member ��� rof returned collection) is aligned based on the jump behavior defined in Section .30.7.4.2F, and its time ���r(and the time pointer argument if passed and is non-� NULL� ) will be updated based on the aligned traverse ����point. In the case of � vpiNextVC�  or � vpiPrevVC� , the time argument, if passed and is non-� NULL�  (other���iwise it is ignored and not updated), is updated if there is a VC (for collection this means a VC for any ��>object) to the new time, otherwise the value is not updated. P���FSyntax: � vpi_goto(vpiType prop, vpiHandle obj, p_vpi_time time_p, B���PLI_INT32 *ret_code) UH��ˆ����j� ����UH��ˆ���R@  ����l��� �ɻpx}O��lC�0AA���ɻpx}O� `� `�F parameter}sZ)��uD�Wc��sZ))X �H�|3 ���$4Move traverse (collection) to min, max, or specific ���4time. Return a new traverse (collection) handle conP���D5taining all the objects that have a VC at that time. ��d������Ze��������&&��������~l�@��lD�0w��~l�@A}6py)��uF�W"��6py)X �HW} ���d vpi_goto() }sGZ��uP�W$��sGZX �I�W�3 ���dInitialize load access. }6pGy��uR�W%��6pGyX �IW ���dvpi_load_init() e,°�F��r�[ct��e,°�Fe,rVe,rV�,���d������r��������@@)��������}sZ)��ly�W$��sZ))X �K�<3 ���$7Load data (for a single design object or a collection) ���6onto memory if the user wishes to exercise this level P���Dof data load control. UH��ˆ����Zf�����UH��ˆ��|�4���4����& �������$hHow to select an object for access, in other words, marking this object as a target for access. This is ���D)where the design navigation VPI is used. N���$gHow to call � vpi_load_init()�  as a hint on the areas to be accessed, and/or optionally load an ���gobject into memory after obtaining a handle and then either loading objects individually or as a group ���Dusing the object collection. LN���dkHow to optionally iterate the design scope and the object collection to find the loaded objects if needed. Md���$lIn this section reading data is discussed. Reading an objects data means obtaining its value changes. VPI, o���qbefore this extension, had allowed a user to query a value at a specific point in time--namely the current time, 0 ���qand its access does not require the extra step of giving a load hint or actually loading the object data. We add ���mthat step here because we extend VPI with a temporal access component: The user can ask about all the values ���sin time (regardless of whether that value is available to a particular tool, or found in memory or a database, the ���kmechanism is provided) since accessing this value horizon involves a larger memory expense, and possibly a ���econsiderable access time. Lets see now how to access and traverse this value timeline of an object. ��� ���mTo access the value changes of an object over time we use a traverse object as introduced earlier in Section ��� u?30.3.1>. Several VPI routines are also added to traverse the value changes (using this new handle) back and ���nforth. This mechanism is very different from the iteration notion of VPI that returns objects related to a ���ogiven object, the traversal here can walk or jump back and forth on the value change timeline of an object. To ���qcreate a value change traverse handle the routine � vpi_handle()�  must be called in the following manner: ��� ���<vpiHandle trvsHndl = vpi_handle(vpiTrvsObj, object_handle); "��� ���lNote that the user (or tool) application can create more than one value change traverse handle for the same ���lobject, thus providing different views of the value changes. Each value change traverse handle shall have a ���omeans to have an internal index, which is used to point to its current time and value change of the place it ���spoints. In fact, the value change traversal can be done by increasing or decreasing this internal index. What this ���qindex is, and how its function is performed is left up to tools implementation; we only use it as a concept for ���Dexplanation here. 2`���$nOnce created the traverse handle can point anywhere along the timeline; its initial location is left for tool k���kimplementation. However, if the traverse object has no value changes the handle shall point to the minimum 00���|time (of the trace), so that calls to � vpi_get_time()�  can return a valid time. It is up to the user to call an ini���DLtial � vpi_goto()�  to move to the desired initial pointing location. I9���d$Traversing value changes of objects h���$uAfter getting a traverse � vpiHandle� , the application can do a forward or backward walk or jump traversal by ���Ddusing � vpi_goto()�  on a � vpiTrvsObj�  object type with the new traverse properties. [ʪ���d\Here is a sample code segment for the complete process from handle creation to traversal. :��d`p_vpi_extension reader_p;/* Pointer to VPI reader extension structure*/ ^��$SvpiHandle instanceHandle; /* Some scope object is inside*/ 0&q��BvpiHandle var_handle; /* Object handle*/ ��EvpiHandle vc_trvs_hdl; /* Traverse handle */ ���vpiHandle itr; ��@p_vpi_value value_p; /* Value storage*/ ��D=p_vpi_time time_p; /* Time storage*/ e��d9PLI_INT32 code;/* return code */ ?���d... @��dU/* Initialize the read interface: Access data from memory */ ]���dJ/* NOTE: Use built-in VPI (e.g. that of simulator application is running ! ��$!under)*/ ���Hreader_p = vpi_load_extension(NULL, NULL, vpiAccessLimitedInteractive); ���D o���d1if (reader_p == NULL) ... ; /* Not successful */ Am���d }6py)��l{�W"��6py)X �KWV ���d vpi_load() }s\Z)��uT�W'��s\Z))X �L�^3 ���$4Unload data (for a single design object or a collec���6tion) from memory if the user wishes to exercise this P���Dlevel of data load control. UH��ˆ����Zh� ����UH��ˆ���LD## ����l���}6p\y)��uV�W%���6p\y)X �LWe ���d vpi_unload() }SeT��h@�T;)��SeTU=�OW03 ���dUse }qeT��hB�T(H��qeTU=�OW13 ���d New Usage }UT[��hD�T+��UT[[U=�P�23 ���$"Create an iterator for the loaded ���objects (using 2���vpi_iterate(vpiData���DLoaded, <instance>� )). #\3���$"Create an iterator for (object or ���traverse) collections using b���vpi_iterate(vpiMember, ���D<collection>� ). }ST[��hF�T*,��ST[U=�PW3 ���dvpi_iterate() }qT[��hH�T+-��qT[=U=�P43 ���$!Add iteration types � vpiData���%Loaded�  and � vpiMember� . 23���#Extended with collection handle to ���#create a collection member element P����E iterator. }UTG��hJ�T,.��UTGU=�Q�53 ���$&Obtain a traverse (collection) handle P���D#from an object (collection) handle }STG��hL�T-/��STGU=�QW6 ���d vpi_handle() }qTG��hN�T.3��qTGGU=�Q>3 ���$'Add new types � vpiTrvsObj�  and ���vpiTrvsCollection. r3���$Extended with collection handle (of ���!traversable objects) to create a ���'traverse collection from an object col���Dlection.�  W�Q����i�N�����?ۂEs�OC���� z��PZ�F��v�0]`��z��PZ�Fz����z�����H���d������c��������BB#��������}U1T=��hP�T/4��U1T=U=�S�WF3 ���dObtain a property. }S1T=��hR�T35��S1T=U=�SWG ���d vpi_get() }q1T=��hT�T46��q1T==U=�SH3 ���$#Extended with the new check proper���*ties: � vpiIsLoaded�  , � vpiHasr���!DataVC� ,�  vpiHasVC� , ���$vpiHasNoValue� , and � vpiBel���Dong. }UnT��hV�T57��UnTU=�T�WI3 ���d Get a value. }SnT��hX�T68��SnTU=�TWL ���dvpi_get_value() }qnT��hZ�T79��qnTU=�TM3 ���$#Use traverse handle as argument to P���Dget value where handle points. }UT=��h\�T8:��UT=U=�U�N3 ���$&Get time traverse (collection) handle P���D points at. }ST=��h^�T9;��ST=U=�UWO ���dvpi_get_time() }qT=��h`�T:<��qT==U=�UQ3 ���$$Use traverse (collection) handle as ���#argument to get current time where p���&handle points. Also, get the traverse ���#handle min, max, previous VC time, ���Dor next VC time. }UT)��hb�T;=��UT)U=�V�S3 ���$Free traverse handle P���D#Free (traverse) collection handle. }ST)��hd�T<>��ST)U=�VWT ���dvpi_free_object() }qT)��hf�T=C��qT))U=�V:3 ���d Use traverse handle as argument G���$$Use (traverse) collection handle as P���D argument. UH��ˆ����r�!����UH��ˆ��F��������@����DI*5'���]Returns:�  � vpiHandle�  of type � vpitrvsObj�  (� vpiObjCollection� ). ��� Arguments: ��$� vpiType�  � prop� : 2��M� vpiMinTime� : Goto the minimum time of traverse collection handle. ��M� vpiMaxTime� : Goto the maximum time of traverse collection handle. ��@� vpiTime� : Jump to the time specified in � time_p. "��/vpiNextVC� : Goto the (time of) next VC. ��3vpiPrevVC� : Goto the (time of) previous VC. ��\vpiHandle obj� : Handle to a traverse object (collection) of type � vpitrvsObj�  "��(� vpitrvsCollection� ) ��q� p_vpi_time time_p� : Pointer to a structure containing time information. Used only if � prop�  is ��5of type � vpiTime� , otherwise it is ignored. ��g� PLI_INT32 *ret_code:� Pointer to a return code indicator. It is 1 for success and 0 for fail. ���DRelated routines� : None. F���$ vpi_filter() P���sSynopsis: � Filter a general collection, a traversable object collection, or traverse collection according to a 2j���kspecific criterion. Return a collection of the handles that meet the criterion. Original collection is not ��� changed. P���CSyntax: � vpi_filter(vpiHandle h, PLI_INT32 ft, PLI_INT32 flag) I��gReturns: � vpiHandle�  of type � vpiObjCollection�  for success, � NULL�  for fail. ��� Arguments: ��n� vpiHandle h� : Handle to a collection of type � vpiCollection� , � vpiObjCollection�  or "��vpiTrvsCollection ��MPLI_INT32 ft� : Filter criterion, any vpiType or a VPI Boolean property. ��{� PLI_INT32 flag� : Flag to indicate whether to match criterion (if set to � TRUE� ), or not (if set to �  ��FALSE� ). B���DRelated routines� : None. UH��ˆ����r� !����UH��ˆ����?? ����l���}ssZG��t�TF��ssZGGU-�F�R3 ���$7For the reader extension, initialize read interface by ���1loading the appropriate reader extension library p���2(simulator, waveform, or other tool). All VPI rou���7tines defined by the reader extension library shall be ���4called by indirection through the returned pointer; ���D3only built-in VPI routines can be called directly. ��d������[��������DD�������� UH��ˆ����[�B����UH��ˆ��o�7���7����D����w���$F/* Initialize the load: Access data from simulator) memory, for scope ���$instanceHandle and its subscopes */ ���D?/* NOTE: Call marks access for all the objects in the scope */ ����d(vpi_load_init(NULL, instanceHandle, 0); t���d !���$ ���1itr = vpi_iterate(vpiVariables, instanceHandle); ���D%while (var_handle = vpi_scan(itr)) { !���$F/* Demo how to force the load, this part can be skipped in general */ ��?if (vpi_get(vpiIsLoaded, var_handle) == 0) { /* not loaded*/ ��1/* Load data: object-based load, one by one */ ��Gif (!vpi_load(var_handle)); /* Data not found !*/ ��D break; P��d} ���dO/*-- End of Demo how to force the load, this part can be skipped in general */ Y��d1/* Create a traverse handle for read queries */ !R��$3vc_trvs_hdl = vpi_handle(vpiTrvsObj, var_handle); ��/* Go to minimum time */ ��>vc_trvs_hdl = vpi_goto(vpiMinTime, vc_trvs_hdl, NULL, NULL); ��D /* Get info at the min time */ !|��$time_p->type = vpiSimTime; ��7vpi_get_time(vc_trvs_hdl, time_p); /* Minimum time */ ��vpi_printf(...); ��2vpi_get_value(vc_trvs_hdl, value_p); /* Value */ ��vpi_printf(...); ��@if (vpi_get(vpiHasDataVC, vc_trvs_hdl)) { /* Have any VCs ? */ ��D,for (;;) { /* All the elements in time */ Z��d@vc_trvs_hdl = vpi_goto(vpiNextVC, vc_trvs_hdl, NULL, &code); !B��$if (!code) { ��;/* failure (e.g. already at MaxTime or no more VCs) */ ��#break; /* cannot go further */ ��} ��D9/* Get Max time: Set bits of s_vpi_time type field */ !{��$1/* time_p->type = vpiMaxTime & vpiSimTime; */ ��,/* vpi_get_time(vc_trvs_hdl, time_p); */ ��time_p->type = vpiSimTime; ��Gvpi_get_time(vc_trvs_hdl, time_p);/* Time of VC*/ ��DFvpi_get_value(vc_trvs_hdl, value_p);/* VC data*/ !A��$} ��} ���} ���/* free handles */ ���Dvpi_free_object(...); J骪���$lThe code segment above declares an interactive access scheme, where only a limited history of values is pro���kvided by the tool (e.g. simulator). It then creates a Value Change (VC) traverse handle associated with an 0���wobject whose handle is represented by � var_handle�  but only after � vpi_load_init()�  is called. It then ���|creates a traverse handle, � vc_trvs_hdl� . With this traverse handle, it first calls � vpi_goto()�  to move to ���kthe minimum time where the value has changed. It moves the handle (internal index) to that time by calling ���vpi_goto� () with a � vpiMinTime�  argument. It then repeatedly calls � vpi_goto()�  with a�  vpiNextVC�  to "���rmove the internal index forward repeatedly until there is no value change left. � vpi_get_time()�  gets the ���qactual time where this VC is, and data is obtained by � vpi_get_value()� . The application can also choose ���rto call � vpi_goto()�  with a � time_p�  argument to automatically get the VC time instead of calling ���D8vpi_get_time()�  separately to get this information. Ka���$VThe traverse and collection handles can be freed when they are no longer needed using Rl���Dvpi_free_object()� . UH��ˆ����[ � B����UH��ˆ���&xCC  ����l���?l�@��i�0�F!�F�?l�@ }O��i�0EG!E��}O�?�?�F net array2Zl�@��i�0FHI�H�2Zl�@ H?]>}O��i�0GIIG��H?]>}OH?i3H?i3�Gtrvs obj2Zl�@��i�0HM��2Zl�@GH��d������RO��������LL�������� UH��ˆ����RP�J����UH��ˆ��z�-���-����L ����'���pdoes not specify here any memory hierarchy or caching strategy that governs the access (load or read) speed. It ���mis left up to tool implementation to choose the appropriate scheme. It is recommended that this happens in a ���DKfashion invisible to the user without requiring additional routine calls. }���$cThe API here provides the tool with the chance to prepare itself for data load and access with the ���mvpi_load_init()� . With this call, the tool can examine what objects the user wishes to access before the 2UQ���pactual read access is made. The API also provides the user the ability to force loads and unloads but it is rec���Dmommended to leave this to the tool unless there is a need for the user application to influence this aspect. >9e���d,Iterating the design for the loaded objects 3{���$oThe user shall be allowed to optionally iterate for the loaded objects in a specific instantiation scope using ���qvpi_iterate()� . This shall be accomplished by calling � vpi_iterate()�  with the appropriate reference ɪ���DMhandle, and using the property � vpiDataLoaded� . This is shown below. z���$oIterate all data read loaded objects in the design: use a � NULL � reference handle (� ref_h� ) to ���Dvpi_iterate()� , e.g., {Ī���$4itr = vpi_iterate(vpiDataLoaded, /* ref_h */ NULL); Ъ���$while (loadedObj = vpi_scan(itr)) { 0<���/* process loadedObj */ ���D} |���$iIterate all data read loaded objects in an instance: pass the appropriate instance handle as a reference ���D)handle to � vpi_iterate()� , e.g., }���$>itr = vpi_iterate(vpiDataLoaded, /* ref_h */ instanceHandle); (���$while (loadedObj = vpi_scan(itr)) { 0D���/* process loadedObj */ ���D} 49T���d7Iterating the object collection for its member objects Sj���$uThe user shall be allowed to iterate for the design objects in a design collection using � vpi_iterate()�  and u���ovpi_scan()� . This shall be accomplished by creating an iterator for the members of the collection and then B���D5use � vpi_scan()�  on the iterator handle e.g. O���$ ��6vpiHandle var_handle;/* some object*/ 0'��?vpiHandle varCollection;/* object collection*/ ��1vpiHandle Var;/* object handle*/ ��3vpiHandle itr;/* iterator handle*/ ��./* Create object collection*/ ���DvarCollection = vpi_create(� vpiObjCollection, NULL, NULL� ); ��;/* Add elements to the object collection*/ ���<varCollection = vpi_create(vpiObjCollection, varCollection, ���D var_handle); 5 ���$ R���./* Iterating a collection for its elements */ 2Ǘa��Uitr = vpi_iterate(vpiMember, varCollection);/* create iterator*/ ��Dwhile (Var = vpi_scan(itr)) {/* scan iterator*/ ���/* process Var */ ���D} @9a���l(Reading an object S8w~���d#The sections above have outlined: UH��ˆ����RR� J����UH��ˆ���=&KK  ����l���{4g5�.���i�0IN��{4g5�.��2bg5{4g5 I4ѧF��i �0MO��I4ѧF֜I4MwI4Mw� -> name MIF��i!�0NP��MIFMM�  str: vpiName )��vPFF��i"�0OQ��)��vPFF)��@6)��@6� ->time: trvs time )���F��i#�0PRv�R�)���F)��o)��o�  )��9/F��i$�0QSvQS�)��9/F)��)��� -> value )��ƀF��i%�0RTvRU�)��ƀF)��/)��/�  /OH}O��i&�0SU��/OH}O/[//[/�F vpiParent )��ס�F��i'�0TVvSV�)��ס�F)��Q{)��Q{� � )��請F��i(�0UWvUW�)��請F)��Q)��Q�* )���F��i)�0VYvVY�)���F)��v|)��v|� ���d������\��������xx�������� )���F��i*�0WZvWZ�)���F)��v|)��v|� � )�����F��i+�0YvY�)�����F)��)��� �UQ�����_�Q�����X�\L�R3���� ZG�]��_�[�]��ZG�]ZZ��~O���_�[\^��~O���Z���_�[]_����Z��������Q���_�[^a����Q������ z��PZ�F��v�01o��z��PZ�Fz����z�����H���~P���_�[_e����~P�}sZ)��uL�W?c��sZ))X �N�Z ���$1Filter a collection and extract a set of handles ���1which meet, or do not meet, a specific criterion P���Dfor a given collection. }6py)��uN�Wb��6py)X �NW] ���d vpi_filter() ��x�)��b�[gl�� ��x�) �� ���9� z��E�]��_�[ah��z��E�]z��z������~���b�[>d����~������ 6i$�F��_�[e{��6i$�F6s~6s~� � UH��ˆ����\�X����UH��ˆ��‡X�+���+��<<x����U9���l,Jump Behavior V���$}Jump behavior refers to the behavior of � vpi_goto()�  with a � vpiTime�  control constant, � vpiTrvsObj�  ���otype, and a jump time argument. The user specifies a time to which he or she would like the traverse handle to 0UR���qjump, but the specified time may or not have value changes. In that case, the traverse handle shall point to the ���D5latest VC equal to or less than the time requested. _R���$�In the example below, the whole simulation run is from tim� e 10�  to time � 65� , and a variable has value changes ]��� at time � 10� , � 15�  and � 50� . If we create a value change traverse handle associated with this variable and try to ���DFjump to a different time, the result will be determined as follows: \y���dDJump to � 12� ; traverse handle return time is � 10� . ]���dEJump to � 15� ; traverse handle return time is � 15� . ^���dEJump to � 65� ; traverse handle return time is � 50� . _���dEJump to � 30� ; traverse handle return time is � 15� . `���d:Jump to 0; traverse handle return time is � 10� . a���dEJump to � 50� ; traverse handle return time is � 50� . b骜���$mIf the jump time has a value change, then the internal index of the traverse handle will point to that time. ���DBTherefore, the return time is exactly the same as the jump time. H ���$mIf the jump time does not have a value change, and if the jump time is not less than the minimum time of the �� pwhole trace run, then the return time is aligned backward. If the jump time is less than the minimum time, 0ê���vthen the return time will be the minimum time. In case the object has � hold value semantics�  between the VCs ���wsuch as static variables, then the return of � vpi_goto()�  (with a specified time argument to jump to) is a new ���{handle pointing to that time to indicate � success� . In case the time is greater than the trace maximum time, or we ���ohave an automatic object or an assertion or any other object that does not hold its value between the VCs then ���{the return code should indicate � failure�  (and the backward time alignment is still performed). In other words the ���mtime returned by the traverse object shall never exceed the trace maximum; the maximum point in the trace is ���onot marked as a VC unless there is truly a value change at that point in time (see the example in this sub-sec���Dtion). 9���dDump off regions 5���$nWhen accessing a database, it is likely that there are gaps along the value time-line where possibly the data ���rrecording (e.g. dumping from simulator) was turned off. In this case the starting point of that interval shall be 0٪4���umarked as a VC if the object had a stored value before that time. � vpi_goto()� , whether used to jump to that ���qtime or using next VC or previous VC traversal from a point before or after respectively, shall stop at that VC. ���oCalling � vpi_get_value()�  on the traverse object pointing to that VC shall have no effect on the value ���uargument passed; the time argument will be filled with the time at that VC. � vpi_get()�  can be called in the ���nform: � vpi_get(vpiHasNoValue, <traverse handle>)�  to return � TRUE�  if the traverse handle has ���DZno value (i.e. pointing to the start of a dump off region) and � FALSE�  otherwise. :���$pThere is, of course, another VC (from no recorded value to an actual recorded value) at the end of the dump off ���rinterval, if the end exists i.e. there is additional dumping performed and data for this object exists before the 0E���oend of the trace. There are no VCs in between the two marking the beginning and end (if they exist); a move to ���D9the next VC from the start point leads to the end point. &9/���d4Sample code using object (and traverse) collections xB��dNp_vpi_extension reader;/* Pointer to reader VPI library*/ M��$GvpiHandle scope; /* Some scope we are looking at*/ PE��?vpiHandle var_handle; /* Object handle*/  ���}��b�[}T�����}��������l��b�[dq����lU������\�������n�64������ -6��\�m�p���� -6� ��PZ�F��v�0`s����PZ�F���������H��� ZQ��\�mnu���� ZQ� 2 n΋)��b�[l}��2 n΋)K2$ traversable q��PZ�F��v�0o���q��PZ�Fq����q�����H� ,x�F��v�[ ��,x�F֯,,�H���$$��\�mpv����$$���$��?H-?6��\�muw��H-?6 ���_��\�mvy�����_��E1��E1�"�UH��ˆ����\� X����UH��ˆ���Dii ����l��� ��n�_��\�mw����n�_�����"� -C�F��w%�[5��-C�F-N-N� � z��L�]��_�[h|��z��L�]z��Uz��U�� ��B�]��_�[{~����B�]��K��K�� ph}��b�[qk��ph}pp� vpiMember�����_�[|����������� J,°�F��v�[t��J,°�FJ,rVJ,rV�*� V��Iw�)��_�[~:��V��Iw�)V��RV��R�� p֐DX)p��\�my��p֐DX)ppp�? SystemVerilog e,°�F��v�[��e,°�Fe,rVe,rV�,� J,°�F��v�[��J,°�FJ,rVJ,rV�,���cZ$��\�m����cZ$ bk N<��\�m ��bk N< ��sbs6Waveform DatabaseL �F��w&�[z?�� �Fֳ [6 [6� � Zʁ�]��v�[ ��Zʁ�]Z6Z6����-���\�m ����-����-��-��u���\�m ����u����u��u8~G��v�[G��8~G $\N_��\�m ��$\N_4"VPI ��i`)p��\�m ����i`)p4��?Read _)6ޠ]��\�m ~��_)6ޠ]h׾_)User}6psyG��t�TA���6psyGU-�FWU ���dvpi_load_extension() ��d������]�������� �������� UH��ˆ����]�����UH��ˆ��‡���;���;����������?vpiHandle some_net;/* Handle of some net*/ ��?vpiHandle some_reg;/* Handle of some reg*/ 0��AvpiHandle vc_trvs_hdl1; /* Traverse handle*/ ��AvpiHandle vc_trvs_hdl2; /* Traverse handle*/ ��2vpiHandle itr; /* Iterator */ ��DCvpiHandle objCollection;/* Object collection*/ o��dFvpiHandle trvsCollection;/* Traverse collection*/ !v���$ ��BPLI_BYTE8 *data = my_database;/* database*/ ��D1p_vpi_time time_p; /* time*/ +��d4PLI_INT32 code;/* Return code*/ !J���$ ��DS/* Initialize the read interface: Post process mode, read from a database */ !_��$8/* NOTE: Uses toolX library*/ ���DDreader_p = vpi_load_extension(toolX, data, vpiAccessPostProcess); c���d y���d1if (reader_p == NULL) ... ; /* Not successful */ p���d g���d#/* Get the scope using its name */ !W���$9scope = reader_p->vpi_handle_by_name(top.m1.s1, NULL); ���/* Create object collection */ ���DobjCollection = reader_p->vpi_create(vpiObjCollection, NULL, NULL); ��� ���D4/* Add data to collection: All the nets in scope */ !b���$A/* ASSUMPTION: (waveform) tool toolX supports this navigation ��relationship */ ���,itr = reader_p->vpi_iterate(vpiNet, scope); ���/while (var_handle = reader_p->vpi_scan(itr)) { ��GobjCollection = reader_p->vpi_create(vpiObjCollection, objCollection, ��var_handle); ���} ���4/* Add data to collection: All the regs in scope */ ���H/* ASSUMPTION: (waveform) tool supports this navigation relationship */ ���,itr = reader_p->vpi_iterate(vpiReg, scope); ���/while (var_handle = reader_p->vpi_scan(itr)) { ��GobjCollection = reader_p->vpi_create(vpiObjCollection, objCollection, ��var_handle); ���} ���D aK���$L/* Initialize the load: focus only on the signals in the object collection: ���objCollection */ ���1reader_p->vpi_load_init(objCollection, NULL, 0); ��� ���*/* Demo scanning the object collection */ ���7itr = reader_p->vpi_iterate(vpiMember, objCollection); ���/while (var_handle = reader_p->vpi_scan(itr)) { ��... ���} ��� ��� ���/* Application code here */ ���some_net = ...; ���time_p = ...; ���some_reg = ...; ���.... ���;vc_trvs_hdl1 = reader_p->vpi_handle(vpiTrvsObj, some_net); ���;vc_trvs_hdl2 = reader_p->vpi_handle(vpiTrvsObj, some_reg); ���Ivc_trvs_hdl1 = reader_p->vpi_goto(vpiTime, vc_trvs_hdl1, time_p, &code); ���Ivc_trvs_hdl2 = reader_p->vpi_goto(vpiTime, vc_trvs_hdl2, time_p, &code); UH��ˆ����]� ����UH��ˆ���x  ����l�����d������e��������EE$����������d������a?��������!�������� UH��ˆ����a@�����UH��ˆ��c�6���6��������K���(/* Data querying and processing here */ ���.... 0��� ��/* free handles*/ ���D reader_p->vpi_free_object(...); ���d ���d/* close database */ ���d4reader_p->vpi_close(0, vpiAccessPostProcess, data); Th���$yThe code segment above initializes the read interface for post process read access from database � data� . It then s���creates an object collection�  objCollection�  then adds to it all the objects in � scope�  of type � vpiNet�  and I���qvpiReg�  (assuming this type of navigation is allowed in the tool). Load access is initialized and set to the "���objects listed in � objCollection� . � objCollection�  can be iterated using � vpi_iterate(� ) to create the ���witerator and then using � vpi_scan()�  to scan it assuming here that the waveform tool provides this navigation. ���pThe application code is then free to obtain traverse handles for the objects, and perform its querying and data ���Dprocessing as it desires. ���$jThe code segment below shows a simple code segment that mimics the function of a $dumpvars call to access ʪ���Qdata of all the regs in a specific scope and its subscopes and process the data. ���D ��dIp_vpi_extension reader_p;/* Reader library pointer*/ `��$KvpiHandle big_scope; /* Some scope we are looking at*/ 0j��?vpiHandle obj_handle; /* Object handle*/ ��AvpiHandle obj_trvs_hdl; /* Traverse handle*/ ��HvpiHandle signal_iterator;/* Iterator for signals*/ ��D1p_vpi_time time_p; /* time*/ !���$ ��W/* Initialize the read interface: Access data from simulator*/ ���DJ/* NOTE: Use built-in VPI (e.g. that of simulator application is running !l��$ under*/ ���DHreader_p = vpi_load_extension(NULL, NULL, vpiAccessLimitedInteractive); !����$ ���1if (reader_p == NULL) ... ; /* Not successful */ ���D !~���$G/* Initialize the load access: data from (simulator) memory, for scope �� big_scope and its subscopes */ ���#/* NOTE: Call marks load access */ ���#vpi_load_init(NULL, big_scope, 0); ��� ���/* Application code here */ ���D./* Obtain handle for all the regs in scope */ ���d3signal_iterator = vpi_iterate(vpiReg, big_scope); !���$ ���(/* Data querying and processing here */ ���D=while ( (obj_handle = vpi_scan(signal_iterator)) != NULL ) { ��d1assert(vpi_get(vpiType, obj_handle) == vpiReg);  ��d1/* Create a traverse handle for read queries */ ! ��$4obj_trvs_hdl = vpi_handle(vpiTrvsObj, obj_handle); ��time_p = ...; /* some time */ ��@obj_trvs_hdl = vpi_goto(vpiTime, obj_trvs_hdl, time_p, &code); ��/* Get info at time */ ��D3vpi_get_value(obj_trvs_hdl, value_p); /* Value */  ��dvpi_printf(....); a���$} ��/* free handles*/ ���Dvpi_free_object(...); UH��ˆ����aB� ����UH��ˆ��� ����l�����d������a��������"�������� UH��ˆ����a�����UH��ˆ��y�4���4��������!9���dObject-based traversal l���$mObject based traversal can be performed by creating a traverse handle for the object and then moving it back ���mand forth to the next or previous Value Change (VC) or by performing jumps in time. A traverse object handle 0UR���xfor any object in the design can be obtained by calling � vpi_handle()�  with a � vpiTrvsObj�  type, and an ��� }object � vpiHandle� . This is the method described in Section 630.7.45, and used in all the code examples thus ����Efar. mR���$nUsing this method, the traversal would be object-based because the individual object traverse handles are cre]���nated, and then the application can query the (value, time) pairs for each VC. This method works well when the ���Dedesign is being navigated and there is a need to access the (stored) data of any individual object. g9���l7Time-ordered traversal k���$mAlternatively, we may wish to do a time-ordered traversal i.e. a time-based examination of values of several ���zobjects. We can do this by using a collection. We first create a � traverse collection�  of type � vpiTrvsCollec2���rtion�  of the objects we are interested in traversing from the design object collection of type � vpiObjCol���ulection�  using � vpi_handle()�  with a � vpiTrvsCollection�  type and collection handle argument. We "���ucan then call � vpi_goto()�  on the traverse collection to move to next or previous or do jump in time for the ���vcollection as a whole. A move to next (previous) VC means move to the next (previous) � earliest�  VC among the ���nobjects in the collection; any traverse handle that does not have any VC is ignored; on return its new handle ���rpoints to the same place as its old. A jump to a specific time aligns the new returned handles of all the objects ���Doin the collection (as if we had done this object by object, but here it is done in one-shot for all elements). m���$kWe can choose to loop in time by incrementing the time, and doing a jump to those time increments. This is  ���%shown in the following code snippet. >���D p"���dvpiHandle objCollection = ...; y-���dvpiHandle trvsCollection; wDž���dp_vpi_time time_p; .���dPLI_INT32 code; r���d z���dA/* Obtain (create) traverse collection from object collection */ q���d?trvsCollection = vpi_handle(vpiTrvsCollection, objCollection); s���d,/* Loop in time: increments of 100 units */ t���d%for (i = 0; i < 1000; i = i + 100) { u��dtime_p = ...; x��d/* Go to point in time */ ��dDtrvsCollection = vpi_goto(vpiTime, trvsCollection, time_p, &code); /��d... c���d} nǪ���$oAlternatively, we may wish to get a new collection returned of all the objects that have a value change at the Ҫ���hgiven time we moved the traverse collection to. In this case � vpi_filter()�  follows the call to S���ovpi_goto()� . The latter returns a new collection with all the new traverse objects, whether they have a VC "���vor not. � vpi_filter()�  allows us to filter the members that have a VC at that time. This is shown in the code ���snippet that follows. ���D ���d... ?��dXvpiHandle rettrvsCollection; /* Collection for all the objects*/ 0aW��d\vpiHandle vctrvsCollection; /* collection for the objects with VC */ ��dFvpiHandle itr; /* collection member iterator*/ A���d... ���d//* Go to earliest next VC in the collection */ ���d0for (;;) { /* for all collection VCs in time */ D��dGrettrvsCollection = vpi_goto(vpiNextVC, trvsCollection, NULL, &code); a��$if (!code) { ��9/* failure (e.g. already at MaxTime or no more VCs) */ UH��ˆ����a� ����UH��ˆ���B  ����l��� )��(�F��i,�0ZvZ�)��(�F)��l)��l�*� )��۶F��i-�0v�)��۶F)��)���* )��JԑtF��i.�0v�)��JԑtF)��z)��z�* )��tF��i/�0vo�)��tF)��*AP)��*AP�* �  L:l�R?��i0�0��L:l�R??ol�@��i1�0 ��?ol�@ r )}O��i2�0!�� r )}O ~5 ~5�K � nets?l�@ ��i3�0 "��?l�@ EFg�@l����i4�0!#��g�@l���g�@y4g�@ @S-'}O��i5�0"$��@S-'}O@`7ĥ@`7�K traversable?D l�@��i6�0#%&�%�?D l�@ GSO}O��i7�0$&&$��GSO}OSkSk�Fprimitive array?D l�@��i8�0%'��?D l�@$%?&l�@��i9�0&()�(�?&l�@ )@}O��i:�0'))'��)@}O6�b6�b�L primitive?&l�@��i;�0(*��?&l�@'(l�@��i<�0)+,�+�l�@ E}O��i=�0*,,*��E}OـHـH�F reg arrayl�@��i>�0+-��l�@*+?_l�@��i?�0,.��?_l�@ @!;}O��i@�0-/��@!;}O@!D@!D�K � regs I+}T F��iA�0.0��I+}T F֩I#I#� * str: vpiFullName_k@@��iB�0/1��_k@@ � 눽R}O��iC�002��� 눽R}O� �T� �T�L variables_l�@��iD�0134�3�_l�@ @ HƲ"k}O��iE�02442��@ HƲ"k}O@]@]�F memory_l�@��iF�035��_l�@23c` l�@��iG�046��c` l�@ gPh F��iH�057��gPh F֓r�rr�r� concurrent assertions I4rSB&F��iI�068��I4rSB&F֜I4!I4!� -> trvs loaded I4ٹ)fF��iJ�079��I4ٹ)fF֜I4hϜI4h�  bool: vpiIsLoadedݩYDZ��iK�08;��ݩYDZ$l��b�[�<��$l }98Z!��iL�09in�i�}98Z!f}9M instances~���b�[:=��~���� Qw�)��b�[<>��Qw�)QQ�9�  N")��b�[=g�� N")Xᓹ9 objCollection \LI�F��w'�[@?�@� \LI�F֘ \V/ \V/� � \aa�F��w(�[?(??6� \aa�F֘ \l \l� � UH��ˆ����c�2����UH��ˆ��}�-���-����B����e��!break; /* cannot go further */ Y��D} f��$@vctrvsCollection = vpi_filter(rettrvsCollection, vpiHasVC, 1); ��3/* create iterator then scan the VC collection */ 0��1itr = vpi_iterate(vpiMember, vctrvsCollection); ��(while (vc_trvs1_hdl = vpi_scan(itr)) { ��/* Element has a VC */ ��DBvpi_get_value(vc_trvs1_hdl, value_p);/* VC data */ <��d&/* Do something at this VC point */ !��$... ��} ��D... >���d} iUTUT���l#:Optionally unloading the data r���$mThe implementation tool should handle unloading the unused data in a fashion invisible to the user. Managing ���lthe data caching and memory hierarchy is left to tool implementation but it should be noted that failure to ���D5unload may affect the tool performance and capacity. Qժ���$rThe user can optionally choose to call � vpi_unload()�  to unload the data from (active) memory if the user ત���D.application is done with accessing the data. s���$rCalling � vpi_unload()�  before releasing (freeing) traverse (collection) handles that are manipulating the ����mdata using � vpi_free_object()�  is not recommended practice by users; the behavior of traversal using e���yexisting�  handles is not defined here. It is left up to tool implementation to decide how best to handle this. Tools "���ushall, however, prevent creation of new traverse handles, after the call to � vpi_unload()� , by returning the ���D<appropriate fail codes in the respective creation routines. qUT?UH���lR@Reading data from multiple databases and/or different read library providers  W���$nThe VPI routine � vpi_load_extension()�  is used to load VPI extensions. Such extensions include reader b���olibraries from such tools as waveform viewers. � vpi_load_extension()�  shall return a pointer to a func���D6tion pointer structure with the following definition. 2���$typedef struct { ��DS void *user_data;     /* Attach user data here if needed         */ 7��$E /* Below this point user application MUST NOT modify any values */ ��| size_t struct_size;  /* Must be set to sizeof(s_vpi_extension)  */ 0UA��q long struct_version; /* Set to 1 for SystemVerilog 3.1a         */ ��$ PLI_BYTE8 *extension_version; ��D PLI_BYTE8 *extension_name; 9㪒��$?/* One function pointer for each of the defined VPI routines: ��S - Each function pointer has to have the correct prototype 2U@���D*/ ;��$ ... ��, PLI_INT32 (*vpi_chk_error)(error_info_p); 0�� ... ��4 PLI_INT32 (*vpi_vprintf)(PLI_BYTE8 *format, ...); ��D ... 1O���d%} s_vpi_extension, *p_vpi_extension; S0`U ���$Subsequent versions of the � s_vpi_extension�  structure shall only � extend�  it by adding members at the � end� ; UH��ˆ����c� 2����UH��ˆ���EAA ����l���}s^Z��t�T>F��s^ZU-�W�WW3 ���dTo UH��ˆ����e�����UH��ˆ��‚�6���6����E����0o���jpreviously existing entries must not be changed, removed, or re-ordered in order to preserve backward comEU���tpatability. The � struct_size�  entry allows users to perform basic sanity checks (e.g. before type casting), ���qand the � struct_version�  permits keeping track and checking the version of the � s_vpi_extension�  ���ystructure. The structure also has a � user_data�  field to give users a way to attach data to a particular load of ���D$an extension if they wish to do so. <���$|The structure shall have an entry for � every�  VPI routine; the order and synopsis of these entries within the struc���oture shall exactly match the order and synopsis of function definitions in Chapter 27 of the Verilog Standard, UQ���_IEEE Std 1364-2001. After those entries the SystemVerilog VPI routine additions for assertions ���dvpi_get_assertion_info()�  and then � vpi_register_assertion_cb()�  shall be added in that "��� order. Then all new reader routines defined in Table 0303+ shall be added in exactly the order noted in the table.�  ���sIf a particular extension does not support a specific VPI routine, then it shall still have an entry (with the cor���mrect prototype), and a dummy body that shall always have a return (consistent with the VPI prototype) to sig���nify failure (i.e. � NULL�  or � FALSE�  as the case may be). The routine call must also raise the appropriate VPI ���nerror, which can be checked by � vpi_chk_error()� , and/or automatically generate an error message in a ���D1manner consistent with the specific VPI routine. 6���$nIf tool providers want to add their own implementation extensions, those extensions must only have the effect ���of making the � s_vpi_extension�  structure � larger�  and any non-standard content must occur � after�  all the 㪧���gstandard fields. This permits applications to use the pointer to the extended structure as if it was a ���mp_vpi_extension�  pointer, yet still allow the applications to go beyond and access or call tool-specific "���ofields or routines in the extended structure. For example, a tool extended � s_vpi_extension�  could be: ���D =���dtypedef struct { >��d9/* inline a copy of s_vpi_extension */ @��d/* begin*/ A��dvoid *user_data; B��d... C��d/* end*/ D��dF/* toolZ extension with one additional routine */ E��dint (*toolZfunc)(int); ?���d)} s_toolZ_extension, *p_toolZ_extension; FX���dAAn example of use of the above extended structure is as follows: Gb���$ m���Dp_vpi_extension h; H#���dp_toolZ_extension hZ; I���d J���d)h = vpi_load_extension(toolZ, <args>); K���d8if ( h && (h->struct_size >= sizeof(s_toolZ_extension)) E��d- && !(strcmp(h->extension_version, ...) L��d. && !strcmp(h->extension_name, toolZ) ) { M��dhZ = (p_toolZ_extension) h; !O��$E/* Can now use hZ to access all the VPI routines, including toolZs ��DtoolZfunc */ P��d... N���d} $���$nThe SystemVerilog tool the user application is running under is responsible for loading the appropriate exten���psion, i.e. the reader API library in the case of the read API. The extension name is used for this purpose, fol0K���mlowing a specific policy, for example, this extension name can be the name of the library to be loaded. Once ���tthe reader API library is loaded all VPI function calls that wish to use the implementation in the library shall be ���tperformed using the returned � p_vpi_extension�  pointer as an indirection to call the function pointers spec���pified in s_vpi_extension or the extended vendor specific structure as described above. Note that, as stated ear���slier, in the case the application is using the built-in routine implementation (i.e. the ones provided by the tool ���Db(e.g. simulator) it is running under) then the de-reference through the pointer is not necessary. 4^���$_Multiple databases can be opened for read � simultaneously�  by the application. After a Ri���ovpi_load_extension()�  call, a top scope handle can be created for that database to be used later to derive UH��ˆ����e� ����UH��ˆ���BLDD  ����l���}6p^y��t�TCA��6p^yU-�WWX3 ���dUse ��9Z���v�[ }����9Z����9��9}UzT��q�T)I��UzTU=�J�W3 ���dGet tools reader version }SzT��q�TH��SzTU=�JWS ���dvpi_get_vlog_info() ��d������g��������LL%�������� UH��ˆ����g�J����UH��ˆ��†�;���;����L����4Gd ���nany other handles for objects in that database. An example of multiple database access is shown below. In the ���mexample, scope1 and scope2 are the top scope handles used to point into database1 and database2 respectively ���Nand perform the processing (comparing data in the two databases for example). ���D  ��d`p_vpi_extension reader_pX;/* Pointer to reader libraryfunction struct*/ h��d`p_vpi_extension reader_pY;/* Pointer to reader libraryfunction struct*/ 1f��$TvpiHandle scope1, scope2; /* Some scope we are looking at*/ ��CvpiHandle var_handle; /* Object handle*/ ��CvpiHandle some_net;/* Handle of some net*/ ��CvpiHandle some_reg;/* Handle of some reg*/ ��EvpiHandle vc_trvs_hdl1; /* Traverse handle*/ ��EvpiHandle vc_trvs_hdl2; /* Traverse handle*/ ��6vpiHandle itr; /* Iterator */ ��DVvpiHandle objCollection1, objCollection2;/* Object collection*/ ! ��$ZvpiHandle trvsCollection1, trvsCollection2;/* Traverse collection*/ ��D1p_vpi_time time_p; /* time*/ !���$ ���D PLI_BYTE8 *data1 = database1; ���d PLI_BYTE8 *data2 = database2; !���$ ���DM/* Initialize the read interface: Post process mode, read from a database */ !a��$;/* NOTE: Use library from toolX*/ ���DFreader_pX = vpi_load_extension(toolX, data1, vpiAccessPostProcess); ���d#/* Get the scope using its name */ ��dJ/* NOTE: scope handle comes from database: data1*/ ���d;scope1 = reader_pX->vpi_handle_by_name(top.m1.s1, NULL); ���d "���dM/* Initialize the read interface: Post process mode, read from a database */ !d��$;/* NOTE: Use library from toolY*/ ���DFreader_pY = vpi_load_extension(toolY, data2, vpiAccessPostProcess); #���d#/* Get the scope using its name */ ��dJ/* NOTE: scope handle comes from database: data2*/ !���$;scope2 = reader_pY->vpi_handle_by_name(top.m1.s1, NULL); ��� ��� /* Create object collections */ ���DFobjCollection1 = reader_pX->vpi_create(vpiObjCollection, NULL, NULL); ! ���$FobjCollection2 = reader_pY->vpi_create(vpiObjCollection, NULL, NULL); ��� ���D5/* Add data to collection1: All the nets in scope1, '��ddata comes from database1 */ !���$H/* ASSUMPTION: (waveform) tool supports this navigation relationship */ ���.itr = reader_pX->vpi_iterate(vpiNet, scope1); ���0while (var_handle = reader_pX->vpi_scan(itr)) { ��JobjCollection1 = reader_pX->vpi_create(vpiObjCollection, objCollection1, ��var_handle); ���} ��� ���D4/* Add data to collection2: All the nets in scope2, (��ddata comes from database2 */ !���$H/* ASSUMPTION: (waveform) tool supports this navigation relationship */ ���.itr = reader_pY->vpi_iterate(vpiNet, scope2); ���0while (var_handle = reader_pY->vpi_scan(itr)) { ��JobjCollection2 = reader_pY->vpi_create(vpiObjCollection, objCollection2, ��var_handle); ���D} ���d a���$L/* Initialize the load: focus only on the signals in the object collection: ���objCollection */ ���D3reader_pX->vpi_load_init(objCollection1, NULL, 0); UH��ˆ����g� J����UH��ˆ���EOKK ����l�����d������g��������OO&�������� UH��ˆ����g�M����UH��ˆ���5���5����O����4���$3reader_pY->vpi_load_init(objCollection2, NULL, 0); 9��� ���'/* Demo: Scan the object collection */ ���9itr = reader_pX->vpi_iterate(vpiMember, objCollection1); 0���0while (var_handle = reader_pX->vpi_scan(itr)) { ��... ���} ���9itr = reader_pY->vpi_iterate(vpiMember, objCollection2); ���0while (var_handle = reader_pY->vpi_scan(itr)) { ��... ���} ��� ���H/* Application code here: Access Objects from database1 or database2 */ ���some_net = ...; ���time_p = ...; ���some_reg = ...; ���.... ���(/* Data querying and processing here */ ���.... ��� ��/* free handles*/ ���D!reader_pX->vpi_free_object(...); i���d!reader_pY->vpi_free_object(...); ���d g���d ���d/* close databases */  ���d6reader_pX->vpi_close(0, vpiAccessPostProcess, data1); ���d6reader_pY->vpi_close(0, vpiAccessPostProcess, data2);  UT7UT���d'VPI routines extended in SystemVerilog 7O���,Table 1301G lists the usage extensions. We repeat here the � additional extended usage�  with traverse (collection) Z���D1handles of � vpi_get_time()�  for clarity. ~j���$vpi_get_time() Pv���YSynopsis: � Retrieve the time of the object or collection of objects traverse handle. ���<Syntax: � vpi_get_time(vpiHandle obj, p_vpi_time time_p) I���9Returns: � PLI_INT32� , 1 for success, 0 for fail. ��� Arguments: "��p� vpiHandle obj� : Handle to a traverse object of type � vpiTrvsObj�  or a traverse collection of ��type � vpiTrvsCollection. ��j� p_vpi_time time_p� : Pointer to a structure containing the returned time information. There are ��several cases to consider: ��nPLI_INT32 type = ...; /* � vpiScaledRealTime� , � vpiSimTime� , or � vpiSuppressTime�  */ ��c� (time_p == type)� : Get the time of traverse object or collection. In case of collection ��greturn time only if all the members have the same time, otherwise � time_p�  is not modified. ��R(time_p == vpiMinTime & type)� : Gets the minimum time of traverse object or "��collection. ��W� (time_p == vpiMaxTime & type)� : Gets the maximum time of traverse object or ��collection. ��`� (time_p == vpiNextVC & type)� : � Gets the time where traverse handle points next. "��kReturns failure if traverse object or collection has no next VC and � time_p�  is not modified. In ��ethe case of a collection, it returns success when any traverse object in the collection has a next ��AVC,� time_p�  is updated with the smallest next VC time. ��^� (time_p == vpiPrevVC & type)� : � Gets the time where traverse handle previously B��jpoints. Returns failure if traverse object or collection has no previous VC and � time_p�  is not UH��ˆ����g� M����UH��ˆ���LRNN  ����l�����d������h��������RR'�������� UH��ˆ����h�P����UH��ˆ��…�1���1����R����~��\modified. In the case of a collection, it returns success when any traverse object in the ��`collection has a previous VC, � time_p�  is updated with the largest previous VC time. ���DRelated routines� : None. ;UTUR���d$VPI routines added in SystemVerilog dI���d>This section describes the additional VPI routines in detail. eY���$vpi_load_extension() Pe���lSynopsis� : Load specified VPI extension. The general form of this function allows for later extensions. `���mFor the reader-specific form, � initialize the reader with access mode, and specify the database if used. P��eSyntax� : � vpi_load_extension(PLI_BYTE8 *extension_name, ...) � in its general form "��7vpi_load_extension(PLI_BYTE8 *extension_name, ��PLI_BYTE8 *name, ��9vpiType mode, ...)�  for the reader extension I���9Returns: � PLI_INT32� , 1 for success, 0 for fail. ���Arguments� : "��]PLI_BYTE8�  *extension_name� : Extension name of the extension library to be loaded. ��aIn the case of the reader, this is the reader VPI library (with the supported navigation ��VPI routines). ��[� ...� : Contains all the additional arguments. For the reader extension these are: ��'� PLI_BYTE8 *name� : Database. ��vpiType�  � mode� : "��T� vpiAccessLimitedInteractive� : Access data in tool memory, with limited ��[history. The tool shall at least have the current time value, no history is required. ��`� vpiAccessInteractive� : Access data interactively. Tool shall keep value history up ��to the current time. ��M� vpiAccessPostProcess� : Access data stored in specified database. ��Q� ...� : Additional arguments if required by specific reader extensions. ���DRelated routines� : None. [9m���dVPI reader routines n���$ vpi_close() P���0Synopsis� : � Close the database if open. x���KSyntax� : � vpi_close(PLI_INT32 tool, vpiType prop, PLI_BYTE8* name) I���9Returns: � PLI_INT32� , 1 for success, 0 for fail. ���Arguments� : ��7� PLI_INT32 tool� : � 0�  for the reader. ��vpiType�  � prop� : "��L� vpiAccessPostProcess� : Access data stored in specified database. ��d� vpiAccessInteractive� : Access data interactively, database is the flush area. Tool shall ��-keep value history up to the current time. ��d� PLI_BYTE8* name� : Name of the database. This can be the logical name of a database or the ��Dactual name of the data file depending on the tool implementation. ���DRelated routines� : None. "���$ .���vpi_load_init() 2Pґ���VSynopsis� : � Initialize the load access to scope and/or collection of objects. ���JSyntax� : � vpi_load_init(vpiHandle objCollection, vpiHandle scope, ���PLI_INT32 level) I���9Returns: � PLI_INT32� , 1 for success, 0 for fail. ���Arguments� : B��g� vpiHandle objCollection:�  Object collection of type � vpiObjCollection� , a collection UH��ˆ����h� P����UH��ˆ���OQQ ����l��� \qS�F��h�[kUc�U� \qS�F֡ \|F \|F� � \+�F��h�[TZcTZ� \+�F֡ \ѡ \� � \cb%ˍF��h�[U[cU[� \cb%ˍF֡ \m \m�,-> � creation, addition \pF�F��h�[Z\cZ\� \pF�F֡ \z| \z|�,� \qKqF��h�[[]c[]� \qKqF֡ \|~ \|~�* �  vpi_create() \WY�F��h�[\^c\^� \WY�F֡ \ \� � \^-�F��h�[]_c]_� \^-�F֡ \ ӡ \ � � \�@F��h�[^`c^`� \�@F֡ \ \�,-> � filtering \F�F��h�[_ac_a� \F�F֡ \ \�,� \EUF��h�[`cc`�� \EUF֡ \> \>�* �  vpi_filter() \cb%˾��h�[a �� \cb%˾Tak3w]o��iM�0;jn;��k3w]oE.@���iN�0ik��E.@��E.@E.LEn\�i��iO�0jl��En\�i�En\EnBźFmv���iP�0km��Fmv��j2Fm H IR؊ ��iQ�0ln��H IR؊ H lH l�N vpiDataLoadedk2w]p��iR�0mo��k2w]p;i )���F��iS�0npv��)���F)��/)��/� � 2f�F��iT�0oq��2f�F2 2 � � 2<�F��iU�0pr��2<�F22� � 2f�F��iV�0qs��2f�F2 2 � � 2f�F��iW�0rt��2f�F2 2 � � 2y.f؍F��iX�0su��2y.f؍F2(2(�* max time, min time, 2YxmF��iY�0tv��2YxmF2o2o�* next VC, prev VC)����؀��iZ�0uz��)����؀Qo 50誂F��n�0y��50誂F50P50P�  D��PZ�F��n�0 ��D��PZ�FD����D�����,� 50/�F��n�0w���50/�F50&50&�*� 2A�F��il�0v{��2A�F22� � 2A�F��im�0z|��2A�F22� � 7P*EF��in�0{A��7P*EF7Ph7Ph�Hvpi_get_time()��9Q���v�[G ����9Q����9��9 QH1]��i{�m��QH1]hPQP Application" 50�vV�F��n�0y��50�vV�F50 %50 %�*���Q-6��i}�m~����Q-6���Z$ ��i�m����Z$ ���c��Z o\N_��i�m��o\N_4{1{1"VPI ��]i`)p��i�m�����]i`)p4gj��gj?Read 50/�F��n�0���50/�F50&50&�*� ��:�F��n�0����:�F��2��2�*� 5��hg`F��n�0��5��hg`F55�2bool: vpiHasDataVC D��PZ�F��n�0 ��D��PZ�FD��)��D��)���*� 2?FֱF��n�0 ��2?FֱF2I|2I|�, vpi_goto() 22��VF��n�0 ��22��VF2<2<�*next VC, prev VC 2$FcF��n�0 ��2$FcF2.|2.|�*max time, min time, ��PZ�F��n�0 x����PZ�F���������*� ��PZ�F��n�0x����PZ�F���������*� )����_LF��n�0 ��)����_LF)��!)��!�*-> control: trvs time 5Q �F��n�0��5Q �F5Q 5Q �*� 5Q J�F��n�0��5Q J�F5Q z5Q z�*� ��PZ�F��n�0����PZ�F���������*� 2��gF��n�0��2��gF2Я2Я�*bool: vpiHasNoValue )��V��PNHڻ��n�0��)��V��PNHڻ)��`X)��`X�D-> Is in extension 0Uc*L#F��n�0��0Uc*L#F0Unh0Unh�*bool: vpiBelong ;��PZ�F��n�0��;��PZ�F;�� ��;�� ���*� z��PZ�F��n�0��z��PZ�Fz����z�����*� ��PZ�F��n�0����PZ�F��������� � ��PZ�F��n�0����PZ�F���������*� )��*_F��n�0��)��*_F)��h)��h� -> has value change ��PZ�F��n�0����PZ�F��������� � 2ӹ*KEHF��n�0��2ӹ*KEHF2h2h�Hvpi_get_value� () �� 51�F��n�0���� 51�F����� � D��|PZ�F��n�0��D��|PZ�FD����D�����*� ;��PZ�F��n�0@��;��PZ�F;����;�����H�}qzT��q�TI*��qzTU=�JWR3 ���dReader version information ��9~G��v�[}!����9~G z���]��v�[ #��z���]z��4z��4�� -R.�F��v�[!$��-R.�F-]F-]F� � z��&5�]��v�[#%��z��&5�]z��/z��/�� ��6�]��v�[$&����6�]��%��%����9���v�[%'����9����9��9 V��#�)��v�[&)��V��#�)V��,8V��,8�� \{VwF��w)�[@+>�+� \{VwF֘ \ \�*-> control/time: trvs time9~���v�['*��9~��9��9 Q�)��v�[),��Q�)Q8Q8�9� \qЍF��w*�[(0>(0� \qЍF֘ \Mx \Mx�* max time, min time, $9l��v�[*-��$9l cFB)��v�[,.��cFB)Xͷc9trvsCollection��9~���v�[-/����9~����9��9 ��즲�)��v�[.2�� ��즲�) ��9 ��9�9� \hT#F��w+�[+1>+1� \hT#F֘ \N \N�* next VC, prev VC \+~CYvF��w,�[06>0�� \+~CYvF֘ \$ \$�* �  vpi_goto()��9l��v�[/3����9l ;wF)��v�[24��;wF)K;wtrvsObj p9h}��v�[35��p9h}pp� vpiMember ��Y�}��v�[4z����Y�}��9��9�� \=6b%ˍF��w-�[17?@7� \=6b%ˍF֘ \Haܘ \Ha�,-> � creation, addition \J �F��w.�[68?68� \J �F֘ \U \U�,� \L,KqF��w/�[79?79� \L,KqF֘ \W0Ҙ \W0�* �  vpi_create() \j �F��w0�[8:?8:� \j �F֘ \t5 \t5� � \oc�F��w1�[9;?9;� \oc�F֘ \y \y � � \Z<@F��w2�[:<?:<� \Z<@F֘ \ea \ea�,-> � filtering \g�F��w3�[;=?;=� \g�F֘ \r \r�,� \jA2EUF��w4�[<>?<�� \jA2EUF֘ \tؘ \t�* �  vpi_filter() \{VwX��w5�[=?�� \{VwX(1 \=6b%˾��w6�[>@�� \=6b%˾?= 8*HfF��w7�[?E��8*HfF֢8hТ8h�*-> load, unload fI��}F��w<�[@F��fI��}FֵfIfI�, vpi_load() H*@`F��w=�[EG��H*@`FִHhдHh�, vpi_unload() \,®�F��w>�[FH��\,®�F\,rT\,rT�,� ,x®�F��w?�[GI��,x®�F֦,rT,rT�H� A,®�F��w@�[HJ��A,®�FA,rTA,rT�*� \,®�F��wA�[IK��\,®�F\,rT\,rT�,� A,®�F��wB�[JL��A,®�FA,rTA,rT�,� \rTW' F��wC�[K��� \rTW' F֘ \! \!�,      vpi_get_time()�)�d�������`��Left�d�������Right�d������� Reference�d������� �����d���������HTML�d����� ��HTML�d�����  ��Headings�d����� $��HTML�d�����'��HTML�d���� �9�����d����� B�����d����� E�����d����� H�����d����� K�����d�����N�����d�����Q�����d�����T�����d�����W�����d���� � Z�����d���� � J�����d�����,��First�d�����j�� last left�d�����q�� boilerplate�d�����t�� title page�d�����{�� Index.left�d������� Index.right�d��������Cover�d��������TOC�d���� ������d���� �B�����d����� X�����d�����!�����d����� "�����d�����!#�����d�����"$2�����d�����#%�����d�����$&J�����d�����%'M�����d�����&(P�����d�����')�����d�����(�!������&�������@��@��������������������� ���������������������������Mapping Table Title������. ������@��@��������������������� ���������������������������Body������. ��� f�@��������H�U��� ������� ���������������� ���������9 $���H���l����������������������� �����D�����h����������H3,1.1.1���H3H:<$chapnum>.<n>.<n+> Body. ���� �@��@��������HQ������������ =������������� ����������SectionHeading����H:Section <$chapnum> SectionTitle. ���� �@��@��������H�Q������������ =������������� ����������SectionHeading����H:Section <$chapnum> SectionTitle. �����f�@��������������������� ������������������������� $� �H� �l� ���� ���� ���� ���� � ��� �D��� �h��� ���� ���� �Normal������. ��� f�@��������H�U���������� ���������������� ��������� $���H���l����������������������� �����D�����h����������H2,1.1���H2H:<$chapnum>.<n+> Body. ���f�@��������H�U��� ������� ���������������� ���������9 $���H���l����������������������� �����D�����h���������� H4,1.1.1.1���H4H:<$chapnum>.<n>.<n>.<n+> Body. ��� f�@��������F�E������������ ���������������� ���������9� FigureCaption����F:Figure <$chapnum><n+> FigCaptionCont. ��� f�@���������P�������������������������� ��������� $� �H� �l� ���� ���� ���� ���� � ��� �D��� �h��� ���� ���� � heading 1�����Normal. ��f�@��������L������������ ��������������������������. NumberedList2���� L:<n+>)\t�. ��� f�@���������P�������������������������� ��������� $� �H� �l� ���� ���� ���� ���� � ��� �D��� �h��� ���� ���� � heading 2�����Normal. ��� f�@���������P���������� ���������������� ��������� $� �H� �l� ���� ���� ���� ���� � ��� �D��� �h��� ���� ���� � heading 3�����Normal. �����f�@��������������������� ������������������������� $� �H� �l� ���� ���� ���� ���� � ��� �D��� �h��� ���� ���� �Default������. ���f�@���������@����������� ������������������������� $� �H� �l� ���� ���� ���� ���� � ��� �D��� �h��� ���� ���� �..�����Default. �����f�@��������������������� ����������������������������.����.�header������. �����f�@��������������������� ����������������������������.����.�footer������. ��� �f�@������������������� ������������������������� �Body������. �����f�@��������������������� ������������������������� $� �H� �l� ���� ���� ���� ���� � ��� �D��� �h��� ���� ���� � footnote text������. ���&f33f�@���������@����������� ���������������<���������� $� �H� �l� ���� ���� ���� ���� � ��� �D��� �h��� ���� ���� �.. 2�����Default. ���f�@���������@����������� ���������������� ��������� $� �H� �l� ���� ���� ���� ���� � ��� �D��� �h��� ���� ���� �caption�����Normal. �f�@��������Z�A����������� ������������������������� �� NumberedLista���� Z:<a=1>)\t NumberedList2. ���33f�@���������@����������� ���������������<���������� $� �H� �l� ���� ���� ���� ���� � ��� �D��� �h��� ���� ���� �.. 3�����Default. ��f�@���������������������� �������������������������(�.�<�.�P�.�d�.�x�.����.����.����.����.����.����.����.����.�,���.�@���.�T���.�h���.�|���.����.����.����.����.�Body.Indented.1������. �����f�@���������@����������� ���������������<���������� $� �H� �l� ���� ���� ���� ���� � ��� �D��� �h��� ���� ���� � Heading Base�����Default. ��f�@��������D������������� ��������������������������.�DashedList.indented����D:\t�. ������@��@��������������������� ����������������������������Mapping Table Title������. ��f�@��������L�A����������� ��������������������������. NumberedList1���� L:<n=1>)\tL,NumberedListb. ������@��@��������������������� ����������������������������Mapping Table Cell������. ��f�@���������������������� �������������������������(�.�<�.�P�.�d�.�x�.����.����.����.����.����.����.����.����.�,���.�@���.�T���.�h���.�|���.����.����.����.����.�Body.Indented.1������. ������@��@������������������������������������� ����������� �Mapping Table Cell������. 33�f�@��������Z������������ ��������������������������� NumberedListii���� Z:<r+>)\t�. ���f�@����������������������� �������������������������$�.�4�.�D�.�T�.�d�.�t�.����.����.����.����.����.����.����.����.����.����.�$���.�4���.�D���.�T���.�d���.�t���.����.����.����.����.����.����.�ExampleCode.Indented������. ��� �f�@������������������� ���������������� ���������Body������. ���f�@��������������������� ������������������������� �Body���������� �f�@������������������� ��������������������������Body������. ������@��@������������������������������������� ����������� �Mapping Table Cell������. �f�@��������Z������������ ������������������������� �� NumberedListb���� Z:<a+>)\t�. ��� �f�@������������������� ��������������������������Body������. ������@��@��������������������� ���������������� ����������� �Mapping Table Cell������. ���f�@��������H�U��� ������� ���������������� ���������9 $���H���l����������������������� �����D�����h���������� H5,1.1.1.1.1���H5H:<$chapnum>.<n>.<n>.<n>.<n+> Body. �����f�@������������������� �������������������������3� TableText������. �����f�@���������������������� ������������������������� $� �H� �l� ���� ���� ���� ���� � ��� �D��� �h��� ���� ���� �Normal������. �����f�@������������������� �������������������������� TableText������. �����f�@���������������������� ������������������������� $� �H� �l� ���� ���� ���� ���� � ��� �D��� �h��� ���� ���� � footnote text������. ��� �f�@������������������� ��������������������������Body������. ������@��@��������TA������������ ���������������}� ���������� TableTitle.1����T:Table<$chapnum><n=1>: Body. �����f�@��������AE������������ ���������������� ����������x.Annex.TableTitle.1����A:Table <A><n=1>T,Text. �����f�@��������AE������������ ���������������� ����������x.Annex.TableTitle����A:Table <A><n+1>T,Text. ���f�@��������D������������ ��������������������������.� DashedList����D:\t�. ��� �@��@��������SA������������ ��������������� �����������SyntaxBoxCaption.1����S:Syntax<$chapnum><n=1>Body. (���f�@�������������������� �������������������������.�.�=�.�BNF_SyntaxItem������. �����f�@�������������������� �������������������������� �� M���� CommitteeList������. ��f�@��������LA����������� ��������������������������. NumberedList1���� L:<n=1>)\tL,NumberedListb. �����f�@���������������������� ����������������������������� PageHeader.right������. ��� �@��@��������SA������������ ��������������� �����������SyntaxBoxCaption����S:Syntax<$chapnum><n+>Body. ������@��@��������TA���� ������� ���������������}� ���������� TableTitle����T:Table<$chapnum><n+>: Body. ��� f�@��������HU��� ������� ���������������� ��������� $���H���l����������������������� �����D�����h����������H3,1.1.1���H3H:<$chapnum>.<n>.<n+> Body. ����f�@��������������������� �������������������������� CellBody.X������. ��� �f�@������������������ ��������������������������Body������. ��� �f�@��������AU����������� ���������������� ����������x.Annex.H1,A.1���� A:<A>.<n+> T,Text. ������f�@���������������������� ����������������������������� PageHeader.left������. ��f�@��������L����������� ��������������������������. NumberedList2���� L:<n+>)\t�. ��f�@��������������������� �������������������������(�.�<�.�P�.�d�.�x�.����.����.����.����.����.����.����.����.�,���.�@���.�T���.�h���.�|���.����.����.����.����.�Body.Indented.1������. ����f�@��������AE����������� ���������������� ��������� $���H���l����������������������� �����D�����h����������x.Annex.H2,A.1.1���AH2A:<A>.<n>.<n+> T,Text. ����f�@������������������� ��������������������������x.Annex.normative������. �����f�@���������������������� ����������������������������� ���� PageFooter.left������. �����@��@��������AQ����������� =������������� ����������x.Annex.Heading���� A:Annex <A+> SectionTitle. ��� f�@���������D����������� ������������������������� $���H���l����������������������� �����D�����h����������Note����� P1,Normal. �����f�@���������������������� ����������������������������� ���� PageFooter.right������. ����f�@��������AE����������� ���������������� ��������� $���H���l����������������������� �����D�����h����������x.Annex.H3,A.1.1.1���AH3A:<A>.<n>.<n>.<n+> T,Text. ��� �f�@��������BE����������� �������������������������� Bibliography���� B:[B<n+>] �. ���f�@���������������������� �������������������������$�.�4�.�D�.�T�.�d�.�t�.����.����.����.����.����.����.����.����.����.����.�$���.�4���.�D���.�T���.�d���.�t���.����.����.����.����.����.����.�ExampleCode.Indented������. �����f�@���������������������� ��������������������������.� �.�0�.�@�.�P�.�`�.�p�.����.����.����.����.����.����.����.����.�����.����.� ���.�0���.�@���.�P���.�`���.�p���.����.����.����.����.����.����.� ExampleCode������. �����f�@�������������������� ��������������������������CellBody������. ���f�@��������HU��� ������� ���������������� ��������� $���H���l����������������������� �����D�����h���������� H4,1.1.1.1���H4H:<$chapnum>.<n>.<n>.<n+> Body. ���f�@��������HU��� ������� ���������������� ��������� $���H���l����������������������� �����D�����h���������� H5,1.1.1.1.1���H5H:<$chapnum>.<n>.<n>.<n>.<n+> Body. 3�����f�@������������������ ���������������� ���������� CellHeading������. ��� f�@���������T��������������������������� ���������� SectionTitle�����Body. �����f�@������������������ �������������������������� TableText������. ��f�@��������D������������ ��������������������������.�DashedList.indented����D:\t�. ��� �f�@��������AE����������� ���������������� ��������� $���H���l����������������������� �����D�����h����������x.Annex.H4,A.1.1.1.1���AH4A:<A>.<n>.<n>.<n>.<n+> T,Text. ��� �f�@��������AE����������� ���������������� ��������� $���H���l����������������������� �����D�����h����������x.Annex.H5,A.1.1.1.1.1���AH5A:<A>.<n>.<n>.<n>.<n>.<n+> T,Text. ��� f�@��������HU���������� ���������������� ��������� $���H���l����������������������� �����D�����h����������H2,1.1���H2H:<$chapnum>.<n+> Body. ��� �f�@��������HE������������ ������������������������� $���H���l����������������������� �����D�����h����������x.BNF.H2��� definition H:<n>.<n+> P1,Normal. ���f�@����������������������������������������������Footnote������. ��� �f�@��������HE������������ ������������������������� $���H���l����������������������� �����D�����h����������x.BNF.H3��� definitionH:<n>.<n>.<n+> P1,Normal. ��� �f�@��������HE������������ ������������������������� $���H���l����������������������� �����D�����h����������x.BNF.H4��� definitionH:<n>.<n>.<n>.<n+> P1,Normal. ��� �f�@��������HE������������ ������������������������� $���H���l����������������������� �����D�����h����������x.BNF.H5��� definitionH:<n>.<n>.<n>.<n>.<n+> P1,Normal. �f�@��������ZA����������� ������������������������� �� NumberedLista���� Z:<a=1>)\t NumberedList2. �f�@��������Z����������� ������������������������� �� NumberedListb���� Z:<a+>)\t�. 33�f�@��������ZA����������� ��������������������������� NumberedListi���� Z:<r=1>)\tNumberedListii. 33�f�@��������Z����������� ��������������������������� NumberedListii���� Z:<r+>)\t�. ��� �f�@��������AE������������ ���������������� ����������x.Annex.FigureTitle����A:Figure <A><n+>T,Text. ��� �f�@��������AE������������ ���������������� ����������x.Annex.FigureTitle.1����A:Figure <A><n=1>T,Text. 33�f�@��������LA����������� �������������������������33�� NumberedNote1���� L:<n=1>)\tL,NumberedListb. ��� �@��@��������EA������������ �� =������������ �����������ExampleCaption����E:Example<$chapnum><n+> Body. ��� �@��@��������EA������������ �� =������������ �����������ExampleCaption.1����E:Example<$chapnum><n=1> Body. ��� f�@��������FE������������ ���������������� ����������FigureCaption.1����F:Figure <$chapnum><n=1> FigCaptionCont. ��� f�@��������FE������������ ���������������� ���������� FigureCaption����F:Figure <$chapnum><n+> FigCaptionCont. 33�f�@��������L����������� �������������������������33�� NumberedNote2���� L:<n+>)\t�. ���� f�@���������T��������������������������� ���������� x.Annex.Title�����T,Text. ������@��@��������T�A���� ������� ���������������}� ���������/� TableTitle����T:Table<$chapnum><n+>: Body. �����@��@��������������������� �������������������������0�� A�� f�� ���� ���� ���� ���� ���� XCourier12������. �����f�@���������������������� �������������������������3 �� 6�� Q�� l�� ���� ���� ���� ���� ���� ���� )���� D���� _���� CellBody������. �����f�@������������������� ���������������� ���������6� CellHeading������. ��9X���f�@����������������������������������������������8xƨ��� Heading2T��� Chapter #��. �����f�@�������������������� ���������������� ���������9� CellHeading������. ��� �f�@������������������� ��������������������������Body������. �����5\\�@������������d��������� ���������������} ����������:�. 33�. H�. TableCell������. ����5\\�@������������d��������� ���������������}� ���������;Q�. c�. TableHead������. �����f�@���������������������� ��������������������������Table���Figure #��. �����\\�@������������d������������������������} ����������<�. 33�. H�. TabularListBody������. ]��̅\\�@��������A�Q�d�� ����������������������} ����������=]�. ���. TableTitle����A:Table <n>< ><n+>< >Body. ����f�@���������������������� ���������������� ���������� Table Heading������. �����33�@���������������������� ���������������� ���������6� LCellHeading������. ����33�@����������������������� �������������������������3� LCellBody������. �����33�@��������������������� ���������������� ���������9� CellHeading������. ����33�@���������������������� ��������������������������CellBody������. ����f�@���������������������� ������������������������� � RCellBody������. $$� �f�@��������J����������� ���������������� ����������TableTitle 1st����J:Table <n>-< >< ><n=1>. �. ������f�@���������������������� ������������������������� � Table body������. ������f�@����������������������� ����������������������������� ���� PageHeader.left������. �����f�@����������������������� ��������������������������� ���� ���� ���� PageFooter.left������. �����f�@����������������������� ����������������������������� PageHeader.right������. �����f�@����������������������� ��������������������������� ���� ���� ���� PageFooter.right������. � ��<f�@��������������������� ���������������� ���������? $�� H�� l�� ���� ���� ���� ���� ���� D���� h���� ���� P1,Normal������. ����f�@��������������������� ���������������} ����������@ $���H���l����������������������� �����D�����h���������� FL,FlushLeft������. ��� �@��@��������������������� �������������������������0�������..SectionHeadingTOC������. ������@��@��������������������� ��������������������������.�*�.�����.. H2,1.1TOC������. ��� �@��@��������������������� �����������������������������������..H1,1stLevelHeadTOC������. ������@��@��������������������� ����������������������������-�������..AT,AnnexTitleTOC������. ������@��@��������������������� �������������������������-���F���Z�������.. AH2,A.1.1TOC������. ���� �@��@��������������������� �������������������������-���F�������.. AH1,A.1TOC������. ��� �@��@��������������������� �������������������������-�������..x.Annex.HeadingTOC������. ���� �@��@��������������������� �������������������������-�������.. AN,AnnexTOC������. �� ���3��������� ������� Hyperlink ���3��������� �������footnote reference �������������� ���������� ��������������� ��������� ������������������������ ������������������������� �������vp������������������3���������� �������Heading 1 Char��������������� ������������������3 8���� ����������� �������3 8���� ����������� ������������������������ �������vp��������������� =������������ ��������� ������������������������ ������������������������ ���3�����������������Bullet1  ������������������������ ��������������>���������� ��������������>���������� ��������������� ��������� ��������������� ��������� ��������������� ��������� ������������������������ ��������������=���������� ��������������� ��������� ��������������� �������� ���������������������������������������"��������1.DELETE������������������������ BNFitalic ��������������� ��������� ������������� �������Keyword �������������� �������������� ����������� ������� BNFkeyword ��������������<��������������������������������3.FIX ����������������������� Superscript ������������������������ ��������������������Code ��������������������������������������� ��������2.DRAFT6 ��������������}� ��������� ������������������������ ��� ��������������������� ������������������������ ��������������� ��������� ����������������������� ��������������� ��������� ��������������} ���������� ��������������}� �����������������������} ������������������������} ���������������������������������� ��������������� ��������� ��������������} ���������� ��������������}� ��������� ������������������������ ��������������������������������������� ��������� ������������������������ ��������������>� ��������� ��������������=������������������������� ����������������������������������������������� ���������� �������������� ���������� ��������������>� ��������� ��������������� ������������������Z���������������Zd������Zd������Zd������Zd�����������������������d�����������d����������������Z�������Z������������������������;������������������������ ��Zd������Zd������Zd������Zd������Zd�����Zd�����Zd�����Zd��������������������Z�������Z�������Thin����Medium����Double����Thick�@���� Very Thin���� Blue Line���� Blue thick����� Blue thin����ThinGray����� .75 Weight�����1.5 pt����Weight Four Double���Weight Three Double����Weight Two Double����Weight One Double���� Weight Four��� Weight Three���� Weight Two���� Weight One��������������������� ���������0�33  �33  �33  �33  �Format A�������������d��� AbRoutine��������������H� Mapping Table����� ��������a �;8 � Lines/Title� �����������H  �H  �H  �H  �H  �Format B�33$��MҁMҁ���� �����������H �v̀ �v̀ �v̀ �v̀ �Wide���MҁMҁ� �����������H �L- � = �ȴ �v3b�3333��MҁMҁ���� �����������H �v̀ �v̀ �v̀ �v̀ �WideFN�33$ff�MҁMҁ������ �����������S �S �S �S �S � TextColumn�3333ff�MҁMҁ������ ����������O33 �O33 �O33 �O33 �O33 � TextColumnFN� �����������������������mPU ��� �Clear�33$ff�MM���������� ����������̀�̀�̀� TabularList�������������H � Mapping Table� $ff�MM����������������mPU �3 � Ruled_formal�$����������H�Z�Z�Z�Table 1�$������������ WideTable�$� ����������H �Z �Z �Z �Z � Default_Table� ���� �������������������P" �$@  ��  �dx@  �z؀  �cmdref� ���������������������YP ��� � Clear/Title� �����������s� �` �Lines��������������d�Q �?�Y�� AbRoutine��������������d��� AbRoutine�� �z��>����������������H����6����-����?������ @�� ������������������H����z�� ����!*������h����h����h����B����_�� N��+0������������������?����_�� ��13������ev����ev����C����Q������ p��4C������H����������?����)�� W��<B������l����u����H����}w��)�� DL������Z����y����}w�\��-WF������Z����y����9�� ����-=OV������T����T����T�����L�$�� �������������������$Cz�����������������������$Sz���������������� ��!�"�$qz������������#���$��%��&��'��$z��,����������(���)��*��+��,��$z������������-���.��/��0��1��$z������������2���3��4��5��6��$z������ ������7���8��9��:��;��$z������ ������< ���= ��> ��? ��@ ��$z������ ������A ���B ��C ��D ��E ��$z������ ������F ���G ��H ��I ��J ��$ z��,���� ������K ���L ��M ��N ��O ��$9z������ ������P ���Q ��R ��S ��T ��$Iz������ ������U���V��W��X��Y��$Yz��,����������Z���[��\��]��^��$bz��,����#�����_���`��a��b��c��$��z������#������d���e��f��g��h��$��z������#������i���j��k��l��m��$��z������#������n���o��p��q��r��$��z������#������s���t��u��v��w��$��z������#������x���y��z��{��|��$��z������#������}���~���������$��z������#�����������������$��z������#����������� �� �� ��$��z������#������ ��� ��������$��z�������#����������������$B���� �����#������������$R��������#��������������$b��������#�������������$r��������#��������� ��!��$�������� #������"���#��$��$���������#������% ���& ��' ��$$�� �����"&�������(!���)!�*!�+!�$4z������!#&�������,"���-"��."��/"��$Dz��,����"$&������0#���1#��2#��3#��$pz������#%&������4$���5$��6$��7$��$��z��,����$&&������8%���9%��:%��;%��$��z������%'&������<&���=&��>&��?&��$��z��,����&(&������@'���A'��B'��C'��$��z������')&������D(���E(��F(��G(��$��z��,����(*&������H)���I)��J)��K)��$$��z������)�&������L*���M*��N*��O*��$:���� �����,&�������P+���Q+�R+�$J��_������+-&�������S,���T,��U,��$Z��_������,.&������V-���W-��X-��$j��_������-/&������Y.���Z.��[.��$z��_������.0&������\/���]/��^/��$��_������/�&������_0���`0��a0��$$�� �����2)�������b1���c1�d1�e1�$4_������13)�������f2���g2��h2��i2��$D_������2�)������j3���k3��l3��m3��$Z�� �����5)�������n4���o4�p4�$j������46)�������q5���r5��s5��$z������57)������t6���u6��v6��$��������68)������w7���x7��y7��$��������79)������z8���{8��|8��$��������8:)������}9���~9��9��$��������9;)�������:���:��:��$��������:C)������;���;��;��$h�� �����= ������� <���<�<�$C)������<> �������=���=��=��$S)������=? ������>���>��>��$i)������>@ ������?���?��?��${)������?A ������@���@��@��$)������@B ������A���A��A��$)������A� ������B��� B��!B��$��������;�)������C���C��C��se}w�����GX�������D���8D��s}w)����GNX�������>E���?E��ss}wG���� W�U������AF���F��sz}w)����DEX�������^G���_G��s}w)����NKX�������H���H��sG}w����KLX�������I���I��Uz9���� OPU�������HJ���IJ��J��s}w)����HIX�������"K���$K��s\}w)����I�X������%L���'L��s}w)����EHX�������bN���cN��Ue9���� �JU�������;O���(O��)O��U9[���� JQU�������*P���+P��,P��U9G���� PSU������-Q���.Q��/Q��U19=���� QTU������3S���4S��5S��Un9���� SUU������6T���7T��8T��U9=���� TVU������9U���:U��;U��U9)���� U�U������<V���=V��>V��s^}w���� �FU������CW���FW����Comment����� �F:� �F=��I��I��I ��I ��FK��FN� �Fu�!" �Fx�#$ �F�%& �F��u�0+�t�.F�ro�1G�vx�65�] �98�]t�<;�]�?>�`(�BA �g�2' �kJ�ED �kQ�� ����d� �Black�������T!�White����dd���A�Red���dd�����Green���d�d��� �Blue���d�����Cyan�����d���Magenta����d���� �Yellow���FF������ Dark Green�����������RGB 255,255,255������d����RGB 000,000,000������22����RGB 127,127,127������Header/Footer $1Header/Footer $1Header/Footer $2Header/Footer $2IndexIndexCommentCommentSubjectSubjectAuthorAuthorGlossaryGlossaryEquationEquation Hypertext Hypertext  Cross-Ref Cross-Ref Conditional TextConditional TextPositionFMPrivatePositionFMPrivateRangeEndFMPrivateRangeEndFMPrivate HTML Macro HTML Macro�����W.Times New Roman.R.400�� FrameRoman� W.Arial.R.700�� FrameRoman� W.Arial.I.700�� FrameRoman���� FrameRomanW.Times New Roman.R.700�� FrameRoman�W.Courier.R.400�� FrameRoman�W.Courier New.R.400�� FrameRoman�W.Helvetica.R.700�� FrameRoman W.Arial.I.400�� FrameRoman�W.Helvetica.R.400�� FrameRomanW.Helvetica.I.400�� FrameRoman��� FrameRoman� W.Arial.R.400�� FrameRoman�W.Times New Roman.I.700�� FrameRoman���� FrameRoman���� FrameRoman�W.Times New Roman.I.400�� FrameRoman���� FrameRomanW.Courier.R.700�� FrameRoman���� FrameRomanW.Courier New.R.700�� FrameRoman���� FrameRoman=CourierArialTimes New Roman Courier New| Helvetica; Arial,Bold<TimesNewRomanPSMT=TimesNewRomanPS-BoldMT Regular Regular BoldRegularObliqueItalic��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� p!o蔋i-MS֓Ap'&�Y 1;~\xq r%RZP d sQ゜{K(ewY{ajA,z[x`n DJL@4iN 3/fwB՟A^_2H=_f}A*_>�dj>~OOb|Ňqk9:;4夀im z a}9eMse1W_GRarnWTLT2Ѓ8̳ 2Kk=Y3i?R],̉ڀ̽P4 rC% 㣫n m?+dGI2]9HD:ks.)cVh脆hٶx9>7HdHttOD5V3 Ȍ%Je@~�# 0ŤH,\ɰ/"-I�6@ը2Q0V�opr1s)-3WT/*$ꌦvj%?ӖQmn²c|<3V%8##D1(8PDʱ6�TGrnΊ<"DnL�<ďbY)awx$VMd*~1!fEvSYϹ f׈/o%;Zᐬ ]@\KRʗ����