Using SILOS and Verilog PLI (Programming Language Interface).

003_pli : Using SILOS and Verilog PLI (Programming Language Interface).

Minimum Required Versions: SILOS 4.12.1.C

The example 003_pli consists of a PLI source file, a Windows export definition file and a Verilog test file. We will create the PLI shared library and run a SILOS simulation that executes a "C" language function from Verilog source code.

Run a simulation that includes a system call to a PLI linked function.

  • Compile the "C" source file from the command line. For Windows use the command "cl /Zi /ML /Fr /c pli01.c" and for Linux use the command "gcc -c -fPIC pli01.c".
  • Link the shared library. For Windows use the command "link /def:pli01.def /dll libsilosdll.lib pli01.obj" and for Linux use the command "gcc -o pli01.so -fPIC -shared pli01.o".
  • Start SILOS, open the project file "pli01.spjx" and click "Go".
  • Observe the simulation output includes PLI related messages.
  • Double click on the message "Test Bench: tfarg 1 received 1 (hex)".
  • Observe the PLI related code in the source edit window.