OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [stable_0_2_0_rc2/] [or1ksim/] [toplevel.c] - Diff between revs 46 and 54

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 46 Rev 54
Line 42... Line 42...
#include "execute.h"
#include "execute.h"
 
 
#include "coff.h"
#include "coff.h"
 
 
/* CVS revision number. */
/* CVS revision number. */
static const char rcsrev[] = "$Revision: 1.9 $";
const char rcsrev[] = "$Revision: 1.10 $";
 
 
/* 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 66... Line 66...
  "break",
  "break",
  "hist",
  "hist",
  "stats",
  "stats",
  "info",
  "info",
  "r",
  "r",
 
  "dv",
  0
  0
};
};
 
 
void debug(const char *format, ...)
void debug(const char *format, ...)
{
{
Line 155... Line 156...
        printf("break <addr>             - toggle breakpoint at address <addr>\n");
        printf("break <addr>             - toggle breakpoint at address <addr>\n");
        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("<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("help                     - available commands (this list)\n");
        printf("help                     - available commands (this list)\n");
}
}
 
 
void debugmem();
void debugmem();
Line 259... Line 261...
                        if (strlen(item3))
                        if (strlen(item3))
                                to = strtoul(item3, NULL, 0);
                                to = strtoul(item3, NULL, 0);
                        dumpmemory(from, to);
                        dumpmemory(from, to);
      printf("\n");
      printf("\n");
                } else
                } else
 
                if (strcmp(item1, "dv") == 0) {/* dump memory as verilog*/
 
                        char item2[20];
 
                        char item3[20];
 
                        char item4[20];
 
                        static int from = 0, to = 0;
 
 
 
                        strtoken(linestr, item2, 2);
 
                        strtoken(linestr, item3, 3);
 
                        strtoken(linestr, item4, 4);
 
 
 
                        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);
 
                        if (!strlen(item4))
 
                                strcpy(item4, "or1k_mem");
 
                        dumpverilog(item4, 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;
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.