OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [or1ksim/] [sim-cmd.c] - Diff between revs 494 and 552

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

Rev 494 Rev 552
Line 304... Line 304...
    {
    {
      PRINTF ("pr <register> <value>\n");
      PRINTF ("pr <register> <value>\n");
      return 0;
      return 0;
    }
    }
  setsim_reg (strtoul (argv[1], NULL, 0), strtoul (argv[2], NULL, 0));
  setsim_reg (strtoul (argv[1], NULL, 0), strtoul (argv[2], NULL, 0));
#if DYNAMIC_EXECUTION
 
  PRINTF
 
    ("WARNING: Patching registers may not work with the dynamic execution model\n");
 
#endif
 
  return 0;
  return 0;
}
}
 
 
static int
static int
sim_cmd_pc (int argc, char **argv)      /* patch PC */
sim_cmd_pc (int argc, char **argv)      /* patch PC */
{
{
#if DYNAMIC_EXECUTION
 
  PRINTF ("Patching the pc in the dynamic execution model doesn't work\n");
 
#else
 
  if (argc != 2)
  if (argc != 2)
    {
    {
      PRINTF ("pc <value>\n");
      PRINTF ("pc <value>\n");
      return 0;
      return 0;
    }
    }
 
 
  cpu_state.pc = strtoul (argv[1], NULL, 0);
  cpu_state.pc = strtoul (argv[1], NULL, 0);
  pcnext = cpu_state.pc + 4;
  pcnext = cpu_state.pc + 4;
#endif
 
  return 0;
  return 0;
}
}
 
 
static int
static int
sim_cmd_breaks (int argc, char **argv)  /* print breakpoints */
sim_cmd_breaks (int argc, char **argv)  /* print breakpoints */
Line 339... Line 331...
}
}
 
 
static int
static int
sim_cmd_break (int argc, char **argv)   /* set/clear breakpoint */
sim_cmd_break (int argc, char **argv)   /* set/clear breakpoint */
{
{
#if DYNAMIC_EXECUTION
 
  PRINTF
 
    ("Setting simulator breakpoints is not support with the recompiler\n");
 
  return 0;
 
#else
 
  char *p;
  char *p;
  oraddr_t addr;
  oraddr_t addr;
  struct label_entry *l;
  struct label_entry *l;
 
 
  if (argc != 2)
  if (argc != 2)
Line 366... Line 353...
        PRINTF ("Label `%s' does not exist\n", argv[1]);
        PRINTF ("Label `%s' does not exist\n", argv[1]);
    }
    }
  else
  else
    set_insnbrkpoint (addr);
    set_insnbrkpoint (addr);
  return 0;
  return 0;
#endif
 
}
}
 
 
static int
static int
sim_cmd_r (int argc, char **argv)       /* dump regs */
sim_cmd_r (int argc, char **argv)       /* dump regs */
{
{
Line 497... Line 483...
}
}
 
 
static int
static int
sim_cmd_stall (int argc, char **argv)   /* Added by CZ 210801 */
sim_cmd_stall (int argc, char **argv)   /* Added by CZ 210801 */
{
{
#if DYNAMIC_EXECUTION
 
  PRINTF ("Can't stall the cpu with the dynamic recompiler\n");
 
  return 0;
 
#else
 
  set_stall_state (1);
  set_stall_state (1);
  runtime.sim.iprompt = 0;
  runtime.sim.iprompt = 0;
  runtime.sim.hush = 1;
  runtime.sim.hush = 1;
  return 1;
  return 1;
#endif
 
}
}
 
 
static int
static int
sim_cmd_unstall (int argc, char **argv) /* Added by CZ 210801 */
sim_cmd_unstall (int argc, char **argv) /* Added by CZ 210801 */
{
{
#if DYNAMIC_EXECUTION
 
  PRINTF ("Can't unstall the cpu with the dynamic recompiler\n");
 
  return 0;
 
#else
 
  set_stall_state (0);
  set_stall_state (0);
  return 0;
  return 0;
#endif
 
}
}
 
 
static int
static int
sim_cmd_stats (int argc, char **argv)   /* stats */
sim_cmd_stats (int argc, char **argv)   /* stats */
{
{

powered by: WebSVN 2.1.0

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