Line 59... |
Line 59... |
|
|
struct config_section *cur_section;
|
struct config_section *cur_section;
|
|
|
struct config_section *sections = NULL;
|
struct config_section *sections = NULL;
|
|
|
|
extern char *or1ksim_ver;
|
|
|
void init_defconfig(void)
|
void init_defconfig(void)
|
{
|
{
|
memset(&config, 0, sizeof(config));
|
memset(&config, 0, sizeof(config));
|
/* Sim */
|
/* Sim */
|
config.sim.exe_log = 0;
|
config.sim.exe_log = 0;
|
Line 157... |
Line 159... |
/* VAPI */
|
/* VAPI */
|
runtime.vapi.vapi_file = NULL;
|
runtime.vapi.vapi_file = NULL;
|
runtime.vapi.enabled = 0;
|
runtime.vapi.enabled = 0;
|
}
|
}
|
|
|
|
static void version(void)
|
|
{
|
|
PRINTF ("\n");
|
|
PRINTF ("OpenRISC 1000 (OR32) Architectural Simulator, version %s\n",
|
|
or1ksim_ver);
|
|
PRINTF ("Copyright (C) 1999 Damjan Lampret, lampret@opencores.org\n");
|
|
PRINTF ("Copyright (C) 2000 Damjan Lampret, lampret@opencores.org\n");
|
|
PRINTF (" Jimmy Chen-Min Chen, jimmy@ee.nctu.edu.tw\n");
|
|
PRINTF (" Johan Rydberg, johan.rydberg@insight.se\n");
|
|
PRINTF (" Marko Mlinar, markom@opencores.org\n");
|
|
PRINTF ("Copyright (C) 2001 Simon Srot, simons@opencores.org\n");
|
|
PRINTF (" Marko Mlinar, markom@opencores.org\n");
|
|
PRINTF ("Copyright (C) 2002 Marko Mlinar, markom@opencores.org\n");
|
|
PRINTF (" Simon Srot, simons@opencores.org\n");
|
|
PRINTF ("Visit http://www.opencores.org for more information about ");
|
|
PRINTF ("OpenRISC 1000 and\nother open source cores.\n\n");
|
|
PRINTF ("This software comes with ABSOLUTELY NO WARRANTY; for ");
|
|
PRINTF ("details see COPYING.\nThis is free software, and you ");
|
|
PRINTF ("are welcome to redistribute it under certain\nconditions; ");
|
|
PRINTF ("for details see COPYING.\n");
|
|
}
|
|
|
int parse_args(int argc, char *argv[])
|
int parse_args(int argc, char *argv[])
|
{
|
{
|
argv++; argc--;
|
argv++; argc--;
|
while (argc) {
|
while (argc) {
|
if (strcmp(*argv, "profiler") == 0) {
|
if (strcmp(*argv, "profiler") == 0) {
|
Line 608... |
Line 632... |
char ctmp[STR_SIZE];
|
char ctmp[STR_SIZE];
|
int local = 1;
|
int local = 1;
|
cur_section = NULL;
|
cur_section = NULL;
|
|
|
sprintf(ctmp, "%s/.or1k/%s", home, filename);
|
sprintf(ctmp, "%s/.or1k/%s", home, filename);
|
if ((f = fopen (filename, "rt")) != NULL
|
if ((f = fopen (filename, "rt")) || (home && (f = fopen (ctmp, "rt")))) {
|
|| home != NULL && !(local = 0) && (f = fopen (ctmp, "rt")) != NULL) {
|
|
if (config.sim.verbose)
|
if (config.sim.verbose)
|
PRINTF ("Reading script file from '%s'...\n", local ? filename : ctmp);
|
PRINTF ("Reading script file from '%s'...\n", local ? filename : ctmp);
|
strcpy (runtime.sim.script_fn, local ? filename : ctmp);
|
strcpy (runtime.sim.script_fn, local ? filename : ctmp);
|
|
|
while (!feof(f)) {
|
while (!feof(f)) {
|