Technical data
Using the VHDL FLI with foreign subprograms
460
-
VHDL Foreign Language Interface and Verilog PLI ModelSim EE/PLUS Reference Manual
"Enumeration" refers to everything that is declared in VHDL as an enumeration
with 256 or fewer elements. For example: BIT, BOOLEAN, CHARACTER,
STD_LOGIC.
"Array" refers to everything that is declared in VHDL as an array. For example:
STRING, BIT_VECTOR, STD_LOGIC_VECTOR. Arrays are not NULL
terminated.
"Array" SIGNAL parameters are passed as a varID representing an array of
signalID's.
Match VHDL return type with the C return type
Use the table below to match the C return types in your foreign C subprogram to
the VHDL return types in your VHDL code.
C code and VHDL examples
The following examples illustrate this association between C functions and
VHDL procedures: the C function is connected to the VHDL procedure through
the FOREIGN attribute declaration.
Access Record -- Not supported --
VHDL T
y
pe IN/INOUT/OUT
Integer int
Enumeration int
Real -- Not supported --
Time -- Not supported --
Array -- Not supported --
File -- Not supported --
Record -- Not supported --
Access -- Not supported --
Parameters of class CONSTANT or VARIABLE class SIGNAL
VHDL T
y
pe IN INOUT/OUT IN