OpenASIP
2.0
|
#include <iostream>
#include <string>
#include "BEMGeneratorCmdLineOptions.hh"
#include "BEMSerializer.hh"
#include "BEMGenerator.hh"
#include "BinaryEncoding.hh"
#include "Machine.hh"
#include "ADFSerializer.hh"
#include "FileSystem.hh"
Go to the source code of this file.
Functions | |
static Machine * | loadMachine (const std::string &adfFile) |
static std::string | outputFileName (const std::string &adfFile) |
int | main (int argc, char *argv[]) |
Implements the main function of createbem application which creates a binary encoding map.
Definition in file CreateBEM.cc.
|
static |
Loads the given ADF file and creates a Machine instance from it.
adfFile | The ADF file. |
SerializerException | If an error occurs while reading the file. |
ObjectStateLoadingException | If an error occurs while loading the state of Machine instance. |
Definition at line 62 of file CreateBEM.cc.
References ADFSerializer::readMachine(), and XMLSerializer::setSourceFile().
Referenced by GenerateProcessor::generateProcessor(), and main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
The main function.
Definition at line 86 of file CreateBEM.cc.
References Exception::errorMessage(), Exception::fileName(), BEMGenerator::generate(), Exception::lineNum(), loadMachine(), options, outputFileName(), CmdLineOptions::parse(), MachInfoCmdLineOptions::printHelp(), XMLSerializer::setDestinationFile(), and BEMSerializer::writeBinaryEncoding().
|
static |
Generates the name of the output file from the given ADF file name.
The generated name has same body but .bem suffix.
adfFile | The name of the ADF file. |
Definition at line 77 of file CreateBEM.cc.
References FileSystem::fileNameBody().
Referenced by main(), and SOPCBuilderFileGenerator::writeProjectFiles().