torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UnpackTest.cpp
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 #include <fstream>
18 #include "torc/Physical.hpp"
24 
25 using namespace std;
26 int main(int argc, char *argv[]) {
27 
28  if (argc != 2) {
29  std::cout << "Usage: " << argv[0] << " <input xdlfile>" << std::endl;
30  return 1;
31  }
32 
33  ifstream inp(argv[1]);
34  cout<<"Reading xdl file ....................."<<endl;
36  importer(inp, "");
37  torc::physical::DesignSharedPtr designPtr = importer.getDesignPtr();
38 
40  cout<<"Unpacking ............................"<<endl;
41  torc::physical::DesignSharedPtr dp = unpacker(designPtr);
42  string unpackName = argv[1];
43  unpackName += "_unpack";
44  ofstream outp(unpackName.c_str());
45  torc::physical::XdlExporter fileExporter(outp);
46  fileExporter(dp);
47  cout<<"Extracting combinational paths ......."<<endl;
48  // test combinational paths
50  combPtr->setPatchCounts(dp);
53  cout<<"Done ................................."<<endl;
54  /*while(rnb<rne){
55  cout<<(*rnb)->getName()<<":"<<endl;
56  size_t n=(*rnb)->getSuperNet()->getSourceCount() + (*rnb)->getSuperNet()->getSinkCount();
57  for(size_t i=0; i<n; ++i)
58  cout<<"\n"<<(*rnb)->getPathCount(i)<<endl;
59  ++rnb;
60  }*/
61  return 0;
62 }
Header for the RcFactory class.
DesignSharedPtr getDesignPtr(void)
Returns a shared pointer for the design.
Header for the DirectoryTree class.
Header for the XdlImporter class.
Header for the XdlExport class.
Main torc::physical namespace header.
RoutingNetSharedPtrVector::const_iterator RoutingNetSharedPtrConstIterator
Constant iterator to Routing Net shared pointers.
boost::shared_ptr< Design > DesignSharedPtr
Shared pointer encapsulation of a Design.
Importer from XDL format into a physical design.
int main(int argc, char *argv[])
Definition: UnpackTest.cpp:26
static CombinationalPathSharedPtr newCombinationalPathPtr()
Create and return a new CombinationalPath object.
Definition: RcFactory.hpp:62
boost::shared_ptr< CombinationalPath > CombinationalPathSharedPtr
Shared pointer encapsulation of a CombinationalPath.
Header for the CombinationalPath class.
Physical design exporter for XDL.
Definition: XdlExporter.hpp:31