52#include "tce_config.h"
75 "Print missing operations from primitive operation set",
82 "Print all connections in adf.",
90 "Print the name of global connection register",
"g");
97 "Print missing connections to connection register",
105 "Print all connections to the connection register.",
"r");
112 "Don't print any error messages.",
"e");
119 "Write binary program as output.",
"w");
153 cout <<
"dictionary_tool - Dictionary Tool "
162int main(
int argc,
char* argv[]) {
179 cerr <<
"Illegal number of arguments" << endl;
194 cerr <<
"Error opening ADF file:" << endl
195 <<
"- Is the filename correct?" << endl
196 <<
"- Is the machine legal?" << endl;
212 for (
int i = 0; i < booleanResults.
errorCount(); i++) {
214 booleanResults.
error(i);
216 cerr << error.second << endl;
218 cerr <<
"Execution stopped." << endl;
222 bool gcrError =
false;
227 binaryProgram = validator->
profile(results);
230 cerr <<
"Check that all operations are found in OSAL." << endl;
231 cerr <<
"Create new ones with OSEd." << endl;
232 cerr <<
"Execution stopped." << endl;
239 string outputFile = adfFileName.append(
"_profiled.tpef");
244 if (!
options.doNotPrintErrors()) {
245 for (
int i = 0; i < results.
errorCount(); i++) {
249 OPERATION_MISSING_FROM_THE_PRIMITIVE_OPERATION_SET) {
250 if (
options.printPrimitive()) {
251 cerr << error.second << endl;
254 else if (error.first ==
256 GLOBAL_CONNECTION_REGISTER_NOT_FOUND) {
257 if (
options.printGlobalRegister()) {
259 cerr << error.second << endl;
262 else if (error.first ==
264 MISSING_CONNECTION) {
265 if (
options.printMissingConnections()) {
266 cerr << error.second << endl;
270 cerr << error.second << endl;
275 if (
options.printGlobalRegister() && !gcrError) {
276 cout <<
"* The global connection register in the machine is: "
281 if (
options.printConnections()) {
285 if (
options.printRFConnections()) {
static MachInfoCmdLineOptions options
TTAMachine::Machine * readMachine()
static std::string TCEVersionString()
virtual bool isFlagOn() const
void parse(char *argv[], int argc)
CmdLineOptionParser * findOption(std::string name) const
virtual std::string argument(int index) const
virtual int numberOfArguments() const
void addOption(CmdLineOptionParser *opt)
std::string errorMessage() const
virtual void printHelp() const
Error error(int index) const
std::pair< ProgrammabilityValidator::ErrorCode, std::string > Error
Typedef for an error (error code + error message).
bool checkBooleanRegister(ProgrammabilityValidatorResults &results)
const RegisterFile * findGlobalConnectionRegister()
TPEF::Binary * profile(ProgrammabilityValidatorResults &results)
void printRegisterConnections()
void writeBinary(BinaryStream &stream, const Binary *bin) const
static const BinaryWriter & instance()
virtual TCEString name() const
void setSourceFile(const std::string &fileName)