Verilog Parser

Describes a declaration of a user function. More...

Data Structures

struct  ast_function_declaration
 Fully describes the declaration of a verilog function. More...
 
struct  ast_function_item_declaration
 Describes a function item declaration, which is either a block item or port declaration. More...
 
struct  ast_range_or_type
 Holds either a range or a type data item. More...
 
struct  ast_task_port
 

Enumerations

enum  ast_task_port_type {
  PORT_TYPE_TIME, PORT_TYPE_REAL, PORT_TYPE_REALTIME, PORT_TYPE_INTEGER,
  PORT_TYPE_NONE
}
 Return value type for a task. More...
 

Functions

ast_function_declarationast_new_function_declaration (ast_boolean automatic, ast_boolean is_signed, ast_boolean function_or_block, ast_range_or_type *rot, ast_identifier identifier, ast_list *item_declarations, ast_statement *statements)
 Creates and returns a function declaration node. More...
 
ast_function_item_declarationast_new_function_item_declaration ()
 Creates and returns a new function item declaration. More...
 
ast_range_or_typeast_new_range_or_type (ast_boolean is_range)
 Creates and returns a new object storing either a range or a type. More...
 
ast_task_portast_new_task_port (ast_port_direction direction, ast_boolean reg, ast_boolean is_signed, ast_range *range, ast_task_port_type type, ast_list *identifiers)
 

Detailed Description

Describes a declaration of a user function.

See also
ast-node-function-calling

Enumeration Type Documentation

Return value type for a task.

Enumerator
PORT_TYPE_TIME 

Time value.

PORT_TYPE_REAL 

Real valued number.

PORT_TYPE_REALTIME 

Real valued time.

PORT_TYPE_INTEGER 

Integer type.

PORT_TYPE_NONE 

No specified type.

Function Documentation

ast_function_declaration* ast_new_function_declaration ( ast_boolean  automatic,
ast_boolean  is_signed,
ast_boolean  function_or_block,
ast_range_or_type rot,
ast_identifier  identifier,
ast_list item_declarations,
ast_statement *  statements 
)

Creates and returns a function declaration node.

Parameters
automaticIs automatic?
is_signedIs the returned value signed?
function_or_blockIFF true statements is list of function_item_declaration else list of block_item_declaration.
rotRange or type.
identifierFunction name.
item_declarationsInternal variable declarations.
statementsExecutable statements.
ast_function_item_declaration* ast_new_function_item_declaration ( )

Creates and returns a new function item declaration.

Note
All member fields must be filled out manaully. THis function just ensures the memory is allocated properly.
ast_range_or_type* ast_new_range_or_type ( ast_boolean  is_range)

Creates and returns a new object storing either a range or a type.

Parameters
[in]is_range- IFF true then the structure's union contains a range structure, otherwise it contains a type structure.
Note
Expects the union member of ast_range_or_type to be set manually.
Parameters
[in]is_range- true if the contained object will be a range instance, else false.
ast_task_port* ast_new_task_port ( ast_port_direction  direction,
ast_boolean  reg,
ast_boolean  is_signed,
ast_range *  range,
ast_task_port_type  type,
ast_list identifiers 
)

< The list of port names.

Parameters
directionInput or output to the port.
regIs is a registered value?
is_signedDoes it represent a signed value?
rangeBit or item range for arrays.
typeData type (if any)
identifiersThe list of port names.