torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AssemblerLibGenExample.cpp
Go to the documentation of this file.
1 // Torc - Copyright 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 Implementation of class to encapsulate micro-bitstream library generation code
18 /// \author Ritesh Kumar Soni
19 
22 #include <iostream>
23 
24 // Main function to create a executable
25 int main(int argc, char **argv) {
26 
27  if(argc != 4) {
28  std::cerr << "Invalid arguments. Usage: " << argv[0]
29  << " <device> <harness_folder> <xdl_generation_folder>" << std::endl;
30  exit(-1);
31  }
32  // get the part number
33  std::string partNumber = argv[1];
34  boost::filesystem::path harnessFolder = argv[2];
35  boost::filesystem::path xdlGenerationFolder = argv[3];
36  // Initialize the DirectoryTree class
37  torc::common::DirectoryTree directoryTree(argv[0]);
38 
40  = torc::bitstream::LibGenFactory::newLibGenPtr(partNumber, xdlGenerationFolder);
41  libGen->generateLogicXdls();
42  libGen->generateWireXdls();
43  libGen->generateBitstreams();
44  libGen->compressBitFiles();
45  libGen->stitchMicroBitstreams();
46 }
47 
48 
boost::shared_ptr< AssemblerLibGen > AssemblerLibGenSharedPtr
std::string string
Encapsulation of filesystem paths that are used by the library.
boost::filesystem::path path
static AssemblerLibGenSharedPtr newLibGenPtr(string inFamily, path inXdlGenerationFolder)
int main(int argc, char **argv)