Line 237... |
Line 237... |
runtime.sim.iprompt = 0;
|
runtime.sim.iprompt = 0;
|
runtime.sim.fprof = NULL;
|
runtime.sim.fprof = NULL;
|
runtime.sim.fmprof = NULL;
|
runtime.sim.fmprof = NULL;
|
runtime.sim.fout = stdout;
|
runtime.sim.fout = stdout;
|
|
|
|
/* NPC state. Set to 1 when NPC is changed while the processor is stalled. */
|
|
cpu_state.npc_not_valid = 0;
|
|
|
/* VAPI */
|
/* VAPI */
|
runtime.vapi.vapi_file = NULL;
|
runtime.vapi.vapi_file = NULL;
|
runtime.vapi.enabled = 0;
|
runtime.vapi.enabled = 0;
|
|
|
} /* init_defconfig() */
|
} /* init_defconfig() */
|
Line 264... |
Line 267... |
struct arg_file *cfg_file;
|
struct arg_file *cfg_file;
|
struct arg_lit *nosrv;
|
struct arg_lit *nosrv;
|
struct arg_int *srv;
|
struct arg_int *srv;
|
struct arg_str *dbg;
|
struct arg_str *dbg;
|
struct arg_lit *command;
|
struct arg_lit *command;
|
|
struct arg_lit *strict_npc;
|
struct arg_lit *profile;
|
struct arg_lit *profile;
|
struct arg_lit *mprofile;
|
struct arg_lit *mprofile;
|
struct arg_file *load_file;
|
struct arg_file *load_file;
|
struct arg_end *end;
|
struct arg_end *end;
|
|
|
void *argtab[11];
|
void *argtab[12];
|
int nerrors;
|
int nerrors;
|
|
|
/* Specify each argument, with fall back values */
|
/* Specify each argument, with fall back values */
|
vercop = arg_lit0 ("v", "version", "version and copyright notice");
|
vercop = arg_lit0 ("v", "version", "version and copyright notice");
|
help = arg_lit0 ("h", "help", "print this help message");
|
help = arg_lit0 ("h", "help", "print this help message");
|
Line 284... |
Line 288... |
srv = arg_int0 (NULL, "srv", "<n>", "port number (default random)");
|
srv = arg_int0 (NULL, "srv", "<n>", "port number (default random)");
|
srv->ival[0] = rand () % (65536 - 49152) + 49152;
|
srv->ival[0] = rand () % (65536 - 49152) + 49152;
|
srv->hdr.flag |= ARG_HASOPTVALUE;
|
srv->hdr.flag |= ARG_HASOPTVALUE;
|
dbg = arg_str0 ("d", "debug-config", "<str>", "Debug config string");
|
dbg = arg_str0 ("d", "debug-config", "<str>", "Debug config string");
|
command = arg_lit0 ("i", "interactive", "launch interactive prompt");
|
command = arg_lit0 ("i", "interactive", "launch interactive prompt");
|
|
strict_npc = arg_lit0 (NULL, "strict-npc", "setting NPC flushes pipeline");
|
profile = arg_lit0 (NULL, "enable-profile", "enable profiling");
|
profile = arg_lit0 (NULL, "enable-profile", "enable profiling");
|
mprofile = arg_lit0 (NULL, "enable-mprofile", "enable memory profiling");
|
mprofile = arg_lit0 (NULL, "enable-mprofile", "enable memory profiling");
|
load_file = arg_file0 (NULL, NULL, "<file>", "OR32 executable");
|
load_file = arg_file0 (NULL, NULL, "<file>", "OR32 executable");
|
end = arg_end (20);
|
end = arg_end (20);
|
|
|
Line 295... |
Line 300... |
argtab[0] = vercop;
|
argtab[0] = vercop;
|
argtab[1] = help;
|
argtab[1] = help;
|
argtab[2] = cfg_file;
|
argtab[2] = cfg_file;
|
argtab[3] = nosrv;
|
argtab[3] = nosrv;
|
argtab[4] = srv;
|
argtab[4] = srv;
|
argtab[5] = dbg, argtab[6] = command;
|
argtab[ 5] = dbg;
|
argtab[7] = profile;
|
argtab[ 6] = command;
|
argtab[8] = mprofile;
|
argtab[ 7] = strict_npc;
|
argtab[9] = load_file;
|
argtab[ 8] = profile;
|
argtab[10] = end;
|
argtab[ 9] = mprofile;
|
|
argtab[10] = load_file;
|
|
argtab[11] = end;
|
|
|
/* Parse */
|
/* Parse */
|
nerrors = arg_parse (argc, argv, argtab);
|
nerrors = arg_parse (argc, argv, argtab);
|
|
|
/* Special case here is if help or version is specified, we ignore any other
|
/* Special case here is if help or version is specified, we ignore any other
|
Line 378... |
Line 385... |
}
|
}
|
|
|
/* Interactive operation */
|
/* Interactive operation */
|
runtime.sim.iprompt = command->count;
|
runtime.sim.iprompt = command->count;
|
|
|
|
/* Request for strict NPC behavior (flush the pipeline on change) */
|
|
config.sim.strict_npc = strict_npc->count;
|
|
|
/* Profiling requests */
|
/* Profiling requests */
|
config.sim.profile = profile->count;
|
config.sim.profile = profile->count;
|
config.sim.mprofile = mprofile->count;
|
config.sim.mprofile = mprofile->count;
|
|
|
/* Executable file */
|
/* Executable file */
|