User guide
18-81
DirectC Interface
Enabling C/C++ Functions
The +vc compile-time option is required for enabling the direct call
of C/C++ functions in your Verilog code. When you use this option
you can enter the C/C++ source files on the vcs command line. These
source files must have a .c extension.
char
*vc_MemoryStringF(vc_hand
le, U indx, char)
This routine works like the vc_MemoryString function
except that you specify a radix with the third parameter.
The valid radixes are ’b’, ’o’, ’d’, and ’x’.
void
vc_FillWithScalar(vc_hand
le, scalar)
This routine fills all the bits or a reg, bit, or memory with all
1, 0, x, or z values (you can choose only one of these four
values).
char
*vc_argInfo(vc_handle)
Returns a string containing the information about the
parameter in the function call in your Verilog source code.
int vc_Index(vc_handle, U,
...)
Returns the index of a linearized array, or returns -1 if the
U type parameter is not an index of a multi-dimensional
array, or the vc_handle parameter is not a handle to a
multi-dimensional array of the reg data type.
int vc_Index2(vc_handle,
U, U)
Specialized version of vc_Index() where the two U
parameters are the indices in a two-dimensional array.
int vc_Index3(vc_handle,
U, U, U)
Specialized version of vc_Index() where the two U
parameters are the indexes in a three-dimensional array.
U vc_mdaSize(vc_handle, U) If the U type parameter has a value of 0, it returns the
number of indices in multi-dimensional array. If the U type
parameter has a value greater than 0, it returns the number
of values in the index specified by the parameter. There
is an error condition if this parameter is out of the range of
indices. If the vc_handle parameter is not a
multi-dimensional array, it returns 0.
Access Routine Description