This example shows how to use PLI:
Veritools has included two files with this distribution of Undertow
that allows the user to build a new Verilog simulator that has
the Veritools' pli routines linked in. These routines are:

	veriuser.c, which is a Veritools' specific PLI object file and

	utpli.o, which is a PLI library.

1. Define your pli object files (a) and
   link user defined routines with the analyzer code (b).

  a)  setenv FINUSERPLIOBJ (path)/veriuser.o where (path) is the complete
      path to veriuser.c

***Note: If you defined your PLI functions in various files, such as
         in veriuser.c, mypli.c and morepli.c, then you should define
         the variable FINUSERPLIOBJ as following:

           setenv FINUSERPLIOBJ "veriuser.o mypli.o morepli.o"

  b) setenv FINUSERPLILIB (path)/utpli.o where (path) is the complete
      path to utpli.o 

  c)  make -f $FINTRONIC/include/MakePLI

2. compile the Verilog source.

   vc -a qtest.v

***Note: vc is the executable created in step 1.b. You can call 
         it anything by making the change in the makefile, MakePLI
         located in $FINTRONIC/include

3. build the simulator

   finbuild

***Note: If the PLI routine is NOT called within the Verilog source  
         code but you still wish to link with the simulator, be sure
         to include the simulation builder option "-pli"

4. run the design
  ************ ATTENTION ***********
  * Be sure to provide -startPLI   *
  * or you will not get all the    *
  * outputs you want. However, it  *
  * still finishes normally. Try   *
  * both to see what happens.      *
  **********************************

   TOP.sim -nodriverchk -startPLI

