Go to the documentation of this file.
33 #include <unordered_map>
64 template<
typename SupportedOps = std::vector<OpGraphOpCode>>
150 template<
typename STR>
163 template<
typename STR>
176 template<
typename STR,
typename SupportedOps = std::vector<OpGraphOpCode>>
190 template<
typename STR,
typename SupportedOps = std::vector<OpGraphOpCode>>
241 template<
typename NodeDescList = std::vector<NodeDescriptor>>
243 auto ir =
insert(std::move(node));
326 void printDot(std::ostream& os)
const;
351 std::ptrdiff_t
size()
const;
365 std::vector<std::map<std::string, std::unique_ptr<MRRGNode>>>
nodes;
366 std::map<std::string, std::unique_ptr<MRRG>>
subMRRGs;
384 os << (
void*)ndesc <<
':';
402 return [&mrrg, cycle](
const std::string& name) {
403 return &mrrg.getNodeRef(cycle, name);
415 bool silent_on_no_errors,
bool throw_if_errors,
const ConfigStore& extra_opts = {});
427 case Type::Info: os <<
"Info";
break;
428 case Type::Warning: os <<
"Warning";
break;
429 case Type::Error: os <<
"Error";
break;
430 default: os <<
"MRRGVMTNotImplementedByPrinter" << +vm_type;
break;
void link(MRRG::NodeDescriptor driver, MRRG::NodeDescriptor fanout)
std::string getFullName() const
const MRRGNode & getNodeRef(NodeDescriptor ndesc) const
@ MRRG_NODE_ROUTING_FUNCTION
std::pair< NodeDescriptor, bool > insertMultiFanin(NodeDescList fanins, MRRGNode node)
MRRGNode & getNodeRefByPropertiesOf(const MRRGNode &node)
const auto & allNodesByCycle() const
MRRGNode & getNodeRef(int cycle, const std::string &name)
std::map< std::string, std::unique_ptr< MRRG > > subMRRGs
const MRRGNode * NodeDescriptor
void printSubmoduleDot(std::ostream &os, Module *) const
std::pair< NodeDescriptor, bool > insert(NodeDescriptor fanin, MRRGNode node)
void applyReferenceRename(const std::unordered_map< const MRRGNode *, MRRGNode * > &rename_map)
bool verifyAndPrintReport(const MRRG &mrrg, std::ostream &os, bool silent_on_no_errors, bool throw_if_errors, const ConfigStore &extra_opts={})
MRRG & operator=(const MRRG &rhs)
friend std::ostream & operator<<(std::ostream &out, const MRRGNode &node)
const MRRGNode & getNodeRefByPropertiesOf(const MRRGNode &node) const
auto makeNodeGetterForCycle(M &mrrg, int cycle)
MRRG::NodeDescriptor const * data() const
void erase(MRRG::NodeDescriptor n)
void renameNode(NodeDescriptor ndesc, std::string new_name)
auto getContextNum() const
std::vector< VerifyMessage > verify(const ConfigStore &options={}) const
void printDot(std::ostream &os, Module *, const ConfigStore &archAttrs) const
NodeDescriptor getNodeByPropertiesOf(const MRRGNode &node) const
std::pair< NodeDescriptor, bool > insert(MRRGNode node)
MRRG::NodeDescriptor const * _data
void printSupportedOps(std::ostream &os) const
void unlink(MRRG::NodeDescriptor driver, MRRG::NodeDescriptor fanout)
std::vector< std::map< std::string, std::unique_ptr< MRRGNode > > > nodes
MRRG::NodeDescriptor const * begin() const
auto & fanout(NodeDescriptor ndesc) const
std::ostream & operator<<(std::ostream &os, const MRRG::NodeDescriptor &ndesc)
bool canMapOp(OpGraphOp const *op) const
MRRG::NodeDescriptor const * end() const
MRRGNode & getNodeRef(NodeDescriptor ndesc)
static MRRGNode make_operand_pin(Module *parent, int bitwidth, int cycle, STR &&name, SupportedOpTags operand_tags, int latency=0, int max_cap=1)
std::vector< MRRGNode * > fanin
static MRRGNode make_function(Module *parent, int bitwidth, int cycle, STR &&name, int latency, SupportedOps supported_ops, int max_cap=1, bool is_const_unit=false)
void printDotClustered(std::ostream &os) const
auto & fanin(NodeDescriptor ndesc) const
std::vector< OpGraphOpCode > supported_ops
const std::string & getHierarchyQualifiedName() const
MRRG::NodeDescriptor const & front() const
MRRG::NodeDescriptor const & back() const
std::set< std::string > SupportedOpTags
std::vector< MRRGNode * > fanout
std::ptrdiff_t size() const
NodeDescriptor getNode(int cycle, const std::string &name) const
const MRRGNode & getNodeRef(int cycle, const std::string &name) const
char operator+(const MRRG::VerifyMessage::Type &vm_type)
SupportedOpTags supported_operand_tags
int initiationInterval() const
MRRGNode(Module *parent, int cycle, std::string name, MRRGNode_Type type, int latency, int bitwidth, SupportedOps &&supported_ops, HWEntityType et, SupportedOpTags supported_operand_tags, int max_cap=1)
static MRRGNode make_routing(Module *parent, int bitwidth, int cycle, STR &&name, int latency=0, int max_cap=1)
static MRRGNode make_routing_function(Module *parent, int bitwidth, int cycle, STR &&name, int latency, SupportedOpTags operand_tags, SupportedOps supported_ops, int max_cap=1)
MRRGNode & operator=(const MRRGNode &)=default
void printBasicStats(std::ostream &os) const