AaRd uvvwwx}HH  @dHHHHff@  d Footnote TableFootnote**.\t.\t/ - :;,.!?bos4  a. bTOCHeadingHeading2S*//*CorletteDunlop FrancoiseInteroperability MartinollePattanamSathyamStdVerilog actualExpr arrayValue_sattrSpecbitValue bitValue_p bitValue_s blockInst, blockStmtboolcallback callbackscbDatap|cb_data* cb_data_pNclk5compInst compInstStmtconcconcStmt debuggersdecldeclHdludesignInstUnit eqProcessStmtfullName generateInst generateStmt genericityhParamhfcthttpinstinstP#intiteratoritrP labelDeclO latchConsumer latchElabrlatchWrk latchWrk_p latchWrk_slatchpobjHpackInstrootHdlrootInstscopeHdlscopeItstmtstrstructtypedef user_data vhpiArchBodyvhpiBeginLineNovhpiBeginSrcMkr vhpiFileName vhpiHandle vhpiImmScope vhpiInstName vhpiInstStmtvhpiInternalScopes vhpiIsForeignvhpiNamevhpiPrimaryUnit vhpiSrcMkrvhpiUpperScope vhpiValueovhpi_handle(vhpiRootInst vhpi_value_swaveform   EquationVariablesreMasGMmQ CMathDNkO ackP aroOUsoQVbikWitVkXitVpgYlocpiZlocallckap|cbb_da_coInnstmt<$lastpagenum><$monthname> <$daynum>, <$year>uNa"<$monthnum>/<$daynum>/<$shortyear>;<$monthname> <$daynum>, <$year> <$hour>:<$minute00> <$ampm> tc"<$monthnum>/<$daynum>/<$shortyear><$monthname> <$daynum>, <$year>oHd"<$monthnum>/<$daynum>/<$shortyear> <$fullfilename>rat <$filename>hBe <$paratext[Title]> <$paratext[Heading1]>hvh <$marker1> <$marker2> (Continued)vh+ (Sheet <$tblsheetnum> of <$tblsheetcount>)evhHeading & Page <$paratext> on page<$pagenum>Pagepage<$pagenum>See Heading & Page%See <$paratext> on page<$pagenum>. Table & Page7Table<$paranumonly>, <$paratext>, on page<$pagenum> C Table All7Table<$paranumonly>, <$paratext>, on page<$pagenum>WTable Number & Pagel'Table<$paranumonly> on page<$pagenum>lckRevision0.9!A8!"#A"$%&A am'Aaum()*Area+,-Aate./Br0B+Sh1234B5B<ar67Ba-<(dge(e! k!ek#l$pk!o<k!Tak &'(iay>`,p>la!e`! >qb!!cG!d!h2jo!kn!"m!n'k'ee2amg%!kokkp!kZp!!i!rjj!j!j!j!a``o2!Brp!!p!!Shqr)j!l!k^n2o922k_!k"k#hz2k!h2ah~2k%!k!!k!#n!i2!i o l<!,qs))!qt))!`!!m5!!m6!!`!2`!!`!!`!!`!'s !!'qu))`!2i!!m !n^ !n !!qv ))qw ))!q522!qx))qy)!qz))!q{)!q|)!q})q~)q)!g&!g'!!q))q)!q)!q)g)2s!!2g+!!g-!!"g."#q#2 Figure 2: !g:%22g3&2q')%q()!q)))!q*))q+))2q,))q-)) q.))!q/)))q0)))q1))!q2)!q3)!q4))!q5))!q6))!q7)!q8)!q9)!q:))q;)!q<)!q=)!q>)!q?)!q@))qA))nB22qC))qD))qE))qF))qG))pfH!)nI)nJ!)qK)qL)!aM!)qN))aO!)aP!)aQ!aR!o&S!!qT)!qU)qV)qW)i: qX))2qY))oNZ!)a[!)oR\#)q])) Figure 3: )oT^!2)a!_!)r4`!! )pja#!)r8b!!))rc))sd!!)a+i!)a-k!!)pkl!!)qr!!!)qs!!!)qt!!!)qu!!!)qv!!!)qw!!))qx!!!)qy!!!)qz!!!)q{!!!)q|!!!)q}!!))a@~!)2q!!2)q!!))aC!))q!!))q!!))q!!)!q!!)q!!)!q) Figure 1: q!!!q!!)q!!)q!!)q!!)q!!q!!!q!!!q!!!q!!q!!q!!i: q!!2q!!q!!)q!!)q!!)r!!)Fir!!)!r!!)!r!!)!r!!)#r!!)!r!!)r!!)!r !!)r !!)!a) \d(k=)qu!HMk> )qHM !q>)UU`pq !H$ > 2H$  )!!)!UUep !H$ (m?H$ l!)H !> !H  !q!UUmp!Page MN H (n?!2H l"HH$>y irHH !!UUepr !HH(o?)HHly#ddkO62kC62l$62kC 62  2)UU`p! 6 kC6 l%6 kC 6  hm! OP HkCH\lv&d(s=wrHm3R (t? Hm3R H RH RoFootnoterHr@ (u? )Hr@ HzHzo Single LineH'(v>OFootnote  `^@     HD (xA HD HHo Double Line H (y> Double Line`bBl`dBC6H (|>! Single Line`gB\HZ(~>(s TableFootnoteEGxR (> EGxR EPwEPwo TableFootnoteod(=xHQ>>z HQO&&&UU ~2Abstract: Recognizing the utility of a Procedural UU~4Language Interface to access VHDL data and interact UU~le5with a VHDL tool, Cadence has developed a procedural *UU~6interface which is highly compatible with the Verilog 6UU~7procedural interface. This paper describes the various `dBUU~C6kinds of applications that can be built using such an NUU~8interface and shows the interoperability of the Verilog ZUU~3and VHDL procedural interfaces in a mixed language fUU@~design. `Ig Introduction UU p7In the past ten years, there have been a few additions UUp8and revisions to the VHDL standard [1] such as the IEEE (UUp7standard logic package [2], the VITAL standard package >UUp 9[3] etc... These additions were driven by VHDL users and UUp4tools providers that pointed out the weaknesses and il˪UUpl 1omissions in the language. The goal of all these VתUUpac5enhancements and new revisions of the standard is to 㪚UUpur0make VHDL the language of choice for behavioral y 滋UUpe 9modeling. Its counterpart, the Verilog language has been pUUpar4polished over the years. One of the advantages that atUUpg 9Verilog still has over VHDL is its standard C procedural oUUpVe7interface. The Verilog C interface [4] is very popular cesUUpge8among the Verilog community. The standard status of the In+UUp;interface ensures the portability of the tools that use it dit7UU@pUU%across different Verilog simulators. nCUU phe0The Verilog interface allows the development of geOUUpan7applications such as delay calculators and annotators, dit[UUpy 5hierarchy model browsers, connectivity access tools, hgUUp w5waveform tools, debuggers, etc... The interface also lsUUpof9provides a way to instantiate C models in the HDL design sUU@prd9and to communicate with the HDL tool during simulation. iUU py 2At Cadence we developed a VHDL interface that has UUpha;all these capabilities [5], [6], [9]. This interface named thUUpat6VHPI, is very similar to the latest generation of the UUpur9Verilog Procedural Interface (VPI) [4], [7]. The general eUUpar5concepts behind the design of VHPI and its essential TǪUUp o:functional characteristics are presented in the first and ӪUUpha:second sections of this paper. The third section gives an H(CoinH\lz'licda=ts,yhiarQH8Rva>| l hQH8Rvtwa22 etc... 2UU@ppr0to each "VHPI" data type that is a leaf class. siUU p.The first level of hierarchy defines the main UU@pclasses which are: Cad*UU`pa ( - the scope class (~scopep) ha6UU`pli+ - the statement class (~stmtp) BUU`pVH- - the declaration class (~declp) NUU`p- - the expression class (~exprp). 7ZUU p5The class ~scopep (refer to figure 1) has five dfUUp>members, each one of them is a scope: ~designInstUnitp, rUU~=eqProcessStmtp, ~subprogramp, ~blockStmt pand g~UU~8generateStmtp. The first member, the design instance UUp)unit class groups the component instance UUptE(~compInstStmtp), the root instance (~rootInstp) and the UUp1package instance (~packInstp) classes. The UU~9eqProcessStmtp class gathers the equivalent processes eUUp4(concurrent assertion, signal assignment, procedure mƪUUp1call and process statements). A subprogram class ҪUU@pas1contains the procedure and function class types. hުUU p(3A definition of a scope can be thought as a region larꪗUUpec.that contains declarative items and execution UUppr6statements. Consequently, the class scope defines two UUpha8methods, a method to traverse the declarations that are aUUpIn7declared in that scope, and another method to traverse subUUplo8the statements that belong to that scope. Both of these e &UUpde5methods are available for each of the members of the 2UUpan?class scope. The classes denoted ~declp and ~stmtp ce >UUp a5respectively represent the declaration and statement kJUU@p T.classes. They are not expanded in the figure. VUU pva2The class hierarchy is not a tree structure but a bUU@psi6graph, classes may be derived from multiple classes. {`gsu2. The VHPI C-functions UUUU p t1The VHPI interface defines a very small set of C-UUUpti9functions. The simplicity of the interface is due to the UUps 6genericity of the functions: the same function can be UUpnt3applied to many different classes and depending on 8meUU@p t6the class type perform a totally different operation. ǪUU`p s*The VHPI functions allow applications to: ӪUU`dpth- traverse the model, to ߪUU`pf .- query about the properties of the objects, 몄UU`pe (- modify and access simulation values, s UU`!p d-- interact with the simulation via callback UU`pec mechanisms. theUU "pta3Some other utility functions allow applications to xpaUU"p. /print, display, do error checking, get current a t'UU@"pa simulation time etc... ph,?U(UT`&kri2.1 The concept of handle M|UU psu,The VHPI functions manipulate objects at an tY{UUpce8abstraction level. All internal data is hidden from the tiezUUpy >user. The user only gets back ~handlesp which basically qyUUp t4are abstract representation of a VHDL thing such as toQHvaCeQHv\l|'opeda=tnszM mL M MMhtiQHvaC diQHv\l'nteda={. heQH8Rva>~ nioQH8Rvo33/print,rr3UU`p t(- time callbacks such as cbAfterDelay, ..UU` p& cbNextSimTime, etc... nUU cp5The function ~vhpi_register_cbp takes only one {*UUcpab;argument a s_~vhpi_cb_datap structure. The user must 6UUcp. 4allocate this data structure and fill up the proper y BUUcp t8field(s) for the callback reason he wants. For example, NUUcpa7a callback on value change requires at least the "obj" ZUUcp|5field to be set to the handle of the object the user sfUUcp9wants to put a callback on, and the "cb_rtn" field to be rUUcp8set to the function pointer of the callback function to ~UUcp3execute when the callback happens. Optionally, the UUcpa@user can provide a s_~vhpi_valuep and ~s_vhpi_timep 8RUUcp~3structures if he wants to get the new value of the UU@cp*object and the time the change happened. UFUT`kh )3. Typical PLI applications and examples ȪUU pc.3One of the principal aspects of the VHPI interface terԪUUp o3is that it gives complete access to the elaborated taઘUUp uAmodel. It can retrieve ~structuralp information as well as f쪗UU~y :behavioralp information allowing to write applications UUp5such as VHDL decompilers or translators, design rule eUUpj"6checkers, hierarchy browsers, connectivity extractors UUpus0etc... Its simulation control and communication onUUp f4capabilities combined with the static access to the po(UUpac-HDL information allow to write debuggers, co-h4UUppp2simulation, backplane tools, code profilers, test @UUpv2benches etc... Finally the possibility of binding LUUpes1foreign C models to architecture bodies, process XUUpct0instances or even subprograms allows the direct dUUpLI9instantiation of C models, or the possibility of using C epUUp o1functions for implementing functionality that is a|UUpe -generally difficult, non performant, or even uUUptr1impossible to do with VHDL. For example, file IO UUpbe4operations, bit-wise logical or shift operations on s UUp2integers, UNIX related operations such as process UUp3communication or connection, command line read and actUUp3write, file system, environment variable access, X onĪUUp f5library interface function invocation are easier and oЪUUpac4more efficient to code in C than in VHDL. Therefore ܪUUpla3having a C based procedural interface considerably UU誂UUpet4broadens the type of applications and increases the UUp8R0flexibility of design modeling and verification UU@p e solutions. s  UU  p/Figure 3 gives samples of VHPI code. The first or ~UU p u,one is extracted from a hierarchy traversal pl$}UU pli8application; it shows the use of the iteration methods, p0|UU p u5string and integer property access functions and the x<{UU p:display facility function. It iterates through the design HzUU p7scopes and found all the declared items, disaply their rocTyUU p5names, class type and source line number. The second d`xUU p8one is a fragment of code that creates a signal monitor onlwUU p f7by registering a callback on value change on a signal. ЪQHvaC thQHv\l~'d pda=UU|e adq =Ude?Qmq > eso?QmaUU== samples T=UU`i 4#include "vhpi_user.h" /* VHPI public include file }UU`iapL class type definitions and function prototypes */ stUU`iro t$UU`i aint traverse() UU.UU` ifa{ 8UU` ier7vhpiHandle rootHdl, scopeHdl, scopeIt, declit declHdl; fouBUU`id &/* get the VHDL root of the design */ LUU`i t+rootHdl = vhpi_handle(vhpiRootInst, NULL); VUU`iisHvhpi_printf("Design Root is %s\n", vhpi_get_str(vhpiDefName, rootHdl)); by`UU`ilbscopeHdl = rootHdl; ajUU`i6scopeIt = vhpi_iterate(vhpiInternalScopes, scopeHdl); tUU`i%while(scopeHdl = vhpi_scan(scopeIt)) ~UU`i{ UU`iJ vhpi_printf("sub-scope %s is a %s\n",vhpi_get_str(vhpiName, scopeHdl), UU`iJ vhpi_get_str(vhpiKind, scopeHdl)); UU`i- declIt = vhpi_iterate(vhpiDecl, scopeHdl); UU`ilu% while(declHdl = vhpi_scan(declIt)) UU iUUO vhpi_printf("found a %s declaration: %s line %d\n", vhpi_get_str(vhpiKind, s *UU@iKdeclHdl), vhpi_get_str(vhpiName, declHdl), vhpi_get(vhpiLineNo, declHdl)); ĪUU`'iHa} ΪUU`(i, For the following VHDL code: تUU`)i/*architecture A of E is de⪔UU`*iUUbegin 쪓UU`+iansignal S : bit; NUUU`,iUUP1: process(s) intUU`-i%s variable V : integer := 10; tH UU`.iUU begin UU`/i a s <= not(s); scUU`0ite end P1; co(UU`1iend A; `2UU`2idl v<UU`3i The PLI program will output: FUU`4ipi Design Root is E(A) a %PUU`5ivh% sub-scope P1 is a vhpiProcessStmt ZUU`6i - found a vhpiVariable declaration V line 5 pdUU`7iUU nUU`8ihpAThe following VHPI application registers a value change callback dxUU`9iItsetup_callback(signal) O UU`:indvhpiHandle signal; liUU`;i_s{ UU`<iS static s_vhpi_time time_s = {vhpiSimTime};/* format for simualtion time */ ));UU`=i'S static s_vhpi_value value_s = {vhpiBinStrVal};/* requested value format */ hitUU`>ide& static s_cb_data cb_data_s = UU`?i :F {cbValueChange, my_callback, NULL, &time_s, &value_s}; ~UU`@iegS /* reason, callback function pointer, object field, time, value */ scȪ}UU`Aite< char *sigName = vhpi_get_str(vhpiFullName, signal); 2Ҫ|UU`CiUUR cb_data.obj = signal; /( fills up the obj field with the isgnal handle */ ܪ{UU`Di59 cb_data.user_data = malloc(strlen(sigName) + 1); 6zUU`EihpH strcpy(cb_data.user_data, sigName); /* store the signal name */ hpyUU`FiPIB vhpi_register_cb(&cb_data_s); /* register the callback */ xUU`Giig} wUU`Ki:my_callback(cb_data_p) livUU`Li_sp_cb_data cb_data_p; uUU`Ni_v{ "tUU`TiiS@ vhpi_printf("Signal %s changed to value %s at time %d %d\n", ,sUU`Uii_' cb_data_p->user_data, ted6rUU`Viit- cb_data_p->value->value.str, c@qUU`Wi> cb_data_p->time->high, cb_data_p->time->low); JpUU`Xi; } ToUU`Yi  ^nUU`]vn,Samples of VHPI code tHQkvC UUHQ  *hpiFullN2UU`p  b;Hjgy= lwi;H/ cbCGQjhz= p CGQse%%re the shp%UUp 9overview of the various typical applications that can be UUpig7developed with a VHDL procedural interface. Samples of UUp_d6VHPI code are given to illustrate the concepts and to *UUptf1give an idea of how two very common types of PLI 6UUpi_8applications can be written in VHPI. The fourth section VBUUp 8highlights the interoperability aspect of VPI and VHPI. NUUpp-8Finally we conclude by giving the current status of the } ZUUp 7standardization effort for a VHDL procedural interface QfUU@p4that is pursued under the sponsorship of the IEEE. ~UKUT`k(1. An object-oriented information model bUIUT`k1.1 The VHPI class hierarchy UU p/ 4The VHPI procedural interface is based on an object-UUp9oriented representation of the VHDL post-elaboration and UUp tAsimulation data. It constitutes the ~information modelp on aǪUU@pic*which the procedural interface operates. ӪUU pL /We first define some object-oriented terms. An ߪUU~e =object pis a data type on which you can perform some well i몗UUptw;defined operations called ~methods pand has a set of s cUU~HPFpropertiesp. A ~classp is a collection of object types which UUpI 5share the same functional methods and properties. An yUUpt Bobject which belongs to a class is said to be a ~memberp of UUperBthat class or to be ~derivedp from that class. The class is 'UUpUKBsaid to be the ~parent class pof the object. The object may 3UUpThproperty, the property ~kindp. All objects possess this ϪUUpaiCproperty. The ~kindp property associates an integer constant If>ǮH8Rvji|= ode>ǮH8Rvqid22 the clain2UUpmb5for example a statement, declaration or transaction. dUUp7The user cannot assume that the handle is a pointer to eraUUp8some data structure that he can access directly. He can i*UUptw1only manipulate handles with the VHPI functions. e6UUp4Handles are reusable: the same handle can be set to ssBUUppe8represent one object type and then reset to represent a esNUUp 6different object. Handle allocation is managed by the ZUU@p interface. rULUT`kel) 2.2 Singular and multiple relationships UU pss.The VHPI interface distinguishes two types of UU@paccess: heUU pop+- accessing one object of some type from a ϪUU@pprreference object dUU p5- accessing a list of objects of the same class from =UU@pdea reference object. idȪUU p/In order to perform these two operations, VHPI ԪUU@pa &has defined two classes of relations: ઘUU p9- the ~singlep or also called ~"one-to-one"p a쪗UU@prelationship UU pac8- the ~multiplep or also called ~"one-to-many" atUU@p Vrelationship. 6UU pHa2The "one-to-one" relationship allows applications UUppe6to go from a given reference handle to an object of a (UUp7particular type. Typically this function is used every he 4UUp 9time there is the possibility of getting a single object t@UUp .from a reference handle. For example, from an LUUpf 4architecture body reference handle the primary unit - XUUpct0relationship will return a handle to the entity redUUp4declaration, this is illustrated by figure 2. The C-e pUUp4function to go from a reference object handle named |UU~or9RH pto another object handle of type ~T pis~ eUU~ofan iteration function, ~vhpi_iterate(T, RH)p, obtains a ЪUUparAlist of handles to objects of the same class type ~T pfrom ܪUUpe ǮH8Rvjk~= tat>ǮH8Rvkqa 11st of hats1UU p~/Paper [9] gives a complete example of a VHPI C dleUU@ ptu9model of a latch that is instantiated in a VHDL design. l*URUT`k,%4. Verilog VHDL PLI interoperability U8UU pn(-In a mixed Verilog/VHDL design, a procedural DUUp5language interface that can handle both languages is iPUUpUU3highly desirable. VHPI and VPI have a very similar eth\UUpUU3design, they share the same methods for iteration, h lhUUp0relation traversal, property access and utility UTtUUpPr2functions. The interoperability of the procedural UUpac3interfaces is expressed by the intersection of the tieUUps..language specific information models. VHDL or UUpcl0Verilog PLI handles can be returned by the same ntUUpop2access method. For example, iterating on internal UUp2scopes from a VHDL design instance unit reference UUp2handle can return Verilog module (vpiModule class ȪUUp4type) or user-defined primitive (vpiUdp class type) n ԪUUpUR5instances as well as VHDL instances (refer to figure UઘUUpn(61). The procedural interface semantics are defined at 쪗UUpua/the language boundaries. Some language neutral PUUphi7properties and relations are available at the boundary UUpgn,allowing to perform some operations without lUUp3dropping in the language specific PLI; for example tUUpfu6the hierarchical path name of the module instance can (UUprf4be retrieved with a neutral property (fullName). On 4UUpua1the other hand, it is sometimes needed to access U@UUpPL.language intrinsic properties or methods. The LUUpss5uniformity of the PLI operational schema, the visual UXUUpro4graphical description of the information models and dUUpet5the very small number of PLI functions to manipulate pUUpfi5are key factors in reducing an application developer R|UUpl 3learning curve and making him able to program in a pn(UUpal2record amount of time. The common architecture of UUp b.VPI and VHPI enables a smooth crossing of the UUpes.language domains resulting in a very powerful UUpgn,programming environment. The two interfaces lUUp.merged together can provide language specific ĪUUpUU5information as well as language neutral information. aЪUUpUU1The VHDL and Verilog PLI software components are lܪUUp.tightly coupled and often share the same code 誂UUp6achieving higher performance of the PLI applications. UUpUU8This is in alignment with the goals and architecture of suU" ULUUp9the INCA}TMp technology [8] where high performance U!UUpet3mixed language simulation is obtained by execution e U UU@pfi'of interleaved language code streams. ion4u`g Conclusion leDUUU pak1This paper described the main characteristics of lPUUUp t1the VHDL procedural interface being developed at b\UUUp2Cadence. We showed how this interface can be used hUUUpul.to develop C based applications or models. We ?QmqYl?Qml5ic dk=san} aQH8Rvk> stwQH8Rv:33y couple ar3UUpUU5demonstrated how its close relation with the Verilog cUUpUU6Procedural Interface VPI is essential to its use in a UUpUL.mixed language design. The VHDL community has *UUpan5recognized that a standard C procedural interface is o6UUpon1needed to complement VHDL. A technical group has oBUUpu3been recently formed under the IEEE VASG to create 1ThNUUp t+a VHDL procedural interface standard. Many p tZUUpra5companies contribute to its specification, simulator afUUpow5providers as well as third-party tool developers and vrUUpca8designers. This effort has just started, the mission of ~UUp4the group and the high level design requirements of UUpk7the interface have been stated. The group is currently QUUpk-working on defining the procedural interface UUp/functionality that is necessary to support the UUp h5simulation of PLI C models. This includes: PLI model UUpnt6initialization, access and modification of simulation ƪUUpge9values, callback registration, access and traversal of a nҪUUprd4subset of the VHDL design. Progress, specifications edުUUpL.3and status are available under http//:www.vhdl.org/cenꪗUUphe4vhdlpli. We believe that Cadence VHPI interface can roUU@pst5serve as a useful input to the standardization task. u`g References: a now3[1] IEEE Std1076-1993, IEEE Standard VHDL Language d v(@ncaReference Manual f2 nte3[2] IEEE 1164-1993, IEEE Standard Multivalue Logic nd <@nig8System for VHDL Model Interoperability (std_logic_1164) veF ngr2[3] IEEE Std 1074.4, VHDL Initiative Towards ASIC P@nedLibraries (VITAL) Z nfu/[4] IEEE Std 1364-1995, IEEE Standard Hardware dnsi3Description Language Based on the Verilog Hardware n@nin(Description Language Chapters 22 and 23 imx %nUU1[5] VIUF Fall 1996 "VHPI, A Programming Language @%n Interface for VHDL" Doug Dunlop DL n s9[6] VHPI functional specification, Francoise Martinolle, b@nw.Cadence internal document  nbe8[7] IVC 1996, "The Verilog Procedural Interface for the stnl 7Verilog Hardware Description Language" Charles Dawson, Re@n Sathyam Pattanam, David Roberts 3, nL 8[8] IVC 1995, "INCA: A Next-Generation Architecture for @nIE'Simulation " Jay Lawrence, Cary Ussery gic Bn2[9] BMAS 1997 IEEE/VIUF International Workshop on Bn2Behavioral Modeling and Simulation1, "VHPI a VHDL Bn5Procedural Interface " Francoise Martinolle, Sathyam 4@Bn95Pattanam, Debra Corlette  nsi7[10] Unified Modeling Language Reference Manual, James nnDe5Rumbaugh, Grady Booch, Ivar Jacobson, Addison-Wesley %@nl Object Technology Series.  n8[11] Unified Modeling Language user guide, Grady Booch, "nct5James Rumbaugh, Ivar Jacobson, Addison-Wesley Object ,@ninTechnology Series. 7UU`pIV 9QHvkChstQHv\l'Cha>ǮH8Rvk= Pa>ǮH8Rv3,] IVC 19 exdkqOESivarUsdkR= EE~opn H$ kS?nSiH$ l(rfaH$ kT> H$  br nsi MUU`p M aH kU? adH l)ObH kV> [1H  ngooch, UU`p J bHHvkW?inHHvl*vHHvkX> HHv >ǮHkUU`pǮ DHvkY= V19DHvOSiH$krCkRH$l+$H$ksC H$ (rfa`g  HHH ktCHH l,HH kuC HH ObH`m[1 QHvkvCchQHv\l-QH8RvkwC QH8Rv vHUU`p >ǮH8RvkxC Ǯ>ǮH8Rv= DH kyCH l.H kzC H $Hhm WX QH8Rvn= aQH8Rvo33Hkt3UU`Pp - string properties UU`Qp - complex properties. HUU Rp2For each property class, the interface provides a *UURp5function that returns the property value for a given 6UURpC3object. The information model defines what are the BUURp6property types available for each class. For example, NUURp-in reference to figure 2, the object of kind ZUUR~2vhpiDesignUnit pwill have the boolean property fUUR~*vhpiIsProtectedp. The integer property rUUR~9vhpiStartLineNop will return the line position of the ~UURp5beginning of the design unit description in the VHDL UURp;source file. The string property ~vhpiFileNamep will $UURp3return the file name of the source file where that vUU@Rpdesign unit is described. UU [p.Typically, an integer property will return an UU[p -6enumerated value into the allowed property value type ƪUU[p9set. The boolean property will return true or false. The eҪUU@[pR&string property will return a string. ުUU _p -Complex properties allow applications to get oꪗUU_pre7values of objects in various formats. For example, the r eUU_pmp@property ~vhpiValuep is available for a port, variable or kiUU_pR!signal declaration. The function tUU_~y ?vhpi_get_value(hportDecl, &val)p where ~hportDeclp is rUU_pvhAa handle to a port declaration and ~valp is a structure of U&UU_pg >type ~s_vhpi_value,p will get the value of the port and 2UU_p s?store it in the appropriate field of ~s_vhpi_value.p The 3re>UU_p o4s_vhpi_value structure may have been set to specify deJUU_pib/how the value should be returned. For example, ropVUU_pn 5binary values may be returned in a decimal, octal or bUU@_pe hexadecimal format. sezU6UT kpe-2.4 Formal specification of the VHPI informaUU4UT@kro tion model turUU  p.We use the standard Unified Modeling language UU p.(UML) [10], [11] to formally express the VHPI UU phe2information model. UML is a graphical language to UU pa 4model object oriented software design. It defines a raĪUU p t5rigorous notation and a meta-model (diagrams) of the pЪUU pec6notation that can be used to formally describe object-ܪUU pal3oriented software design. We use the class diagram ~s誁UU pil1technique of UML to express the VHPI information sUU pap6model. A class diagram specifies the VHPI class types UU ppi1and the way they are connected together. In UML,  ~UU pho/class inheritance is denoted by a hollow arrow V}UU pbi8directed to the parent class. In UML, the relationships $|UU pde8between classes are called ~associations pand are ti0{UU por+denoted by straight lines between classes.  nthHM}edUUs  UT UT`la *A Procedural Language Interface for VHDL #UR UT`llaand its Typical Applications :UU`Spde eFUU`Jpca dS`m"Francoise Martinolle, Adam Sherer a`mliCadence Design Systems ǮH8Rvn= de>ǮH8Rvowi337a multth3UU p *7iteration may contain zero elements or will contain at ) tUU pe 8least one element. The direction or navigability of the QUU p8association is indicated by an arrow to the destination *UU p9class. In figure 1, we show that from an object of class 6UU p t7scope, one can iterate on the declarations within that BUU p5scope, the association multiplicity is *. A singular TNUU poc6method will be represented by a navigable association ZUU pAp7with a multiplicity of one (marked as 1) if the method  dfUU p0should always return one handle, or zero or one rUU pgn0(marked as 0..1) if the method may not return a ~UU p0handle. An association will have a role name to UU p6indicate more precisely the type of association or to UU pde6distinguish that association from another association UU p3of the same object class. For example from a scope eleUU pai8handle, there is a one-to-many relationship with a role tiUU p o7name of "internalScope" to retrieve the scopes defined anƪUU pin,within a scope; there is another one-to-one 1ҪUU pm 2relationship to go from a scope to the scope that ުUU pe 4contains it ("upperScope"). In UML, VHPI properties e,ꪗUU pul@are modeled as ~attributesp. The attributes appear in the epUU pga4panel under the class type header. For example, the itUU ps 6scope class has several attributes such as name (name UU p o7of the scope), fullName (full instantiated name of the thUU@ petscope), etc... UU2U<UT`ikAn2.4 Simulation interaction na@UU kpUU2One of the important features of the interface is LUUkp4its interaction capabilities. The simulation can be r XUUkp0modified and interrupted by VHPI. Therefore a C e dUUkp0model or application using VHPI can communicate elpUUkpol7with a simulator that supports the VHPI interface. The iev|UUkped0interface provides one function that can modify aUUkp 17simulation values and schedule events at future times. theUUkp=This function~ vhpi_put_value ptakes four arguments, a eUUkp >value structure of type s_~vhpi_valuep, a handle to the UUkpUU1simulation object to which the value needs to be aUUkp4assigned, a delay time structure indicating at what asĪUUkp0time the value needs to be assigned, and a flag tiЪUUkpth2indicating which delay mode to apply (inertial or ܪUU@kplatransport delay). @誂UU pOn1Simulation control and interruption are done via UUpit-callbacks. One can register callbacks before bUUpk1simulation starts or during simulation. Only one  UUpk@function, ~vhpi_register_cbp, exists to register any type UU~UUpim8of callbacks. A rich set of callback reasons provides a UU$}UUpe 2sophisticated simulation control and interaction. 0|UUpon0Callback reasons can be classified in different <{UU@pTh categories:  HzUU`~pt'- simulation action callbacks such as p TyUU`pof0 cbEndOfSimulation, cbEnterInteractive, etc... `xUU`pla*- event callbacks such as cbValueChange, lwUU`p cbTransaction, etc... r?Qmom> k?Qma t33g tiЪth3UU`qod oUU`pr  UU`ptr p*UU`p 6UU`pla nBUU`pru oNUU`p ZUU`pba .fUU`pca arUU`p U~UU`pon aUU`pla nUU`p UUU`p,  UU`pp xUU`pny pƪUU`p mҪUU`pri sުUU`pso pꪗUU`p UUU`pca UU`p a iUU`p UUU`p r o&UU`ped 2UU`p U>UU`pes JUU`pt VUU`caScope class diagramv bUU`rpEn SnUU`spIn azUU`tpx UU`upen aUU`vpVa CUU`wpUU UU`xpti UU`yp ªUU`zp ΪUU`{p ڪUU`|p 檂UU`}p UU`p UU`p  UU`p ~UU`p "}UU`p .|UU`p :{UU``p FzUU`p RyUU`bp ^xUU`#vDesign unit class diagram doDO62oECU62l162oFC 62 UU`UU`ZpUU 6 oGCU6 l2las6 oHC 6 UU`uh\mUU UV dp_OUU?QmoLYUU?Qml4 ?QmoM> }?Qm |UUzUU`^p U?QmooYicl?Qml562p`C62l362paC 62  UU`Hp 6 pbC6 l66 pcC 6  lam YZ ?QmpdT?Qml7??Qmpe> U?Qm 4UU`lp uduLeftdv~zRightdw ReferencedxyFirstdyxzdzy{p`d{z|d|{halfd}pad~v firstpage d~Firstdhalfd|}pbhalfdoneA.p H  a   h  Body.   H     hU l Bulleted\t. f CellBody. f  CellHeading. f pba Footnote. fgT  Heading1Body. fkT  Heading2Body. P  Hu t    h  HeadingRunInBody.   H     h  Indented. ad   Hb  o   h  Numbered.\t.  A  H  k   h  Numbered1.\tNumbered. f   TableFootnote. f T   TableTitleT:Table : .  H     h  authors . fgT   TableTitleT:Table : . fh  CellHeading. fh CellBody. fh  CellFooting. p H     h  Body. i H   g  h  Body. @p   Header. @p   Footer. @p   l Header. @p    Footer. fvF figureF:Figure : . p H p    h  Body. m H     h  oBody. fgT  Heading2Body. m H    o rh  Body. fF figureF:Figure : . @ lP Title Body. !p H     h  Body. f"gD  .. Body-ContdBody. @#m Footer. @$P Title Body. @%m Footer.  f&T  Heading2Body. 'm H    g h  authors. ( mH     h  reference. )i H  l   h  code. * H     h  abstract. ,~ H     h  abstract. f-T  Heading1Body. / . H     h i code. 1 H     h  Body. 2n H     h  ~ reference. eje Emphasisf EquationVariables )g  ڝh i_mFi )k )l  ڝm ڝn [o  ڝp ڝqEquationVariables yc>v ڝ} tu ~ yc>EquationVariables=D n=>?@ABCL ZOaT ZY Z` Z-=2-Thin.Medium/Double0Thick@1  Very Thin -.-----.HHHHHFormat B ---------/HHHHHFormat AComment(_MNkOPoPUVkWXphYZd BlackT!WhiteddARedddGreendd BluedCyandMagenta` d YellowRGB 255,255,255dleRGB 000,000,000222RGB 127,127,127i--RGB 252,252,252RGB 251,251,251RGB 250,250,250Z[RGB 249,249,249RGB 248,248,248##-RGB 247,247,247RGB 246,246,246RGB 245,245,245FoPQRGB 244,244,244RGB 243,243,243kRGB 242,242,242}}XRGB 241,241,241YRGB 240,240,240cFGRGB 239,239,239dRGB 238,238,238RGB 237,237,237essRGB 236,236,236RGB 235,235,235 <=RGB 234,234,23425RGB 233,233,23300 RGB 232,232,23212 ijRGB 231,231,23125 RGB 230,230,23025 22RGB 229,229,22925 RGB 228,228,22824 RGB 227,227,22724 _`RGB 226,226,22624 RGB 225,225,22524 ((RGB 224,224,22424 RGB 223,223,22324 RGB 222,222,22224 UVRGB 221,221,22124 RGB 220,220,22024RGB 219,219,21924RGB 218,218,21823RGB 217,217,21723KLRGB 216,216,21623RGB 215,215,21523RGB 214,214,21423xyRGB 213,213,21323RGB 212,212,21223ABRGB 211,211,21123RGB 210,210,21023 RGB 209,209,20923noRGB 208,208,20822RGB 207,207,2072277RGB 206,206,20622RGB 205,205,20522RGB 204,204,20422deRGB 203,203,20322RGB 202,202,20222--RGB 201,201,20122RGB 200,200,20022RGB 199,199,19922Z[RGB 198,198,19821RGB 197,197,19721##RGB 196,196,19621RGB 195,195,19521RGB 194,194,19421PQRGB 193,193,19321RGB 192,192,19221RGB 191,191,19121}~RGB 190,190,19021RGB 189,189,18921FGRGB 188,188,18820RGB 187,187,18720RGB 186,186,18620stRGB 185,185,18520RGB 184,184,18420<<RGB 183,183,18320RGB 182,182,18220RGB 181,181,18120ijRGB 180,180,18020RGB 179,179,1792022RGB 178,178,17819RGB 177,177,17719RGB 176,176,17619_`RGB 175,175,17519RGB 174,174,17419 ((RGB 173,173,17319 RGB 172,172,17219 RGB 171,171,17119!UVRGB 170,170,17019!RGB 169,169,16919"RGB 168,168,16818"RGB 167,167,16718"RGB 166,166,16618#KLRGB 165,165,16518#RGB 164,164,16418$RGB 163,163,16318$xyRGB 162,162,16218$RGB 161,161,16118%ABRGB 160,160,16018% RGB 159,159,15918&  RGB 158,158,15817&no RGB 157,157,15717& RGB 156,156,15617'77 RGB 155,155,15517'RGB 154,154,15417'RGB 153,153,15317(deRGB 152,152,15217(RGB 151,151,15117)-.RGB 150,150,15017)RGB 149,149,14917)RGB 148,148,14816*Z[RGB 147,147,14716*RGB 146,146,14616+#$RGB 145,145,14516+RGB 144,144,14416+RGB 143,143,14316,PQRGB 142,142,14216,RGB 141,141,14116-RGB 140,140,14016-}~RGB 139,139,13916-RGB 138,138,13815.FGRGB 137,137,13715. RGB 136,136,13615/!RGB 135,135,13515/st"RGB 134,134,13415/#RGB 133,133,133150<<$RGB 132,132,132150%RGB 131,131,131151&RGB 130,130,130151ij'RGB 129,129,129151(RGB 128,128,128142)RGB 126,126,126142*RGB 125,125,125143_`+RGB 124,124,124143,RGB 123,123,123144()-RGB 122,122,122144.RGB 121,121,121144/RGB 120,120,120145UV0RGB 119,119,1191451RGB 118,118,1181462RGB 117,117,1171363RGB 116,116,1161364RGB 115,115,115137KL5RGB 114,114,1141376RGB 113,113,1131387RGB 112,112,112138xy8RGB 111,111,1111389RGB 110,110,110139AA:RGB 109,109,109139;RGB 108,108,10813: <RGB 107,107,10712:no=RGB 106,106,10612:>RGB 105,105,10512;78?RGB 104,104,10412;@RGB 103,103,10312<ARGB 102,102,10212Z[GRGB 096,096,09611>HRGB 095,095,09511?#$IRGB 094,094,09411?JRGB 093,093,09311?KRGB 092,092,09211@PQLRGB 091,091,09111@MRGB 090,090,09011ANRGB 089,089,08911A}~ORGB 088,088,08810APRGB 087,087,08710BFGQRGB 086,086,08610BRRGB 085,085,08510CSRGB 084,084,08410CstTRGB 083,083,08310CURGB 082,082,08210D<=VRGB 081,081,08110DWRGB 080,080,08010EXRGB 079,079,07910EijYRGB 078,078,07809EZRGB 077,077,07709F23[RGB 076,076,07609F\RGB 075,075,07509F]RGB 074,074,07409G_`^RGB 073,073,07309G_RGB 072,072,07209H()`RGB 071,071,07109HaRGB 070,070,07009HbRGB 069,069,06909IUVcRGB 068,068,06808IdRGB 067,067,06708JeRGB 066,066,06608JfRGB 065,065,06508JgRGB 064,064,06408KKLhRGB 063,063,06308KiRGB 062,062,06208LjRGB 061,061,06108LxykRGB 060,060,06008LlRGB 059,059,05908MABmRGB 058,058,05807MnRGB 057,057,05707N oRGB 056,056,05607NnopRGB 055,055,05507NqRGB 054,054,05407O78rRGB 053,053,05307OsRGB 052,052,05207PtRGB 051,051,05107PdeuRGB 050,050,05007PvRGB 049,049,04907Q-.wRGB 048,048,04806QxRGB 047,047,04706QyRGB 046,046,04606RZ[zRGB 045,045,04506R{RGB 044,044,04406S#$|RGB 043,043,04306S}RGB 042,042,04206S~RGB 041,041,04106TPQRGB 040,040,04006TRGB 039,039,03906URGB 038,038,03805U}~RGB 037,037,03705URGB 036,036,03605VFGRGB 035,035,03505VRGB 034,034,03405WRGB 033,033,03305WstRGB 032,032,03205WRGB 031,031,03105X<=RGB 030,030,03005XRGB 029,029,02905YRGB 028,028,02804YijRGB 027,027,02704YRGB 026,026,02604Z23RGB 025,025,02504ZRGB 024,024,02404ZRGB 023,023,02304[_`RGB 022,022,02204[RGB 021,021,02104\()RGB 020,020,02004\RGB 019,019,01904\RGB 018,018,01803]UVRGB 017,017,01703]RGB 016,016,01603^RGB 015,015,01503^RGB 014,014,01403^RGB 013,013,01303_KLRGB 012,012,01203_RGB 011,011,01103`RGB 010,010,01003`xyRGB 009,009,00903`RGB 008,008,00802aABRGB 007,007,00702aRGB 006,006,00602b RGB 005,005,00502bnoRGB 004,004,00402bRGB 003,003,00302c78RGB 002,002,00202cRGB 001,001,001YiZ Times-Roman\Courier Times-Bold Courier-Bold Helvetica, Times-ItalicHelvetica-BoldCourierTimes] HelveticaG RegularRegular BoldRegular1Oblique3ItalicG{,!#0GT,of"i_KYH|xqrA*5OX.xtNf5֥~?fx5E$Hk *2Z/!ŧe/&=%%C'bOc(ru[O (iT~CwSolO,:N4!r/8 ^;ّḰJx<-Ao