00001 // Torc - Copyright 2011 University of Southern California. All Rights Reserved. 00002 // $HeadURL: https://torc-isi.svn.sourceforge.net/svnroot/torc-isi/branches/staging/0.9/src/torc/utils/BrowserMain.cpp $ 00003 // $Id: BrowserMain.cpp 10 2011-10-12 18:40:16Z nsteiner $ 00004 00005 // This program is free software: you can redistribute it and/or modify it under the terms of the 00006 // GNU General Public License as published by the Free Software Foundation, either version 3 of the 00007 // License, or (at your option) any later version. 00008 // 00009 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 00010 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 00011 // the GNU General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU General Public License along with this program. If 00014 // not, see <http://www.gnu.org/licenses/>. 00015 00016 /// \file 00017 /// \brief Source for a PhysicalDiff command line utility. 00018 /// \details Opens up two designs with the XDLImporter and then compares them with PhysicalDiff. 00019 00020 #include <fstream> 00021 #include "ArchitectureBrowser.hpp" 00022 #include "torc/common/DirectoryTree.hpp" 00023 00024 /// \brief Main entry point for the architecture browser tool. 00025 int main(int argc, char *argv[]) { 00026 typedef std::string string; 00027 torc::common::DirectoryTree directoryTree(argv[0]); 00028 00029 if (argc != 2) { 00030 std::cout << "Usage: " << argv[0] << " <device>" << std::endl; 00031 return 1; 00032 } 00033 string device_arg = argv[1]; 00034 00035 torc::common::DeviceDesignator device(device_arg); 00036 torc::architecture::DDB db(device); 00037 torc::ArchitectureBrowser ab(db); 00038 ab.browse(); 00039 00040 return 0; 00041 } 00042