28#include <common/mstring.h>
29#include <common/list.h>
30#include <common/array.h>
248#define ACT_CHP_STMT_END 17
388#define ACT_SPEC_ISTIMING(x) ((x)->type == -1 || (x)->type == -2 || (x)->type == -3 || (x)->type == -4)
389#define ACT_SPEC_ISTIMINGFORK(x) ((x)->type == -1 || (x)->type == -2)
828typedef void *(*ACT_VAR_CONV) (
void *,
void *);
849 struct Hashtable *at_hash,
This class is used to hold the contents of the body of any user-defined type or namespace....
Definition: body.h:52
This class is used to store Act identifiers that correspond to instances. Identifiers have an optiona...
Definition: act_id.h:56
The ActNamespace class holds all the information about a namespace.
Definition: namespaces.h:469
This is the data structure that holds all instances and their associated types within a scope....
Definition: namespaces.h:77
This holds all the sub-langugae bodies in a namespace/user-defined type definition.
Definition: lang.h:641
act_sizing * getsizing()
Definition: lang.h:679
act_initialize * getinit()
Definition: lang.h:682
act_languages()
Definition: lang.h:643
int hasCktLang()
Definition: lang.h:697
void setchp(act_chp *x)
Definition: lang.h:665
void Print(FILE *fp)
Definition: lang.h:653
act_chp * gethse()
Definition: lang.h:667
void setprs(act_prs *x)
Definition: lang.h:671
act_dataflow * dflow
Definition: lang.h:720
int hasNetlistLang()
Definition: lang.h:708
act_chp * getchp()
Definition: lang.h:664
act_languages * Expand(ActNamespace *ns, Scope *s)
act_dataflow * getdflow()
Definition: lang.h:685
void setsizing(act_sizing *s)
Definition: lang.h:680
act_spec * getspec()
Definition: lang.h:673
void setrefine(act_refine *x)
Definition: lang.h:677
act_prs * getprs()
Definition: lang.h:670
act_chp * hse
Definition: lang.h:714
act_prs * prs
Definition: lang.h:715
act_refine * getrefine()
Definition: lang.h:676
act_sizing * sizing
Definition: lang.h:718
act_spec * spec
Definition: lang.h:716
act_refine * refine
Definition: lang.h:717
void setdflow(act_dataflow *s)
Definition: lang.h:686
act_initialize * init
Definition: lang.h:719
void setspec(act_spec *x)
Definition: lang.h:674
act_chp * chp
Definition: lang.h:714
void sethse(act_chp *x)
Definition: lang.h:668
void setinit(act_initialize *s)
Definition: lang.h:683
act_prs_expr_type
Definition: lang.h:64
@ ACT_PRS_EXPR_OR
"|" operator
Definition: lang.h:66
@ ACT_PRS_EXPR_NOT
"~" operator
Definition: lang.h:68
@ ACT_PRS_EXPR_ANDLOOP
replicated &-loop
Definition: lang.h:70
@ ACT_PRS_EXPR_VAR
leaf variable
Definition: lang.h:67
@ ACT_PRS_EXPR_TRUE
constant "true"
Definition: lang.h:73
@ ACT_PRS_EXPR_FALSE
constant "false"
Definition: lang.h:74
@ ACT_PRS_EXPR_AND
"&" operator
Definition: lang.h:65
@ ACT_PRS_EXPR_ORLOOP
replicated |-loop
Definition: lang.h:71
@ ACT_PRS_EXPR_LABEL
leaf "@label"
Definition: lang.h:69
int act_dev_string_to_value(const char *s)
void spec_print(FILE *, act_spec *)
void act_print_one_prs(FILE *fp, act_prs_lang_t *p)
void refine_expand(act_refine *, ActNamespace *, Scope *)
void chp_print(FILE *, act_chp *)
act_initialize * initialize_expand(act_initialize *, ActNamespace *, Scope *)
struct act_chp_lang act_chp_lang_t
void act_expr_collect_ids(list_t *l, Expr *e)
char * act_expr_to_string(list_t *id_list, Expr *e)
act_spec * spec_expand(act_spec *, ActNamespace *, Scope *)
void *(* ACT_VAR_CONV)(void *, void *)
Definition: lang.h:828
act_prs * prs_expand(act_prs *, ActNamespace *, Scope *)
act_attr_t * inst_attr_expand(act_attr_t *a, ActNamespace *ns, Scope *s)
struct act_func_arguments act_func_arguments_t
act_prs_expr_t * act_prs_celement_rule(act_prs_expr_t *e)
int act_expr_has_neg_probes(Expr *e)
act_size_spec_t * act_expand_size(act_size_spec_t *sz, ActNamespace *ns, Scope *s)
void chp_expand_macromode(int mode)
void sizing_print(FILE *, act_sizing *)
act_chp_lang_type
Definition: lang.h:218
@ ACT_CHP_MACRO
Definition: lang.h:242
@ ACT_CHP_SELECT
selection statement
Definition: lang.h:221
@ ACT_CHP_DOLOOP
CHP do loop.
Definition: lang.h:224
@ ACT_CHP_LOOP
CHP while loop.
Definition: lang.h:223
@ ACT_CHP_FUNC
used for log(...) logging statement
Definition: lang.h:230
@ ACT_CHP_SEMILOOP
Definition: lang.h:232
@ ACT_CHP_SELECT_NONDET
non-deterministic selection statement
Definition: lang.h:222
@ ACT_CHP_ASSIGNSELF
Definition: lang.h:239
@ ACT_CHP_COMMALOOP
Definition: lang.h:234
@ ACT_CHP_SEMI
sequential composition
Definition: lang.h:220
@ ACT_CHP_SEND
send operation
Definition: lang.h:227
@ ACT_CHP_SKIP
skip statement
Definition: lang.h:225
@ ACT_CHP_ASSIGN
assignment
Definition: lang.h:226
@ ACT_CHP_RECV
receive operation
Definition: lang.h:228
@ ACT_CHP_COMMA
comma or parallel composition
Definition: lang.h:219
@ ACT_CHP_HOLE
a "hole"—only used by downstream tools
Definition: lang.h:237
@ ACT_HSE_FRAGMENTS
used to support fragmented hse
Definition: lang.h:245
act_prs_expr_t * act_prs_expr_nnf(void *cookie, struct Hashtable *at_hash, act_prs_expr_t *e, ACT_VAR_CONV conv_var)
const char * act_dev_value_to_string(int)
struct act_prs_lang act_prs_lang_t
act_attr_t * prs_attr_expand(act_attr_t *a, ActNamespace *ns, Scope *s)
void refine_print(FILE *, act_refine *)
int act_hse_direction(act_chp_lang_t *, ActId *)
struct act_prs_expr act_prs_expr_t
void prs_print(FILE *, act_prs *)
act_dataflow * dflow_expand(act_dataflow *, ActNamespace *, Scope *)
void act_print_size(FILE *fp, act_size_spec_t *sz)
char * act_prs_expr_to_string(list_t *id_list, act_prs_expr_t *e)
void act_prs_expr_free(act_prs_expr_t *e)
struct act_chp_gc act_chp_gc_t
void act_chp_macro_check(Scope *s, ActId *id)
act_chp * chp_expand(act_chp *, ActNamespace *, Scope *)
const char * act_spec_string(int type)
void initialize_print(FILE *, act_initialize *)
ActId * expand_var_write(ActId *id, ActNamespace *ns, Scope *s)
void dflow_print(FILE *, act_dataflow *)
void chp_check_channels(act_chp_lang_t *c, Scope *s)
act_dataflow_element_types
Definition: lang.h:529
@ ACT_DFLOW_MIXER
mixer dataflow element
Definition: lang.h:533
@ ACT_DFLOW_SINK
a dataflow sink
Definition: lang.h:536
@ ACT_DFLOW_SPLIT
split dataflow element
Definition: lang.h:531
@ ACT_DFLOW_ARBITER
arbiter dataflow element
Definition: lang.h:534
@ ACT_DFLOW_CLUSTER
a cluster of dataflow elements
Definition: lang.h:535
@ ACT_DFLOW_MERGE
merge dataflow element
Definition: lang.h:532
@ ACT_DFLOW_FUNC
function dataflow element
Definition: lang.h:530
act_prs_expr_t * act_prs_complement_rule(act_prs_expr_t *e)
act_prs_lang_type
Definition: lang.h:125
@ ACT_PRS_RULE
a production rule
Definition: lang.h:126
@ ACT_PRS_GATE
a transmission gate / pass transistor
Definition: lang.h:127
@ ACT_PRS_CAP
a capacitor
Definition: lang.h:131
@ ACT_PRS_LOOP
a loop of production rules
Definition: lang.h:128
@ ACT_PRS_SUBCKT
a subckt { ... } block
Definition: lang.h:130
@ ACT_PRS_TREE
a tree { ... } block
Definition: lang.h:129
void act_chp_free(act_chp_lang_t *)
void hse_print(FILE *, act_chp *)
act_sizing * sizing_expand(act_sizing *, ActNamespace *, Scope *)
Attribute list associated with an instance.
Definition: lang.h:44
struct act_attr * next
linked list next pointer
Definition: lang.h:47
Expr * e
the expression that holds the value of the attribute
Definition: lang.h:46
const char * attr
the name of the attribute
Definition: lang.h:45
Data structure for guarded commands.
Definition: lang.h:272
struct act_chp_gc * next
next pointer for linked-list
Definition: lang.h:277
Expr * g
the guard
Definition: lang.h:275
const char * id
the loop id for syntactic replication
Definition: lang.h:273
struct act_chp_lang * s
the statement
Definition: lang.h:276
Expr * hi
Definition: lang.h:274
Expr * lo
Definition: lang.h:274
Data structure for the chp sub-language body.
Definition: lang.h:286
Expr * e
expression on the RHS
Definition: lang.h:293
Expr * lo
Definition: lang.h:331
int type
this is taken from act_chp_lang_type
Definition: lang.h:287
Expr * hi
Definition: lang.h:331
list_t * exit_conds
Definition: lang.h:337
unsigned int convert
0 = nothing, 1 = bool(.), 2 = int(.)
Definition: lang.h:303
struct act_chp_lang::@27::@30 func
currently only used for log(..)
void * space
this space for rent!
Definition: lang.h:289
const char * nextlabel
next label
Definition: lang.h:336
struct act_chp_lang::@27::@34 frag
HSE fragments.
const char * label
label for this item, normally NULL
Definition: lang.h:288
act_chp_gc_t * gc
Definition: lang.h:326
struct act_chp_lang::@27::@28 assign
assignment statement id := e
mstring_t * name
function name
Definition: lang.h:308
ActId * chan
channel for communication
Definition: lang.h:298
ActId * var
variable to be assigned
Definition: lang.h:299
list_t * rhs
the argument list, list of Expr *
Definition: lang.h:309
list_t * cmd
a list of act_chp_lang_t pointers
Definition: lang.h:323
struct act_chp_lang * body
body to be replicated
Definition: lang.h:332
const char * id
loop variable
Definition: lang.h:330
struct act_chp_lang * next
next fragment
Definition: lang.h:340
struct act_chp_lang::@27::@31 macro
macro call
ActId * id
variable on the LHS
Definition: lang.h:292
unsigned int flavor
Definition: lang.h:301
struct act_chp_lang::@27::@29 comm
used for send/recv
union act_chp_lang::@27 u
struct act_chp_lang::@27::@33 loop
replication construct
struct act_chp_lang::@27::@32 semi_comma
used for comma and semicolon
Holds a CHP sub-language.
Definition: lang.h:367
ActId * vdd
power supply
Definition: lang.h:368
ActId * gnd
ground
Definition: lang.h:369
int is_synthesizable
1 if this is synthesizable, 0 otherwise
Definition: lang.h:373
ActId * psc
p-substrate terminal
Definition: lang.h:370
act_chp_lang_t * c
chp body
Definition: lang.h:372
ActId * nsc
n-substrate terminal
Definition: lang.h:371
An individual dataflow element.
Definition: lang.h:545
Expr * lhs
expression
Definition: lang.h:549
ActId * nondetctrl
Definition: lang.h:561
ActId * guard
the condition
Definition: lang.h:556
ActId * chan
the input channel
Definition: lang.h:568
act_dataflow_element_types t
the type
Definition: lang.h:546
ActId * rhs
channel output
Definition: lang.h:550
Expr * init
initial token, if any on the output
Definition: lang.h:553
list_t * dflow_cluster
a cluster is a list of dataflow elements
Definition: lang.h:570
Expr * nbufs
Definition: lang.h:551
int istransparent
transparent v/s opaque
Definition: lang.h:552
ActId ** multi
Definition: lang.h:557
int nmulti
number of channels in multi
Definition: lang.h:559
ActId * single
the single channel end
Definition: lang.h:560
An order directive in the dataflow language, used for optimizations in the presence of hierarchy.
Definition: lang.h:581
list_t * lhs
first list of ActId pointers (channels)
Definition: lang.h:582
list_t * rhs
second list of ActId pointers (channels)
Definition: lang.h:583
The dataflow sub-language.
Definition: lang.h:592
list_t * order
Definition: lang.h:616
list_t * dflow
list of dataflow elements
Definition: lang.h:593
Used to represent log(...) arguments. Holds either a string or an expression.
Definition: lang.h:353
mstring_t * s
string
Definition: lang.h:356
Expr * e
or expression
Definition: lang.h:357
union act_func_arguments::@35 u
unsigned int isstring
true if string, false otherwise
Definition: lang.h:354
The Initialize { ... } body. Only used in the global namespace.
Definition: lang.h:513
list_t * actions
Definition: lang.h:514
act_initialize * next
next initialize block
Definition: lang.h:516
A production rule expression, corresponding to the guard for the production rule.
Definition: lang.h:97
struct act_prs_expr * e
body of the loop
Definition: lang.h:117
int pchg_type
precharge type: 1 for +, 0 for -
Definition: lang.h:104
char * label
name of the label
Definition: lang.h:111
struct act_prs_expr * r
right pointer in expression tree
Definition: lang.h:102
ActId * id
name of the variable
Definition: lang.h:107
struct act_prs_expr::@18::@22 loop
used for AND/OR loops
struct act_prs_expr::@18::@19 e
a standard PRS expression
char * id
loop iteration variable
Definition: lang.h:114
struct act_prs_expr * l
left pointer in expression tree
Definition: lang.h:101
struct act_prs_expr * pchg
internal precharge, only for an AND
Definition: lang.h:103
act_size_spec_t * sz
size specifier, if any
Definition: lang.h:108
struct act_prs_expr::@18::@20 v
a leaf variable
Expr * lo
low value of loop range
Definition: lang.h:115
Expr * hi
high value of loop range
Definition: lang.h:116
unsigned int type
an act_prs_expr_type value
Definition: lang.h:98
union act_prs_expr::@18 u
Structure that holds a prs sub-language body. This consists of a linked-list of individual items in t...
Definition: lang.h:140
ActId * id
Definition: lang.h:149
struct act_prs_lang * next
the linked list next pointer field
Definition: lang.h:141
struct act_prs_lang::@23::@25 p
struct act_prs_lang::@23::@26 l
const char * id
loop id
Definition: lang.h:176
Expr * lo
low range (NULL means 0..hi-1)
Definition: lang.h:177
unsigned int dir
Definition: lang.h:155
ActId * _g
Definition: lang.h:167
ActId * d
the drain terminal
Definition: lang.h:166
struct act_prs_lang * p
loop body
Definition: lang.h:179
ActId * s
the source terminal
Definition: lang.h:165
act_prs_expr_t * e
the guard of the production rule
Definition: lang.h:148
unsigned int label
Definition: lang.h:157
ActId * g
Definition: lang.h:163
unsigned int type
Definition: lang.h:142
act_size_spec_t * sz
sizing specification
Definition: lang.h:169
struct act_prs_lang::@23::@24 one
unsigned int arrow_type
Definition: lang.h:152
union act_prs_lang::@23 u
act_attr_t * attr
any attribute associated with the gate
Definition: lang.h:146
Expr * hi
high range
Definition: lang.h:178
Structure that holds all the prs { } blocks in a particular scope. This is a linked-list of blocks,...
Definition: lang.h:194
struct act_prs * next
the next prs block
Definition: lang.h:202
ActId * nsc
n substrate terminal
Definition: lang.h:198
ActId * vdd
power supply
Definition: lang.h:195
int leak_adjust
Definition: lang.h:199
ActId * psc
p substrate terminal
Definition: lang.h:197
act_prs_lang_t * p
the actual prs sub-languge elements
Definition: lang.h:201
ActId * gnd
ground
Definition: lang.h:196
The refinement sub-language just contains an ActBody.
Definition: lang.h:444
ActBody * b
the body of the refine { ... }
Definition: lang.h:445
Sizing specifier for variables.
Definition: lang.h:83
int flavor
type of transistor (its flavor)
Definition: lang.h:86
Expr * folds
number of folds, the folding specification if any
Definition: lang.h:87
Expr * w
transistor width
Definition: lang.h:84
Expr * l
transistor length
Definition: lang.h:85
An individual sizing directive.
Definition: lang.h:461
ActId * id
the signal to be sized
Definition: lang.h:462
Expr * upfolds
number of folds for pull-up
Definition: lang.h:467
A_DECL(act_sizing_directive, d)
loop body
const char * loop_id
for a loop in the sizing body
Definition: lang.h:472
Expr * eup
drive strength for pull-up
Definition: lang.h:465
Expr * hi
Definition: lang.h:473
Expr * dnfolds
number of folds for pull-down
Definition: lang.h:468
int flav_dn
transistor flavor for pull-down
Definition: lang.h:464
int flav_up
transistor flavor for pull-up
Definition: lang.h:463
Expr * edn
drive strength for pull-down
Definition: lang.h:466
Expr * lo
Definition: lang.h:473
The sizing { ... } body data.
Definition: lang.h:482
Expr * p_n_mode_e
p_n_mode expression
Definition: lang.h:488
int p_specified
1 if p_n_mode is specified, 0 otherwise
Definition: lang.h:485
A_DECL(act_sizing_directive, d)
all sizing directives
int p_n_mode
p_n_mode after expansion (default 0)
Definition: lang.h:491
int leak_adjust
leak_adjust after expansion (default 0)
Definition: lang.h:493
act_sizing * next
next sizing body
Definition: lang.h:495
int unit_n
unit_n after expansion
Definition: lang.h:492
Expr * leak_adjust_e
leak_adjust expression
Definition: lang.h:490
int unit_n_specified
1 if unit_n specified, 0 otherwise
Definition: lang.h:486
Expr * unit_n_e
unit_n expression
Definition: lang.h:489
int leak_adjust_specified
1 if leak_adjust specified, 0 otherwise
Definition: lang.h:487
The specification sub-language.
Definition: lang.h:397
int type
Definition: lang.h:413
struct act_spec * next
Definition: lang.h:426
int count
the number of ids; -1 = all nodes in the process
Definition: lang.h:415
ActId ** ids
the array of identifiers in the spec directive
Definition: lang.h:416
int * extra
Definition: lang.h:425
int isrequires
Definition: lang.h:398