ACT Library
Loading...
Searching...
No Matches
chpdecomp.h
Go to the documentation of this file.
1/*************************************************************************
2 *
3 * This file is part of the ACT library
4 *
5 * Copyright (c) 2022 Rajit Manohar
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 *
22 **************************************************************************
23 */
24#ifndef __ACT_PASS_CHPDECOMP_H__
25#define __ACT_PASS_CHPDECOMP_H__
26
27#include <act/act.h>
28#include <act/passes/booleanize.h>
29
30class ActCHPMemory : public ActPass {
31public:
33 int run (Process *p = NULL);
34
35private:
36 void *local_op (Process *p, int mode = 0);
37 void free_local (void *);
38
40
41 int _fresh_memdata (Scope *sc, int bw);
42 void _fresh_release (int idx);
43
44 void _subst_dynamic_array (list_t *l, Expr *e);
45
46
48
50
51 struct memvar_info {
52 int bw;
53 int idx;
54 int used;
55 };
56
60};
61
62
63class ActCHPArbiter : public ActPass {
64public:
66 int run (Process *p = NULL);
67
68private:
69 void *local_op (Process *p, int mode = 0);
70 void free_local (void *);
71
73 int _fresh_channel (Scope *sc, int bw);
74 void _substitute (act_chp_lang_t *c, list_t *l1, list_t *l2);
75
78};
79
80
81#endif /* __ACT_PASS_CHPDECOMP_H__ */
This pass is used to pre-process information about languages and variables within the design....
Definition: booleanize.h:271
Definition: chpdecomp.h:63
ActCHPArbiter(Act *a)
int run(Process *p=NULL)
void _find_potential_arbiters(list_t *l, act_chp_lang_t *c)
void free_local(void *)
void _substitute(act_chp_lang_t *c, list_t *l1, list_t *l2)
int _fresh_channel(Scope *sc, int bw)
void * local_op(Process *p, int mode=0)
ActBooleanizePass * _bp
Definition: chpdecomp.h:76
act_boolean_netlist_t * _curbnl
Definition: chpdecomp.h:77
Definition: chpdecomp.h:30
void _subst_dynamic_array(list_t *l, Expr *e)
int _is_dynamic_array(ActId *id)
void _fresh_release(int idx)
int run(Process *p=NULL)
ActCHPMemory(Act *a)
struct memvar_info * _memdata_var
Definition: chpdecomp.h:58
int _fresh_memdata(Scope *sc, int bw)
void * local_op(Process *p, int mode=0)
ActBooleanizePass * _bp
Definition: chpdecomp.h:49
int _memdata_len
Definition: chpdecomp.h:57
void free_local(void *)
void _extract_memory(act_chp_lang_t *c)
act_boolean_netlist_t * _curbnl
Definition: chpdecomp.h:59
The main Act class used to read in an ACT file and create basic data structures. All design informati...
Definition: act.h:334
This class is used to store Act identifiers that correspond to instances. Identifiers have an optiona...
Definition: act_id.h:56
The main ActPass class used to implement an ACT analysis/synthesis pass. All the core tools use this ...
Definition: act.h:791
Act * a
Definition: act.h:810
User-defined processes.
Definition: types.h:750
This is the data structure that holds all instances and their associated types within a scope....
Definition: namespaces.h:77
Definition: chpdecomp.h:51
int used
Definition: chpdecomp.h:54
int bw
Definition: chpdecomp.h:52
int idx
Definition: chpdecomp.h:53
This structure is computed for each process by the Booleanize pass. It summarizes the information abo...
Definition: booleanize.h:187
Data structure for the chp sub-language body.
Definition: lang.h:286
Definition: expr.h:79