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 16 and 18

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

Rev 16 Rev 18
Line 39... Line 39...
#include "abstract.h"
#include "abstract.h"
#include "trace.h"
#include "trace.h"
#include "execute.h"
#include "execute.h"
 
 
/* CVS revision number. */
/* CVS revision number. */
static const char rcsrev[] = "$Revision: 1.4 $";
static const char rcsrev[] = "$Revision: 1.5 $";
 
 
/* 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 56... Line 56...
  "dm",
  "dm",
  "run",
  "run",
  "pr",
  "pr",
  "pm",
  "pm",
  "pc",
  "pc",
  "brk",
  "reset",
 
  "break",
  "hist",
  "hist",
  "stats",
  "stats",
  "info",
  "info",
  "r",
  "r",
  0
  0
Line 94... Line 95...
 
 
void
void
version()
version()
{
{
        printf ("\n");
        printf ("\n");
        printf ("OpenRISC 1000 Architectural Simulator, revision %s\n", rcsrev);
        printf ("OpenRISC 1000 (OR16+OR32) Architectural Simulator, %s\n", rcsrev);
        printf ("Copyright (C) 1999  Damjan Lampret, lampret@opencores.org\n");
        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, jimmy87@sunplus.com.tw\n");
 
        printf ("                   Johan Rydberg, johan.rydberg@insight.se\n");
        printf ("Visit http://www.opencores.org for more information about ");
        printf ("Visit http://www.opencores.org for more information about ");
        printf ("OpenRISC 1000 and\nother open source cores.\n\n");
        printf ("OpenRISC 1000 and\nother open source cores.\n\n");
        printf ("This software comes with ABSOLUTELY NO WARRANTY; for ");
        printf ("This software comes with ABSOLUTELY NO WARRANTY; for ");
        printf ("details see COPYING.\nThis is free software, and you ");
        printf ("details see COPYING.\nThis is free software, and you ");
        printf ("are welcome to redistribute it under certain\nconditions; ");
        printf ("are welcome to redistribute it under certain\nconditions; ");
Line 115... Line 119...
        printf("run <cycles> [<hush>]    - execute <cycles> instructions, no reg dump if hush\n");
        printf("run <cycles> [<hush>]    - execute <cycles> instructions, no reg dump if hush\n");
        printf("pr <r> <value>           - patch register <r> with <value>\n");
        printf("pr <r> <value>           - patch register <r> with <value>\n");
        printf("dm <fromaddr> [<toaddr>] - display memory from <fromaddr> to <toaddr>\n");
        printf("dm <fromaddr> [<toaddr>] - display memory from <fromaddr> to <toaddr>\n");
        printf("pm <addr> <value>        - patch memory location <addr> with <value>\n");
        printf("pm <addr> <value>        - patch memory location <addr> with <value>\n");
        printf("pc <value>               - patch PC register with <value>\n");
        printf("pc <value>               - patch PC register with <value>\n");
        printf("brk <addr>               - toggle breakpoint at address <addr>\n");
        printf("break <addr>             - toggle breakpoint at address <addr>\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("<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");
Line 256... Line 261...
                        set_insnbrkpoint(strtoul(item2, NULL, 0));
                        set_insnbrkpoint(strtoul(item2, NULL, 0));
                } else
                } else
                if (strcmp(item1, "r") == 0) {   /* dump regs */
                if (strcmp(item1, "r") == 0) {   /* dump regs */
                        dumpreg();
                        dumpreg();
                } else
                } else
 
                if (strcmp(item1, "reset") == 0) {       /* reset simulator */
 
                        reset();
 
                } else
                if (strcmp(item1, "hist") == 0) {        /* dump history */
                if (strcmp(item1, "hist") == 0) {        /* dump history */
                        int i;
                        int i;
                        for(i = HISTEXEC_LEN; i; i--)
                        for(i = HISTEXEC_LEN; i; i--)
                                dumpmemory(histexec[i - 1], histexec[i - 1] + 4);
                                dumpmemory(histexec[i - 1], histexec[i - 1] + 4);
                } else
                } else

powered by: WebSVN 2.1.0

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