yosys-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SubCircuit::SolverWorker::DiNode Struct Reference

Public Member Functions

 DiNode ()
 
 DiNode (const Graph &graph, int nodeIdx)
 
bool operator< (const DiNode &other) const
 
std::string toString () const
 

Data Fields

std::string typeId
 
std::map< std::string, int > portSizes
 

Detailed Description

Definition at line 419 of file subcircuit.cc.

Constructor & Destructor Documentation

SubCircuit::SolverWorker::DiNode::DiNode ( )
inline

Definition at line 424 of file subcircuit.cc.

425  {
426  }
SubCircuit::SolverWorker::DiNode::DiNode ( const Graph graph,
int  nodeIdx 
)
inline

Definition at line 428 of file subcircuit.cc.

429  {
430  const Graph::Node &node = graph.nodes.at(nodeIdx);
431  typeId = node.typeId;
432  for (const auto &port : node.ports)
433  portSizes[port.portId] = port.bits.size();
434  }
std::vector< Node > nodes
Definition: subcircuit.h:72
std::map< std::string, int > portSizes
Definition: subcircuit.cc:422
std::vector< Port > ports
Definition: subcircuit.h:64

Member Function Documentation

bool SubCircuit::SolverWorker::DiNode::operator< ( const DiNode other) const
inline

Definition at line 436 of file subcircuit.cc.

437  {
438  if (typeId != other.typeId)
439  return typeId < other.typeId;
440  return portSizes < other.portSizes;
441  }
std::map< std::string, int > portSizes
Definition: subcircuit.cc:422
std::string SubCircuit::SolverWorker::DiNode::toString ( ) const
inline

Definition at line 443 of file subcircuit.cc.

444  {
445  std::string str;
446  bool firstPort = true;
447  for (const auto &it : portSizes) {
448  str += my_stringf("%s%s[%d]", firstPort ? "" : ",", it.first.c_str(), it.second);
449  firstPort = false;
450  }
451  return typeId + "(" + str + ")";
452  }
std::map< std::string, int > portSizes
Definition: subcircuit.cc:422
static std::string my_stringf(const char *fmt,...)
Definition: subcircuit.cc:38

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

std::map<std::string, int> SubCircuit::SolverWorker::DiNode::portSizes

Definition at line 422 of file subcircuit.cc.

std::string SubCircuit::SolverWorker::DiNode::typeId

Definition at line 421 of file subcircuit.cc.


The documentation for this struct was generated from the following file: