85 int port2FirstBit,
int width) {
97 boost::add_edge(port1Descriptor, port2Descriptor, property1, *
this);
101 boost::add_edge(port2Descriptor, port1Descriptor, property2, *
this);
125 boost::add_edge(port1Descriptor, port2Descriptor, property, *
this);
127 boost::add_edge(port2Descriptor, port1Descriptor, property, *
this);
139 boost::remove_edge(port1Descriptor, port2Descriptor, *
this);
140 boost::remove_edge(port2Descriptor, port1Descriptor, *
this);
155 std::map<SignalType, const NetlistPort*> portsOfGroup2;
159 portsOfGroup2, port->assignedSignal().type()) &&
160 "Netlist::Connect(): Currently cannot handle groups with "
161 "multiply of same signal type");
162 portsOfGroup2.insert(
163 std::make_pair(port->assignedSignal().type(), port));
167 SignalType matchingType = from->assignedSignal().type();
169 const NetlistPort* to = portsOfGroup2.at(matchingType);
211 std::map<SignalType, SignalType> connectionMap) {
213 SignalType type1 = port1->assignedSignal().type();
215 if (connectionMap.count(type1)) {
216 type2 = connectionMap.at(type1);
244 std::map<std::string, const NetlistPort*> portsOfGroup2;
248 "Netlist::Connect(): group2 has multiple ports "
249 "with the same name");
250 portsOfGroup2.insert(std::make_pair(port->name(), port));
254 std::string matchingName = from->name();
257 "Netlist::connectByName: The two port groups' names "
259 const NetlistPort* to = portsOfGroup2.at(matchingName);
276 boost::graph_traits<Netlist>::degree_size_type edges =
277 boost::out_degree(vertDesc, *
this);
289 return boost::num_vertices(*
this) == 0;
297 return boost::num_edges(*
this) != 0;
312 "The port is already registered");
313 size_t descriptor = boost::add_vertex(&port, *
this);
315 std::pair<const NetlistPort*, size_t>(&port,
descriptor));
344 boost::clear_vertex(this->
descriptor(port), *
this);
345 boost::remove_vertex(this->
descriptor(port), *
this);
363 const std::string& name,
364 const std::string& type,
365 const std::string& value) {
387 for (ParameterTable::iterator iter =
parameters_.begin();
389 if (iter->name() == name) {
405 for (ParameterTable::const_iterator iter =
parameters_.begin();
407 if (iter->name() == name) {
444 return boost::edges(*this).first;
449 return boost::edges(*this).second;
454 return boost::edges(*this).first;
459 return boost::edges(*this).second;
486 std::vector<const NetlistPort*> clockOfBlock;
488 assert(clockOfBlock.size() < 2);
489 if (clockOfBlock.empty()) {
492 topClock = clockOfBlock.at(0);
497 std::vector<const NetlistPort*> clockOfSubBlock;
500 assert(clockOfSubBlock.size() < 2);
501 if (clockOfSubBlock.empty() ||
514 std::vector<const NetlistPort*> clockOfBlock;
516 assert(clockOfBlock.size() < 2);
517 if (clockOfBlock.empty()) {
520 topClock = clockOfBlock.at(0);
525 std::vector<const NetlistPort*> clockOfSubBlock;
528 assert(clockOfSubBlock.size() < 2);
529 if (clockOfSubBlock.empty() ||