CGRA-ME
ModuleElastic.h
Go to the documentation of this file.
1 #ifndef __ELASTICMODULES__H__
2 #define __ELASTICMODULES__H__
3 
4 #include <CGRA/Module.h>
5 
6 #define DEFAULT_EB_DEPTH 2
7 #define DEFAULT_FANIN_FANOUT 2
8 #define DEFAULT_LFORK_IMPL 1 // LKFork design
9 
11 {
12  public:
13  ElasticBufferFifo(std::string name, Location, int depth_ = DEFAULT_EB_DEPTH, int size = DEFAULT_SIZE, bool hasEnable_ = true, bool isElastic = true);
14  virtual ~ElasticBufferFifo();
15  virtual std::string GenericName() override;
16  virtual nlohmann::json CoreIRGenFunctionality() override;
17  MRRG* createMRRG(unsigned II) override;
18  int getDepth() const {return eb_depth;};
19  virtual BitConfig getBitConfig(
20  const MRRG& mrrg, const OpGraph & og,
21  const Mapping& map,
22  const ConfigCell& ccell,
23  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
24  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
25  ) const override;
26 
27 
28 
29  private:
30  int eb_depth;
31  bool hasEnable;
32 };
33 
34 class ElasticEagerFork: public Module
35 {
36  public:
37  ElasticEagerFork(std::string name, Location, int size, int fanout_ = DEFAULT_FANIN_FANOUT, int unit_fork_fanout_ = DEFAULT_FANIN_FANOUT, bool isElastic = true);
38  virtual ~ElasticEagerFork();
39  virtual std::string GenericName() override;
40  virtual nlohmann::json CoreIRGenFunctionality() override;
41  MRRG* createMRRG(unsigned II) override;
42 
43  virtual BitConfig getBitConfig(
44  const MRRG& mrrg, const OpGraph & og,
45  const Mapping& map,
46  const ConfigCell& ccell,
47  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
48  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
49  ) const override;
50 
51  int getUnitFanout() const {return unit_fork_fanout;};
52  int getFanout() const {return fanout;};
53  private:
54  int unit_fork_fanout;
55  int fanout;
56 };
57 
59 {
60  public:
61  static const std::map<OpGraphOpCode,LLVMMode> all_modes;
62  ElasticForkBranch(std::string name, Location, int size, int fanout_ = DEFAULT_FANIN_FANOUT, bool isElastic = true);
63  virtual ~ElasticForkBranch();
64  virtual std::string GenericName() override;
65  virtual nlohmann::json CoreIRGenFunctionality() override;
66  MRRG* createMRRG(unsigned II) override;
67 
68  virtual BitConfig getBitConfig(
69  const MRRG& mrrg, const OpGraph & og,
70  const Mapping& map,
71  const ConfigCell& ccell,
72  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
73  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
74  ) const override;
75 
76  int getFanout() const {return fanout;};
77  private:
78  int fanout;
79 };
80 
81 
82 class ElasticSelMultiplexer : public Module {
83  public:
84  static const std::map<OpGraphOpCode,LLVMMode> all_modes;
85  ElasticSelMultiplexer(std::string, Location, unsigned mux_size, unsigned size = DEFAULT_SIZE, bool isElastic = false); // ("name", mux size, size)
86  virtual ~ElasticSelMultiplexer();
87  virtual std::string GenericName() override; // Generates a generic name for the module
88  virtual nlohmann::json CoreIRGenFunctionality() override;
89 
90  virtual BitConfig getBitConfig(
91  const MRRG& mrrg, const OpGraph & og,
92  const Mapping& map,
93  const ConfigCell& ccell,
94  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
95  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
96  ) const override;
97  int getMuxSize() { return mux_size; };
98  MRRG* createMRRG(unsigned II) override;
99  private:
100  int mux_size; // size of multiplexer (e.g. how many inputs)
101 };
102 
103 
104 class ElasticLazyFork: public Module
105 {
106  public:
107  ElasticLazyFork(std::string name, Location, int size = DEFAULT_SIZE, int fanout_ = DEFAULT_FANIN_FANOUT, int unit_fork_fanout_ = DEFAULT_FANIN_FANOUT, int impl_type_ = DEFAULT_LFORK_IMPL);
108  virtual ~ElasticLazyFork();
109  virtual std::string GenericName() override;
110  virtual nlohmann::json CoreIRGenFunctionality() override;
111  MRRG* createMRRG(unsigned II) override;
112 
113  virtual BitConfig getBitConfig(
114  const MRRG& mrrg, const OpGraph & og,
115  const Mapping& map,
116  const ConfigCell& ccell,
117  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
118  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
119  ) const override;
120  private:
122  int fanout;
124 };
125 
126 
127 class ElasticJoin: public Module
128 {
129  public:
130  ElasticJoin(std::string name, Location, int size = DEFAULT_SIZE, int fanin_ = DEFAULT_FANIN_FANOUT, bool isElastic = true);
131  virtual ~ElasticJoin();
132  virtual std::string GenericName() override;
133  virtual nlohmann::json CoreIRGenFunctionality() override;
134  MRRG* createMRRG(unsigned II) override;
135 
136  virtual BitConfig getBitConfig(
137  const MRRG& mrrg, const OpGraph & og,
138  const Mapping& map,
139  const ConfigCell& ccell,
140  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
141  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
142  ) const override;
143  private:
144  int fanin;
145 };
146 
147 
148 class ElasticDiverge: public Module
149 {
150  public:
151  ElasticDiverge(std::string name, Location, int size = DEFAULT_SIZE, int fanout_ = DEFAULT_FANIN_FANOUT);
152  virtual ~ElasticDiverge();
153  virtual std::string GenericName() override;
154  virtual nlohmann::json CoreIRGenFunctionality() override;
155  MRRG* createMRRG(unsigned II) override;
156 
157  virtual BitConfig getBitConfig(
158  const MRRG& mrrg, const OpGraph & og,
159  const Mapping& map,
160  const ConfigCell& ccell,
161  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
162  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
163  ) const override;
164  private:
165  int fanout;
166 };
167 
168 
169 class ElasticMerge: public Module
170 {
171  public:
172  ElasticMerge(std::string name, Location, int size = DEFAULT_SIZE, int fanin_ = DEFAULT_FANIN_FANOUT);
173  virtual ~ElasticMerge();
174  virtual std::string GenericName() override;
175  virtual nlohmann::json CoreIRGenFunctionality() override;
176  MRRG* createMRRG(unsigned II) override;
177 
178  virtual BitConfig getBitConfig(
179  const MRRG& mrrg, const OpGraph & og,
180  const Mapping& map,
181  const ConfigCell& ccell,
182  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
183  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
184  ) const override;
185  private:
186  int fanin;
187 };
188 
190 {
191  public:
192  ElasticVLUWrapper(std::string name, Location, int size = DEFAULT_SIZE, int input_count_ = 1);
193  virtual ~ElasticVLUWrapper();
194  virtual std::string GenericName() override;
195  virtual nlohmann::json CoreIRGenFunctionality() override;
196  MRRG* createMRRG(unsigned II) override;
197 
198  private:
200 };
201 
202 class FPUnit_wrapper: public Module
203 {
204  public:
205  FPUnit_wrapper(std::string name, Location, int max_latency, std::vector<OpGraphOpCode> supported_modes); //module definition
206  virtual ~FPUnit_wrapper(); //class destructor
207  virtual std::string GenericName() override; //generates generic name for wrapper
208  virtual nlohmann::json CoreIRGenFunctionality() override; //generates functionality for wrapper
209  MRRG* createMRRG(unsigned II) override; //creates Modulo Routing Resource Graph
210  virtual BitConfig getBitConfig(
211  const MRRG& mrrg, const OpGraph & og,
212  const Mapping& map,
213  const ConfigCell& ccell,
214  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
215  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
216  ) const override;
217  auto& getSupportedModes() const { return supported_modes; }
218  static const std::map<OpGraphOpCode, LLVMMode> all_modes;
219  protected:
220  std::vector<OpGraphOpCode> supported_modes;
222 };
223 
225 {
226  public:
227  ElasticTokenInducer(std::string name, Location, int size = DEFAULT_SIZE, int iteration_interval = 2, bool isEalstic = true);
228  virtual ~ElasticTokenInducer();
229  virtual std::string GenericName() override;
230  virtual nlohmann::json CoreIRGenFunctionality() override;
231  MRRG* createMRRG(unsigned II) override;
232  virtual BitConfig getBitConfig(
233  const MRRG& mrrg, const OpGraph & og,
234  const Mapping& map,
235  const ConfigCell& ccell,
236  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
237  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
238  ) const override;
239  bool isNodeInCycle( const MRRGNode* originNode, const MRRGNode* thisNode, std::set<const MRRGNode*>& visited,std::set<const MRRGNode*>& mrrgnodes_mapped_to ) const;
240  private:
242 
243 };
244 
246 {
247  public:
248  ElasticRegisterFile(std::string name, Location, int numInputPorts, int numOutputPorts, int log2Registers, int size = DEFAULT_SIZE, int contexts = 1, int eb_depth = DEFAULT_EB_DEPTH);
249  virtual ~ElasticRegisterFile();
250  virtual std::string GenericName() override;
251  virtual nlohmann::json CoreIRGenFunctionality() override;
252 
253  private:
257  int eb_depth;
258 };
259 
260 class ElasticFuncUnit: public Module
261 {
262  public:
263  ElasticFuncUnit(std::string name, Location loc, std::vector<OpGraphOpCode> supported_modes_, unsigned size, int II, int latency, bool predExist, bool isElastic, int contexts = 1);
264  virtual std::string GenericName() override;
265 };
266 
267 class ElasticFPUnit: public Module
268 {
269  public:
270  ElasticFPUnit(std::string name, Location loc, std::vector<OpGraphOpCode> supported_modes_, unsigned size, int II, int latency, bool predExist, bool isElastic, int contexts = 1);
271  virtual std::string GenericName() override;
272 };
273 
274 
275 class ElasticCrossbar: public Module
276 {
277  public:
278  ElasticCrossbar(std::string name, Location, int num_inputs, int num_outputs, int data_size, int type, bool predExist=false, std::string pred_type = "full", int contexts = 1);
279  virtual std::string GenericName() override;
280  private:
283 };
284 
285 class ElasticMemPort: public Module
286 {
287  public:
288  ElasticMemPort(std::string name, Location, int size = DEFAULT_SIZE, int eb_depth = DEFAULT_EB_DEPTH, int num_connections = 2, bool pred = false, int contexts = 1);
289  virtual std::string GenericName() override;
290  virtual ~ElasticMemPort();
291 
292  private:
293  int eb_depth;
295 };
296 
297 class ElasticMemoryUnit: public Module {
298  public:
299  ElasticMemoryUnit(std::string name, Location, unsigned size = DEFAULT_SIZE, unsigned addr_size = DEFAULT_SIZE);
300  virtual std::string GenericName() override;
301  virtual nlohmann::json CoreIRGenFunctionality() override;
302  MRRG* createMRRG(unsigned II) override;
303  virtual ~ElasticMemoryUnit();
304 
305  virtual BitConfig getBitConfig(
306  const MRRG& mrrg, const OpGraph & og,
307  const Mapping& map,
308  const ConfigCell& ccell,
309  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
310  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
311  ) const override;
312 
313  private:
314  unsigned data_size;
315  unsigned addr_size;
316 };
317 
319  public:
320  ElasticConfigCell(std::string name, int iteration_interval = 1, Location loc = {0,0}); // Constructor of the configuration cell; initializes the name
321  virtual std::string GenericName() override; // returns the module name
322  virtual nlohmann::json CoreIRGenFunctionality() override;
323  private:
324  int configCell_II = 0;
325 };
326 
327 #endif
ElasticBufferFifo
Definition: ModuleElastic.h:10
ElasticEagerFork
Definition: ModuleElastic.h:34
ElasticFuncUnit
Definition: ModuleElastic.h:260
BitConfig
Definition: BitSetting.h:58
ElasticLazyFork::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModuleElastic.cpp:3140
ElasticMerge::GenericName
virtual std::string GenericName() override
Definition: ModuleElastic.cpp:1497
Module::name
std::string name
Definition: Module.h:341
ConfigCell
Definition: Module.h:825
ElasticLazyFork::GenericName
virtual std::string GenericName() override
Definition: ModuleElastic.cpp:3046
DEFAULT_LFORK_IMPL
#define DEFAULT_LFORK_IMPL
Definition: ModuleElastic.h:8
ElasticEagerFork::ElasticEagerFork
ElasticEagerFork(std::string name, Location, int size, int fanout_=DEFAULT_FANIN_FANOUT, int unit_fork_fanout_=DEFAULT_FANIN_FANOUT, bool isElastic=true)
Definition: ModuleElastic.cpp:586
ElasticEagerFork::getUnitFanout
int getUnitFanout() const
Definition: ModuleElastic.h:51
ElasticVLUWrapper::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModuleElastic.cpp:2058
ElasticJoin::GenericName
virtual std::string GenericName() override
Definition: ModuleElastic.cpp:843
FPUnit_wrapper::getSupportedModes
auto & getSupportedModes() const
Definition: ModuleElastic.h:217
ElasticMemPort::eb_depth
int eb_depth
Definition: ModuleElastic.h:293
ElasticSelMultiplexer
Definition: ModuleElastic.h:82
ElasticSelMultiplexer::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModuleElastic.cpp:1321
ElasticLazyFork::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleElastic.cpp:3051
ElasticDiverge::ElasticDiverge
ElasticDiverge(std::string name, Location, int size=DEFAULT_SIZE, int fanout_=DEFAULT_FANIN_FANOUT)
Definition: ModuleElastic.cpp:1038
FPUnit_wrapper::max_latency
int max_latency
Definition: ModuleElastic.h:221
MRRG
Definition: MRRG.h:216
MRRGNodesFromOpNode
std::map< OpGraphOp *, std::set< MRRG::NodeDescriptor > > MRRGNodesFromOpNode
Definition: Module.h:146
ElasticForkBranch::getBitConfig
virtual BitConfig getBitConfig(const MRRG &mrrg, const OpGraph &og, const Mapping &map, const ConfigCell &ccell, const MRRGNodesFromOpNode &mrrg_nodes_from_op_node, const MRRGNodesFromValNode &mrrg_nodes_from_val_node) const override
Definition: ModuleElastic.cpp:402
ElasticEagerFork::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModuleElastic.cpp:719
Location
Definition: Module.h:156
ElasticEagerFork::getBitConfig
virtual BitConfig getBitConfig(const MRRG &mrrg, const OpGraph &og, const Mapping &map, const ConfigCell &ccell, const MRRGNodesFromOpNode &mrrg_nodes_from_op_node, const MRRGNodesFromValNode &mrrg_nodes_from_val_node) const override
Definition: ModuleElastic.cpp:740
Module::data_size
unsigned data_size
Definition: Module.h:338
DEFAULT_FANIN_FANOUT
#define DEFAULT_FANIN_FANOUT
Definition: ModuleElastic.h:7
ElasticMemoryUnit::addr_size
unsigned addr_size
Definition: ModuleElastic.h:315
ElasticMemoryUnit::data_size
unsigned data_size
Definition: ModuleElastic.h:314
ElasticFPUnit
Definition: ModuleElastic.h:267
ElasticForkBranch::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModuleElastic.cpp:377
ElasticMemPort::GenericName
virtual std::string GenericName() override
Definition: ModuleElastic.cpp:2685
ElasticMemoryUnit
Definition: ModuleElastic.h:297
ElasticRegisterFile::numInputPorts
int numInputPorts
Definition: ModuleElastic.h:254
ElasticDiverge::fanout
int fanout
Definition: ModuleElastic.h:165
ElasticBufferFifo::ElasticBufferFifo
ElasticBufferFifo(std::string name, Location, int depth_=DEFAULT_EB_DEPTH, int size=DEFAULT_SIZE, bool hasEnable_=true, bool isElastic=true)
Definition: ModuleElastic.cpp:7
ElasticLazyFork
Definition: ModuleElastic.h:104
ElasticMemoryUnit::getBitConfig
virtual BitConfig getBitConfig(const MRRG &mrrg, const OpGraph &og, const Mapping &map, const ConfigCell &ccell, const MRRGNodesFromOpNode &mrrg_nodes_from_op_node, const MRRGNodesFromValNode &mrrg_nodes_from_val_node) const override
Module.h
ElasticEagerFork::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleElastic.cpp:617
ElasticRegisterFile::~ElasticRegisterFile
virtual ~ElasticRegisterFile()
Definition: ModuleElastic.cpp:2514
ElasticTokenInducer::~ElasticTokenInducer
virtual ~ElasticTokenInducer()
Definition: ModuleElastic.cpp:2311
ElasticCrossbar::GenericName
virtual std::string GenericName() override
Definition: ModuleElastic.cpp:2694
ElasticSelMultiplexer::all_modes
static const std::map< OpGraphOpCode, LLVMMode > all_modes
Definition: ModuleElastic.h:84
FPUnit_wrapper::supported_modes
std::vector< OpGraphOpCode > supported_modes
Definition: ModuleElastic.h:220
ElasticLazyFork::unit_fork_fanout
int unit_fork_fanout
Definition: ModuleElastic.h:121
ElasticJoin::~ElasticJoin
virtual ~ElasticJoin()
Definition: ModuleElastic.cpp:933
ElasticSelMultiplexer::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleElastic.cpp:1220
ElasticJoin::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleElastic.cpp:848
ElasticRegisterFile::eb_depth
int eb_depth
Definition: ModuleElastic.h:257
ElasticTokenInducer::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleElastic.cpp:2210
ElasticMemPort::~ElasticMemPort
virtual ~ElasticMemPort()
Definition: ModuleElastic.cpp:2690
FPUnit_wrapper::FPUnit_wrapper
FPUnit_wrapper(std::string name, Location, int max_latency, std::vector< OpGraphOpCode > supported_modes)
Definition: ModuleElastic.cpp:1709
ElasticLazyFork::~ElasticLazyFork
virtual ~ElasticLazyFork()
Definition: ModuleElastic.cpp:3136
ElasticLazyFork::impl_type
int impl_type
Definition: ModuleElastic.h:123
ElasticDiverge::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModuleElastic.cpp:1168
ElasticRegisterFile::log2Registers
int log2Registers
Definition: ModuleElastic.h:256
ElasticLazyFork::ElasticLazyFork
ElasticLazyFork(std::string name, Location, int size=DEFAULT_SIZE, int fanout_=DEFAULT_FANIN_FANOUT, int unit_fork_fanout_=DEFAULT_FANIN_FANOUT, int impl_type_=DEFAULT_LFORK_IMPL)
Definition: ModuleElastic.cpp:3018
ElasticForkBranch::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleElastic.cpp:248
ElasticForkBranch::fanout
int fanout
Definition: ModuleElastic.h:76
ElasticCrossbar::num_outputs
int num_outputs
Definition: ModuleElastic.h:282
ElasticMerge::fanin
int fanin
Definition: ModuleElastic.h:186
ElasticEagerFork::getFanout
int getFanout() const
Definition: ModuleElastic.h:52
FPUnit_wrapper
Definition: ModuleElastic.h:202
ElasticForkBranch::ElasticForkBranch
ElasticForkBranch(std::string name, Location, int size, int fanout_=DEFAULT_FANIN_FANOUT, bool isElastic=true)
Definition: ModuleElastic.cpp:218
ElasticCrossbar
Definition: ModuleElastic.h:275
DEFAULT_EB_DEPTH
#define DEFAULT_EB_DEPTH
Definition: ModuleElastic.h:6
ElasticEagerFork::GenericName
virtual std::string GenericName() override
Definition: ModuleElastic.cpp:612
ElasticBufferFifo::getDepth
int getDepth() const
Definition: ModuleElastic.h:18
ElasticForkBranch::getFanout
int getFanout() const
Definition: ModuleElastic.h:76
ElasticSelMultiplexer::~ElasticSelMultiplexer
virtual ~ElasticSelMultiplexer()
Definition: ModuleElastic.cpp:1317
FPUnit_wrapper::~FPUnit_wrapper
virtual ~FPUnit_wrapper()
Definition: ModuleElastic.cpp:1861
ElasticVLUWrapper::GenericName
virtual std::string GenericName() override
Definition: ModuleElastic.cpp:1960
ElasticJoin::ElasticJoin
ElasticJoin(std::string name, Location, int size=DEFAULT_SIZE, int fanin_=DEFAULT_FANIN_FANOUT, bool isElastic=true)
Definition: ModuleElastic.cpp:818
ElasticTokenInducer::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModuleElastic.cpp:2315
ElasticTokenInducer::getBitConfig
virtual BitConfig getBitConfig(const MRRG &mrrg, const OpGraph &og, const Mapping &map, const ConfigCell &ccell, const MRRGNodesFromOpNode &mrrg_nodes_from_op_node, const MRRGNodesFromValNode &mrrg_nodes_from_val_node) const override
Definition: ModuleElastic.cpp:2336
MRRGNodesFromValNode
std::map< OpGraphVal *, std::set< MRRG::NodeDescriptor > > MRRGNodesFromValNode
Definition: Module.h:147
ElasticVLUWrapper::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleElastic.cpp:1965
ElasticRegisterFile::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleElastic.cpp:2519
Mapping
Definition: Mapping.h:31
ElasticFPUnit::ElasticFPUnit
ElasticFPUnit(std::string name, Location loc, std::vector< OpGraphOpCode > supported_modes_, unsigned size, int II, int latency, bool predExist, bool isElastic, int contexts=1)
Definition: ModuleElastic.cpp:2136
ElasticVLUWrapper::~ElasticVLUWrapper
virtual ~ElasticVLUWrapper()
Definition: ModuleElastic.cpp:2054
ElasticMemoryUnit::GenericName
virtual std::string GenericName() override
ElasticTokenInducer::GenericName
virtual std::string GenericName() override
Definition: ModuleElastic.cpp:2205
ElasticConfigCell::GenericName
virtual std::string GenericName() override
Definition: ModuleElastic.cpp:3012
ElasticTokenInducer::isNodeInCycle
bool isNodeInCycle(const MRRGNode *originNode, const MRRGNode *thisNode, std::set< const MRRGNode * > &visited, std::set< const MRRGNode * > &mrrgnodes_mapped_to) const
Definition: ModuleElastic.cpp:2403
FPUnit_wrapper::all_modes
static const std::map< OpGraphOpCode, LLVMMode > all_modes
Definition: ModuleElastic.h:218
ElasticJoin::fanin
int fanin
Definition: ModuleElastic.h:144
ElasticSelMultiplexer::mux_size
int mux_size
Definition: ModuleElastic.h:100
ElasticForkBranch::GenericName
virtual std::string GenericName() override
Definition: ModuleElastic.cpp:243
ElasticDiverge::getBitConfig
virtual BitConfig getBitConfig(const MRRG &mrrg, const OpGraph &og, const Mapping &map, const ConfigCell &ccell, const MRRGNodesFromOpNode &mrrg_nodes_from_op_node, const MRRGNodesFromValNode &mrrg_nodes_from_val_node) const override
Definition: ModuleElastic.cpp:1174
ElasticDiverge
Definition: ModuleElastic.h:148
ElasticTokenInducer::ElasticTokenInducer
ElasticTokenInducer(std::string name, Location, int size=DEFAULT_SIZE, int iteration_interval=2, bool isEalstic=true)
Definition: ModuleElastic.cpp:2184
ElasticRegisterFile::ElasticRegisterFile
ElasticRegisterFile(std::string name, Location, int numInputPorts, int numOutputPorts, int log2Registers, int size=DEFAULT_SIZE, int contexts=1, int eb_depth=DEFAULT_EB_DEPTH)
Definition: ModuleElastic.cpp:2427
ElasticMemPort::num_connections
int num_connections
Definition: ModuleElastic.h:294
ElasticMerge::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleElastic.cpp:1502
ElasticBufferFifo::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleElastic.cpp:35
ElasticForkBranch::all_modes
static const std::map< OpGraphOpCode, LLVMMode > all_modes
Definition: ModuleElastic.h:61
ElasticDiverge::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleElastic.cpp:1066
Module
Definition: Module.h:163
ElasticCrossbar::ElasticCrossbar
ElasticCrossbar(std::string name, Location, int num_inputs, int num_outputs, int data_size, int type, bool predExist=false, std::string pred_type="full", int contexts=1)
Definition: ModuleElastic.cpp:2699
ElasticMerge::getBitConfig
virtual BitConfig getBitConfig(const MRRG &mrrg, const OpGraph &og, const Mapping &map, const ConfigCell &ccell, const MRRGNodesFromOpNode &mrrg_nodes_from_op_node, const MRRGNodesFromValNode &mrrg_nodes_from_val_node) const override
Definition: ModuleElastic.cpp:1623
ElasticTokenInducer::iteration_interval
int iteration_interval
Definition: ModuleElastic.h:241
FPUnit_wrapper::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModuleElastic.cpp:1913
FPUnit_wrapper::GenericName
virtual std::string GenericName() override
Definition: ModuleElastic.cpp:1723
ElasticJoin
Definition: ModuleElastic.h:127
ElasticMemoryUnit::~ElasticMemoryUnit
virtual ~ElasticMemoryUnit()
ElasticMemoryUnit::createMRRG
MRRG * createMRRG(unsigned II) override
ElasticRegisterFile
Definition: ModuleElastic.h:245
ElasticTokenInducer
Definition: ModuleElastic.h:224
ElasticConfigCell::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleElastic.cpp:2884
ElasticMerge::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModuleElastic.cpp:1602
ElasticRegisterFile::GenericName
virtual std::string GenericName() override
Definition: ModuleElastic.cpp:2509
ElasticForkBranch
Definition: ModuleElastic.h:58
ElasticMerge::~ElasticMerge
virtual ~ElasticMerge()
Definition: ModuleElastic.cpp:1598
ElasticConfigCell
Definition: ModuleElastic.h:318
ElasticDiverge::~ElasticDiverge
virtual ~ElasticDiverge()
Definition: ModuleElastic.cpp:1164
ElasticMemPort::ElasticMemPort
ElasticMemPort(std::string name, Location, int size=DEFAULT_SIZE, int eb_depth=DEFAULT_EB_DEPTH, int num_connections=2, bool pred=false, int contexts=1)
Definition: ModuleElastic.cpp:2606
MRRGNode
Definition: MRRG.h:60
ElasticMemoryUnit::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
ElasticMerge
Definition: ModuleElastic.h:169
ElasticCrossbar::num_inputs
int num_inputs
Definition: ModuleElastic.h:281
ElasticSelMultiplexer::getBitConfig
virtual BitConfig getBitConfig(const MRRG &mrrg, const OpGraph &og, const Mapping &map, const ConfigCell &ccell, const MRRGNodesFromOpNode &mrrg_nodes_from_op_node, const MRRGNodesFromValNode &mrrg_nodes_from_val_node) const override
Definition: ModuleElastic.cpp:1341
ElasticEagerFork::unit_fork_fanout
int unit_fork_fanout
Definition: ModuleElastic.h:52
ElasticBufferFifo::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModuleElastic.cpp:194
ElasticFuncUnit::GenericName
virtual std::string GenericName() override
Definition: ModuleElastic.cpp:2080
ElasticEagerFork::~ElasticEagerFork
virtual ~ElasticEagerFork()
Definition: ModuleElastic.cpp:715
ElasticSelMultiplexer::getMuxSize
int getMuxSize()
Definition: ModuleElastic.h:97
Module::isElastic
bool isElastic
Definition: Module.h:236
ElasticEagerFork::fanout
int fanout
Definition: ModuleElastic.h:55
ElasticMemPort
Definition: ModuleElastic.h:285
Module::loc
Location loc
Definition: Module.h:239
ElasticForkBranch::~ElasticForkBranch
virtual ~ElasticForkBranch()
Definition: ModuleElastic.cpp:373
ElasticBufferFifo::getBitConfig
virtual BitConfig getBitConfig(const MRRG &mrrg, const OpGraph &og, const Mapping &map, const ConfigCell &ccell, const MRRGNodesFromOpNode &mrrg_nodes_from_op_node, const MRRGNodesFromValNode &mrrg_nodes_from_val_node) const override
Definition: ModuleElastic.cpp:136
ElasticSelMultiplexer::ElasticSelMultiplexer
ElasticSelMultiplexer(std::string, Location, unsigned mux_size, unsigned size=DEFAULT_SIZE, bool isElastic=false)
Definition: ModuleElastic.cpp:1193
ElasticVLUWrapper::input_count
int input_count
Definition: ModuleElastic.h:199
ElasticLazyFork::getBitConfig
virtual BitConfig getBitConfig(const MRRG &mrrg, const OpGraph &og, const Mapping &map, const ConfigCell &ccell, const MRRGNodesFromOpNode &mrrg_nodes_from_op_node, const MRRGNodesFromValNode &mrrg_nodes_from_val_node) const override
Definition: ModuleElastic.cpp:3161
ElasticConfigCell::ElasticConfigCell
ElasticConfigCell(std::string name, int iteration_interval=1, Location loc={0, 0})
Definition: ModuleElastic.cpp:2873
ElasticFuncUnit::ElasticFuncUnit
ElasticFuncUnit(std::string name, Location loc, std::vector< OpGraphOpCode > supported_modes_, unsigned size, int II, int latency, bool predExist, bool isElastic, int contexts=1)
Definition: ModuleElastic.cpp:2087
ElasticDiverge::GenericName
virtual std::string GenericName() override
Definition: ModuleElastic.cpp:1061
FPUnit_wrapper::getBitConfig
virtual BitConfig getBitConfig(const MRRG &mrrg, const OpGraph &og, const Mapping &map, const ConfigCell &ccell, const MRRGNodesFromOpNode &mrrg_nodes_from_op_node, const MRRGNodesFromValNode &mrrg_nodes_from_val_node) const override
Definition: ModuleElastic.cpp:1868
ElasticBufferFifo::GenericName
virtual std::string GenericName() override
Definition: ModuleElastic.cpp:28
FPUnit_wrapper::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleElastic.cpp:1729
ElasticJoin::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModuleElastic.cpp:937
ElasticVLUWrapper
Definition: ModuleElastic.h:189
ElasticJoin::getBitConfig
virtual BitConfig getBitConfig(const MRRG &mrrg, const OpGraph &og, const Mapping &map, const ConfigCell &ccell, const MRRGNodesFromOpNode &mrrg_nodes_from_op_node, const MRRGNodesFromValNode &mrrg_nodes_from_val_node) const override
Definition: ModuleElastic.cpp:960
ElasticFPUnit::GenericName
virtual std::string GenericName() override
Definition: ModuleElastic.cpp:2129
ElasticMerge::ElasticMerge
ElasticMerge(std::string name, Location, int size=DEFAULT_SIZE, int fanin_=DEFAULT_FANIN_FANOUT)
Definition: ModuleElastic.cpp:1472
OpGraph
Definition: OpGraph.h:215
ElasticSelMultiplexer::GenericName
virtual std::string GenericName() override
Definition: ModuleElastic.cpp:1214
ElasticBufferFifo::eb_depth
int eb_depth
Definition: ModuleElastic.h:30
ElasticVLUWrapper::ElasticVLUWrapper
ElasticVLUWrapper(std::string name, Location, int size=DEFAULT_SIZE, int input_count_=1)
Definition: ModuleElastic.cpp:1930
ElasticBufferFifo::hasEnable
bool hasEnable
Definition: ModuleElastic.h:31
DEFAULT_SIZE
const int DEFAULT_SIZE
Definition: Module.h:48
ElasticRegisterFile::numOutputPorts
int numOutputPorts
Definition: ModuleElastic.h:255
ElasticBufferFifo::~ElasticBufferFifo
virtual ~ElasticBufferFifo()
Definition: ModuleElastic.cpp:190
ElasticLazyFork::fanout
int fanout
Definition: ModuleElastic.h:122
ElasticConfigCell::configCell_II
int configCell_II
Definition: ModuleElastic.h:324
ElasticMemoryUnit::ElasticMemoryUnit
ElasticMemoryUnit(std::string name, Location, unsigned size=DEFAULT_SIZE, unsigned addr_size=DEFAULT_SIZE)