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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [or1ksim/] [toplevel-support.c] - Diff between revs 1748 and 1751

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

Rev 1748 Rev 1751
Line 48... Line 48...
#include "labels.h"
#include "labels.h"
#include "stats.h"
#include "stats.h"
#include "opcode/or32.h"
#include "opcode/or32.h"
#include "parse.h"
#include "parse.h"
#include "gdbcomm.h"
#include "gdbcomm.h"
 
#include "rsp-server.h"
#include "vapi.h"
#include "vapi.h"
#include "abstract.h"
#include "abstract.h"
#include "mc.h"
#include "mc.h"
 
#include "except.h"
 
 
 
 
/*! Struct for list of reset hooks */
/*! Struct for list of reset hooks */
struct sim_reset_hook
struct sim_reset_hook
{
{
Line 283... Line 285...
                   runtime.sim.filename);
                   runtime.sim.filename);
          exit (1);
          exit (1);
        }
        }
    }
    }
 
 
  /* Disable gdb debugging, if debug unit is not available.  */
  /* Disable GDB debugging, if debug unit is not available.  */
  if (config.debug.gdb_enabled && !config.debug.enabled)
  if ((config.debug.gdb_enabled || config.debug.rsp_enabled) &&
 
      !config.debug.enabled)
    {
    {
      config.debug.gdb_enabled = 0;
      config.debug.gdb_enabled = 0;
 
      config.debug.rsp_enabled = 0;
 
 
      if (config.sim.verbose)
      if (config.sim.verbose)
        {
        {
          fprintf (stderr, "WARNING: sim_init: Debug module not enabled, "
          fprintf (stderr, "WARNING: sim_init: Debug module not enabled, "
                   "cannot start GDB\n");
                   "cannot start remote service to GDB\n");
        }
        }
    }
    }
 
 
  if (config.debug.gdb_enabled)
  /* Start either RSP or legacy GDB debugging service */
 
  if (config.debug.rsp_enabled)
 
    {
 
      rsp_init ();
 
 
 
      /* RSP always starts stalled as though we have just reset the
 
         processor. */
 
      rsp_exception (EXCEPT_TRAP);
 
      set_stall_state (1);
 
    }
 
  else if (config.debug.gdb_enabled)
    {
    {
      gdbcomm_init ();
      gdbcomm_init ();
    }
    }
 
 
  /* Enable dependency stats, if we want to do history analisis */
  /* Enable dependency stats, if we want to do history analisis */
Line 349... Line 364...
            }
            }
          PRINTF ("\n");
          PRINTF ("\n");
        }
        }
      PRINTF ("All devices connected\n");
      PRINTF ("All devices connected\n");
    }
    }
 
 
  /* simulator is initialized */
 
  runtime.sim.init = 0;
 
 
 
}       /* sim_init() */
}       /* sim_init() */
 
 
 
 
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/*!Clean up
/*!Clean up

powered by: WebSVN 2.1.0

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