Table D-1: Mapping data types
|
SystemVerilog
type |
C type |
|
byte |
char |
|
shortint |
short int |
|
int |
int |
|
longint |
long long |
|
real |
double |
|
shortreal |
float |
|
chandle |
void* |
|
string |
char* |
input arguments, with the exception of open
arrays, are passed by value or by reference, depending on the size. Small
values of formal input arguments are passed by value. The following data types
are considered small:
byte, shortint, int, longint, real, shortreal
chandle, string
bit (i.e., 2-state) packed arrays up to 32 bits (canonical
representation shall be used, like for a function result; thus a small packed
bit array shall be represented as const
svBitVec32)
Types of a function result are restricted to the
following SystemVerilog data types (see Table D-1 for the corresponding C
type):
byte, shortint, int, longint, real, shortreal, chandle, string
packed bit
arrays up to 32 bits.