User guide

18-47
DirectC Interface
vc_handle h4)
{
vc_putValueF(h1,"10",’b’);
vc_putValueF(h2,"11",’o’);
vc_putValueF(h3,"10",’d’);
vc_putValueF(h4,"aff",’x’);
}
The Verilog code displays the following:
r1=10 in binary r1=2 in decimal
r2=11 in octal r2 =9 in decimal
r3=10 in decimal r3=1010 in binary
r4=aff in hex r4= 2815 in decimal
void vc_putPointer(vc_handle, void*)
void *vc_getPointer(vc_handle)
These functions pass a generic type of pointer or string to a vc_handle
by reference. Do not use these functions for passing Verilog data (the
values of Verilog signals). Use them for passing C/C++ data instead.
vc_putPointer passes this data by reference to Verilog and
vc_getPointer receives this data in a pass by reference from
Verilog. You can also use these functions for passing Verilog strings.
For example:
extern void passback(output string, input string);
extern void printer(input pointer);
module top;
reg [31:0] r2;
initial
begin
passback(r2,"abc");
printer(r2);