Verilog Parser

Describes items found inside procedural blocks. More...

Modules

 Task Enable Statements
 Describes task enable statements.
 
 Loop Statements
 Describes for and while loop representation.
 
 Case Statements
 
 If Else Statements
 

Data Structures

struct  ast_assignment
 Top level descriptor for an assignment. More...
 
struct  ast_continuous_assignment
 Describes a set of assignments with the same drive strength and delay. More...
 
struct  ast_hybrid_assignment
 caters for procedural_continuous_assignments in Annex A.6.2 of spec. More...
 
struct  ast_procedural_assignment
 Describes a procedural assignment, can be blocking or nonblocking. More...
 
struct  ast_pulse_control_specparam
 Describes the pulse characteristics in signal transmission? More...
 
struct  ast_range
 Describes a range or dimension. More...
 
struct  ast_single_assignment
 encodes a single assignment. More...
 
struct  ast_statement
 Describes a single statement, and can contain sequential statement blocks. More...
 

Enumerations

enum  ast_assignment_type { ASSIGNMENT_CONTINUOUS, ASSIGNMENT_BLOCKING, ASSIGNMENT_NONBLOCKING, ASSIGNMENT_HYBRID }
 Describes the type (and implicitly, the location) of an assignment. More...
 
enum  ast_hybrid_assignment_type {
  HYBRID_ASSIGNMENT_ASSIGN, HYBRID_ASSIGNMENT_DEASSIGN, HYBRID_ASSIGNMENT_FORCE_NET, HYBRID_ASSIGNMENT_FORCE_VAR,
  HYBRID_ASSIGNMENT_RELEASE_VAR, HYBRID_ASSIGNMENT_RELEASE_NET
}
 Describes the different types of procedural continuous assignments.
 
enum  ast_statement_type {
  STM_GENERATE =0, STM_ASSIGNMENT =1, STM_CASE =2, STM_CONDITIONAL =3,
  STM_DISABLE =4, STM_EVENT_TRIGGER =5, STM_LOOP =6, STM_BLOCK =7,
  STM_BLOCK_ALWAYS =8, STM_BLOCK_INITIAL =9, STM_TIMING_CONTROL =10, STM_FUNCTION_CALL =11,
  STM_TASK_ENABLE =12, STM_WAIT =13, STM_MODULE_ITEM =14
}
 Describes the kind of statement in a statement struct. More...
 

Functions

ast_assignment * ast_new_blocking_assignment (ast_lvalue *lval, ast_expression *expression, ast_timing_control_statement *delay_or_event)
 Creates and returns a new blocking procedural assignment object. More...
 
ast_assignment * ast_new_continuous_assignment (ast_list *assignments, ast_drive_strength *strength, ast_delay3 *delay)
 Creates and returns a new continuous assignment object. More...
 
ast_assignment * ast_new_hybrid_assignment (ast_hybrid_assignment_type type, ast_single_assignment *assignment)
 Creates a new hybrid assignment of the specified type. More...
 
ast_assignment * ast_new_hybrid_lval_assignment (ast_hybrid_assignment_type type, ast_lvalue *lval)
 Creates a new hybrid assignment of the specified type. More...
 
ast_assignment * ast_new_nonblocking_assignment (ast_lvalue *lval, ast_expression *expression, ast_timing_control_statement *delay_or_event)
 Creates and returns a new nonblocking procedural assignment object. More...
 
ast_pulse_control_specparamast_new_pulse_control_specparam (ast_expression *reject_limit, ast_expression *error_limit)
 Creates and returns a new pulse control data structure.
 
ast_range * ast_new_range (ast_expression *upper, ast_expression *lower)
 Creates and returns a new range or dimension representation node.
 
ast_single_assignment * ast_new_single_assignment (ast_lvalue *lval, ast_expression *expression)
 Creates and returns a new continuous assignment. More...
 
ast_statement * ast_new_statement (ast_node_attributes *attr, ast_boolean is_function_statement, void *data, ast_statement_type type)
 Creates a new AST statement and returns it. More...
 

Detailed Description

Describes items found inside procedural blocks.

Enumeration Type Documentation

Describes the type (and implicitly, the location) of an assignment.

Enumerator
ASSIGNMENT_CONTINUOUS 

Continuous (combinatorial) assignment.

ASSIGNMENT_BLOCKING 

Procedural, blocking assignment.

ASSIGNMENT_NONBLOCKING 

Procedural, non-blocking assignment.

ASSIGNMENT_HYBRID 
See also
ast_hybrid_assignment

Describes the kind of statement in a statement struct.

Enumerator
STM_ASSIGNMENT 

Blocking, non-blocking, continuous.

STM_CONDITIONAL 

if/if-else/if-elseif-else

STM_LOOP 

While, for, repeat.

STM_BLOCK 

Par, sequential.

STM_BLOCK_ALWAYS 

always @ blocks

STM_BLOCK_INITIAL 

Initial blocks.

STM_TASK_ENABLE 

System, user.

Function Documentation

ast_assignment* ast_new_blocking_assignment ( ast_lvalue lval,
ast_expression *  expression,
ast_timing_control_statement delay_or_event 
)

Creates and returns a new blocking procedural assignment object.

Parameters
lvalThe net/variable being assigned to.
expressionAssign it this value.
delay_or_eventThe timing module
ast_assignment* ast_new_continuous_assignment ( ast_list assignments,
ast_drive_strength *  strength,
ast_delay3 *  delay 
)

Creates and returns a new continuous assignment object.

All of the assignments will have the same drive strength and signal delay properties.

Parameters
assignmentsThe list of assignments to make.
strengthThe drive strength
delayDelay in making the assignment.
ast_assignment* ast_new_hybrid_assignment ( ast_hybrid_assignment_type  type,
ast_single_assignment *  assignment 
)

Creates a new hybrid assignment of the specified type.

Parameters
typeThe assignment type.
assignmentThe things being assigned.
ast_assignment* ast_new_hybrid_lval_assignment ( ast_hybrid_assignment_type  type,
ast_lvalue lval 
)

Creates a new hybrid assignment of the specified type.

Parameters
typeFORCE or (DE)ASSIGN.
lvalThe thing to change.
ast_assignment* ast_new_nonblocking_assignment ( ast_lvalue lval,
ast_expression *  expression,
ast_timing_control_statement delay_or_event 
)

Creates and returns a new nonblocking procedural assignment object.

Parameters
lvalThe net/variable being assigned to.
expressionThe value it will take.
delay_or_eventTiming model.
ast_single_assignment* ast_new_single_assignment ( ast_lvalue lval,
ast_expression *  expression 
)

Creates and returns a new continuous assignment.

Creates and returns a new continuous assignment.

Parameters
lvalThe thing being assigned to.
expressionThe value it takes on.
ast_statement* ast_new_statement ( ast_node_attributes *  attr,
ast_boolean  is_function_statement,
void *  data,
ast_statement_type  type 
)

Creates a new AST statement and returns it.

Note
Requires the data field of the union to be filled out manually.