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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [sim/] [or32/] [or32sim.h] - Diff between revs 157 and 225

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

Rev 157 Rev 225
Line 26... Line 26...
   The code tries to follow the GDB coding style.
   The code tries to follow the GDB coding style.
 
 
   Commenting is Doxygen compatible.                                         */
   Commenting is Doxygen compatible.                                         */
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
 
 
/*! GDB signal indiating breakpoint hit */
/* GDB signal numbers */
#define TARGET_SIGNAL_TRAP  5
#define TARGET_SIGNAL_NONE  0           /*!< No signal */
 
#define TARGET_SIGNAL_TRAP  5           /*!< Breakpoint hit */
 
 
/*! Number of registers */
/*! Number of registers */
#define  OR32_MAX_GPRS  32
#define  OR32_MAX_GPRS  32
 
 
/* Particular registers */
/* Particular registers */
#define OR32_FIRST_ARG_REGNUM  3                        /*!< First arg reg */
#define OR32_FIRST_ARG_REGNUM  3                        /*!< First arg reg */
#define OR32_PPC_REGNUM        (OR32_MAX_GPRS + 0)      /*!< Previous PC */
#define OR32_PPC_REGNUM        (OR32_MAX_GPRS + 0)      /*!< Previous PC */
#define OR32_NPC_REGNUM        (OR32_MAX_GPRS + 1)      /*!< Next PC */
#define OR32_NPC_REGNUM        (OR32_MAX_GPRS + 1)      /*!< Next PC */
#define OR32_SR_REGNUM         (OR32_MAX_GPRS + 2)      /*!< Supervision Reg */
#define OR32_SR_REGNUM         (OR32_MAX_GPRS + 2)      /*!< Supervision Reg */
 
 
 
/* Debug SPRs */
 
#define OR32_SPR_NPC    0x0010          /*!< Next Program Counter */
 
#define OR32_SPR_SR     0x0011          /*!< Supervision Register */
 
#define OR32_SPR_PPC    0x0012          /*!< Previous Program Counter */
 
 
 
#define OR32_SPR_DMR1   0x3010          /*!< Debug Mode Register 1 */
 
#define OR32_SPR_DMR2   0x3011          /*!< Debug Mode Register 2 */
 
#define OR32_SPR_DSR    0x3014          /*!< Debug Stop Register */
 
#define OR32_SPR_DRR    0x3015          /*!< Debug Reason Register */
 
 
 
/* Debug SPR bit fields */
 
#define OR32_SPR_DMR1_ST   0x00400000   /*!< Single-step trace*/
 
#define OR32_SPR_DMR2_WGB  0x003ff000   /*!< Watchpoints which breakpoint */
 
#define OR32_SPR_DSR_TE    0x00002000   /*!< Trap exception bit */
 
 
 
/* OR1K exception vector addresses */
 
#define OR32_RESET_EXCEPTION  0x100     /*!< Reset exception vector */
 
 
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
/*!A structure to hold the state of a simulation instance.
/*!A structure to hold the state of a simulation instance.
 
 
   This is the typedef SIM_DESC.
   This is the typedef SIM_DESC.
 
 
   The entries are
   The entries are
   - the socket descriptor for reading/writing from/to the model process
   - A flag which is true if we are used for debug rather than standalone (i.e
   - a flag which is true if we are used for debug rather than standalone
     we were opened with type SIM_OPEN_DEBUG)
   - the callback function supplied to the sim_open () function
   - The callback function supplied to the sim_open () function
   - this simulator's name (argv[0] supplied to sim_open ()
   - This simulator's name (argv[0] supplied to sim_open ()
   - the PID of the child process running the model (0 if we are the child)  */
   - A flag to indicate the simulator has been opened.
 
   - The last reason the simulator stopped
 
   - The signal associated with the last stop, or the exit code from the last
 
     exit.
 
   - The entry point to the program if available, otherwise the reset
 
     exception vector address.
 
   - The NPC with which to resume. So as not to destroy the pipeline, this is
 
     only written immediately before unstalling.                             */
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
struct sim_state
struct sim_state
{
{
  int                          sockd;
 
  int                          is_debug;
  int                          is_debug;
  struct host_callback_struct *callback;
  struct host_callback_struct *callback;
  char                        *myname;
  char                        *myname;
  int                          pid;
  int                          sim_open;
 
  enum sim_stop                last_reason;
 
  unsigned int                 last_rc;
 
  unsigned long int            entry_point;
 
  unsigned long int            resume_npc;
 
 
};
};
 
 
 
 
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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