Methods implemented in C and given import declarations in SystemVerilog can be called from SystemVerilog, such methods are referred to as imported methods.Imported tasks or functions are similar to SystemVerilog tasks or functions. Imported tasks or functions can have zero or more formal input, output, and inout arguments.
Imported tasks always return an int result as part of the DPI-C disable protocol and, thus, are declared in foreign code as int functions. We will discusses about the DPI-C disable protocol in following sections.
Imported functions can return a result or be defined as void functions.