31#include <common/config.h>
33#include <unordered_set>
310#define ACT_MODEL_CHP 0
311#define ACT_MODEL_HSE 1
312#define ACT_MODEL_PRS 2
313#define ACT_MODEL_DEVICE 3
314#define ACT_MODEL_TOTAL 4
351 static void Init (
int *argc,
char ***argv,
const char *optional_conf);
366 static void Init (
int *argc,
char ***argv, list_t *multi_conf = NULL);
403#define WARNING_FLAG(x,y) \
434 Act (
const char *s = NULL);
710 int mangle_langle_idx;
Expr * const_expr_real(double v)
#define ACT_MODEL_TOTAL
The total number of modeling levels (used for error checking)
Definition: act.h:314
Expr * const_expr(long val)
void act_add_global_pbool(const char *name, int val)
Expr * const_expr_bool(int v)
const char * act_model_names[]
void act_add_global_pint(const char *name, int val)
This is an ActPass that is dynamically loaded in at run-time via a shared object library....
Definition: act.h:1115
void setParam(const char *name, int v)
Technology * T
the technology pointer for the library
Definition: act.h:1363
int getIntParam(const char *name)
virtual void * local_op(Channel *, int=0)
struct Hashtable * _config_state
Definition: act.h:1360
bool _load_success
flag set when the pass is loaded
Definition: act.h:1351
void setParam(const char *name, void *v)
act_sh_dispatch_table _d
dispatch table for this pass
Definition: act.h:1355
~ActDynamicPass()
release storage
virtual void free_local(void *)
void run_recursive(Process *p=NULL, int mode=0)
virtual void * local_op(Data *, int=0)
struct Hashtable * getConfig()
void * getPtrParam(const char *name)
void setParam(const char *name, double v)
char * _libused
library used by this pass
Definition: act.h:1353
bool hasParam(const char *name)
Technology * getTech()
Definition: act.h:1315
int addDependency(const char *name)
Definition: act.h:1330
double getRealParam(const char *name)
struct Hashtable * _params
Definition: act.h:1357
bool loaded()
Definition: act.h:1320
ActDynamicPass(Act *_a, const char *name, const char *lib, const char *prefix)
virtual void * local_op(Process *, int=0)
int runcmd(const char *name)
static list_t * _sh_libs
Definition: act.h:1370
The main Act class used to read in an ACT file and create basic data structures. All design informati...
Definition: act.h:334
char ** inst_levels[ACT_MODEL_TOTAL]
Definition: act.h:736
static void generic_msg(const char *s)
static int getOptions(int *argc, char ***argv)
int default_level
the default modeling level
Definition: act.h:741
const char * pass_name(const char *name)
static void Init(int *argc, char ***argv, list_t *multi_conf=NULL)
list_t * getDecompTypes()
bool LocalizeGlobal(const char *s)
char ** type_levels[ACT_MODEL_TOTAL]
Definition: act.h:727
int mangle_characters[256]
which characters do we mangle?
Definition: act.h:705
void Merge(const char *s)
int num_type_levels[ACT_MODEL_TOTAL]
Definition: act.h:722
int msnprintf(char *fp, int sz, const char *s,...)
int refine_steps
Definition: act.h:719
int usnprintf(char *fp, int sz, const char *s,...)
void pass_unregister(const char *name)
void mfprintfproc(FILE *fp, UserDef *u, int omit_ns=0)
int mangle_active()
Definition: act.h:477
static list_t * cmdline_args
Definition: act.h:411
ActNamespace * Global()
Definition: act.h:619
void pass_register(const char *name, ActPass *p)
static int _process_act_arg(const char *argvp, int *tech_specified, char **conf)
list_t * getDecomp(Process *p)
void msnprintfproc(char *fp, int sz, UserDef *u, int omit_ns=0)
int getRefSteps()
Definition: act.h:692
void decRefSteps()
Definition: act.h:694
static int max_loop_iterations
Definition: act.h:401
void mfprintf(FILE *fp, const char *s,...)
void incRefSteps()
Definition: act.h:697
ActPass * pass_find(const char *name)
int inv_map[256]
map used for inverse lookup
Definition: act.h:706
int mangle_string(const char *src, char *dst, int sz)
UserDef * findUserdef(const char *s)
int getLevel(ActId *id)
get level for this instance
int getLevel(Process *p)
get level for this type
int getLevel()
get default level
static int emit_depend
Definition: act.h:418
static void Init(int *argc, char ***argv, const char *optional_conf)
int unmangle_stringproc(const char *src, char *dst, int sz)
int num_inst_levels[ACT_MODEL_TOTAL]
Definition: act.h:731
TypeFactory * getTypeFactory()
Definition: act.h:683
static int max_recurse_depth
Definition: act.h:396
ActNamespace * findNamespace(ActNamespace *ns, const char *s)
ActNamespace * gns
the global namespace pointer
Definition: act.h:702
Process * findProcess(const char *s, bool allow_expand=false)
TypeFactory * tf
type factory for the Act instance
Definition: act.h:701
static void setOptionString(char *str)
int any_mangling
1 if there is any name mangling, 0 otherwise
Definition: act.h:707
Process * findProcess(ActNamespace *ns, const char *s, bool allow_expand=false)
int mangle_set_char(unsigned char c)
struct Hashtable * passes
Table of any ActPass-es.
Definition: act.h:717
static Log * L
Used for log messages.
Definition: act.h:715
static char * _getopt_string
the string used for getopt
Definition: act.h:743
int unmangle_string(const char *src, char *dst, int sz)
ActNamespace * findNamespace(const char *s)
static void config_info(const char *s)
void ufprintf(FILE *fp, const char *s,...)
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
The main ActPass class used to implement an ACT analysis/synthesis pass. All the core tools use this ...
Definition: act.h:791
void enableUpdate()
Definition: act.h:983
void clrStickyVisited()
Definition: act.h:993
int _update_propagate
Definition: act.h:824
Act * a
Definition: act.h:810
list_t * fwdeps
Definition: act.h:817
const char * name
the name for the pass
Definition: act.h:822
int rundeps(Process *p=NULL)
static void refreshAll(Act *a, Process *p=NULL)
int _finished
has the pass finished execution?
Definition: act.h:793
int init()
initialize or re-initialize
Process * getRoot()
Definition: act.h:954
void recursive_op(UserDef *p, int mode=0)
void * getMap(UserDef *u)
virtual void * local_op(Process *p, int mode=0)
std::map< UserDef *, void * > * pmap
Definition: act.h:1087
void * getGlobalInfo()
Definition: act.h:939
ActPass * getPass(const char *name)
Definition: act.h:949
void * _global_info
Definition: act.h:838
virtual void * pre_op(Channel *c, int mode=0)
Act * getAct()
Definition: act.h:944
Process * _root
the root of the design
Definition: act.h:836
virtual void * local_op(Channel *c, int mode=0)
int _root_dirty
Definition: act.h:829
virtual ~ActPass()
release storage
list_t * deps
Definition: act.h:813
int _sticky_visited
Definition: act.h:795
virtual int run(Process *p=NULL)
virtual void run_recursive(Process *p=NULL, int mode=0)
void disableUpdate()
Definition: act.h:978
ActPass(Act *_a, const char *name, int doroot=0)
virtual void _actual_update(Process *p)
void mkStickyVisited()
Definition: act.h:988
int AddDependency(const char *pass)
virtual void free_local(void *)
virtual void * local_op(Data *d, int mode=0)
int completed()
Definition: act.h:920
virtual void * pre_op(Data *d, int mode=0)
std::unordered_set< UserDef * > * visited_flag
Definition: act.h:1092
int pending()
Definition: act.h:925
virtual void * pre_op(Process *p, int mode=0)
User-defined channel type. Channels can be unidirectional or bi-directional (sometimes called exchang...
Definition: types.h:1215
A user-defined data types.
Definition: types.h:1062
User-defined processes.
Definition: types.h:750
This holds all the technology design rules (or at least the approximate ones) used by the ACT library...
Definition: tech.h:820
This is the class used to create all instance types. It also caches types to reduce memory usage.
Definition: types.h:1415
UserDef stores information that is common to all user-defined types. User-defined types are more comp...
Definition: types.h:310
Contains the data structures for each ACT sub-language.
These are the C function pointers extracted from the shared library used to execute the various metho...
Definition: act.h:1134
void(* _run)(ActPass *ap, Process *p)
Definition: act.h:1152
int(* _runcmd)(ActPass *ap, const char *name)
Definition: act.h:1210
void(* _init)(ActPass *ap)
Definition: act.h:1142
void(* _recursive)(ActPass *ap, Process *p, int mode)
Definition: act.h:1160
void(* _free)(ActPass *ap, void *v)
Definition: act.h:1194
void(* _done)(ActPass *ap)
Definition: act.h:1200
This holds information about the shared object file.
Definition: act.h:1121
int refs
Definition: act.h:1124
void * lib_ptr
this is the open library pointer, if any
Definition: act.h:1123
char * lib
this is the file name of the shared object library
Definition: act.h:1122