User guide

18-7
DirectC Interface
attribute ::= pure
return_type ::= void | reg | bit | DirectC_primitive_type
| small_bit_vector
small_bit_vector ::= bit [ (constant_expression : constant_expression ) ]
extern_func_args ::= extern_func_arg ( , extern_func_arg ) *
extern_func_arg ::= arg_direction ? arg_type arg_id ?
arg_direction ::= input | output | inout
arg_type ::= bit_or_reg_type | array_type | DirectC_primitive_type
bit_or_reg_type ::= ( bit | reg ) optional_vector_range ?
optional_vector_range ::= [ ( constant_expression : constant_expression ) ? ]
array_type ::= bit_or_reg_type array [ (constant_expression :
constant_expression ) ? ]
DirectC_primitive_type ::= int | real | pointe
r | string
Here:
extern
Keyword that begins the declaration of the C/C++ function
declaration.
access_mode
Specifies the mode of access in the declaration. Enter C for direct
access, or A for abstract access. Using this entry enables some
functions to use direct access and others to use abstract access.
attribute
An optional attribute for the function.
The pure attribute enables some optimizations. Enter this
attribute if the function has no side effects and is dependent only
on the values of its input parameters.
return_type
The valid return types are int, bit, reg, string, pointer, and
void. See Table 18-1 for a description of what these types specify.