Line 43... |
Line 43... |
#include "sim-config.h"
|
#include "sim-config.h"
|
|
|
#include "coff.h"
|
#include "coff.h"
|
|
|
/* CVS revision number. */
|
/* CVS revision number. */
|
const char rcsrev[] = "$Revision: 1.12 $";
|
const char rcsrev[] = "$Revision: 1.13 $";
|
|
|
/* Continuos run versus single step tracing switch. */
|
/* Continuos run versus single step tracing switch. */
|
int cont_run;
|
int cont_run;
|
|
|
/* History of execution */
|
/* History of execution */
|
Line 169... |
Line 169... |
printf("reset - simulator reset\n");
|
printf("reset - simulator reset\n");
|
printf("hist - execution history\n");
|
printf("hist - execution history\n");
|
printf("stats <num|clear> - execution statistics num or clear it.\n");
|
printf("stats <num|clear> - execution statistics num or clear it.\n");
|
printf("info - configuration info (caches etc.)\n");
|
printf("info - configuration info (caches etc.)\n");
|
printf("dv <fromaddr> [<toaddr>] [<modname>] - dumps memory as verilog (use redirect)\n");
|
printf("dv <fromaddr> [<toaddr>] [<modname>] - dumps memory as verilog (use redirect)\n");
|
|
printf("dh <fromaddr> [<toaddr>] - dumps memory as hex code (use redirect)\n");
|
printf("<cmd> > <filename> - redirect simulator stdout to <filename> (and not emulated printf)\n");
|
printf("<cmd> > <filename> - redirect simulator stdout to <filename> (and not emulated printf)\n");
|
printf("debug - toggles simulator debug mode\n");
|
printf("debug - toggles simulator debug mode\n");
|
printf("help - available commands (this list)\n");
|
printf("help - available commands (this list)\n");
|
}
|
}
|
|
|
Line 305... |
Line 306... |
if (!strlen(item4))
|
if (!strlen(item4))
|
strcpy(item4, "or1k_mem");
|
strcpy(item4, "or1k_mem");
|
dumpverilog(item4, from, to);
|
dumpverilog(item4, from, to);
|
printf("\n");
|
printf("\n");
|
} else
|
} else
|
|
if (strcmp(item1, "dh") == 0) {/* dump memory as hex*/
|
|
char item2[20];
|
|
char item3[20];
|
|
static int from = 0, to = 0;
|
|
|
|
strtoken(linestr, item2, 2);
|
|
strtoken(linestr, item3, 3);
|
|
|
|
if (strlen(item2)) {
|
|
if (item2[0] == '_')
|
|
from = eval_label(item2);
|
|
else
|
|
from = strtoul(item2, NULL, 0);
|
|
to = from + 0x40;
|
|
}
|
|
if (strlen(item3))
|
|
to = strtoul(item3, NULL, 0);
|
|
dumphex(from, to);
|
|
printf("\n");
|
|
} else
|
if (strcmp(item1, "pm") == 0) { /* patch memory */
|
if (strcmp(item1, "pm") == 0) { /* patch memory */
|
char item2[20];
|
char item2[20];
|
char item3[20];
|
char item3[20];
|
static int addr = 0;
|
static int addr = 0;
|
|
|
Line 331... |
Line 352... |
} else
|
} else
|
if (strcmp(item1, "pc") == 0) { /* patch PC */
|
if (strcmp(item1, "pc") == 0) { /* patch PC */
|
char item2[20];
|
char item2[20];
|
|
|
strtoken(linestr, item2, 2);
|
strtoken(linestr, item2, 2);
|
pctemp = strtoul(item2, NULL, 0);
|
pcnext = strtoul(item2, NULL, 0);
|
} else
|
} else
|
if (strcmp(item1, "break") == 0) { /* set/clear breakpoint */
|
if (strcmp(item1, "break") == 0) { /* set/clear breakpoint */
|
char item2[20];
|
char item2[20];
|
|
|
strtoken(linestr, item2, 2);
|
strtoken(linestr, item2, 2);
|