Vl-dpiexport
Represents a single export of a SystemVerilog function/task for use
in C programs via the Direct Programming Interface.
This is a product type introduced by defprod.
Fields
- name — stringp
- The SystemVerilog version of the name (may differ from the C
function's name.)
- c-name — stringp
- The name of the new C function to create which will correspond
to this SystemVerilog function/task.
- spec — vl-dpispec-p
- Indicates whether this function uses the deprecated "DPI"
or the replacement "DPI-C" interface.
- fntask — vl-dpifntask-p
- Are we exporting a function or a task?
- atts — vl-atts
- Any attributes associated with this DPI export.
- loc — vl-location
- Where this DPI export was found in the source code.
SystemVerilog's Direct Programming Interface (DPI) allows for
SystemVerilog code to invoke functions that are written in C, and for
C programs to invoke SystemVerilog functions/tasks. (In theory the
DPI can also be used to connect to other languages besides C, but
we'll just say C here.)
A DPI export statement is for making SystemVerilog tasks and
functions available to C programs. A DPI import goes the other
way and we treat them separately; see vl-dpiimport.
We cannot imagine any way for VL to really comprehend or make any
real use of imported C code. However, we do try to at least parse and
represent the actual DPI export statements so that they don't lead to
parse errors.
Aside from parsing, we largely don't care about DPI exports.
Unlike DPI imports, we don't treat exports as scope items because if
you look up a function foo, you want to find its definition, not
the fact that it was exported.
Subtopics
- Vl-dpiexport-fix
- Fixing function for vl-dpiexport structures.
- Vl-dpiexport-p
- Recognizer for vl-dpiexport structures.
- Vl-dpiexport-equiv
- Basic equivalence relation for vl-dpiexport structures.
- Make-vl-dpiexport
- Basic constructor macro for vl-dpiexport structures.
- Change-vl-dpiexport
- Modifying constructor for vl-dpiexport structures.
- Vl-dpiexport->spec
- Get the spec field from a vl-dpiexport.
- Vl-dpiexport->fntask
- Get the fntask field from a vl-dpiexport.
- Vl-dpiexport->c-name
- Get the c-name field from a vl-dpiexport.
- Vl-dpiexport->name
- Get the name field from a vl-dpiexport.
- Vl-dpiexport->loc
- Get the loc field from a vl-dpiexport.
- Vl-dpiexport->atts
- Get the atts field from a vl-dpiexport.
- Vl-dpispec-p
- Representation of the "DPI" or "DPI-C" specification
used in DPI import/exports.
- Vl-dpifntask-p
- Indicates whether we are exporting a function or task.