torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PhysicalDiff.hpp
Go to the documentation of this file.
1 // Torc - Copyright 2011-2013 University of Southern California. All Rights Reserved.
2 // $HeadURL$
3 // $Id$
4 
5 // This program is free software: you can redistribute it and/or modify it under the terms of the
6 // GNU General Public License as published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11 // the GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License along with this program. If
14 // not, see <http://www.gnu.org/licenses/>.
15 
16 /// \file
17 /// \brief PhysicalDiff class for comparing physical netlists.
18 
19 #ifndef TORC_UTILS_PHYSICALDIFF_HPP
20 #define TORC_UTILS_PHYSICALDIFF_HPP
21 
22 #include <iostream>
23 #include "torc/Physical.hpp"
25 #include <vector>
26 
27 namespace torc {
28 
29 namespace utils {
30  // forward declarations of unit test classes within their namespace.
31  class PhysicalDiffDesignUnitTest;
32  class PhysicalDiffModuleUnitTest;
33  class PhysicalDiffCircuitUnitTest;
34  class PhysicalDiffConfigMapUnitTest;
35  class PhysicalDiffInstanceUnitTest;
36  class PhysicalDiffNetUnitTest;
37 }
38 
39 
40 /// \brief Diff utility class for comparing physical netlists.
41 /// \details This class takes two design pointers and compares them.
42 class PhysicalDiff {
43  /// \brief Unit test access to internal functions.
45  /// \brief Unit test access to internal functions.
47  /// \brief Unit test access to internal functions.
49  /// \brief Unit test access to internal functions.
51  /// \brief Unit test access to internal functions.
53  /// \brief Unit test access to internal functions.
55 protected:
56  /// \brief Imported type name.
58  /// \brief Imported type name.
60  /// \brief Imported type name.
62  /// \brief Imported type name.
63  typedef std::vector<ModuleSharedPtr> ModuleSharedPtrVector;
64  /// \brief Imported type name.
66  /// \brief Imported type name.
68  /// \brief Imported type name.
69  typedef std::vector<InstanceSharedPtr> InstanceSharedPtrVector;
70  /// \brief Imported type name.
72  /// \brief Imported type name.
73  typedef std::vector<NetSharedPtr> NetSharedPtrVector;
74  /// \brief Imported type name.
76  /// \brief Imported type name.
78  /// \brief Imported type name.
80  /// \brief Imported type name.
82  /// \brief Imported type name.
84  /// \brief Imported type name.
86  /// \brief Imported type name.
88  /// \brief Imported type name.
90  /// \brief Imported type name.
93  /// \brief Imported type name.
95  /// \brief Imported type name.
96  typedef boost::shared_ptr<torc::physical::Named> NamedSharedPtr;
97  /// \brief Imported type name.
98  typedef boost::shared_ptr<torc::physical::ConfigMap> ConfigMapSharedPtr;
99  /// \brief Imported type name.
101 
102  /// \brief Output stream to use for comparison results.
103  std::ostream& mStream;
104 
105 public:
106  /// \todo Improve Pip comparison.
107  /// \todo Port comparison should use port name.
108  /// \todo Config sequence index is not used.
109  /// \todo Instance does not check the reference pointer.
110  PhysicalDiff(std::ostream& inOutStream) : mStream(inOutStream)
111  {
112  mStream << "WARNING: Pip comparison uses only tile, source, direction "
113  << "and sink!" << std::endl;
114  mStream << "WARNING: Port comparison does not use the port name!" << std::endl;
115  mStream << "WARNING: Config sequence index not used!" << std::endl;
116  mStream << "WARNING: Instance does not check reference pointer!" << std::endl;
117  }
118 
119  /// \brief Top level call to diff two designs.
120  bool diff(const DesignSharedPtr& left, const DesignSharedPtr& right) {
121  return diffDesign(left, right);
122  }
123 protected:
124  /// \brief Diff design pointers and then recursively compare modules and inherited members.
125  bool diffDesign(const DesignSharedPtr& left, const DesignSharedPtr& right) {
126  bool rval = true;
127  string designNameLeft = left->getName();
128  string designNameRight = right->getName();
129 
130  if (!(designNameLeft == designNameRight)) {
131  mStream << "! Design Name: " << designNameLeft << " | "
132  << designNameRight << std::endl;
133  rval = false;
134  }
135  if (!(left->getDevice() == right->getDevice())) {
136  mStream << "! Device: " << left->getDevice() << " | "
137  << right->getDevice() << std::endl;
138  rval = false;
139  }
140  if (!(left->getPackage() == right->getPackage())) {
141  mStream << "! Package: " << left->getPackage() << " | "
142  << right->getPackage() << std::endl;
143  rval = false;
144  }
145  if (!(left->getSpeedGrade() == right->getSpeedGrade())) {
146  mStream << "! Speed grade: " << left->getSpeedGrade()
147  << " | " << right->getSpeedGrade() << std::endl;
148  rval = false;
149  }
150  if (!(left->getXdlVersion() == right->getXdlVersion())) {
151  mStream << "! XDL version differs: " << left->getXdlVersion()
152  << " | " << right->getXdlVersion() << std::endl;
153  rval = false;
154  }
155 
156  ModuleSharedPtrVector leftModules;
157  ModuleSharedPtrVector rightModules;
158 
159  for (ModuleSharedPtrConstIterator p = left->modulesBegin(); p!= left->modulesEnd(); p++) {
160  leftModules.push_back(*p);
161  }
162  for (ModuleSharedPtrConstIterator p = right->modulesBegin(); p!= right->modulesEnd(); p++) {
163  rightModules.push_back(*p);
164  }
165 
166  // look left to right
169  for (ileft = leftModules.begin(); ileft != leftModules.end(); ileft++) {
170  bool found = false;
171  for (iright = rightModules.begin(); iright != rightModules.end(); iright++) {
172  if ((*ileft)->getName() == (*iright)->getName()) {
173  found = true;
174  break;
175  }
176  }
177  if (found) {
178  rval = diffModule(*ileft, *iright) && rval;
179  rightModules.erase(iright);
180  } else {
181  mStream << "< Module " << (*ileft)->getName() << std::endl;
182  rval = false;
183  }
184  }
185  // anything left on the right doesn't appear on the left
186  for (iright = rightModules.begin(); iright != rightModules.end(); iright++) {
187  mStream << "> Module " << (*iright)->getName() << std::endl;
188  rval = false;
189  }
190  // A design is a circuit
191  rval = diffCircuit(left, right) && rval;
192  return rval;
193  }
194  /// \brief Diff module pointers and then recursively compare inherited members from circuit.
195  bool diffModule(const ModuleSharedPtr& left, const ModuleSharedPtr& right) {
196  bool rval = true;
197 
198  if (!(left->getAnchor() == right->getAnchor())) {
199  mStream << "! Module " << left->getName() << " anchor: " << left->getAnchor()
200  << " | " << right->getAnchor() << std::endl;
201  rval = false;
202  }
203 
204  std::vector<string> leftPorts;
205  std::vector<string> rightPorts;
206  std::vector<string>::iterator leftport;
207  std::vector<string>::iterator rightport;
208  for (PortSharedPtrConstIterator leftport = left->portsBegin();
209  leftport != left->portsEnd(); leftport++) {
210  string t = (*leftport)->getInstancePtr().lock()->getName();
211  t.append(".");
212  t.append((*leftport)->getPinName());
213  leftPorts.push_back(t);
214  }
215  for (PortSharedPtrConstIterator rightport = right->portsBegin();
216  rightport != right->portsEnd(); rightport++) {
217  string t = (*rightport)->getInstancePtr().lock()->getName();
218  t.append(".");
219  t.append((*rightport)->getPinName());
220  rightPorts.push_back(t);
221  }
222  for (leftport = leftPorts.begin(); leftport != leftPorts.end(); leftport++) {
223  bool found = false;
224  for (rightport = rightPorts.begin(); rightport != rightPorts.end(); rightport++) {
225  if (*leftport == *rightport) {
226  found = true;
227  break;
228  }
229  }
230  if (found) {
231  rightPorts.erase(rightport);
232  } else {
233  mStream << "< Module " << left->getName() << " port: "
234  << *leftport << std::endl;
235  rval = false;
236  }
237  }
238  for (rightport = rightPorts.begin(); rightport != rightPorts.end(); rightport++) {
239  mStream << "> Module " << right->getName() << " port: "
240  << *rightport << std::endl;
241  rval = false;
242  }
243  leftPorts.clear();
244  rightPorts.clear();
245 
246  // A module is a circuit
247  rval = diffCircuit(left, right) && rval;
248  return rval;
249  }
250  /// \brief Diff circuit pointers, recursively compare nets, instances and config map.
251  bool diffCircuit(const CircuitSharedPtr& left, const CircuitSharedPtr& right) {
252  bool rval = true;
253 
254  InstanceSharedPtrVector leftInstances;
255  InstanceSharedPtrVector rightInstances;
258 
259  for (ileft = left->instancesBegin(); ileft!= left->instancesEnd(); ileft++) {
260  leftInstances.push_back(*ileft);
261  }
262  for (iright = right->instancesBegin(); iright!= right->instancesEnd(); iright++) {
263  rightInstances.push_back(*iright);
264  }
265  for (ileft = leftInstances.begin(); ileft != leftInstances.end(); ileft++) {
266  bool found = false;
267  for (iright = rightInstances.begin(); iright != rightInstances.end(); iright++) {
268  if ((*ileft)->getName() == (*iright)->getName()) {
269  found = true;
270  break;
271  }
272  }
273  if (found) {
274  //mStream << "Instance " << (*ileft)->getName() << std::endl;
275  rval = diffInstance(*ileft, *iright) && rval;
276  rightInstances.erase(iright);
277  } else {
278  mStream << "< Instance " << (*ileft)->getName() << std::endl;
279  rval = false;
280  }
281  }
282  for (iright = rightInstances.begin(); iright != rightInstances.end(); iright++) {
283  mStream << "> Instance " << (*iright)->getName() << std::endl;
284  rval = false;
285  }
286  leftInstances.clear();
287  rightInstances.clear();
288 
289  NetSharedPtrVector leftNets;
290  NetSharedPtrVector rightNets;
291  NetSharedPtrIterator nleft;
292  NetSharedPtrIterator nright;
293 
294  for (nleft = left->netsBegin(); nleft!= left->netsEnd(); nleft++) {
295  leftNets.push_back(*nleft);
296  }
297  for (nright = right->netsBegin(); nright!= right->netsEnd(); nright++) {
298  rightNets.push_back(*nright);
299  }
300  for (nleft = leftNets.begin(); nleft != leftNets.end(); nleft++) {
301  bool found = false;
302  for (nright = rightNets.begin(); nright != rightNets.end(); nright++) {
303  if ((*nleft)->getName() == (*nright)->getName()) {
304  found = true;
305  break;
306  }
307  }
308  if (found) {
309  rval = diffNet(*nleft, *nright) && rval;
310  rightNets.erase(nright);
311  } else {
312  mStream << "< Net " << (*nleft)->getName() << std::endl;
313  rval = false;
314  }
315  }
316  for (nright = rightNets.begin(); nright != rightNets.end(); nright++) {
317  mStream << "> Net " << (*nright)->getName() << std::endl;
318  rval = false;
319  }
320  leftNets.clear();
321  rightNets.clear();
322 
323  string circuitname = "Circuit ";
324  circuitname.append(left->getName());
325  // A circuit is a configmap.
326  rval = diffConfigMap(left, right, circuitname) && rval;
327  return rval;
328  }
329  /// \brief Diff configuration information, this is called from circuits, instances and nets.
330  bool diffConfigMap(const ConfigMapSharedPtr& left, const ConfigMapSharedPtr& right,
331  const string& parentStr) {
332  bool rval = true;
333 
334  std::vector<string> leftConfigs;
335  std::vector<string> rightConfigs;
336  std::vector<string>::iterator ileft;
337  std::vector<string>::iterator iright;
338 
339  torc::physical::ConfigMap::const_iterator p = left->configBegin();
340  torc::physical::ConfigMap::const_iterator e = left->configEnd();
341  while (p != e) {
342  const torc::physical::Config& config = p->second;
343  string t = p->first;
344  t.append(":");
345  t.append(config.getName());
346  t.append(":");
347  t.append(config.getValue());
348  leftConfigs.push_back(t);
349  p++;
350  }
351  p = right->configBegin();
352  e = right->configEnd();
353  while (p != e) {
354  const torc::physical::Config& config = p->second;
355  string t = p->first;
356  t.append(":");
357  t.append(config.getName());
358  t.append(":");
359  t.append(config.getValue());
360  rightConfigs.push_back(t);
361  p++;
362  }
363  for (ileft = leftConfigs.begin(); ileft != leftConfigs.end(); ileft++) {
364  bool found = false;
365  for (iright = rightConfigs.begin(); iright != rightConfigs.end(); iright++) {
366  if (*ileft == *iright) {
367  found = true;
368  break;
369  }
370  }
371  if (found) {
372  //mStream << "Net " << (*nleft)->getName() << std::endl;
373  rightConfigs.erase(iright);
374  } else {
375  mStream << "< " << parentStr << " Config " << *ileft << std::endl;
376  rval = false;
377  }
378  }
379  for (iright = rightConfigs.begin(); iright != rightConfigs.end(); iright++) {
380  mStream << "> " << parentStr << " Config " << *iright << std::endl;
381  rval = false;
382  }
383  leftConfigs.clear();
384  rightConfigs.clear();
385  return rval;
386  }
387  /// \brief Diff instance pointers and then the underlying config map
388  bool diffInstance(const InstanceSharedPtr& left, const InstanceSharedPtr& right) {
389  bool rval = true;
390  if (!(left->getType() == right->getType())) {
391  mStream << "! Instance " << left->getName() << " type: " << left->getType()
392  << " | " << right->getType() << std::endl;
393  rval = false;
394  }
395  if (!(left->getTile() == right->getTile())) {
396  mStream << "! Instance " << left->getName() << " tile: " << left->getTile()
397  << " | " << right->getTile() << std::endl;;
398  rval = false;
399  }
400  if (!(left->getSite() == right->getSite())) {
401  mStream << "! Instance " << left->getName() << "site: " << left->getSite()
402  << " | " << right->getSite() << std::endl;
403  rval = false;
404  }
405  if (!(left->getBonding() == right->getBonding())) {
406  mStream << "! Instance " << left->getName() << " bonding: " << left->getBonding()
407  << " | " << right->getBonding() << std::endl;
408  rval = false;
409  }
410 
411  string instancename = "Instance ";
412  instancename.append(left->getName());
413  // An instance is a configmap.
414  rval = diffConfigMap(left, right, instancename) && rval;
415  return rval;
416  }
417  /// \brief Diff net pointers and then the underlying config map.
418  bool diffNet(const NetSharedPtr& left, const NetSharedPtr& right) {
419  bool rval = true;
420  if (!(left->getNetType() == right->getNetType())) {
421  mStream << "! Net " << left->getName() << " type: " << left->getNetType()
422  << " | " << right->getNetType() << std::endl;
423  rval = false;
424  }
425 
426  std::vector<string> leftPins;
427  std::vector<string> rightPins;
428  std::vector<string>::iterator leftpin;
429  std::vector<string>::iterator rightpin;
430 
431  for (InstancePinSharedPtrConstIterator leftpinPtr = left->sourcesBegin();
432  leftpinPtr != left->sourcesEnd(); leftpinPtr++) {
433  string t = (*leftpinPtr)->getInstancePtr().lock()->getName();
434  t.append(".");
435  t.append((*leftpinPtr)->getPinName());
436  leftPins.push_back(t);
437  }
438  for (InstancePinSharedPtrConstIterator rightpinPtr = right->sourcesBegin();
439  rightpinPtr != right->sourcesEnd(); rightpinPtr++) {
440  string t = (*rightpinPtr)->getInstancePtr().lock()->getName();
441  t.append(".");
442  t.append((*rightpinPtr)->getPinName());
443  rightPins.push_back(t);
444  }
445  for (leftpin = leftPins.begin(); leftpin != leftPins.end(); leftpin++) {
446  bool found = false;
447  for (rightpin = rightPins.begin(); rightpin != rightPins.end(); rightpin++) {
448  if (*leftpin == *rightpin) {
449  found = true;
450  break;
451  }
452  }
453  if (found) {
454  rightPins.erase(rightpin);
455  } else {
456  mStream << "< Net " << left->getName() << " outpin: "
457  << *leftpin << std::endl;
458  rval = false;
459  }
460  }
461  for (rightpin = rightPins.begin(); rightpin != rightPins.end(); rightpin++) {
462  mStream << "> Net " << right->getName() << " outpin: "
463  << *rightpin << std::endl;
464  rval = false;
465  }
466  leftPins.clear();
467  rightPins.clear();
468 
469  for (InstancePinSharedPtrConstIterator leftpinPtr = left->sinksBegin();
470  leftpinPtr != left->sinksEnd(); leftpinPtr++) {
471  string t = (*leftpinPtr)->getInstancePtr().lock()->getName();
472  t.append(".");
473  t.append((*leftpinPtr)->getPinName());
474  leftPins.push_back(t);
475  }
476  for (InstancePinSharedPtrConstIterator rightpinPtr = right->sinksBegin();
477  rightpinPtr != right->sinksEnd(); rightpinPtr++) {
478  string t = (*rightpinPtr)->getInstancePtr().lock()->getName();
479  t.append(".");
480  t.append((*rightpinPtr)->getPinName());
481  rightPins.push_back(t);
482  }
483  for (leftpin = leftPins.begin(); leftpin != leftPins.end(); leftpin++) {
484  bool found = false;
485  for (rightpin = rightPins.begin(); rightpin != rightPins.end(); rightpin++) {
486  if (*leftpin == *rightpin) {
487  found = true;
488  break;
489  }
490  }
491  if (found) {
492  rightPins.erase(rightpin);
493  } else {
494  mStream << "< Net " << left->getName() << " inpin: "
495  << *leftpin << std::endl;
496  rval = false;
497  }
498  }
499  for (rightpin = rightPins.begin(); rightpin != rightPins.end(); rightpin++) {
500  mStream << "> Net " << right->getName() << " inpin: "
501  << *rightpin << std::endl;
502  rval = false;
503  }
504  leftPins.clear();
505  rightPins.clear();
506 
507  std::vector<string> leftPips;
508  std::vector<string> rightPips;
509  std::vector<string>::iterator leftpip;
510  std::vector<string>::iterator rightpip;
511  for (PipConstIterator leftpip = left->pipsBegin();
512  leftpip != left->pipsEnd(); leftpip++) {
513  string t = leftpip->getTileName();
514  t.append(" ");
515  t.append(leftpip->getSourceWireName());
516  t.append(" ");
517  t.append(leftpip->getDirectionString());
518  t.append(" ");
519  t.append(leftpip->getSinkWireName());
520  leftPips.push_back(t);
521  }
522  for (PipConstIterator rightpip = right->pipsBegin();
523  rightpip != right->pipsEnd(); rightpip++) {
524  string t = rightpip->getTileName();
525  t.append(" ");
526  t.append(rightpip->getSourceWireName());
527  t.append(" ");
528  t.append(rightpip->getDirectionString());
529  t.append(" ");
530  t.append(rightpip->getSinkWireName());
531  rightPips.push_back(t);
532  }
533  for (leftpip = leftPips.begin(); leftpip != leftPips.end(); leftpip++) {
534  bool found = false;
535  for (rightpip = rightPips.begin(); rightpip != rightPips.end(); rightpip++) {
536  if (*leftpip == *rightpip) {
537  found = true;
538  break;
539  }
540  }
541  if (found) {
542  rightPips.erase(rightpip);
543  } else {
544  mStream << "< Net " << left->getName() << " pip: "
545  << *leftpip << std::endl;
546  rval = false;
547  }
548  }
549  for (rightpip = rightPips.begin(); rightpip != rightPips.end(); rightpip++) {
550  mStream << "> Net " << right->getName() << " pip: "
551  << *rightpip << std::endl;
552  rval = false;
553  }
554  leftPips.clear();
555  rightPips.clear();
556 
557  string netname = "Net ";
558  netname.append(left->getName());
559  // A net is a configmap.
560  rval = diffConfigMap(left, right, netname) && rval;
561  return rval;
562  }
563 
564 };
565 
566 } // namespace torc
567 
568 #endif // TORC_UTILS_PHYSICALDIFF_HPP
bool diffCircuit(const CircuitSharedPtr &left, const CircuitSharedPtr &right)
Diff circuit pointers, recursively compare nets, instances and config map.
torc::physical::InstanceSharedPtr InstanceSharedPtr
Imported type name.
torc::physical::DesignSharedPtr DesignSharedPtr
Imported type name.
torc::physical::Net::PipConstIterator PipConstIterator
Imported type name.
bool diffDesign(const DesignSharedPtr &left, const DesignSharedPtr &right)
Diff design pointers and then recursively compare modules and inherited members.
PortSharedPtrVector::const_iterator PortSharedPtrConstIterator
Constant iterator to Port shared pointers.
Definition: Module.hpp:55
torc::physical::CircuitSharedPtr CircuitSharedPtr
Imported type name.
PipVector::const_iterator PipConstIterator
Constant iterator to Pip objects.
torc::physical::Design::ModuleSharedPtrIterator ModuleSharedPtrIterator
Imported type name.
bool diffInstance(const InstanceSharedPtr &left, const InstanceSharedPtr &right)
Diff instance pointers and then the underlying config map.
InstanceSharedPtrVector::const_iterator InstanceSharedPtrConstIterator
Constant iterator to Instance shared pointers.
Definition: Circuit.hpp:72
std::vector< ModuleSharedPtr > ModuleSharedPtrVector
Imported type name.
torc::physical::Circuit::NetSharedPtrConstIterator NetSharedPtrConstIterator
Imported type name.
torc::physical::InstanceWeakPtr InstanceWeakPtr
Imported type name.
boost::shared_ptr< torc::physical::ConfigMap > ConfigMapSharedPtr
Imported type name.
ModuleSharedPtrVector::const_iterator ModuleSharedPtrConstIterator
Constant iterator for Module shared pointers.
torc::physical::Circuit::NetSharedPtrIterator NetSharedPtrIterator
Imported type name.
std::vector< NetSharedPtr > NetSharedPtrVector
Imported type name.
torc::physical::Module::PortSharedPtrConstIterator PortSharedPtrConstIterator
Imported type name.
friend class utils::PhysicalDiffConfigMapUnitTest
Unit test access to internal functions.
torc::physical::ModuleSharedPtr ModuleSharedPtr
Imported type name.
std::string string
const_iterator const_iterator
Constant iterator to {setting,Config} pairs.
Definition: ConfigMap.hpp:52
std::string string
Imported type name.
friend class utils::PhysicalDiffModuleUnitTest
Unit test access to internal functions.
boost::shared_ptr< Module > ModuleSharedPtr
Shared pointer encapsulation of a Module.
Definition: Module.hpp:114
bool diffNet(const NetSharedPtr &left, const NetSharedPtr &right)
Diff net pointers and then the underlying config map.
Main torc::physical namespace header.
Configuration. A {name:value} pair.
Definition: Config.hpp:39
torc::physical::Circuit::InstanceSharedPtrIterator InstanceSharedPtrIterator
Imported type name.
Header for torc::physical output stream helpers.
const string & getName(void) const
Returns the object name.
Definition: Named.hpp:51
boost::shared_ptr< Net > NetSharedPtr
Shared pointer encapsulation of a Net.
boost::shared_ptr< Circuit > CircuitSharedPtr
Shared pointer encapsulation of a Circuit.
Definition: Circuit.hpp:219
const string & getValue(void) const
Return the configuration value.
Definition: Config.hpp:86
boost::shared_ptr< Instance > InstanceSharedPtr
Shared pointer encapsulation of an Instance.
boost::shared_ptr< Design > DesignSharedPtr
Shared pointer encapsulation of a Design.
torc::physical::ConfigMap::const_iterator ConfigMapConstIterator
Imported type name.
torc::physical::NetSharedPtr NetSharedPtr
Imported type name.
std::vector< InstanceSharedPtr > InstanceSharedPtrVector
Imported type name.
InstancePinSharedPtrVector::const_iterator InstancePinSharedPtrConstIterator
Constant iterator to InstancePin shared pointer objects.
NetSharedPtrVector::iterator NetSharedPtrIterator
Non-constant iterator to Net shared pointers.
Definition: Circuit.hpp:78
friend class utils::PhysicalDiffDesignUnitTest
Unit test access to internal functions.
bool diffModule(const ModuleSharedPtr &left, const ModuleSharedPtr &right)
Diff module pointers and then recursively compare inherited members from circuit. ...
torc::physical::Circuit::InstanceSharedPtrConstIterator InstanceSharedPtrConstIterator
Imported type name.
friend class utils::PhysicalDiffCircuitUnitTest
Unit test access to internal functions.
std::ostream & mStream
Output stream to use for comparison results.
boost::shared_ptr< torc::physical::Named > NamedSharedPtr
Imported type name.
torc::physical::Design::ModuleSharedPtrConstIterator ModuleSharedPtrConstIterator
Imported type name.
torc::physical::Net::InstancePinSharedPtrConstIterator InstancePinSharedPtrConstIterator
Imported type name.
friend class utils::PhysicalDiffNetUnitTest
Unit test access to internal functions.
Diff utility class for comparing physical netlists.
ModuleSharedPtrVector::iterator ModuleSharedPtrIterator
Non-constant iterator for Module shared pointers.
PhysicalDiff(std::ostream &inOutStream)
bool diff(const DesignSharedPtr &left, const DesignSharedPtr &right)
Top level call to diff two designs.
friend class utils::PhysicalDiffInstanceUnitTest
Unit test access to internal functions.
boost::weak_ptr< Instance > InstanceWeakPtr
Weak pointer encapsulation of an Instance.
NetSharedPtrVector::const_iterator NetSharedPtrConstIterator
Constant iterator to Net shared pointers.
Definition: Circuit.hpp:76
bool diffConfigMap(const ConfigMapSharedPtr &left, const ConfigMapSharedPtr &right, const string &parentStr)
Diff configuration information, this is called from circuits, instances and nets. ...
InstanceSharedPtrVector::iterator InstanceSharedPtrIterator
Non-constant iterator to Instance shared pointers.
Definition: Circuit.hpp:74