OpenASIP  2.0
Public Member Functions | Static Private Attributes | List of all members
TestHDBCmdLineOptions Class Reference

#include <TestHDBCmdLineOptions.hh>

Inheritance diagram for TestHDBCmdLineOptions:
Inheritance graph
Collaboration diagram for TestHDBCmdLineOptions:
Collaboration graph

Public Member Functions

 TestHDBCmdLineOptions ()
 
 ~TestHDBCmdLineOptions ()
 
bool isFUEntryIDGiven () const
 
bool isRFEntryIDGiven () const
 
bool verbose () const
 
bool leaveDirty () const
 
int fuEntryID () const
 
int rfEntryID () const
 
std::string hdbFile () const
 
std::string vhdlSim () const
 
virtual void printVersion () const
 
virtual void printHelp () 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 FU_ID_PARAM_NAME = "fuid"
 Long name of the FUentryID parameter. More...
 
static const std::string RF_ID_PARAM_NAME = "rfid"
 Long name of the RFentryID parameter. More...
 
static const std::string VERBOSE_PARAM_NAME = "verbose"
 Long name of verbose output parameter. More...
 
static const std::string DIRTY_PARAM_NAME = "leave-dirty"
 Long name of leave dirty parameter. More...
 
static const std::string SIM_PARAM_NAME = "simulator"
 Long name of VHDL simulator parameter. 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)
 
CmdLineOptionParserfindOption (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...
 

Detailed Description

Definition at line 39 of file TestHDBCmdLineOptions.hh.

Constructor & Destructor Documentation

◆ TestHDBCmdLineOptions()

TestHDBCmdLineOptions::TestHDBCmdLineOptions ( )

The constructor.

Definition at line 48 of file TestHDBCmdLineOptions.cc.

48  : CmdLineOptions("") {
51  FU_ID_PARAM_NAME, "Entry id of FU component to be tested. If this"
52  " is and RF ID are not defined whole HDB will be tested.", "f");
56  RF_ID_PARAM_NAME, "Entry id of RF component to be tested. If this"
57  " is and FU ID are not defined whole HDB will be tested.", "r");
61  VERBOSE_PARAM_NAME, "Enable verbose output", "v");
65  DIRTY_PARAM_NAME, "Don't delete created files", "d");
66  addOption(dirty);
67  StringCmdLineOptionParser* simulator =
69  SIM_PARAM_NAME, "HDL simulator used to simulate testbench. "
70  "Accepted values are 'ghdl' and 'modelsim'. Default is ghdl",
71  "s");
72  addOption(simulator);
73 }

References CmdLineParser::addOption(), DIRTY_PARAM_NAME, FU_ID_PARAM_NAME, fuEntryID(), RF_ID_PARAM_NAME, rfEntryID(), SIM_PARAM_NAME, verbose(), and VERBOSE_PARAM_NAME.

Here is the call graph for this function:

◆ ~TestHDBCmdLineOptions()

TestHDBCmdLineOptions::~TestHDBCmdLineOptions ( )

The destructor.

Definition at line 78 of file TestHDBCmdLineOptions.cc.

78  {
79 }

Member Function Documentation

◆ fuEntryID()

int TestHDBCmdLineOptions::fuEntryID ( ) const

Returns FU entryID

Returns
The FU entryID

Definition at line 126 of file TestHDBCmdLineOptions.cc.

126  {
128  return option->integer();
129 }

References CmdLineParser::findOption(), FU_ID_PARAM_NAME, and CmdLineOptionParser::integer().

Referenced by TestHDBCmdLineOptions().

Here is the call graph for this function:

◆ hdbFile()

std::string TestHDBCmdLineOptions::hdbFile ( ) const

Returns HDB file name

Returns
The HDB file name

Definition at line 147 of file TestHDBCmdLineOptions.cc.

147  {
148  return argument(numberOfArguments());
149 }

References CmdLineParser::argument(), and CmdLineParser::numberOfArguments().

Here is the call graph for this function:

◆ isFUEntryIDGiven()

bool TestHDBCmdLineOptions::isFUEntryIDGiven ( ) const

Returns information whether this option was given

Returns
Is FU entryID defined

Definition at line 86 of file TestHDBCmdLineOptions.cc.

86  {
88  return option->isDefined();
89 }

References CmdLineParser::findOption(), FU_ID_PARAM_NAME, and CmdLineOptionParser::isDefined().

Here is the call graph for this function:

◆ isRFEntryIDGiven()

bool TestHDBCmdLineOptions::isRFEntryIDGiven ( ) const

Returns information whether this option was given

Returns
Is RF entryID defined

Definition at line 96 of file TestHDBCmdLineOptions.cc.

96  {
98  return option->isDefined();
99 }

References CmdLineParser::findOption(), CmdLineOptionParser::isDefined(), and RF_ID_PARAM_NAME.

Here is the call graph for this function:

◆ leaveDirty()

bool TestHDBCmdLineOptions::leaveDirty ( ) const

Returns information whether this option was given

Returns
Is leave dirty defined

Definition at line 116 of file TestHDBCmdLineOptions.cc.

116  {
118  return option->isFlagOn();
119 }

References DIRTY_PARAM_NAME, CmdLineParser::findOption(), and CmdLineOptionParser::isFlagOn().

Here is the call graph for this function:

◆ printHelp()

void TestHDBCmdLineOptions::printHelp ( ) const
virtual

Prints help of the application.

Reimplemented from CmdLineOptions.

Definition at line 172 of file TestHDBCmdLineOptions.cc.

172  {
173  printVersion();
174  std::cout << "Usage: testhdb <options> HDB-file" << std::endl;
176 }

References CmdLineOptions::printHelp(), and printVersion().

Here is the call graph for this function:

◆ printVersion()

void TestHDBCmdLineOptions::printVersion ( ) const
virtual

Prints the version of the application.

Implements CmdLineOptions.

Definition at line 164 of file TestHDBCmdLineOptions.cc.

164  {
165  std::cout << "testhdb - HDB test utility "
166  << Application::TCEVersionString() << std::endl;
167 }

References Application::TCEVersionString().

Referenced by printHelp().

Here is the call graph for this function:

◆ rfEntryID()

int TestHDBCmdLineOptions::rfEntryID ( ) const

Returns RF entryID

Returns
The RF entryID

Definition at line 136 of file TestHDBCmdLineOptions.cc.

136  {
138  return option->integer();
139 }

References CmdLineParser::findOption(), CmdLineOptionParser::integer(), and RF_ID_PARAM_NAME.

Referenced by TestHDBCmdLineOptions().

Here is the call graph for this function:

◆ verbose()

bool TestHDBCmdLineOptions::verbose ( ) const

Returns information whether this option was given

Returns
Is verbose output defined

Definition at line 106 of file TestHDBCmdLineOptions.cc.

106  {
108  return option->isFlagOn();
109 }

References CmdLineParser::findOption(), CmdLineOptionParser::isFlagOn(), and VERBOSE_PARAM_NAME.

Referenced by TestHDBCmdLineOptions().

Here is the call graph for this function:

◆ vhdlSim()

std::string TestHDBCmdLineOptions::vhdlSim ( ) const

Returns HDL simulator to be used

Returns
The HDL simulator name

Definition at line 156 of file TestHDBCmdLineOptions.cc.

156  {
158  return option->String();
159 }

References CmdLineParser::findOption(), SIM_PARAM_NAME, and CmdLineOptionParser::String().

Here is the call graph for this function:

Member Data Documentation

◆ DIRTY_PARAM_NAME

const std::string TestHDBCmdLineOptions::DIRTY_PARAM_NAME = "leave-dirty"
staticprivate

Long name of leave dirty parameter.

Definition at line 71 of file TestHDBCmdLineOptions.hh.

Referenced by leaveDirty(), and TestHDBCmdLineOptions().

◆ FU_ID_PARAM_NAME

const std::string TestHDBCmdLineOptions::FU_ID_PARAM_NAME = "fuid"
staticprivate

Long name of the FUentryID parameter.

Definition at line 65 of file TestHDBCmdLineOptions.hh.

Referenced by fuEntryID(), isFUEntryIDGiven(), and TestHDBCmdLineOptions().

◆ RF_ID_PARAM_NAME

const std::string TestHDBCmdLineOptions::RF_ID_PARAM_NAME = "rfid"
staticprivate

Long name of the RFentryID parameter.

Definition at line 67 of file TestHDBCmdLineOptions.hh.

Referenced by isRFEntryIDGiven(), rfEntryID(), and TestHDBCmdLineOptions().

◆ SIM_PARAM_NAME

const std::string TestHDBCmdLineOptions::SIM_PARAM_NAME = "simulator"
staticprivate

Long name of VHDL simulator parameter.

Definition at line 73 of file TestHDBCmdLineOptions.hh.

Referenced by TestHDBCmdLineOptions(), and vhdlSim().

◆ VERBOSE_PARAM_NAME

const std::string TestHDBCmdLineOptions::VERBOSE_PARAM_NAME = "verbose"
staticprivate

Long name of verbose output parameter.

Definition at line 69 of file TestHDBCmdLineOptions.hh.

Referenced by TestHDBCmdLineOptions(), and verbose().


The documentation for this class was generated from the following files:
TestHDBCmdLineOptions::fuEntryID
int fuEntryID() const
Definition: TestHDBCmdLineOptions.cc:126
CmdLineParser::numberOfArguments
virtual int numberOfArguments() const
CmdLineOptionParser::isDefined
bool isDefined()
Definition: CmdLineOptionParser.cc:169
TestHDBCmdLineOptions::SIM_PARAM_NAME
static const std::string SIM_PARAM_NAME
Long name of VHDL simulator parameter.
Definition: TestHDBCmdLineOptions.hh:73
TestHDBCmdLineOptions::verbose
bool verbose() const
Definition: TestHDBCmdLineOptions.cc:106
CmdLineOptionParser::isFlagOn
virtual bool isFlagOn() const
Definition: CmdLineOptionParser.cc:126
CmdLineParser::addOption
void addOption(CmdLineOptionParser *opt)
CmdLineOptionParser
Definition: CmdLineOptionParser.hh:56
TestHDBCmdLineOptions::RF_ID_PARAM_NAME
static const std::string RF_ID_PARAM_NAME
Long name of the RFentryID parameter.
Definition: TestHDBCmdLineOptions.hh:67
CmdLineOptions::CmdLineOptions
CmdLineOptions(std::string description, std::string version="")
Definition: CmdLineOptions.cc:73
BoolCmdLineOptionParser
Definition: CmdLineOptionParser.hh:278
CmdLineOptions::printHelp
virtual void printHelp() const
Definition: CmdLineOptions.cc:262
TestHDBCmdLineOptions::FU_ID_PARAM_NAME
static const std::string FU_ID_PARAM_NAME
Long name of the FUentryID parameter.
Definition: TestHDBCmdLineOptions.hh:65
CmdLineOptionParser::String
virtual std::string String(int index=0) const
Definition: CmdLineOptionParser.cc:102
TestHDBCmdLineOptions::printVersion
virtual void printVersion() const
Definition: TestHDBCmdLineOptions.cc:164
TestHDBCmdLineOptions::DIRTY_PARAM_NAME
static const std::string DIRTY_PARAM_NAME
Long name of leave dirty parameter.
Definition: TestHDBCmdLineOptions.hh:71
CmdLineOptionParser::integer
virtual int integer(int index=0) const
Definition: CmdLineOptionParser.cc:84
TestHDBCmdLineOptions::VERBOSE_PARAM_NAME
static const std::string VERBOSE_PARAM_NAME
Long name of verbose output parameter.
Definition: TestHDBCmdLineOptions.hh:69
CmdLineParser::findOption
CmdLineOptionParser * findOption(std::string name) const
Definition: CmdLineParser.cc:160
TestHDBCmdLineOptions::rfEntryID
int rfEntryID() const
Definition: TestHDBCmdLineOptions.cc:136
CmdLineParser::argument
virtual std::string argument(int index) const
Application::TCEVersionString
static std::string TCEVersionString()
Definition: Application.cc:510
StringCmdLineOptionParser
Definition: CmdLineOptionParser.hh:180
IntegerCmdLineOptionParser
Definition: CmdLineOptionParser.hh:117