• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..26-May-2005-

READMEH A D30-May-20077.4 KiB170120

async.cH A D26-May-20055.2 KiB196123

async.plgH A D26-May-2005160 98

async.vH A D26-May-2005433 2217

cacatmd1.vH A D26-May-2005399 2219

clean.shH A D26-May-200532 21

dfpsetd.cH A D26-May-20054.5 KiB168112

dfpsetd.plgH A D26-May-2005473 1110

dfpsetd.vH A D26-May-2005665 3226

fdspec01.vH A D26-May-20053.5 KiB14092

fff9H A D26-May-20058.3 KiB119118

fff9.expH A D26-May-20058.3 KiB119118

findcaus.cH A D26-May-20055.6 KiB202131

findcaus.plgH A D26-May-20051.2 KiB4645

inst_pli.osx.shH A D26-May-20054.2 KiB150121

inst_pli.shH A D30-May-20074.2 KiB164132

makefile.cygwinH A D26-May-2005530 2314

makefile.lnxH A D26-May-20052.9 KiB14593

makefile.lnx64H A D30-May-20072.9 KiB14593

makefile.osxH A D26-May-20053.1 KiB14592

makefile.sparc-gccH A D26-May-20052.9 KiB14593

opt_vacbtst.inpH A D26-May-2005311 1413

opt_vacbtst.plgH A D26-May-2005538 1615

prtbg09.vH A D26-May-20053.1 KiB9681

rmlic.plH A D26-May-2005370 2622

sparc.oldH A D26-May-20054.3 KiB182130

task10.vH A D26-May-2005989 5947

timtst03.vH A D26-May-2005207 1613

vacbtst.cH A D26-May-200511.7 KiB444326

vacbtst.inpH A D26-May-2005325 2120

vacbtst.plgH A D26-May-200518.1 KiB442437

vchkprt1.cH A D26-May-200514.8 KiB520362

vconta1.cH A D26-May-20058.8 KiB323222

vconta1.plgH A D26-May-20051.4 KiB3231

vdrvld1.cH A D26-May-20058.4 KiB326207

vdrvld1.plgH A D26-May-200510.8 KiB279278

vdrvld2.cH A D26-May-20058.9 KiB342218

vdrvld2.plgH A D26-May-20058.9 KiB251250

vfopen1.cH A D26-May-20054 KiB16393

vfopen1.plgH A D26-May-200557 32

vfopen1.vH A D26-May-2005365 2617

vfopen2.cH A D26-May-20054.3 KiB16296

vfopen2.plgH A D26-May-200548 32

vfopen2.vH A D26-May-2005360 2617

vhelbad.cH A D26-May-20054.4 KiB175102

vhelbad.plgH A D26-May-2005399 98

vhelbad.vH A D26-May-2005192 1310

vhello1.cH A D26-May-20052.6 KiB11159

vhello1.plgH A D26-May-2005125 43

vhello1.vH A D26-May-2005177 1311

vhello2.cH A D26-May-20055.4 KiB211134

vhello2.plgH A D26-May-2005291 87

vhello2.vH A D26-May-2005183 1311

vpifout.filH A D26-May-200524 21

vpifout.xflH A D26-May-200524 21

vpiret.m01H A D26-May-20051.3 KiB3022

vpitout.filH A D26-May-200524 21

vpitout.xflH A D26-May-200524 21

vprtchg.cH A D26-May-20056.9 KiB274171

vprtchg.plgH A D26-May-20051.5 KiB3837

vprtchg2.cH A D26-May-20058.7 KiB342230

vprtchg2.plgH A D26-May-20051.5 KiB3837

vprtchg3.cH A D26-May-200510.3 KiB398265

vprtchg3.plgH A D26-May-20051.8 KiB3837

vprtdel2.cH A D26-May-20057.7 KiB284186

vprtdel2.plgH A D26-May-2005176 54

vprtdels.cH A D26-May-20059.3 KiB325188

vprtdels.plgH A D26-May-20052.8 KiB4746

vsetdels.cH A D26-May-20059.5 KiB336198

vsetdels.plgH A D26-May-20053.1 KiB5352

vsetval1.cH A D26-May-200511.1 KiB364228

vsetval1.colH A D26-May-200510.2 KiB333297

vsetval1.plgH A D26-May-20051.2 KiB1312

vsetval1.vH A D26-May-20051.7 KiB6343

vsetval2.cH A D26-May-200513.3 KiB447297

vsetval2.plgH A D26-May-2005300 1110

vsetval2.vH A D26-May-2005527 3425

vtimcbs.cH A D26-May-20056.1 KiB262169

vtimcbs.plgH A D26-May-20055.2 KiB143142

README

1
2       PLI 2.0 VPI ROUTINE EXAMPLES AND INSTALLATION TEST
3
4This directory contains PLI 2.0 API vpi_ routine examples to illustrate use
5of PLI 2.0.  To test for correct installation run the inst_pli.sh script that
6compiles vpi_ programs into .so libraries which are dynamically loaded
7using new +loadvpi= Cver command line option and run.
8
9To see an example asynchronously driven PLI 2.0 vpi_ model, look
10at async.c (and async.v) test below.  The other tests show various
11PLI 2.0 vpi_ routine capabilities but are not complete models.
12
13To learn more about PLI 2.0 capabilities, read the various examples.  To
14learn how to use a particular vpi_ routine, access method, or to get
15properties from a particular object, run "grep [object or routine name] *.c".
16
17This script assumes you are using new +loadvpi= dynamic library PLI
18execution.  If you need to statically link your PLI libraries contact
19Pragmatic C to obtain the libraries and test scripts.
20
21HOW TO RUN THE TEST SCRIPT FOR ALL SYSTEMS EXCEPT MAC OSX AND CYGWIN (below)
22
231) Run the shell script inst_pli.sh [OS name].  Various compiler and Verilog
24   output messages will be printed but there should be no diff command
25   differences printed.  You must pass the name of your system as the one
26   argument to the script.  Depending on your platform, names are:
27   for X86 linux (suffix lnx), Sparc (suffix sparc-gcc),
28   X86 64-bit (suffix lnx64).
29
30   Run the shell script opt_inst_pli.sh [OS name] to test PLI using
31   optimizer (-O) incremental compiler.
32
33   By convention makefile.[OS name] assumes this test is run in release
34   directory tree with include files in pli_incs 2 directory levels up
35   and Cver binary also 2 levels up.
36
37   The commands to run Cver with dynamically loaded user PLI library
38   explicitly access the user .so library in this directory.  For your
39   PLI libraries, it is better to set the LD_LIBRARY_PATH environment
40   variables so explicit "./" is not needed
41
422) After completing the test, run clean.sh to remove work files.
43   The inst_pli.sh script removes each PLI library .so dynamic library after
44   running the test that uses it so unless something went wrong, you
45   do not need to run clean.sh.
46
473) Use makefile.[your OS] as a template for your vpi_ PLI 2.0 models.
48   Notice to use the PLI1 user defined PLI system/task function interface,
49   you must use +loadpli1= option.  To use newer PLI2 vpi_ user defined PLI
50   system/task function interface you must use +loadvpi=.  You should
51   use the +loadvpi= option for all new PLI code because of the additional
52   capabilities.  +loadpli1= system tasks can't be used with new vpi_
53   system task and function access methods because +loadpli1 system tasks
54   and functions must support old behavior.
55
56HOW TO RUN THE TEST SCRIPT FOR MAC OSX
57
581) Run the shell script inst_pli.osx.sh.  Notice you do not need the
59   OS shell argument here.  Various compiler and Verilog
60   output messages will be printed but there should be no diff command
61   differences printed.  You must run this different script for MAC OSX
62   because OSX uses .dylib suffix for dynamic libraries and uses the
63   mach dynamic library mechanism instead of normal .so and dlopen.
64
65   By convention, makefile.osx assumes this test is run in release
66   directory tree with include files in pli_incs 2 directory levels up
67   and Cver binary is in bin directory also 2 levels up.
68
69   The commands to run Cver with dynamically loaded user PLI library
70   explicitly access the user .dylib library in this directory.  For your
71   PLI libraries, it is better to set the LD_LIBRARY_PATH environment
72   variables so explicit "./" is not needed
73
74   Mac OSX linker (from mach OS) requires that a leading '_' be added to
75   each symbol name.  Cver does this automatically but you must make
76   sure that your bootstrap routine name does not start with underscore ('_').
77
782) After completing the test, run clean.sh to remove work files.
79   The inst_pli.osx.sh script removes each PLI library .so dynamic library
80   after running the test that uses it so unless something went wrong, you
81   do not need to run clean.sh.
82
833) Use makefile.osx as a template for your PLI models.  You must use
84   exactly the LFLAGS options and set and export LD_LIBRARY_PATH
85   environment variable, or your .dylib user PLI code will not load
86   properly.
87
88HOW TO RUN PLI ON CYGWIN
89   ****IMPORTANT - as of 02/02/04 the latest version of Cygwin contains a
90       bug which doesn't run the PLI correctly.  To run the PLI you will need
91       Cygwin version 1.5.5 or earlier.
92
931) First, you must make a cver dll and executable.  Go to the objs directory
94   (gplcver-*/objs/), and type the following commands:
95
96       make -f makefile.dll dll                 #makes the dll library
97       make -f makefile.dll exe                 #make the new cver.exe
98
992) Next copy the libcver.dll library to the lib directory:
100
101       cp libcver.dll /lib/
102
1033) In the vpi examples directory (this one), type the following commands:
104
105       make -f makefile.cygwin dll                #compiles libvfopen1.c
106       make -f makefile.cygwin run                #runs the PLI example
107
1084) All of these should compile correctly, and 'make -f makefile.vpi run',
109   runs the PLI example vfopen1.v after making the libvopen1 library.
110
111---------------------------------------------------------------------------
112
113Tests are:
114
115  1. async.c is asynchronously switching not gate implemented using vpi_.
116
117  2. vhello1.c and vhello2.c are "hello world" tests that also show use
118     of environment determing vpi_ routines.
119
120  3. vhelbad.c is a "hello world" test with some vpi_ errors to illustrate
121     vpi_ error checking.
122
123  4. findcaus.c is test that traverses Verilog design hierarchy.
124
125  5. vcabtsts.c is a test that registers every call back and prints a message
126     when it occurs.
127
128  6. vprtchg.c adds cbValueChange callbacks to every .v file varaibles and
129     prints a message on every change.
130
131  7. vprtchg2.c test also prints every variable change in a design
132     except it uses vpi_get_value and vpi_get_time instead of the built in
133     value change callback values.
134
135  8. vprtchg3.c prints new and old variable values using an on change call
136     back.
137
138  9. vprtdels.c accesses and prints every delay in a design.
139
140  10. vprtdel2.c illustrates vpi_ timscale handling.
141
142  11. vsetdels.c use vpi_ to set delays.
143
144  12. vsetval1.c tests various vpi_put_value uses.
145
146  13. vtimcbs.c illustrates use of various delay callbacks.
147
148  14. vfopen1.c implements $fopen built in system function using PLI 2.0.
149
150  15. vfopen2.c is  variant of the vfopen1.c test using vpi_ system task
151      instead of vpi_ system function.
152
153  16. vconta1.c tests continous assignments and non lvalue expression
154      decomposition.
155
156  17. vchkprt1.c tests most port and vpiHighConn/vpiLowConn one to one
157      and one to many iterators.  It is possible that either the .c model
158      or Cver's interpretation of the LRM are not right because Cver
159      assumes all bit iterators are LSB to MSB in terms of vpi_scan order.
160
161  18. vdrvld1.c tests vpiDriver and vpiLoad iterators for nets.
162
163  19. vdrvld2.c tests vpiDriver and vpiLoad iterators for bits of nets.
164
165  20. dfpsetd.c tests vpi_put_value to defparam and specparam during
166      cbEndOfCompile call back for delay annotation (allows delay annotation
167      to procedural delay controls and continuous assignments).  Test
168      sets same delays and produces same results using vpi_ as dfpsetd.vc
169      in install.tst directory that uses 2 SDF delay annotation files.
170