CGRA-ME
Module.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * The software programs comprising "CGRA-ME" and the documentation provided
3  * with them are copyright by its authors and the University of Toronto. Only
4  * non-commercial, not-for-profit use of this software is permitted without ex-
5  * plicit permission. This software is provided "as is" with no warranties or
6  * guarantees of support. See the LICENCE for more details. You should have re-
7  * ceived a copy of the full licence along with this software. If not, see
8  * <http://cgra-me.ece.utoronto.ca/license/>.
9  ******************************************************************************/
10 
11 #ifndef __MODULE__H__
12 #define __MODULE__H__
13 
14 #include <CGRA/BitSetting.h>
15 #include <CGRA/Exception.h>
16 #include <CGRA/MRRG.h>
17 #include <CGRA/Mapping.h>
18 #include <CGRA/OpGraph.h>
19 
20 #include <coreir/ir/fwd_declare.h>
21 
22 #include <unordered_map>
23 #include <queue>
24 #include <vector>
25 #include <map>
26 #include <set>
27 #include <string>
28 #include <iosfwd>
29 
30 // template<typename T>
31 // auto MOD_II(const T& x) { return x % II; }
32 #define MOD_II(x) ((x) % II)
33 
34 // Data types
35 using StringMatrix = std::vector<std::vector<std::string>>;
36 // For indenting the code
37 const char* const SET_INDENT = " ";
38 const char* const SET_DOUBLE_INDENT = " ";
39 const char* const SET_TRIPLE_INDENT = " ";
40 const char* const SET_QUAD_INDENT = " ";
41 const char* const SET_PENTA_INDENT = " ";
42 const char* const SET_HEXA_INDENT = " ";
43 // If port is not connected, this is the default print message
44 const char* const PORT_DEFAULT_CONNECTION = "/* A PORT IS UNCONNECTED */";
45 // Determine if we want to print out debug messages
46 const bool MODULE_DEBUG_PRINTING = false;
47 // DEFAULT DATA SIZE FOR MODULES, can change here
48 const int DEFAULT_SIZE = 32;
49 // A port size of zero in memory indicates that it is parameterized. The actual port size will then be determined by the module size
50 const int PARAMETERIZED = 0;
51 
52 class Module;
53 class PrintList;
54 class ConfigCell;
55 class ContextCell;
56 class ContextCounter;
57 
58 
59 // Different types of ports (input, output, output reg, inout, etc)
60 // Furthermore config ports that could be handled differently for elastic and static cases
61 typedef enum
62 {
69 } port_type;
70 
71 std::istream& operator >>(std::istream &is, port_type &porttype);
72 
73 // Different types of CGRA blocks
74 typedef enum
75 {
76  STANDARD_NOBYPASS, // CGRA block, NSEW connection, no bypass mux enabled
77  STANDARD_BYPASS, // CGRA block, NSEW connection, bypass mux exists
78  STANDARD_DIAGONAL, // CGRA blocks that have diagonal as well as NSEW Connections
80 
81 std::istream& operator >>(std::istream &is, CGRABlockType &blocktype);
82 
83 // Port object: contains all information for a given port
84 struct Port
85 {
86  const std::string& getName() const { return name; }
87  Module& getModule() const { return *parent; }
88 
89  std::string makeVerilogDeclaration() const;
90 
91  std::string name = {}; // Name of the port
92  port_type pt = PORT_UNSPECIFIED; // The type of port
93  std::string parameter = {}; // If the port is parameterized, this is the name of the parameter
94  unsigned size = -1; // Size of the port
95  Module* parent = nullptr; // The module which the port belongs to (its parent)
96 };
97 
98 // Connection object: contains all information describing connections between a source port and multiple destination ports
99 struct Connection
100 {
101  std::string name = {}; // Name of the connection object
102  Port* src = nullptr; // Source port
103  std::vector<Port*> dst = {}; // Vector of destination port(s)
104  bool isInMRRG = true; // Flag specifying whether ot not the nodes that this connects are in the MRRG
105 };
106 
107 // PrintList class: it's a buffer that is used for printing module contents (WireList, SubmodList, and AssignList are of type PrintList)
108 // This is used because we don't want to print its output immediately after its generated
110 {
111  public:
112  void add(std::vector<std::string> Data)
113  {
114  // Add information into the buffer, taking a vector of strings as input
115  std::string ToAdd = "";
116  for (unsigned i = 0; i < Data.size(); i++)
117  ToAdd.append(Data[i]);
118  ToPrint.push_back(ToAdd); // Adding the information into the buffer
119  };
120  void print() // Printing the buffer
121  {
122  for (unsigned i = 0; i < ToPrint.size(); i++)
123  std::cout << ToPrint[i];
124  };
125  bool empty() // Check if the buffer is empty
126  {
127  return ToPrint.empty();
128  }
129  void pop() // Removes the last thing added into the buffer
130  {
131  ToPrint.pop_back();
132  }
133  std::string last()
134  {
135  return ToPrint[ToPrint.size() - 1];
136  }
137  private:
138  std::vector<std::string> ToPrint = {}; // Vector of strings that stores information in the buffer
139 };
140 
142  std::string name;
143  std::string value;
144 };
145 
146 using MRRGNodesFromOpNode = std::map<OpGraphOp*, std::set<MRRG::NodeDescriptor>>;
147 using MRRGNodesFromValNode = std::map<OpGraphVal*, std::set<MRRG::NodeDescriptor>>;
148 
149 // Modes of Verilog Generation
150 enum class VerilogType
151 {
152  CGRAME = 0,
153  CoreIR = 1
154 };
155 
156 struct Location {
157  unsigned x_coord;
158  unsigned y_coord;
159 };
160 
161 std::ostream& operator<<(std::ostream& os, VerilogType vt);
162 
163 class Module
164 {
165  public:
166  Module(std::string name, Location, unsigned size = DEFAULT_SIZE, bool isElastic = false);
167  Module(std::string name, std::string template_name, Location loc = {0,0}, unsigned size = DEFAULT_SIZE, bool isElastic = false);
168  virtual ~Module();
169 
170  Module(const Module&) = delete;
171  Module(Module&&) = default;
172  Module& operator=(const Module&) = delete;
173  Module& operator=(Module&&) = default;
174 
175  // Other functions for debugging purposes
176  void print();
177  void print_dot();
178  void print_ports();
179  void print_connections();
180  void print_submodules();
181  void print_configcells();
182 
183  // Functions to modify a module
184  void addConfig(ConfigCell* c, std::vector<std::string> ConnectTo); // add a config cell (configcell, {ports to connect to})
185  void addConfig(std::string name, std::vector<std::string> ConnectTo, int contexts, bool isElastic); // add a config cell (configcell, {ports to connect to})
186  void addSubModule(Module* m); // add a submodule (with pointer to module we are adding)
187  void addSubModule(Module* m, double xPos, double yPos, double width, double height); // add a submodule (with pointer to module we are adding)
188 
189  // add connection ("submodulename.portname", "submodulename.portname") Also assumes that port widths are the same size, returns true if sucessful
190  void connectPorts(std::string src, std::string dst, bool isElastic);
191  // add connection ("submodulename.portname", "submodulename.portname") Also assumes that port widths are the same size, returns true if sucessful
192  void addConnection(std::string src, std::string dst, bool isInMRRG = true);
193  // add elastic connection ("submodulename.portname", "submodulename.portname") Also assumes that port widths are the same size, returns true if sucessful
194  void addElasticConnection(std::string src, std::string dst);
195  // adds a port ("portname", port type, size);
196  void addPort(std::string portname, port_type pt, unsigned size);
197  void addPort(std::string portname, port_type pt, unsigned size, bool isElastic);
198  // adds an elastic port ("portname", port type, size)
199  void addElasticPort(std::string portname, port_type pt, unsigned size);
200  // adds a parameterized port ("portname", port type, parameter name, parameter size), parameter size is used to specify default size for a parameter
201  void addPort(std::string portname, port_type pt, std::string ParameterName, unsigned size);
202  // adds a parameterized port ("portname", port type, parameter name, parameter size), parameter size is used to specify default size for a parameter
203  void addPort(std::string portname, port_type pt, std::string ParameterName, unsigned size, bool isElastic);
204  // adds a parameterized port ("portname", port type, parameter name, parameter size), parameter size is used to specify default size for a parameter
205  void addElasticPort(std::string portname, port_type pt, std::string ParameterName, unsigned size);
206  void addParameter(std::string parameterName, unsigned parameterValue);
207  // Adds a verilog only port to the module. The port is not part of the mrrg but will be propagated to the top level cgra.
208  void addVerilogPort(std::string name, port_type pt, std::string parameter, unsigned size);
209 
210  // Function that returns ALL the modules that have config cells attached to them, and their order
211  void genConfigOrder(std::vector<ConfigCell*> & ConfigTable) const;
212 
213  Module* getSubModule(std::string);
214  bool isSubModule(Module*);
215  Module* getModule(std::string, std::string err_context = "");
216  Module* getModuleFromPortName(std::string full_port_name, std::string err_context = "");
217  Port* getPort(std::string full_port_name, std::string err_context = "");
218 
219  // VARIABLES
220  // internal parameters, ports, connections and modules, and configuration cells
221  // submodules variable MUST be public, as used in the CGRA.cpp file
222 
223  // RE. parameterlist: it may be wanted to add an state meaning that the parent's value should be used
224  std::map<std::string, unsigned> parameterlist;
225  std::map<std::string, Port*> ports;
226  std::map<Port*, Connection*> connections;
227  std::map<std::string, Module*> submodules;
228  std::map<std::string, ConfigCell*> configcells; // configcellname -> configcell
229  std::vector<Port> portsToPropagate; // Ports to propagate to the top level of the cgra, e.g. memory
230 
231  // Variables exclusively set and accessed by PerfEngine:
232  // - area, and helper flags used to print hierarchical area
233  double area = 0.;
234  unsigned int hierarchyLevel = 0; // increments from top-level(root) to base-modules(bottom children)
235  bool isLastInHierarchy; // indicate this being the last among submodules in the same level
236  bool isElastic = false;
237  bool submodsSet; // whether the submodules' area/hierarchyLevel/isLastInHierarchy were set
238  // x & y coord assigned to each module to specify the relative position in 2D plannar
240  // FIXME: very hacky... bandaid
241  int overridenFanoutCount = -1; // used for overriden synthesized fanout count; -1 indicates using MRRG-based count
242 
243  Module* parent = nullptr; // Stores parent module
244 
245  // Accessor functions
246  int getSize() const { return data_size; }
247  auto& getName() const { return name; }
248  std::string ReturnPath() const // Returns the full path from the CGRA to a module (useful for CAD tools to simulate CGRA)
249  {
250  if (parent->name == "CGRA")
251  return name;
252  return parent->ReturnPath() + "/" + name;
253  }
254 
255  bool hasConfigCells() const { return not configcells.empty(); }
256 
258  const MRRG& mrrg, const OpGraph & og,
259  const Mapping& map,
260  const ConfigCell& ccell,
261  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
262  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
263  ) const {
264  std::cout << getName() << '\n';
265  for (const auto& op_and_nodes : mrrg_nodes_from_op_node) {
266  std::cout << '\t' << *op_and_nodes.first << '\n';
267  for (const auto& mrrg_node : op_and_nodes.second) {
268  std::cout << "\t\t" << mrrg_node << '\n';
269  }
270  }
271  for (const auto& val_and_nodes : mrrg_nodes_from_val_node) {
272  std::cout << '\t' << *val_and_nodes.first << '\n';
273  for (const auto& mrrg_node : val_and_nodes.second) {
274  std::cout << "\t\t" << mrrg_node << '\n';
275  }
276  }
277  (void)ccell;
278  (void)mrrg_nodes_from_val_node;
279  (void)og;
280  (void)mrrg;
281  throw cgrame_error("getBitConfig: uninplemented for " + getName());
282  }
283  virtual std::string GenericName(); // Generates a generic name for the module, can be overridden by inherited virtual functions.
284 
285  // Recursively create the MRRG for a given number of contexts
286  virtual MRRG* createMRRG(unsigned contexts);
287 
288  // implementations for verilog generation
289  void genVerilogCGRAME(std::string dir);
290  void genVerilogCoreIR(std::string dir, int contexts);
291 
292  // Direct helper functions for GenVerilog()
293  void GetModulesToPrint(std::queue<Module*> & ToPrint, std::set<std::string> & PrintedModMap); // Function that returns what modules need to be printed in Verilog (avoiding duplicate printing)
294  virtual void GenModuleVerilog(); // Function that generates verilog for a module (submodules not included)
295  CoreIR::TypeGenFun makeCoreIRInterfaceGenerator();
296  CoreIR::ModuleDefGenFun makeCoreIRModuleDefinitonGenerator();
297  virtual void CoreIRGenModuleVerilog(CoreIR::Context* c, int contexts); // Function that generates verilog for a module using CoreIR (submodules not included)
298 
299  // Visualization
300  bool setNodePosition(const std::string & nodeName, double x, double y);
301  std::pair<bool, std::pair<double, double>> getSubModulePosition(const std::string & submodName);
302  std::pair<bool, std::pair<double, double>> getNodePosition(const std::string & nodeName);
303  // END OF HELPER FUNCTIONS
304 
305  protected:
306  void GetConfigsToPrint(std::queue<ConfigCell*>& q, std::set<unsigned>& uniq);
307 
308  // Helper functions used in function GenModuleVerilog
309  void GenModuleHeader(bool HasConfig, bool HasRegisters); // Generates module header
310  void GenParameters(); // Prints out module parameters
311  void GenPortSpecs(bool HasConfig, bool HasRegisters); // Prints out the ports, and their specification
312  virtual void GenConnections(); // Prints out submodules and their connectivity, can be overriden (by FuncUnit)
313  virtual void GenFunctionality(); // Generates the functionality for the module, e.g. always block, can be overriden by inherited virtual functions
314  // END OF HELPER FUNCTIONS
315 
316  // Helper functions used in function CoreIRGenModuleVerilog
317  void CoreIRGetModulesToPrint(std::queue<Module*> & ToPrint, std::set<std::string> & PrintedModMap); // Function that returns what modules need to be printed in Verilog (avoiding duplicate printing)
318  virtual nlohmann::json CoreIRGenFunctionality(); // CoreIR Implementation of GenFunctionality()
319  // END OF HELPER FUNCTIONS
320 
321  // Helper functions used in function GenConnections
322  void GenerateMatrix(StringMatrix & Matrix); // Generates a matrix to store connections between submodules
323  void DetermineConnections(StringMatrix & Matrix, PrintList & WireList, PrintList & SubmodList, PrintList & AssignList); // Print out the connections between submodules in Verilog
324  // END OF HELPER FUNCTIONS
325 
331  virtual std::vector<ResolvedVeroligModuleParameter> ResolveVerilogParameters() const;
332 
333  // Helper functions used in DetermineConnections, used to help insert connection information into a matrix
334  int FindPortIndex(std::string PortName);
335  int FindSubmoduleIndex(std::string SubmoduleName);
336  // END OF HELPER FUNCTIONS
337 
338  unsigned data_size; // Bitwidth of the data the module is handling
339 
340  std::string templateName; // Module name
341  std::string name; // Module name
342 
343  // Visualization
351  double x, y, w, h;
352  };
353 
355  double x, y;
356  };
357 
358  // Most positions are set in constructor
359  std::map<std::string, VisualPositionRect> submodule_relative_position = {};
360  std::map<std::string, VisualPositionPoint> node_relative_position = {};
361  public:
368 
369  protected:
370  bool adds_synchronous_circuitry; //< Does *this* module add the requirement for clocks? (regardless of submodules)
371 };
372 
373 struct PipelineMode {
374  int II;
375  int latency;
376 
378  : II(II)
379  , latency(latency)
380  { }
381  PipelineMode(const PipelineMode&) = default;
382  PipelineMode(PipelineMode&&) = default;
383  PipelineMode& operator=(const PipelineMode&) = default;
384  PipelineMode& operator=(PipelineMode&&) = default;
385 };
386 
387 // Struct to hold information of one possible mode of a FuncUnit (e.g. add)
388 typedef struct
389 {
390  std::string ModuleName; // Name of the module to achieve that function
391  std::string OpName; // Name of the operation
392  std::vector<std::string> Functionality; // Verilog code necessary to achieve that function
393  std::string WireName; // Name of the wire we will use when connecting that module to others
394 } LLVMMode;
395 
396 
406 class FuncUnit : public Module
407 {
408  public:
409 
410  // Constructor takes in a name, the operations that the unit supports, and the size of the module
411  FuncUnit(std::string name, Location, std::vector<OpGraphOpCode> supported_modes, unsigned size, int II, int latency, bool isElastic = false);
412  virtual ~FuncUnit();
413 
414  //virtual void GenFunctionality() override;
415  //virtual void GenConnections() override;
416  virtual MRRG* createMRRG(unsigned II) override;
417 
418  virtual BitConfig getBitConfig(
419  const MRRG& mrrg, const OpGraph & og,
420  const Mapping& map,
421  const ConfigCell& ccell,
422  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
423  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
424  ) const override;
425 
426  virtual std::string GenericName() override; // Generates a generic name for the module
427 
428  int getII() const { return pipeline_mode.II; }
429  int getLatency() const { return pipeline_mode.latency; }
430  auto& getSupportedModes() const { return supported_modes; }
431 
432  static const std::map<OpGraphOpCode, LLVMMode> all_modes;
433  protected:
435  std::vector<OpGraphOpCode> supported_modes;
436 };
437 
438 class FracUnit : public Module
439 {
440  public:
441  FracUnit(std::string name, Location loc, std::vector<OpGraphOpCode> supported_modes, unsigned size, int II, int latency);
442  virtual ~FracUnit();
443 
444  virtual std::string GenericName() override; // Generates a generic name for the module
445 
446  int getII() const { return pipeline_mode.II; }
447  int getLatency() const { return pipeline_mode.latency; }
448  auto& getSupportedModes() const { return supported_modes; }
449 
450  protected:
452  std::vector<OpGraphOpCode> supported_modes;
453 };
454 
455 class FracMulUnit : public Module {
456  public:
457  FracMulUnit(std::string name, Location loc, unsigned size, int II, int latency);
458  virtual ~FracMulUnit();
459  virtual std::string GenericName() override; // Generates a generic name for the module
460  virtual nlohmann::json CoreIRGenFunctionality() override;
461 
462  virtual MRRG* createMRRG(unsigned II) override;
463 
464  virtual BitConfig getBitConfig(
465  const MRRG& mrrg, const OpGraph & og,
466  const Mapping& map,
467  const ConfigCell& ccell,
468  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
469  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
470  ) const override;
471 
472  int getII() const { return pipeline_mode.II; }
473  int getLatency() const { return pipeline_mode.latency; }
474 
475  static const std::map<OpGraphOpCode, LLVMMode> all_modes;
476 
477  protected:
479  static const std::vector<OpGraphOpCode> mul_modes_ordered;
480 };
481 
482 class FracAddUnit : public Module {
483  public:
484  FracAddUnit(std::string name, Location loc, unsigned size, int II, int latency);
485  virtual ~FracAddUnit();
486  virtual std::string GenericName() override; // Generates a generic name for the module
487  virtual nlohmann::json CoreIRGenFunctionality() override;
488 
489  virtual MRRG* createMRRG(unsigned II) override;
490 
491  virtual BitConfig getBitConfig(
492  const MRRG& mrrg, const OpGraph & og,
493  const Mapping& map,
494  const ConfigCell& ccell,
495  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
496  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
497  ) const override;
498 
499  int getII() const { return pipeline_mode.II; }
500  int getLatency() const { return pipeline_mode.latency; }
501 
502  static const std::map<OpGraphOpCode, LLVMMode> all_modes;
503 
504  protected:
506  static const std::vector<OpGraphOpCode> add_modes_ordered;
507 };
508 
517 class MemoryUnit : public Module {
518  public:
519  // Constructor takes in a name, the operations that the unit supports, and the size of the module
520  MemoryUnit(std::string name, Location, unsigned size = DEFAULT_SIZE, bool isElastic = false, bool pred = false);
521  // virtual void GenConnections();
522  virtual ~MemoryUnit();
523  virtual std::string GenericName() override; // Generates a generic name for the module
524  virtual void GenFunctionality() override;
525  virtual nlohmann::json CoreIRGenFunctionality() override;
526  MRRG* createMRRG(unsigned II) override;
527 
528  // For the bitstream generation. Maps an operation to a set of bits
529  virtual BitConfig getBitConfig(
530  const MRRG& mrrg, const OpGraph & og,
531  const Mapping& map,
532  const ConfigCell& ccell,
533  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
534  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
535  ) const override;
536  private:
537  bool pred;
538 };
539 
540 class ConstUnit : public Module {
541  public:
542  // Constructor takes in a name, the operations that the unit supports, and the size of the module
543  ConstUnit(std::string name, Location, int size = DEFAULT_SIZE, int contexts = 1, bool isElastic = false);
544  virtual ~ConstUnit();
545  virtual std::string GenericName() override; // Generates a generic name for the module
546  virtual void GenFunctionality() override;
547  MRRG* createMRRG(unsigned II) override;
548 
549  virtual BitConfig getBitConfig(
550  const MRRG& mrrg, const OpGraph & og,
551  const Mapping& map,
552  const ConfigCell& ccell,
553  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
554  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
555  ) const override;
556 };
557 
566 class Register : public Module {
567  public:
568  Register(std::string, Location, int size = DEFAULT_SIZE, bool isElastic = false); // ("name", size)
569  virtual ~Register();
570  virtual std::string GenericName() override; // Generates a generic name for the module
571  virtual void GenFunctionality() override;
572  virtual nlohmann::json CoreIRGenFunctionality() override;
573  MRRG* createMRRG(unsigned II) override;
574 
575  virtual BitConfig getBitConfig(
576  const MRRG& mrrg, const OpGraph & og,
577  const Mapping& map,
578  const ConfigCell& ccell,
579  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
580  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
581  ) const override;
582 };
583 
592 class Multiplexer : public Module {
593  public:
594  Multiplexer(std::string, Location, unsigned mux_size, unsigned size = DEFAULT_SIZE, bool isElastic = false); // ("name", mux size, size)
595  virtual ~Multiplexer();
596  virtual std::string GenericName() override; // Generates a generic name for the module
597  virtual void GenFunctionality() override;
598  virtual nlohmann::json CoreIRGenFunctionality() override;
599 
600  virtual BitConfig getBitConfig(
601  const MRRG& mrrg, const OpGraph & og,
602  const Mapping& map,
603  const ConfigCell& ccell,
604  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
605  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
606  ) const override;
607  int getMuxSize() { return mux_size; };
608  MRRG* createMRRG(unsigned II) override;
609  private:
610  int mux_size; // size of multiplexer (e.g. how many inputs)
611 };
612 
621 class TruncateInput : public Module {
622  public:
623  TruncateInput(std::string, Location, unsigned pos, unsigned size = DEFAULT_SIZE, bool isElastic = false); // ("name", mux size, size)
624  virtual ~TruncateInput();
625 
626  //nlohmann::json genFunctionalityHeader();
627  virtual std::string GenericName() override; // Generates a generic name for the module
628  virtual nlohmann::json CoreIRGenFunctionality() override;
629 
630  MRRG* createMRRG(unsigned II) override;
631  private:
632  int pos; // size of multiplexer (e.g. how many inputs)
633 };
634 
635 
647 class SelMultiplexer : public Module {
648  public:
649  static const std::map<OpGraphOpCode,LLVMMode> all_modes;
650  SelMultiplexer(std::string, Location, unsigned mux_size, unsigned size = DEFAULT_SIZE, bool isElastic = false); // ("name", mux size, size)
651  virtual ~SelMultiplexer();
652  virtual std::string GenericName() override; // Generates a generic name for the module
653  virtual nlohmann::json CoreIRGenFunctionality() override;
654 
655  virtual BitConfig getBitConfig(
656  const MRRG& mrrg, const OpGraph & og,
657  const Mapping& map,
658  const ConfigCell& ccell,
659  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
660  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
661  ) const override;
662  int getMuxSize() { return mux_size; };
663  MRRG* createMRRG(unsigned II) override;
664  private:
665  int mux_size; // size of multiplexer (e.g. how many inputs)
666 };
676 class DeMux : public Module {
677  public:
678  DeMux(std::string, Location, unsigned demux_size, unsigned size = DEFAULT_SIZE, bool isElastic = false); // ("name", mux size, size)
679  virtual ~DeMux();
680  virtual std::string GenericName() override; // Generates a generic name for the module
681  virtual nlohmann::json CoreIRGenFunctionality() override;
682 
683  virtual BitConfig getBitConfig(
684  const MRRG& mrrg, const OpGraph & og,
685  const Mapping& map,
686  const ConfigCell& ccell,
687  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
688  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
689  ) const override;
690  int getDeMuxSize() { return demux_size; };
691  MRRG* createMRRG(unsigned II) override;
692  private:
693  int demux_size; // size of multiplexer (e.g. how many inputs)
694 };
695 
696 
707 class RegisterFile : public Module {
708  public:
709  RegisterFile(std::string name, Location, int numInputPorts, int numOutputPorts, int log2Registers, int size = DEFAULT_SIZE, int contexts = 1, bool isElastic = false);
710  virtual ~RegisterFile();
711  virtual void GenFunctionality() override;
712  virtual nlohmann::json CoreIRGenFunctionality() override;
713 
714  virtual std::string GenericName() override;
715  // MRRG* createMRRG(unsigned II) override;
716  private:
718 };
719 
720 class Crossbar: public Module
721 {
722  public:
723  Crossbar(std::string name, Location, int num_inputs, int num_outputs, int data_size, bool predExist = false, int contexts = 1);
724  virtual std::string GenericName() override;
725  private:
728 };
729 
730 class TriState : public Module {
731  public:
732  enum class Mode : char {
735  PLAIN
736  };
737 
738  TriState(Mode mode, std::string, Location, unsigned size = DEFAULT_SIZE, bool isElastic = false);
739  virtual std::string GenericName() override;
740  virtual ~TriState();
741  virtual BitConfig getBitConfig(
742  const MRRG& mrrg, const OpGraph & og,
743  const Mapping& map,
744  const ConfigCell& ccell,
745  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
746  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
747  ) const override;
748  virtual MRRG* createMRRG(unsigned II) override;
749  virtual void GenFunctionality() override;
750  virtual nlohmann::json CoreIRGenFunctionality() override;
751  private:
753 };
754 
762 class IO : public Module {
763  public:
764  IO(std::string, Location, unsigned size = DEFAULT_SIZE, int contexts = 1, bool isElastic = false); // ("name", size)
765  Module* getTriState(); // This is used for the bitstream generation
766  virtual std::string GenericName() override;
767  virtual ~IO();
768 };
769 
771 class DisconnectedSource : public Module {
772  public:
773  DisconnectedSource(std::string name, Location, unsigned size, int value = 0);
774  virtual std::string GenericName() override;
775  virtual ~DisconnectedSource();
776  virtual void GenFunctionality() override;
777  virtual nlohmann::json CoreIRGenFunctionality() override;
778  private:
779  int value;
780 };
781 
783 class DisconnectedSink : public Module {
784  public:
785  DisconnectedSink(std::string name, Location, unsigned size);
786  virtual std::string GenericName() override;
787  virtual ~DisconnectedSink();
788  virtual void GenFunctionality() override;
789  virtual nlohmann::json CoreIRGenFunctionality() override;
790 };
791 
792 class CustomModule : public Module {
793  public:
794  CustomModule(std::string name, Location, std::vector<std::string> Function, unsigned size = DEFAULT_SIZE, std::string pred = ""); // ("name", {"functionality"}, size)
795  virtual ~CustomModule();
796  virtual void GenFunctionality() override;
797  virtual nlohmann::json CoreIRGenFunctionality() override;
798  virtual std::string GenericName() override;
799  private:
800  std::vector<std::string> Function; // functionality lines of code (this will be printed in GenFunctionality()
801 };
802 
804  public:
805  CustomModuleSingleInput(std::string name, Location, std::vector<std::string> Function, unsigned size = DEFAULT_SIZE, std::string pred = ""); // ("name", {"functionality"}, size)
806  virtual ~CustomModuleSingleInput();
807  virtual void GenFunctionality() override;
808  virtual nlohmann::json CoreIRGenFunctionality() override;
809  virtual std::string GenericName() override;
810  private:
811  std::vector<std::string> Function; // functionality lines of code (this will be printed in GenFunctionality()
812 };
813 
814 class UserModule : public Module {
815  public:
816  UserModule(std::string prototype, std::string name, Location, std::vector<std::string> Ports); // ("prototype name", "module name", {"list of all ports"})
817  virtual void GenModuleVerilog() override { }; // by default, have no implementation
818  virtual void CoreIRGenModuleVerilog(CoreIR::Context*, int) override { } // by default, have no implementation
819  virtual std::string GenericName() override; // Generates a generic name for the module
820  virtual ~UserModule();
821  private:
822  std::string prototype; // prototype name of module
823 };
824 
825 class ConfigCell : public Module {
826  public:
827  ConfigCell(std::string name, int contexts = 1, Location loc = {0,0}); // Constructor of the configuration cell; initializes the name
828  void GenModuleVerilog() override; // Generates the verilog for a configuration cell
829  virtual nlohmann::json CoreIRGenFunctionality() override;
830  const std::string& getName() const { return name; } // returns the instance name
831  virtual std::string GenericName() override; // returns the module name
832  int getStorageSize() const { return Module::getSize(); }
834  if (connected_ports.size() < 1) { throw cgrame_error("trying to get single connected port on ConfigCell with multiple (or zero) ports"); }
835  return *connected_ports.at(0);
836  }
837  const std::vector<Port*>& getAllConnectedPorts() const { return connected_ports; }
838 
839  void addControledPorts(const std::vector<Port*>& new_ports);
840  int l_contexts = 1;
841 
842  private:
843  std::vector<Port*> connected_ports; // All ports that the config cell is connected to
844  std::vector<unsigned> contexts; // vector containing contexts
845 };
846 
847 class EventTransitionTable : public Module {
848 public:
849  static const std::map<OpGraphOpCode,LLVMMode> all_modes;
850  EventTransitionTable(std::string name, int contexts, Location loc = {0,0}); // Constructor of the event dirven transition table; initializes the name
851  virtual nlohmann::json CoreIRGenFunctionality() override;
852  virtual std::string GenericName() override; // returns the module name
853  virtual BitConfig getBitConfig(
854  const MRRG& mrrg, const OpGraph & og,
855  const Mapping& map,
856  const ConfigCell& ccell,
857  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
858  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
859  ) const override;
860  virtual MRRG* createMRRG(unsigned II) override;
861 };
862 
863 class ContextCell : public Module {
864 public:
865  ContextCell(std::string name, int contexts, Location loc = {0,0}); // Constructor of the configuration cell; initializes the name
866  virtual BitConfig getBitConfig(
867  const MRRG& mrrg, const OpGraph & og,
868  const Mapping& map,
869  const ConfigCell& ccell,
870  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
871  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
872  ) const override;
873  virtual std::string GenericName() override; // returns the module name
874 private:
875  int l_contexts = 1;
876 };
877 
878 class ContextCounter : public Module {
879 public:
880  ContextCounter(std::string name, int contexts, Location loc = {0,0}); // Constructor of the configuration cell; initializes the name
881  virtual nlohmann::json CoreIRGenFunctionality() override;
882  virtual std::string GenericName() override; // returns the module name
883 };
884 
885 class CaseStatement : public Module {
886  public:
887  CaseStatement(std::string name, Location, unsigned numInputs, unsigned size, int latency, bool isElastic = false);
888  virtual std::string GenericName() override;
889  virtual void GenFunctionality() override;
890  virtual nlohmann::json CoreIRGenFunctionality() override;
891  virtual ~CaseStatement();
892  unsigned getNumInputs(){return numInputs;};
893  private:
894  unsigned numInputs;
895  int latency;
896 };
897 
898 class Compare : public Module {
899  public:
900  Compare(std::string name, Location, unsigned size, int II);
901  virtual ~Compare();
902  virtual std::string GenericName() override; // Generates a generic name for the module
903  virtual nlohmann::json CoreIRGenFunctionality() override;
904  virtual BitConfig getBitConfig(
905  const MRRG& mrrg, const OpGraph & og,
906  const Mapping& map,
907  const ConfigCell& ccell,
908  const MRRGNodesFromOpNode& mrrg_nodes_from_op_node,
909  const MRRGNodesFromValNode& mrrg_nodes_from_val_node
910  ) const override;
911 
912  MRRG* createMRRG(unsigned II) override;
913 
914  static const std::map<OpGraphOpCode, LLVMMode> all_modes;
915  protected:
916 
917 };
918 #endif
Location::x_coord
unsigned x_coord
Definition: Module.h:157
Module::operator=
Module & operator=(const Module &)=delete
FracUnit::pipeline_mode
PipelineMode pipeline_mode
Definition: Module.h:451
Module::VisualPositionRect::w
double w
Definition: Module.h:351
Module::submodules
std::map< std::string, Module * > submodules
Definition: Module.h:227
DisconnectedSink::GenericName
virtual std::string GenericName() override
Definition: Module.cpp:1952
ConfigCell::getName
const std::string & getName() const
Definition: Module.h:830
Module::GenPortSpecs
void GenPortSpecs(bool HasConfig, bool HasRegisters)
Definition: Module.cpp:684
BitConfig
Definition: BitSetting.h:58
FracMulUnit::GenericName
virtual std::string GenericName() override
Definition: ModuleFracUnit.cpp:350
FracMulUnit::FracMulUnit
FracMulUnit(std::string name, Location loc, unsigned size, int II, int latency)
Definition: ModuleFracUnit.cpp:338
Module::name
std::string name
Definition: Module.h:341
Module::FindPortIndex
int FindPortIndex(std::string PortName)
Definition: Module.cpp:969
ConfigCell
Definition: Module.h:825
Module::connections
std::map< Port *, Connection * > connections
Definition: Module.h:226
FracUnit::getII
int getII() const
Definition: Module.h:446
DisconnectedSink::DisconnectedSink
DisconnectedSink(std::string name, Location, unsigned size)
Definition: Module.cpp:1946
IO::GenericName
virtual std::string GenericName() override
Definition: Module.cpp:1904
LLVMMode::OpName
std::string OpName
Definition: Module.h:391
Connection
Definition: Module.h:99
Compare::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: ModulePredicationUnit.cpp:154
FracAddUnit::pipeline_mode
PipelineMode pipeline_mode
Definition: Module.h:505
FracUnit::supported_modes
std::vector< OpGraphOpCode > supported_modes
Definition: Module.h:452
TruncateInput
Zero-cycle latency split input.
Definition: Module.h:621
CustomModuleSingleInput::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: Module.cpp:2067
Port::name
std::string name
Definition: Module.h:91
Multiplexer::GenFunctionality
virtual void GenFunctionality() override
Definition: ModuleRoutingStructures.cpp:504
SelMultiplexer::~SelMultiplexer
virtual ~SelMultiplexer()
Definition: ModulePredicationUnit.cpp:392
Module::GetConfigsToPrint
void GetConfigsToPrint(std::queue< ConfigCell * > &q, std::set< unsigned > &uniq)
Definition: Module.cpp:240
ConstUnit::ConstUnit
ConstUnit(std::string name, Location, int size=DEFAULT_SIZE, int contexts=1, bool isElastic=false)
Definition: ModuleFuncUnit.cpp:480
Module::VisualPositionPoint::x
double x
Definition: Module.h:355
FracAddUnit::getLatency
int getLatency() const
Definition: Module.h:500
CaseStatement::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleFuncUnit.cpp:651
OpGraph.h
FuncUnit::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: ModuleFuncUnit.cpp:146
FracMulUnit::~FracMulUnit
virtual ~FracMulUnit()
Definition: ModuleFracUnit.cpp:640
PipelineMode::PipelineMode
PipelineMode(int II, int latency)
Definition: Module.h:377
RegisterFile::GenericName
virtual std::string GenericName() override
Definition: ModuleRoutingStructures.cpp:899
Multiplexer
Zero-cycle latency multiplexer.
Definition: Module.h:592
CaseStatement::latency
int latency
Definition: Module.h:895
ContextCounter::ContextCounter
ContextCounter(std::string name, int contexts, Location loc={0, 0})
Definition: Module.cpp:2276
STANDARD_NOBYPASS
@ STANDARD_NOBYPASS
Definition: Module.h:76
DisconnectedSink::GenFunctionality
virtual void GenFunctionality() override
Definition: Module.cpp:1955
DisconnectedSink
For when an output is unused, but a connection is required anyway.
Definition: Module.h:783
Module::genVerilogCGRAME
void genVerilogCGRAME(std::string dir)
Definition: Module.cpp:175
CustomModule::Function
std::vector< std::string > Function
Definition: Module.h:800
UserModule::UserModule
UserModule(std::string prototype, std::string name, Location, std::vector< std::string > Ports)
Definition: Module.cpp:2114
CustomModuleSingleInput::GenFunctionality
virtual void GenFunctionality() override
Definition: Module.cpp:2060
UserModule::GenModuleVerilog
virtual void GenModuleVerilog() override
Definition: Module.h:817
SET_TRIPLE_INDENT
const char *const SET_TRIPLE_INDENT
Definition: Module.h:39
MRRG
Definition: MRRG.h:216
PORT_OUTPUT_REG
@ PORT_OUTPUT_REG
Definition: Module.h:65
Module::print_configcells
void print_configcells()
Definition: Module.cpp:1055
MRRGNodesFromOpNode
std::map< OpGraphOp *, std::set< MRRG::NodeDescriptor > > MRRGNodesFromOpNode
Definition: Module.h:146
SelMultiplexer::getMuxSize
int getMuxSize()
Definition: Module.h:662
Module::isSubModule
bool isSubModule(Module *)
Definition: Module.cpp:1160
FracAddUnit::GenericName
virtual std::string GenericName() override
Definition: ModuleFracUnit.cpp:673
DisconnectedSource::GenericName
virtual std::string GenericName() override
Definition: Module.cpp:1920
Module::DetermineConnections
void DetermineConnections(StringMatrix &Matrix, PrintList &WireList, PrintList &SubmodList, PrintList &AssignList)
Definition: Module.cpp:765
Location
Definition: Module.h:156
Module::data_size
unsigned data_size
Definition: Module.h:338
DeMux::demux_size
int demux_size
Definition: Module.h:693
FracMulUnit::createMRRG
virtual MRRG * createMRRG(unsigned II) override
Definition: ModuleFracUnit.cpp:609
ContextCell::ContextCell
ContextCell(std::string name, int contexts, Location loc={0, 0})
Definition: Module.cpp:2341
FracAddUnit::getII
int getII() const
Definition: Module.h:499
CaseStatement::getNumInputs
unsigned getNumInputs()
Definition: Module.h:892
VerilogType
VerilogType
Definition: Module.h:150
Module::templateName
std::string templateName
Definition: Module.h:340
FracAddUnit::~FracAddUnit
virtual ~FracAddUnit()
Definition: ModuleFracUnit.cpp:860
FuncUnit::pipeline_mode
PipelineMode pipeline_mode
Definition: Module.h:434
PrintList::add
void add(std::vector< std::string > Data)
Definition: Module.h:112
FracUnit::~FracUnit
virtual ~FracUnit()
Definition: ModuleFracUnit.cpp:298
ResolvedVeroligModuleParameter::name
std::string name
Definition: Module.h:142
Port::pt
port_type pt
Definition: Module.h:92
TriState::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: Module.cpp:1769
Module::addConnection
void addConnection(std::string src, std::string dst, bool isInMRRG=true)
Definition: Module.cpp:1241
SET_PENTA_INDENT
const char *const SET_PENTA_INDENT
Definition: Module.h:41
PrintList
Definition: Module.h:109
IO::getTriState
Module * getTriState()
LLVMMode::Functionality
std::vector< std::string > Functionality
Definition: Module.h:392
Module::getSubModulePosition
std::pair< bool, std::pair< double, double > > getSubModulePosition(const std::string &submodName)
Definition: Module.cpp:1629
TriState::createMRRG
virtual MRRG * createMRRG(unsigned II) override
Definition: Module.cpp:1826
SelMultiplexer::SelMultiplexer
SelMultiplexer(std::string, Location, unsigned mux_size, unsigned size=DEFAULT_SIZE, bool isElastic=false)
Definition: ModulePredicationUnit.cpp:241
operator<<
std::ostream & operator<<(std::ostream &os, VerilogType vt)
Definition: Module.cpp:98
Module::addParameter
void addParameter(std::string parameterName, unsigned parameterValue)
Definition: Module.cpp:1503
LLVMMode::ModuleName
std::string ModuleName
Definition: Module.h:390
ContextCell
Definition: Module.h:863
Module::adds_synchronous_circuitry
bool adds_synchronous_circuitry
Definition: Module.h:370
TriState::TriState
TriState(Mode mode, std::string, Location, unsigned size=DEFAULT_SIZE, bool isElastic=false)
Definition: Module.cpp:1710
SET_HEXA_INDENT
const char *const SET_HEXA_INDENT
Definition: Module.h:42
Module::parent
Module * parent
Definition: Module.h:243
Module::getSubModule
Module * getSubModule(std::string)
Definition: Module.cpp:1147
PrintList::empty
bool empty()
Definition: Module.h:125
Module::print_submodules
void print_submodules()
Definition: Module.cpp:1046
Module::setNodePosition
bool setNodePosition(const std::string &nodeName, double x, double y)
Definition: Module.cpp:1671
Module::parameterlist
std::map< std::string, unsigned > parameterlist
Definition: Module.h:224
ConfigCell::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: Module.cpp:2191
DisconnectedSink::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: Module.cpp:1959
Port
Definition: Module.h:84
Register
A simple latency element with an enable signal; a data flip-flop.
Definition: Module.h:566
ConstUnit::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: ModuleFuncUnit.cpp:522
PrintList::print
void print()
Definition: Module.h:120
LLVMMode::WireName
std::string WireName
Definition: Module.h:393
Port::getName
const std::string & getName() const
Definition: Module.h:86
FracUnit
Definition: Module.h:438
Connection::name
std::string name
Definition: Module.h:101
CustomModule::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: Module.cpp:2000
Module::addPort
void addPort(std::string portname, port_type pt, unsigned size)
Definition: Module.cpp:1354
Module::VisualPositionRect::x
double x
Definition: Module.h:351
DeMux::getDeMuxSize
int getDeMuxSize()
Definition: Module.h:690
Module::node_relative_position
std::map< std::string, VisualPositionPoint > node_relative_position
Definition: Module.h:360
Module::print
void print()
Definition: Module.cpp:996
STANDARD_DIAGONAL
@ STANDARD_DIAGONAL
Definition: Module.h:78
Module::FindSubmoduleIndex
int FindSubmoduleIndex(std::string SubmoduleName)
Definition: Module.cpp:983
ConstUnit::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModuleFuncUnit.cpp:567
FracAddUnit::all_modes
static const std::map< OpGraphOpCode, LLVMMode > all_modes
Definition: Module.h:502
FracUnit::FracUnit
FracUnit(std::string name, Location loc, std::vector< OpGraphOpCode > supported_modes, unsigned size, int II, int latency)
Definition: ModuleFracUnit.cpp:22
CustomModule
Definition: Module.h:792
MemoryUnit::GenericName
virtual std::string GenericName() override
Definition: ModuleFuncUnit.cpp:257
Compare::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModulePredicationUnit.cpp:41
Module::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
Definition: Module.h:257
Module::genVerilogCoreIR
void genVerilogCoreIR(std::string dir, int contexts)
Register::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModuleRoutingStructures.cpp:201
ConfigCell::getAllConnectedPorts
const std::vector< Port * > & getAllConnectedPorts() const
Definition: Module.h:837
ConfigCell::GenModuleVerilog
void GenModuleVerilog() override
Definition: Module.cpp:2150
PORT_DEFAULT_CONNECTION
const char *const PORT_DEFAULT_CONNECTION
Definition: Module.h:44
Port::getModule
Module & getModule() const
Definition: Module.h:87
PrintList::ToPrint
std::vector< std::string > ToPrint
Definition: Module.h:138
CaseStatement::GenericName
virtual std::string GenericName() override
Definition: ModuleFuncUnit.cpp:607
FracAddUnit::createMRRG
virtual MRRG * createMRRG(unsigned II) override
Definition: ModuleFracUnit.cpp:829
ConstUnit::~ConstUnit
virtual ~ConstUnit()
Definition: ModuleFuncUnit.cpp:584
DeMux::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModuleRoutingStructures.cpp:442
FracMulUnit::pipeline_mode
PipelineMode pipeline_mode
Definition: Module.h:478
RegisterFile::RegisterFile
RegisterFile(std::string name, Location, int numInputPorts, int numOutputPorts, int log2Registers, int size=DEFAULT_SIZE, int contexts=1, bool isElastic=false)
Definition: ModuleRoutingStructures.cpp:818
Connection::src
Port * src
Definition: Module.h:102
ConfigCell::connected_ports
std::vector< Port * > connected_ports
Definition: Module.h:843
RegisterFile::numInputPorts
int numInputPorts
Definition: Module.h:717
Register::GenFunctionality
virtual void GenFunctionality() override
Definition: ModuleRoutingStructures.cpp:45
DeMux::GenericName
virtual std::string GenericName() override
Definition: ModuleRoutingStructures.cpp:269
Compare::all_modes
static const std::map< OpGraphOpCode, LLVMMode > all_modes
Definition: Module.h:914
Register::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: ModuleRoutingStructures.cpp:151
operator>>
std::istream & operator>>(std::istream &is, port_type &porttype)
Definition: Module.cpp:2381
Compare::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModulePredicationUnit.cpp:132
TruncateInput::~TruncateInput
virtual ~TruncateInput()
Definition: ModuleRoutingStructures.cpp:813
StringMatrix
std::vector< std::vector< std::string > > StringMatrix
Definition: Module.h:35
MRRGNodesFromValNode
std::map< OpGraphVal *, std::set< MRRG::NodeDescriptor > > MRRGNodesFromValNode
Definition: Module.h:147
PipelineMode::latency
int latency
Definition: Module.h:375
Module::getModuleFromPortName
Module * getModuleFromPortName(std::string full_port_name, std::string err_context="")
Definition: Module.cpp:1186
LLVMMode
Definition: Module.h:388
CGRABlockType
CGRABlockType
Definition: Module.h:74
Module::GenConnections
virtual void GenConnections()
Definition: Module.cpp:720
PipelineMode::II
int II
Definition: Module.h:374
RegisterFile::log2Registers
int log2Registers
Definition: Module.h:717
FracAddUnit::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: ModuleFracUnit.cpp:787
Module::overridenFanoutCount
int overridenFanoutCount
Definition: Module.h:241
FracUnit::getLatency
int getLatency() const
Definition: Module.h:447
Mapping
Definition: Mapping.h:31
CaseStatement
Definition: Module.h:885
Exception.h
DeMux::DeMux
DeMux(std::string, Location, unsigned demux_size, unsigned size=DEFAULT_SIZE, bool isElastic=false)
Definition: ModuleRoutingStructures.cpp:247
Module::hasConfigCells
bool hasConfigCells() const
Definition: Module.h:255
ContextCell::GenericName
virtual std::string GenericName() override
Definition: Module.cpp:2366
PORT_CONFIG
@ PORT_CONFIG
Definition: Module.h:67
DeMux::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleRoutingStructures.cpp:276
Connection::isInMRRG
bool isInMRRG
Definition: Module.h:104
ResolvedVeroligModuleParameter::value
std::string value
Definition: Module.h:143
MemoryUnit::~MemoryUnit
virtual ~MemoryUnit()
Definition: ModuleFuncUnit.cpp:476
VerilogType::CoreIR
@ CoreIR
Module::VisualPositionPoint::y
double y
Definition: Module.h:355
Module::GenericName
virtual std::string GenericName()
Definition: Module.cpp:260
Module::configcells
std::map< std::string, ConfigCell * > configcells
Definition: Module.h:228
ContextCounter::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: Module.cpp:2286
ConfigCell::ConfigCell
ConfigCell(std::string name, int contexts=1, Location loc={0, 0})
Definition: Module.cpp:2138
TruncateInput::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleRoutingStructures.cpp:728
UserModule
Definition: Module.h:814
DeMux::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: ModuleRoutingStructures.cpp:368
FracMulUnit::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleFracUnit.cpp:355
EventTransitionTable::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModulePredicationUnit.cpp:594
CaseStatement::GenFunctionality
virtual void GenFunctionality() override
Definition: ModuleFuncUnit.cpp:612
ResolvedVeroligModuleParameter
Definition: Module.h:141
PrintList::last
std::string last()
Definition: Module.h:133
DisconnectedSource::~DisconnectedSource
virtual ~DisconnectedSource()
Definition: Module.cpp:1921
RegisterFile::GenFunctionality
virtual void GenFunctionality() override
Definition: ModuleRoutingStructures.cpp:907
CustomModule::CustomModule
CustomModule(std::string name, Location, std::vector< std::string > Function, unsigned size=DEFAULT_SIZE, std::string pred="")
Definition: Module.cpp:1979
Module::addElasticConnection
void addElasticConnection(std::string src, std::string dst)
Definition: Module.cpp:1469
SelMultiplexer::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: ModulePredicationUnit.cpp:420
UserModule::GenericName
virtual std::string GenericName() override
Definition: Module.cpp:2128
Multiplexer::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: ModuleRoutingStructures.cpp:609
FracUnit::GenericName
virtual std::string GenericName() override
Definition: ModuleFracUnit.cpp:17
ContextCell::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: Module.cpp:2351
RegisterFile::~RegisterFile
virtual ~RegisterFile()
Definition: ModuleRoutingStructures.cpp:1017
Module::GenModuleHeader
void GenModuleHeader(bool HasConfig, bool HasRegisters)
Definition: Module.cpp:645
IO::IO
IO(std::string, Location, unsigned size=DEFAULT_SIZE, int contexts=1, bool isElastic=false)
Definition: Module.cpp:1873
Module::VisualPositionRect::h
double h
Definition: Module.h:351
IO
Supports the input and output ops. Will add an external port at the top-level of generated verilog.
Definition: Module.h:762
FracMulUnit::getII
int getII() const
Definition: Module.h:472
Register::GenericName
virtual std::string GenericName() override
Definition: ModuleRoutingStructures.cpp:38
Module::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality()
Definition: Module.cpp:757
RegisterFile::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleRoutingStructures.cpp:931
CaseStatement::numInputs
unsigned numInputs
Definition: Module.h:892
ConstUnit::GenFunctionality
virtual void GenFunctionality() override
Definition: ModuleFuncUnit.cpp:512
EventTransitionTable::createMRRG
virtual MRRG * createMRRG(unsigned II) override
Definition: ModulePredicationUnit.cpp:723
DisconnectedSource::GenFunctionality
virtual void GenFunctionality() override
Definition: Module.cpp:1923
TriState::GenericName
virtual std::string GenericName() override
Definition: Module.cpp:1861
ConstUnit
Definition: Module.h:540
SET_INDENT
const char *const SET_INDENT
Definition: Module.h:37
Module
Definition: Module.h:163
FracMulUnit::mul_modes_ordered
static const std::vector< OpGraphOpCode > mul_modes_ordered
Definition: Module.h:479
VerilogType::CGRAME
@ CGRAME
TriState::GenFunctionality
virtual void GenFunctionality() override
Definition: Module.cpp:1731
Module::print_ports
void print_ports()
Definition: Module.cpp:1027
MODULE_DEBUG_PRINTING
const bool MODULE_DEBUG_PRINTING
Definition: Module.h:46
PORT_INPUT
@ PORT_INPUT
Definition: Module.h:63
Module::getModule
Module * getModule(std::string, std::string err_context="")
Definition: Module.cpp:1167
FuncUnit::~FuncUnit
virtual ~FuncUnit()
Definition: ModuleFuncUnit.cpp:191
Module::print_dot
void print_dot()
Definition: Module.cpp:1008
Module::portsToPropagate
std::vector< Port > portsToPropagate
Definition: Module.h:229
Compare::GenericName
virtual std::string GenericName() override
Definition: ModulePredicationUnit.cpp:35
Module::addVerilogPort
void addVerilogPort(std::string name, port_type pt, std::string parameter, unsigned size)
Definition: Module.cpp:1515
TruncateInput::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModuleRoutingStructures.cpp:794
FuncUnit::createMRRG
virtual MRRG * createMRRG(unsigned II) override
Definition: ModuleFuncUnit.cpp:195
MemoryUnit::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: ModuleFuncUnit.cpp:396
Module::CoreIRGenModuleVerilog
virtual void CoreIRGenModuleVerilog(CoreIR::Context *c, int contexts)
Definition: Module.cpp:606
Crossbar::num_outputs
int num_outputs
Definition: Module.h:727
FracMulUnit::all_modes
static const std::map< OpGraphOpCode, LLVMMode > all_modes
Definition: Module.h:475
Register::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleRoutingStructures.cpp:55
PipelineMode
Definition: Module.h:373
DisconnectedSink::~DisconnectedSink
virtual ~DisconnectedSink()
Definition: Module.cpp:1953
Connection::dst
std::vector< Port * > dst
Definition: Module.h:103
IO::~IO
virtual ~IO()
Definition: Module.cpp:1909
FracMulUnit
Definition: Module.h:455
FuncUnit::all_modes
static const std::map< OpGraphOpCode, LLVMMode > all_modes
Definition: Module.h:432
CustomModule::GenericName
virtual std::string GenericName() override
Definition: Module.cpp:2037
Module::VisualPositionRect::y
double y
Definition: Module.h:351
Multiplexer::~Multiplexer
virtual ~Multiplexer()
Definition: ModuleRoutingStructures.cpp:706
Register::Register
Register(std::string, Location, int size=DEFAULT_SIZE, bool isElastic=false)
Definition: ModuleRoutingStructures.cpp:18
Module::genConfigOrder
void genConfigOrder(std::vector< ConfigCell * > &ConfigTable) const
Definition: Module.cpp:164
Module::GetModulesToPrint
void GetModulesToPrint(std::queue< Module * > &ToPrint, std::set< std::string > &PrintedModMap)
Definition: Module.cpp:220
Module::~Module
virtual ~Module()
Definition: Module.cpp:150
Compare::~Compare
virtual ~Compare()
Definition: ModulePredicationUnit.cpp:128
Module::addConfig
void addConfig(ConfigCell *c, std::vector< std::string > ConnectTo)
Definition: Module.cpp:1087
Module::getPort
Port * getPort(std::string full_port_name, std::string err_context="")
Definition: Module.cpp:1201
Compare
Definition: Module.h:898
Module::makeCoreIRModuleDefinitonGenerator
CoreIR::ModuleDefGenFun makeCoreIRModuleDefinitonGenerator()
Definition: Module.cpp:409
ConfigCell::addControledPorts
void addControledPorts(const std::vector< Port * > &new_ports)
Definition: Module.cpp:2176
EventTransitionTable::all_modes
static const std::map< OpGraphOpCode, LLVMMode > all_modes
Definition: Module.h:849
ContextCounter
Definition: Module.h:878
Module::CoreIRGetModulesToPrint
void CoreIRGetModulesToPrint(std::queue< Module * > &ToPrint, std::set< std::string > &PrintedModMap)
Multiplexer::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModuleRoutingStructures.cpp:682
RegisterFile::numOutputPorts
int numOutputPorts
Definition: Module.h:717
FuncUnit::getLatency
int getLatency() const
Definition: Module.h:429
UserModule::~UserModule
virtual ~UserModule()
Definition: Module.cpp:2133
UserModule::prototype
std::string prototype
Definition: Module.h:822
PARAMETERIZED
const int PARAMETERIZED
Definition: Module.h:50
Compare::Compare
Compare(std::string name, Location, unsigned size, int II)
Definition: ModulePredicationUnit.cpp:21
Module::ReturnPath
std::string ReturnPath() const
Definition: Module.h:248
EventTransitionTable::EventTransitionTable
EventTransitionTable(std::string name, int contexts, Location loc={0, 0})
Definition: ModulePredicationUnit.cpp:585
FracAddUnit::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleFracUnit.cpp:678
TriState::mode
Mode mode
Definition: Module.h:752
Module::getSize
int getSize() const
Definition: Module.h:246
Multiplexer::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleRoutingStructures.cpp:515
STANDARD_BYPASS
@ STANDARD_BYPASS
Definition: Module.h:77
FuncUnit::getII
int getII() const
Definition: Module.h:428
CaseStatement::~CaseStatement
virtual ~CaseStatement()
Definition: ModuleFuncUnit.cpp:755
SelMultiplexer::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModulePredicationUnit.cpp:396
Module::isLastInHierarchy
bool isLastInHierarchy
Definition: Module.h:235
Module::addElasticPort
void addElasticPort(std::string portname, port_type pt, unsigned size)
Definition: Module.cpp:1440
TriState::Mode::PROVIDES_IO_OP
@ PROVIDES_IO_OP
Crossbar::Crossbar
Crossbar(std::string name, Location, int num_inputs, int num_outputs, int data_size, bool predExist=false, int contexts=1)
Definition: ModuleRoutingStructures.cpp:1027
Module::area
double area
Definition: Module.h:233
MemoryUnit::createMRRG
MRRG * createMRRG(unsigned II) override
Definition: ModuleFuncUnit.cpp:445
Module::submodule_relative_position
std::map< std::string, VisualPositionRect > submodule_relative_position
Definition: Module.h:359
CustomModuleSingleInput::CustomModuleSingleInput
CustomModuleSingleInput(std::string name, Location, std::vector< std::string > Function, unsigned size=DEFAULT_SIZE, std::string pred="")
Definition: Module.cpp:2047
Register::~Register
virtual ~Register()
Definition: ModuleRoutingStructures.cpp:147
Module::getName
auto & getName() const
Definition: Module.h:247
Module::addSubModule
void addSubModule(Module *m)
Definition: Module.cpp:1124
SelMultiplexer::mux_size
int mux_size
Definition: Module.h:665
PipelineMode::operator=
PipelineMode & operator=(const PipelineMode &)=default
BitSetting.h
CaseStatement::CaseStatement
CaseStatement(std::string name, Location, unsigned numInputs, unsigned size, int latency, bool isElastic=false)
Definition: ModuleFuncUnit.cpp:589
FracAddUnit
Definition: Module.h:482
Multiplexer::getMuxSize
int getMuxSize()
Definition: Module.h:607
MemoryUnit
Single load & store memory operations.
Definition: Module.h:517
Multiplexer::Multiplexer
Multiplexer(std::string, Location, unsigned mux_size, unsigned size=DEFAULT_SIZE, bool isElastic=false)
Definition: ModuleRoutingStructures.cpp:472
DeMux::~DeMux
virtual ~DeMux()
Definition: ModuleRoutingStructures.cpp:466
TriState::Mode::PLAIN
@ PLAIN
Crossbar::GenericName
virtual std::string GenericName() override
Definition: ModuleRoutingStructures.cpp:1022
DisconnectedSource::value
int value
Definition: Module.h:779
Mapping.h
Module::isElastic
bool isElastic
Definition: Module.h:236
SET_DOUBLE_INDENT
const char *const SET_DOUBLE_INDENT
Definition: Module.h:38
Module::Module
Module(std::string name, Location, unsigned size=DEFAULT_SIZE, bool isElastic=false)
Definition: Module.cpp:130
Module::ports
std::map< std::string, Port * > ports
Definition: Module.h:225
Module::makeCoreIRInterfaceGenerator
CoreIR::TypeGenFun makeCoreIRInterfaceGenerator()
Definition: Module.cpp:294
Module::ResolveVerilogParameters
virtual std::vector< ResolvedVeroligModuleParameter > ResolveVerilogParameters() const
Definition: Module.cpp:954
FracAddUnit::add_modes_ordered
static const std::vector< OpGraphOpCode > add_modes_ordered
Definition: Module.h:506
MemoryUnit::pred
bool pred
Definition: Module.h:537
Module::addsSynchronousCircuitry
bool addsSynchronousCircuitry() const
Definition: Module.h:367
Crossbar
Definition: Module.h:720
Module::VisualPositionPoint
Definition: Module.h:354
SelMultiplexer::GenericName
virtual std::string GenericName() override
Definition: ModulePredicationUnit.cpp:266
Module::createMRRG
virtual MRRG * createMRRG(unsigned contexts)
Definition: Module.cpp:1520
TriState::~TriState
virtual ~TriState()
Definition: Module.cpp:1867
Multiplexer::mux_size
int mux_size
Definition: Module.h:610
Module::loc
Location loc
Definition: Module.h:239
SelMultiplexer
2 Zero-cycle latency multiplexers for predication support.
Definition: Module.h:647
CustomModuleSingleInput::~CustomModuleSingleInput
virtual ~CustomModuleSingleInput()
Definition: Module.cpp:2109
TriState::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: Module.cpp:1738
ConfigCell::GenericName
virtual std::string GenericName() override
Definition: Module.cpp:2267
Module::GenModuleVerilog
virtual void GenModuleVerilog()
Definition: Module.cpp:268
FuncUnit::FuncUnit
FuncUnit(std::string name, Location, std::vector< OpGraphOpCode > supported_modes, unsigned size, int II, int latency, bool isElastic=false)
Definition: ModuleFuncUnit.cpp:53
DisconnectedSource
For when an input is unused, but a connection is required anyway.
Definition: Module.h:771
FracMulUnit::getLatency
int getLatency() const
Definition: Module.h:473
RegisterFile
Multiplexed registers.
Definition: Module.h:707
Module::hierarchyLevel
unsigned int hierarchyLevel
Definition: Module.h:234
PORT_BIDIR
@ PORT_BIDIR
Definition: Module.h:66
CustomModuleSingleInput::Function
std::vector< std::string > Function
Definition: Module.h:811
FuncUnit::getSupportedModes
auto & getSupportedModes() const
Definition: Module.h:430
ConstUnit::GenericName
virtual std::string GenericName() override
Definition: ModuleFuncUnit.cpp:506
ConfigCell::getSingleConnectedPort
Port & getSingleConnectedPort() const
Definition: Module.h:833
UserModule::CoreIRGenModuleVerilog
virtual void CoreIRGenModuleVerilog(CoreIR::Context *, int) override
Definition: Module.h:818
CustomModule::~CustomModule
virtual ~CustomModule()
Definition: Module.cpp:2042
CustomModule::GenFunctionality
virtual void GenFunctionality() override
Definition: Module.cpp:1993
DeMux
Zero-cycle latency DeMultiplexer.
Definition: Module.h:676
port_type
port_type
Definition: Module.h:61
MemoryUnit::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModuleFuncUnit.cpp:270
SelMultiplexer::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: ModulePredicationUnit.cpp:272
FuncUnit::supported_modes
std::vector< OpGraphOpCode > supported_modes
Definition: Module.h:435
TruncateInput::pos
int pos
Definition: Module.h:632
Multiplexer::GenericName
virtual std::string GenericName() override
Definition: ModuleRoutingStructures.cpp:497
ConfigCell::contexts
std::vector< unsigned > contexts
Definition: Module.h:844
TriState::Mode::PROVIDES_IO_PRED_OP
@ PROVIDES_IO_PRED_OP
Port::parameter
std::string parameter
Definition: Module.h:93
EventTransitionTable::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: ModulePredicationUnit.cpp:738
MemoryUnit::MemoryUnit
MemoryUnit(std::string name, Location, unsigned size=DEFAULT_SIZE, bool isElastic=false, bool pred=false)
Definition: ModuleFuncUnit.cpp:226
TriState
Definition: Module.h:730
MemoryUnit::GenFunctionality
virtual void GenFunctionality() override
Definition: ModuleFuncUnit.cpp:263
Module::GenParameters
void GenParameters()
Definition: Module.cpp:675
TruncateInput::TruncateInput
TruncateInput(std::string, Location, unsigned pos, unsigned size=DEFAULT_SIZE, bool isElastic=false)
Definition: ModuleRoutingStructures.cpp:711
ContextCounter::GenericName
virtual std::string GenericName() override
Definition: Module.cpp:2331
ContextCell::l_contexts
int l_contexts
Definition: Module.h:875
CustomModuleSingleInput
Definition: Module.h:803
Module::connectPorts
void connectPorts(std::string src, std::string dst, bool isElastic)
Definition: Module.cpp:1232
EventTransitionTable::GenericName
virtual std::string GenericName() override
Definition: ModulePredicationUnit.cpp:718
EventTransitionTable
Definition: Module.h:847
DisconnectedSource::CoreIRGenFunctionality
virtual nlohmann::json CoreIRGenFunctionality() override
Definition: Module.cpp:1927
Module::getNodePosition
std::pair< bool, std::pair< double, double > > getNodePosition(const std::string &nodeName)
Definition: Module.cpp:1678
Port::parent
Module * parent
Definition: Module.h:95
FuncUnit
Functional Unit, does one of a set of arithmetic computations.
Definition: Module.h:406
FracMulUnit::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: ModuleFracUnit.cpp:567
Module::VisualPositionRect
Definition: Module.h:344
DisconnectedSource::DisconnectedSource
DisconnectedSource(std::string name, Location, unsigned size, int value=0)
Definition: Module.cpp:1913
Port::makeVerilogDeclaration
std::string makeVerilogDeclaration() const
Definition: Module.cpp:107
PORT_UNSPECIFIED
@ PORT_UNSPECIFIED
Definition: Module.h:68
MRRG.h
Port::size
unsigned size
Definition: Module.h:94
CustomModuleSingleInput::GenericName
virtual std::string GenericName() override
Definition: Module.cpp:2104
ConfigCell::l_contexts
int l_contexts
Definition: Module.h:840
Module::GenerateMatrix
void GenerateMatrix(StringMatrix &Matrix)
Definition: Module.cpp:742
OpGraph
Definition: OpGraph.h:215
Module::GenFunctionality
virtual void GenFunctionality()
Definition: Module.cpp:736
TriState::Mode
Mode
Definition: Module.h:732
Module::submodsSet
bool submodsSet
Definition: Module.h:237
DEFAULT_SIZE
const int DEFAULT_SIZE
Definition: Module.h:48
ConfigCell::getStorageSize
int getStorageSize() const
Definition: Module.h:832
FuncUnit::GenericName
virtual std::string GenericName() override
Definition: ModuleFuncUnit.cpp:40
cgrame_error
Definition: Exception.h:20
FracAddUnit::FracAddUnit
FracAddUnit(std::string name, Location loc, unsigned size, int II, int latency)
Definition: ModuleFracUnit.cpp:661
Module::print_connections
void print_connections()
Definition: Module.cpp:1034
FracUnit::getSupportedModes
auto & getSupportedModes() const
Definition: Module.h:448
PORT_OUTPUT
@ PORT_OUTPUT
Definition: Module.h:64
SelMultiplexer::all_modes
static const std::map< OpGraphOpCode, LLVMMode > all_modes
Definition: Module.h:649
PrintList::pop
void pop()
Definition: Module.h:129
TruncateInput::GenericName
virtual std::string GenericName() override
Definition: ModuleRoutingStructures.cpp:721
SET_QUAD_INDENT
const char *const SET_QUAD_INDENT
Definition: Module.h:40
Location::y_coord
unsigned y_coord
Definition: Module.h:158
Crossbar::num_inputs
int num_inputs
Definition: Module.h:726