User guide

18-34
DirectC Interface
int i1 = vc_isVector(h1),
i2 = vc_isVector(h2),
i3 = vc_isVector(h3),
i4 = vc_isVector(h4);
printf("\ni1=%d i2=%d i3=%d i4=%d\n\n",i1,i2,i3,i4);
}
The function prints the following:
i1=0 i2=1 i3=0 i4=0
int vc_isMemory(vc_handle)
This routine returns a 1 value if the vc_handle is to a memory. It
returns a 0 value for a bit or reg that is not a memory. For example,
using the Verilog code from the previous example, and the following
C/C++ function:
#include <stdio.h>
#include "DirectC.h"
scalarfinder(vc_handle h1, vc_handle h2, vc_handle h3,
vc_handle h4)
{
int i1 = vc_isMemory(h1),
i2 = vc_isMemory(h2),
i3 = vc_isMemory(h3),
i4 = vc_isMemory(h4);
printf("\ni1=%d i2=%d i3=%d i4=%d\n\n",i1,i2,i3,i4);
}
The function prints the following:
i1=0 i2=0 i3=1 i4=1