Sunday, April 24, 2011

Verilog Program Language Interface (PLI) and Verilog Procedural Interface (VPI)

According to "The Principles of Verilog PLI", Programming Language Interface (PLI) is a way to provide Application Program Interface (API) to Verilog HDL. Essentially it is a mechanism to invoke a C function from a Verilog code. The construct which invokes a PLI routine in a Verilog code is usually called a system call. The common system calls built-in to most Verilog simulators are $display, $monitor, $finish etc.

The latest version is PLI 2 or Verilog Procedural Interface (VPI).

The following link shows how to use PLI with VCS:


A Verilog LPI website


give a good tutorial:

Introduction
How it Works
Example - Hello World
C Code
Verilog Code
Running the Simulation
space.gif
Writing PLI Application
PLI Application Specification.
Calling the C function.
C Code - Basic
Verilog Code
C Code - Full
Linking With Simulator
VCS
Modelsim
Counter Simulation Output
space.gif
PLI Routines.
Access Routines
Access Routines Reference
Program Flow using access routines
Handle to Objects
Value change link(VCL)
Utility Routines
Classification of Utility Routines
Other Useful functions
veriusertfs
endofcompile_routines
err_intercept
PLI Example
Clock Generator
Clock Generator HDL Wrapper
Counter Monitor
Counter Monitor HDL Wrapper
Counter TestGen
Counter TestGen HDL Wrapper
HDL TestBench Top
Sample : Test File
Sample Ouput
space.gif
Verilog Procedural Interface (VPI)
Steps : Writing Application Using VPI
Write a C function
Associating C Functions with a New System Task
Registering New System Tasks
Invoking System Tasks
Linking with Simulator
VCS
Modelsim
NCSim
VPI Routines

No comments:

Followers

Blog Archive

About Me

My photo
HD Multimedia Technology player