User guide
18-11
DirectC Interface
The keyword input is omitted. This keyword can be omitted if the
first argument specified is an input argument.
Example 3
extern string return_string();
This example declares a C/C++ function named return_string.
This function returns a character string and takes no arguments.
Example 4
extern void receive_string( input string r5);
This example declares a C/C++ function named receive_string.
It is a void function. At some time earlier in the simulation, another C/
C++ function passed the address of a character string to reg r5. When
we call this function, it reads the address in reg r5.
Example 5
extern pointer return_pointer();
This example declares a C/C++ function named return_pointer.
When we call this function, it returns a pointer.
Example 6
extern void receive_pointer (input pointer r6);
This example declares a C/C++ function named receive_pointer.
When we call this function the address in reg r6 is passed to the
function.
Example 7
extern void memory_reorg (input bit [32:0] array [7:0] mem2,
output bit [32:0] array [7:0] mem1);