User guide
18-9
DirectC Interface
Note:
Argument direction, i.e. input, output, inout applies to all
arguments that follow it until the next direction occurs; the default
direction is input.
Table 18-1 C/C++ Function Return Types
Return Type What it specifies
int The C/C++ function returns a value for type int.
bit The C/C++ function returns the value of a bit, which is a Verilog
reg in two state simulation, if it is 32 bits or less.
reg The C/C++ function returns the value of a Verilog scalar reg.
string The C/C++ function returns a pointer to a character string.
pointer The C/C++ function returns a pointer.
void The C/C++ function does not return a value
Table 18-2 C/C++ Function Argument Directions
keyword What it specifies
input The C/C++ function can only read the value or address of the
argument. If you specify an input argument first, you can omit
the keyword input.
output The C/C++ function can only write the value or address of the
argument.
inout The C/C++ function can both read and write the value or address
of the argument.