OpenASIP
2.0
|
#include <PIGCmdLineOptions.hh>
Public Member Functions | |
PIGCmdLineOptions () | |
virtual | ~PIGCmdLineOptions () |
std::string | bemFile () const |
int | tpefFileCount () const |
std::string | tpefFile (int index) const |
std::string | programImageOutputFormat () const |
std::string | dataImageOutputFormat () const |
std::string | compressorPlugin () const |
int | dataMemoryWidthInMAUs () const |
bool | generateDataImages () const |
bool | generateDecompressor () const |
int | compressorParameterCount () const |
std::string | compressorParameter (int index) const |
bool | showCompressors () const |
std::string | progeOutputDirectory () const |
std::string | entityName () const |
virtual void | printVersion () const |
virtual void | printHelp () const |
void | printUsage () const |
Public Member Functions inherited from CmdLineOptions | |
CmdLineOptions (std::string description, std::string version="") | |
virtual | ~CmdLineOptions () |
void | parse (char *argv[], int argc) |
void | parse (std::string argv[], int argc) |
void | parse (std::vector< std::string > argv) |
virtual bool | isVerboseSwitchDefined () const |
virtual bool | isVerboseSpamSwitchDefined () const |
Public Member Functions inherited from CmdLineParser | |
CmdLineParser (std::string description) | |
virtual | ~CmdLineParser () |
virtual void | storeOptions (Options &options) |
virtual int | numberOfArguments () const |
virtual std::string | argument (int index) const |
Static Private Attributes | |
static const std::string | BEM_PARAM_NAME = "bem" |
Long name of the BEM file parameter. More... | |
static const std::string | TPEF_PARAM_NAME = "program" |
Long name of the TPEF file parameter. More... | |
static const std::string | PI_FORMAT_PARAM_NAME = "piformat" |
Long name of the program image output format parameter. More... | |
static const std::string | DI_FORMAT_PARAM_NAME = "diformat" |
Long name of the data image output format parameter. More... | |
static const std::string | COMPRESSOR_PARAM_NAME = "compressor" |
Long name of the plugin file parameter. More... | |
static const std::string | DATA_IMG_PARAM_NAME = "dataimages" |
Long name of the parameter that defines whether to create data images. More... | |
static const std::string | GEN_DECOMP_PARAM_NAME = "decompressor" |
Long name of the parameter that tells whether to generate decompressor or not. More... | |
static const std::string | DMEM_WIDTH_IN_MAUS_PARAM_NAME |
Long name of the parameter that tells the width of data mem in MAUs. More... | |
static const std::string | IMEM_WIDTH_IN_MAUS_PARAM_NAME |
Long name of the paramter that tells the width of inst mem in MAUs. More... | |
static const std::string | COMPRESSOR_PARAMS_PARAM_NAME |
Long name of parameter passed to code compressor plugin. More... | |
static const std::string | SHOW_COMPRESSORS_PARAM_NAME |
Long name of the parameter that tells whether to show compressors. More... | |
static const std::string | HDL_OUTPUT_DIR = "hdl-dir" |
Long name of the parameter which tells the proge-output dir. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CmdLineOptions | |
bool | optionGiven (std::string key) const |
Protected Member Functions inherited from CmdLineParser | |
void | addOption (CmdLineOptionParser *opt) |
CmdLineOptionParser * | findOption (std::string name) const |
bool | parseOption (std::string option, std::string &name, std::string &arguments, std::string &prefix, bool &hasArgument) const |
bool | readPrefix (std::string &option, std::string &prefix, bool &longOption) const |
bool | isPrefix (std::string name) const |
Protected Attributes inherited from CmdLineParser | |
std::map< std::string, CmdLineOptionParser * > | optionLongNames_ |
Database for holding options with their long names as a key. More... | |
std::map< std::string, CmdLineOptionParser * > | optionShortNames_ |
Database for holding options with their short names as a key. More... | |
std::vector< std::string > | commandLine_ |
Command line is stored here. More... | |
std::vector< std::string > | arguments_ |
Command line arguments are stored here. More... | |
std::vector< std::string > | prefixes_ |
Legal prefixes are stored here. More... | |
Command line options for the command line interface of PIG (generatebits).
Definition at line 41 of file PIGCmdLineOptions.hh.
PIGCmdLineOptions::PIGCmdLineOptions | ( | ) |
The constructor.
Definition at line 61 of file PIGCmdLineOptions.cc.
References CmdLineParser::addOption(), BEM_PARAM_NAME, bemFile(), COMPRESSOR_PARAM_NAME, COMPRESSOR_PARAMS_PARAM_NAME, DATA_IMG_PARAM_NAME, DI_FORMAT_PARAM_NAME, DMEM_WIDTH_IN_MAUS_PARAM_NAME, ENTITY_NAME, entityName(), GEN_DECOMP_PARAM_NAME, HDL_OUTPUT_DIR, PI_FORMAT_PARAM_NAME, SHOW_COMPRESSORS_PARAM_NAME, showCompressors(), TPEF_PARAM_NAME, and tpefFile().
|
virtual |
std::string PIGCmdLineOptions::bemFile | ( | ) | const |
Returns the name of the BEM file given as command line parameter.
Definition at line 150 of file PIGCmdLineOptions.cc.
References BEM_PARAM_NAME, CmdLineParser::findOption(), and CmdLineOptionParser::String().
Referenced by PIGCmdLineOptions().
std::string PIGCmdLineOptions::compressorParameter | ( | int | index | ) | const |
By the given index, returns a parameter given to code compressor.
index | The index. |
OutOfRange | If the given index is negative or not smaller than the number of parameters given to compressor. |
Definition at line 268 of file PIGCmdLineOptions.cc.
References __func__, COMPRESSOR_PARAMS_PARAM_NAME, compressorParameterCount(), CmdLineParser::findOption(), and CmdLineOptionParser::String().
int PIGCmdLineOptions::compressorParameterCount | ( | ) | const |
Returns the number of parameters given to compressor.
Definition at line 255 of file PIGCmdLineOptions.cc.
References COMPRESSOR_PARAMS_PARAM_NAME, CmdLineParser::findOption(), and CmdLineOptionParser::listSize().
Referenced by compressorParameter().
std::string PIGCmdLineOptions::compressorPlugin | ( | ) | const |
Returns the code compressor plugin file name.
Definition at line 209 of file PIGCmdLineOptions.cc.
References COMPRESSOR_PARAM_NAME, CmdLineParser::findOption(), and CmdLineOptionParser::String().
std::string PIGCmdLineOptions::dataImageOutputFormat | ( | ) | const |
Returns the data image output format given as command line parameter.
Definition at line 198 of file PIGCmdLineOptions.cc.
References DI_FORMAT_PARAM_NAME, CmdLineParser::findOption(), and CmdLineOptionParser::String().
int PIGCmdLineOptions::dataMemoryWidthInMAUs | ( | ) | const |
Returns the given width of data memory in MAUs.
Definition at line 220 of file PIGCmdLineOptions.cc.
References DMEM_WIDTH_IN_MAUS_PARAM_NAME, CmdLineParser::findOption(), CmdLineOptionParser::integer(), and CmdLineOptionParser::isDefined().
std::string PIGCmdLineOptions::entityName | ( | ) | const |
Definition at line 295 of file PIGCmdLineOptions.cc.
References ENTITY_NAME, CmdLineParser::findOption(), and CmdLineOptionParser::String().
Referenced by PIGCmdLineOptions().
bool PIGCmdLineOptions::generateDataImages | ( | ) | const |
Tells whether to create data images or not.
Definition at line 235 of file PIGCmdLineOptions.cc.
References DATA_IMG_PARAM_NAME, CmdLineParser::findOption(), and CmdLineOptionParser::isFlagOn().
bool PIGCmdLineOptions::generateDecompressor | ( | ) | const |
Tells whether to generate decompressor block or not.
Definition at line 244 of file PIGCmdLineOptions.cc.
References CmdLineParser::findOption(), GEN_DECOMP_PARAM_NAME, and CmdLineOptionParser::isFlagOn().
|
virtual |
Prints the help menu of the program.
Reimplemented from CmdLineOptions.
Definition at line 318 of file PIGCmdLineOptions.cc.
References CmdLineOptions::printHelp(), printUsage(), and printVersion().
void PIGCmdLineOptions::printUsage | ( | ) | const |
Prints the usage of the CLI.
Definition at line 329 of file PIGCmdLineOptions.cc.
References Texts::TextGenerator::text(), and PIGCLITextGenerator::TXT_CLI_USAGE.
Referenced by printHelp().
|
virtual |
Prints the version of the user interface.
Implements CmdLineOptions.
Definition at line 304 of file PIGCmdLineOptions.cc.
References Texts::TextGenerator::text(), PIGCLITextGenerator::TXT_CLI_TITLE, and PIGCLITextGenerator::TXT_CLI_VERSION.
Referenced by printHelp().
std::string PIGCmdLineOptions::progeOutputDirectory | ( | ) | const |
Returns the proge output directory. Empty if not given
Definition at line 290 of file PIGCmdLineOptions.cc.
References CmdLineParser::findOption(), HDL_OUTPUT_DIR, and CmdLineOptionParser::String().
std::string PIGCmdLineOptions::programImageOutputFormat | ( | ) | const |
Returns the program image output format given as command line parameter.
Definition at line 187 of file PIGCmdLineOptions.cc.
References CmdLineParser::findOption(), PI_FORMAT_PARAM_NAME, and CmdLineOptionParser::String().
bool PIGCmdLineOptions::showCompressors | ( | ) | const |
Tells whether to show code compressor descriptions or not.
Definition at line 280 of file PIGCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::isFlagOn(), and SHOW_COMPRESSORS_PARAM_NAME.
Referenced by PIGCmdLineOptions().
std::string PIGCmdLineOptions::tpefFile | ( | int | index | ) | const |
Returns the name of the TPEF file given as command line parameter.
Definition at line 172 of file PIGCmdLineOptions.cc.
References __func__, CmdLineParser::findOption(), CmdLineOptionParser::String(), TPEF_PARAM_NAME, and tpefFileCount().
Referenced by PIGCmdLineOptions().
int PIGCmdLineOptions::tpefFileCount | ( | ) | const |
Returns the number of TPEF files given.
Definition at line 161 of file PIGCmdLineOptions.cc.
References CmdLineParser::findOption(), CmdLineOptionParser::listSize(), and TPEF_PARAM_NAME.
Referenced by tpefFile().
|
staticprivate |
Long name of the BEM file parameter.
Definition at line 67 of file PIGCmdLineOptions.hh.
Referenced by bemFile(), and PIGCmdLineOptions().
|
staticprivate |
Long name of the plugin file parameter.
Definition at line 75 of file PIGCmdLineOptions.hh.
Referenced by compressorPlugin(), and PIGCmdLineOptions().
|
staticprivate |
Long name of parameter passed to code compressor plugin.
Definition at line 87 of file PIGCmdLineOptions.hh.
Referenced by compressorParameter(), compressorParameterCount(), and PIGCmdLineOptions().
|
staticprivate |
Long name of the parameter that defines whether to create data images.
Definition at line 78 of file PIGCmdLineOptions.hh.
Referenced by generateDataImages(), and PIGCmdLineOptions().
|
staticprivate |
Long name of the data image output format parameter.
Definition at line 73 of file PIGCmdLineOptions.hh.
Referenced by dataImageOutputFormat(), and PIGCmdLineOptions().
|
staticprivate |
Long name of the parameter that tells the width of data mem in MAUs.
Definition at line 83 of file PIGCmdLineOptions.hh.
Referenced by dataMemoryWidthInMAUs(), and PIGCmdLineOptions().
|
staticprivate |
Long name of the parameter that tells whether to generate decompressor or not.
Definition at line 81 of file PIGCmdLineOptions.hh.
Referenced by generateDecompressor(), and PIGCmdLineOptions().
|
staticprivate |
Long name of the parameter which tells the proge-output dir.
Definition at line 91 of file PIGCmdLineOptions.hh.
Referenced by PIGCmdLineOptions(), and progeOutputDirectory().
|
staticprivate |
Long name of the paramter that tells the width of inst mem in MAUs.
Definition at line 85 of file PIGCmdLineOptions.hh.
|
staticprivate |
Long name of the program image output format parameter.
Definition at line 71 of file PIGCmdLineOptions.hh.
Referenced by PIGCmdLineOptions(), and programImageOutputFormat().
|
staticprivate |
Long name of the parameter that tells whether to show compressors.
Definition at line 89 of file PIGCmdLineOptions.hh.
Referenced by PIGCmdLineOptions(), and showCompressors().
|
staticprivate |
Long name of the TPEF file parameter.
Definition at line 69 of file PIGCmdLineOptions.hh.
Referenced by PIGCmdLineOptions(), tpefFile(), and tpefFileCount().