ACT Library
|
Contains the data structures for each ACT sub-language. More...
Go to the source code of this file.
Classes | |
class | act_attr |
Attribute list associated with an instance. More... | |
class | act_size_spec_t |
Sizing specifier for variables. More... | |
class | act_prs_expr |
A production rule expression, corresponding to the guard for the production rule. More... | |
class | act_prs_lang |
Structure that holds a prs sub-language body. This consists of a linked-list of individual items in the prs body. More... | |
class | act_prs |
Structure that holds all the prs { } blocks in a particular scope. This is a linked-list of blocks, each of which can have their own voltage domain specification. More... | |
class | act_chp_gc |
Data structure for guarded commands. More... | |
class | act_chp_lang |
Data structure for the chp sub-language body. More... | |
class | act_func_arguments |
Used to represent log(...) arguments. Holds either a string or an expression. More... | |
class | act_chp |
Holds a CHP sub-language. More... | |
class | act_spec |
The specification sub-language. More... | |
class | act_refine |
The refinement sub-language just contains an ActBody. More... | |
class | act_sizing_directive |
An individual sizing directive. More... | |
class | act_sizing |
The sizing { ... } body data. More... | |
class | act_initialize |
The Initialize { ... } body. Only used in the global namespace. More... | |
class | act_dataflow_element |
An individual dataflow element. More... | |
class | act_dataflow_order |
An order directive in the dataflow language, used for optimizations in the presence of hierarchy. More... | |
class | act_dataflow |
The dataflow sub-language. More... | |
class | act_languages |
This holds all the sub-langugae bodies in a namespace/user-defined type definition. More... | |
Macros | |
#define | ACT_CHP_STMT_END 17 |
#define | ACT_SPEC_ISTIMING(x) ((x)->type == -1 || (x)->type == -2 || (x)->type == -3 || (x)->type == -4) |
#define | ACT_SPEC_ISTIMINGFORK(x) ((x)->type == -1 || (x)->type == -2) |
Typedefs | |
typedef struct act_attr | act_attr_t |
typedef struct act_prs_expr | act_prs_expr_t |
typedef struct act_prs_lang | act_prs_lang_t |
typedef struct act_chp_gc | act_chp_gc_t |
typedef struct act_chp_lang | act_chp_lang_t |
typedef struct act_func_arguments | act_func_arguments_t |
typedef void *(* | ACT_VAR_CONV) (void *, void *) |
Enumerations | |
enum | act_prs_expr_type { ACT_PRS_EXPR_AND = 0 , ACT_PRS_EXPR_OR = 1 , ACT_PRS_EXPR_VAR = 2 , ACT_PRS_EXPR_NOT = 3 , ACT_PRS_EXPR_LABEL = 4 , ACT_PRS_EXPR_ANDLOOP = 5 , ACT_PRS_EXPR_ORLOOP = 6 , ACT_PRS_EXPR_TRUE = 7 , ACT_PRS_EXPR_FALSE = 8 } |
enum | act_prs_lang_type { ACT_PRS_RULE = 0 , ACT_PRS_GATE = 1 , ACT_PRS_LOOP = 2 , ACT_PRS_TREE = 3 , ACT_PRS_SUBCKT = 4 , ACT_PRS_CAP = 5 } |
enum | act_chp_lang_type { ACT_CHP_COMMA = 0 , ACT_CHP_SEMI = 1 , ACT_CHP_SELECT = 2 , ACT_CHP_SELECT_NONDET = 3 , ACT_CHP_LOOP = 4 , ACT_CHP_DOLOOP = 5 , ACT_CHP_SKIP = 6 , ACT_CHP_ASSIGN = 7 , ACT_CHP_SEND = 8 , ACT_CHP_RECV = 9 , ACT_CHP_FUNC = 10 , ACT_CHP_SEMILOOP = 11 , ACT_CHP_COMMALOOP = 12 , ACT_CHP_HOLE = 13 , ACT_CHP_ASSIGNSELF = 14 , ACT_CHP_MACRO = 15 , ACT_HSE_FRAGMENTS = 16 } |
enum | act_dataflow_element_types { ACT_DFLOW_FUNC = 0 , ACT_DFLOW_SPLIT = 1 , ACT_DFLOW_MERGE = 2 , ACT_DFLOW_MIXER = 3 , ACT_DFLOW_ARBITER = 4 , ACT_DFLOW_CLUSTER = 5 , ACT_DFLOW_SINK = 6 } |
Contains the data structures for each ACT sub-language.
#define ACT_CHP_STMT_END 17 |
1 more than the last enumeration of act_chp_lang_type
#define ACT_SPEC_ISTIMING | ( | x | ) | ((x)->type == -1 || (x)->type == -2 || (x)->type == -3 || (x)->type == -4) |
#define ACT_SPEC_ISTIMINGFORK | ( | x | ) | ((x)->type == -1 || (x)->type == -2) |
typedef struct act_attr act_attr_t |
typedef struct act_chp_gc act_chp_gc_t |
typedef struct act_chp_lang act_chp_lang_t |
typedef struct act_func_arguments act_func_arguments_t |
typedef struct act_prs_expr act_prs_expr_t |
typedef struct act_prs_lang act_prs_lang_t |
typedef void *(* ACT_VAR_CONV) (void *, void *) |
Used as a leaf conversion function in act_prs_expr_nnf
enum act_chp_lang_type |
Enumeartion tyoe to capture the elements of a chp sub-language body
Enumerator | |
---|---|
ACT_CHP_COMMA | comma or parallel composition |
ACT_CHP_SEMI | sequential composition |
ACT_CHP_SELECT | selection statement |
ACT_CHP_SELECT_NONDET | non-deterministic selection statement |
ACT_CHP_LOOP | CHP while loop. |
ACT_CHP_DOLOOP | CHP do loop. |
ACT_CHP_SKIP | skip statement |
ACT_CHP_ASSIGN | assignment |
ACT_CHP_SEND | send operation |
ACT_CHP_RECV | receive operation |
ACT_CHP_FUNC | used for log(...) logging statement |
ACT_CHP_SEMILOOP | syntactic replication with semi-colon; removed after expansion |
ACT_CHP_COMMALOOP | syntactic replication with commas; removed after expansion |
ACT_CHP_HOLE | a "hole"—only used by downstream tools |
ACT_CHP_ASSIGNSELF | same as assign, used to indicate self-assignment in some tools |
ACT_CHP_MACRO | a macro call, gets removed when chp_expand() is called |
ACT_HSE_FRAGMENTS | used to support fragmented hse |
The type field used for dataflow elements
enum act_prs_expr_type |
Enumeration type for the prs guards used in the prs sub-language data structure.
enum act_prs_lang_type |
void act_chp_free | ( | act_chp_lang_t * | ) |
Free a CHP lang body
This checks to see if the variable is correctly accessible by a macro. This is an internal call, but is also needed by expr_expand(); hence it is exported.
s | is the scope |
id | is the identifer to be checked. |
int act_dev_string_to_value | ( | const char * | s | ) |
Convert the device flavor string into an index. The default index is 0, so 0 should always be the default transistor flavor
const char * act_dev_value_to_string | ( | int | ) |
Convert a device flavor value to the flavor string name
act_size_spec_t * act_expand_size | ( | act_size_spec_t * | sz, |
ActNamespace * | ns, | ||
Scope * | s | ||
) |
Expansion helper for width/length/flavor/folding spec on variables
void act_expr_collect_ids | ( | list_t * | l, |
Expr * | e | ||
) |
Pass in a non-NULL list of ActId *'s. This function collects any new ids and adds them to the list l. This list is suitable for use in act_expr_to_string and
l | is the list that is used to collect all the IDs in the expression |
e | is the Expr pointer |
int act_expr_has_neg_probes | ( | Expr * | e | ) |
Check if an expression has a negated probe. Only use this on a guard expression
char * act_expr_to_string | ( | list_t * | id_list, |
Expr * | e | ||
) |
Construct a unique string that summarizes the expression tree for an ACT Expr data structure.
id_list | is the list of ActId pointers or any other opaque pointer. The string contains position values for leaf variables. |
e | is the expression |
int act_hse_direction | ( | act_chp_lang_t * | , |
ActId * | |||
) |
Returns 0 if the ID is not found, 1 if it is read, 2 if it is written
void act_print_one_prs | ( | FILE * | fp, |
act_prs_lang_t * | p | ||
) |
Print a single production rule
void act_print_size | ( | FILE * | fp, |
act_size_spec_t * | sz | ||
) |
act_prs_expr_t * act_prs_celement_rule | ( | act_prs_expr_t * | e | ) |
Apply a C-element transformation to the rule. This makes a copy of the expression and inverts each variable in the rule.
act_prs_expr_t * act_prs_complement_rule | ( | act_prs_expr_t * | e | ) |
Compute a new prs expression that is the complement of the provided expression. The original rule is copied.
void act_prs_expr_free | ( | act_prs_expr_t * | e | ) |
Free a prs expression
act_prs_expr_t * act_prs_expr_nnf | ( | void * | cookie, |
struct Hashtable * | at_hash, | ||
act_prs_expr_t * | e, | ||
ACT_VAR_CONV | conv_var | ||
) |
Makes a copy of the provided prs expression, and converts it into negation-normal form. Any at-labels are translated into their corresponding expression as well.
All variable pointers at the leaves are converted using the conv_var function that is an argument to this function. The first argument of the function is the cookie, the second is the ID pointer for the expression.
at_hash | is a hash table from label strings to act_prs_lang_t pointers |
e | is the prs expression |
cookie | is used for the conversion function |
conv_var | is the conversion function used for the leaves of the expression. |
char * act_prs_expr_to_string | ( | list_t * | id_list, |
act_prs_expr_t * | e | ||
) |
Construct a unique string that summarizes the expression tree for production rule expressions
id_list | is the list of ActId pointers or any other opaque pointer. The string contains position values for leaf variables. |
e | is the expression |
const char * act_spec_string | ( | int | type | ) |
Given a spec #, returns the string from the spec table corresponding to the spec directive.
void chp_check_channels | ( | act_chp_lang_t * | c, |
Scope * | s | ||
) |
Check that the CHP body only accesses unfragmented channels/integers.
act_chp * chp_expand | ( | act_chp * | , |
ActNamespace * | , | ||
Scope * | |||
) |
Expand a chp { ... } block. Also used for hse { ... }
act_chp_lang_t * chp_expand | ( | act_chp_lang_t * | , |
ActNamespace * | , | ||
Scope * | |||
) |
chp_expand helper for the items within the language block
void chp_expand_macromode | ( | int | mode | ) |
Set the CHP expansion mode (1 if in macro, 0 otherwise)
void chp_print | ( | FILE * | , |
act_chp * | |||
) |
void chp_print | ( | FILE * | fp, |
act_chp_lang_t * | c | ||
) |
act_dataflow * dflow_expand | ( | act_dataflow * | , |
ActNamespace * | , | ||
Scope * | |||
) |
Expand a dataflow { ... } block
void dflow_print | ( | FILE * | , |
act_dataflow * | |||
) |
void dflow_print | ( | FILE * | , |
act_dataflow_element * | |||
) |
ActId * expand_var_write | ( | ActId * | id, |
ActNamespace * | ns, | ||
Scope * | s | ||
) |
void hse_print | ( | FILE * | , |
act_chp * | |||
) |
act_initialize * initialize_expand | ( | act_initialize * | , |
ActNamespace * | , | ||
Scope * | |||
) |
Expand an Initialize { ... } block
void initialize_print | ( | FILE * | , |
act_initialize * | |||
) |
act_attr_t * inst_attr_expand | ( | act_attr_t * | a, |
ActNamespace * | ns, | ||
Scope * | s | ||
) |
Expansion helper for instance attributes
act_attr_t * prs_attr_expand | ( | act_attr_t * | a, |
ActNamespace * | ns, | ||
Scope * | s | ||
) |
Expansion helper for prs attributes
act_prs * prs_expand | ( | act_prs * | , |
ActNamespace * | , | ||
Scope * | |||
) |
Expand a prs { ... } block
void prs_print | ( | FILE * | , |
act_prs * | |||
) |
void refine_expand | ( | act_refine * | , |
ActNamespace * | , | ||
Scope * | |||
) |
Expand a refine { .. } block
void refine_print | ( | FILE * | , |
act_refine * | |||
) |
act_sizing * sizing_expand | ( | act_sizing * | , |
ActNamespace * | , | ||
Scope * | |||
) |
Expand a sizing { ... } block
void sizing_print | ( | FILE * | , |
act_sizing * | |||
) |
act_spec * spec_expand | ( | act_spec * | , |
ActNamespace * | , | ||
Scope * | |||
) |
Expand a spec { ... } block
void spec_print | ( | FILE * | , |
act_spec * | |||
) |