User guide
18-27
DirectC Interface
Here the parameters in and out are pointers to type double because
their corresponding arguments are type real.
Using the vc_hdrs.h File
When you compile your design for DirectC (by including the +vc
compile-time option), VCS writes a file in the current directory named
vc_hdrs.h. In this file are extern declarations for all the C/C++
functions that you declared in your Verilog code. For example, if you
compile the Verilog code that contains all the C/C++ declarations in
the examples in this section, the vc_hdrs.h file contains the following
extern declarations:
extern void memory_rewriter(UB* mem2, /*OUT*/UB* mem1);
extern U return_vector_bit(U r3);
extern void receive_pointer(void* r6);
extern void incr(/*INOUT*/U* r7);
extern void* return_pointer();
extern scalar return_reg(scalar r1);
extern void reality(double* real1, /*OUT*/double* real2);
extern void receive_string(char* r5);
extern void passbig2(vec32* r8, /*OUT*/vec32* r9);
extern char* return_string();
extern void passbig1(U* r8, /*OUT*/U* r9);
These declarations contain the /*OUT*/ comment in the parameter
specification if its corresponding argument in your Verilog code is of
type output in the declaration of the function.
These declarations contain the /*INOUT*/ comment in the
parameter specification if its corresponding argument in your Verilog
code is of type inout in the declaration of the function.