User guide
18-29
DirectC Interface
UB *vc_array2ElemRef(UB*, U, U)
UB *vc_array3ElemRef(UB*, U, U, U)
U vc_getSize(UB*,U)
This routine is similar to the vc_mdaSize() routine used in abstract
access. It returns the following:
• If the U type parameter has a value of 0, it returns the number of
indices in an 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 UB pointer is null, this routine returns 0.
Using Abstract Access
In abstract access VCS creates a descriptor for each argument in a
function call. The corresponding formal parameters in the function
uses a specially defined pointer to these descriptors called
vc_handle. In abstract access you use these “handles” to pass data
and values by reference to and from these descriptors.
The idea behind abstract access is that you don’t have to worry about
the type you use for parameters, because you always use a special
pointer type called vc_handle.
In abstract access VCS creates a descriptor for every argument that
you enter in the function call in your Verilog code. The vc_handle is
a pointer to the descriptor for the argument. It is defined as follows:
typdef struct VeriC_Descriptor *vc_handle;