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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [or1ksim/] [debug/] [gdb.h] - Diff between revs 1350 and 1748

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

Rev 1350 Rev 1748
Line 1... Line 1...
/* config.h -- Simulator configuration header file
/* config.h -- Simulator configuration header file
 
 
   Copyright (C) 2001 Chris Ziomkowski, chris@asics.ws
   Copyright (C) 2001 Chris Ziomkowski, chris@asics.ws
 
   Copyright (C) 2008 Embecosm Limited
 
 
 
   Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
 
 
 
   This file is part of Or1ksim, the OpenRISC 1000 Architectural Simulator.
 
 
   This file is part of OpenRISC 1000 Architectural Simulator.
   This program is free software; you can redistribute it and/or modify it
 
   under the terms of the GNU General Public License as published by the Free
 
   Software Foundation; either version 3 of the License, or (at your option)
 
   any later version.
 
 
   This program is free software; you can redistribute it and/or modify
   This program is distributed in the hope that it will be useful, but WITHOUT
   it under the terms of the GNU General Public License as published by
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   the Free Software Foundation; either version 2 of the License, or
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
   (at your option) any later version.
   more details.
 
 
   This program is distributed in the hope that it will be useful,
   You should have received a copy of the GNU General Public License along
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   with this program.  If not, see <http://www.gnu.org/licenses/>.  */
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
   GNU General Public License for more details.
 
 
 
   You should have received a copy of the GNU General Public License
/* This program is commented throughout in a fashion suitable for processing
   along with this program; if not, write to the Free Software
   with Doxygen. */
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 
 
 
#ifndef GDB_H
/* The data in here is copied from or1k-jtag.h in the GDB 6.8 port for
#define GDB_H
   OpenRISC 1000 */
 
 
#include <sys/types.h>
 
 
 
#define DEBUG_SLOWDOWN (1)
#ifndef GDB__H
 
#define GDB__H
 
 
enum enum_errors  /* modified <chris@asics.ws> CZ 24/05/01 */
/*! Error codes for the OpenRISC 1000 JTAG debugging protocol */
 
enum or1k_jtag_errors  /* modified <chris@asics.ws> CZ 24/05/01 */
{
{
  /* Codes > 0 are for system errors */
  /* Codes > 0 are for system errors */
 
 
  ERR_NONE = 0,
  ERR_NONE = 0,
  ERR_CRC = -1,
  ERR_CRC = -1,
Line 38... Line 45...
  JTAG_PROXY_COMMAND_NOT_IMPLEMENTED = -7,
  JTAG_PROXY_COMMAND_NOT_IMPLEMENTED = -7,
  JTAG_PROXY_INVALID_CHAIN = -8,
  JTAG_PROXY_INVALID_CHAIN = -8,
  JTAG_PROXY_INVALID_ADDRESS = -9,
  JTAG_PROXY_INVALID_ADDRESS = -9,
  JTAG_PROXY_ACCESS_EXCEPTION = -10, /* Write to ROM */
  JTAG_PROXY_ACCESS_EXCEPTION = -10, /* Write to ROM */
  JTAG_PROXY_INVALID_LENGTH = -11,
  JTAG_PROXY_INVALID_LENGTH = -11,
  JTAG_PROXY_OUT_OF_MEMORY = -12,
  JTAG_PROXY_OUT_OF_MEMORY           = -12
};
};
 
 
/* This is repeated from gdb tm-or1k.h There needs to be
/*! The OR1K JTAG proxy protocol commands. */
   a better mechanism for tracking this, but I don't see
enum or1k_jtag_proxy_protocol_commands {
   an easy way to share files between modules. */
  OR1K_JTAG_COMMAND_READ        = 1,
 
  OR1K_JTAG_COMMAND_WRITE       = 2,
typedef enum {
  OR1K_JTAG_COMMAND_READ_BLOCK  = 3,
  JTAG_COMMAND_READ = 1,
  OR1K_JTAG_COMMAND_WRITE_BLOCK = 4,
  JTAG_COMMAND_WRITE = 2,
  OR1K_JTAG_COMMAND_CHAIN       = 5,
  JTAG_COMMAND_BLOCK_READ = 3,
};
  JTAG_COMMAND_BLOCK_WRITE = 4,
 
  JTAG_COMMAND_CHAIN = 5,
/* Each transmit structure must begin with an integer which specifies the type
} JTAG_proxy_protocol_commands;
   of command. Information after this is variable. Make sure to have all
 
   information aligned properly. If we stick with 32 bit integers, it should
/* Each transmit structure must begin with an integer
   be portable onto every platform. These structures will be transmitted
   which specifies the type of command. Information
   across the network in network byte order. */
   after this is variable. Make sure to have all information
 
   aligned properly. If we stick with 32 bit integers, it
 
   should be portable onto every platform. These structures
 
   will be transmitted across the network in network byte
 
   order.
 
*/
 
 
 
typedef struct {
struct jtr_read_message {
  uint32_t command;
  uint32_t command;
  uint32_t length;
  uint32_t length;
  uint32_t address;
  uint32_t address;
  uint32_t data_H;
};
  uint32_t data_L;
 
} JTAGProxyWriteMessage;
 
 
 
typedef struct {
struct jtr_write_message {
  uint32_t command;
  uint32_t command;
  uint32_t length;
  uint32_t length;
  uint32_t address;
  uint32_t address;
} JTAGProxyReadMessage;
  uint32_t  data_h;
 
  uint32_t  data_l;
 
};
 
 
typedef struct {
struct jtr_read_block_message {
  uint32_t command;
  uint32_t command;
  uint32_t length;
  uint32_t length;
  uint32_t address;
  uint32_t address;
  int32_t  nRegisters;
  int32_t   num_regs;
  uint32_t data[1];
};
} JTAGProxyBlockWriteMessage;
 
 
 
typedef struct {
struct jtr_write_block_message {
  uint32_t command;
  uint32_t command;
  uint32_t length;
  uint32_t length;
  uint32_t address;
  uint32_t address;
  int32_t  nRegisters;
  int32_t   num_regs;
} JTAGProxyBlockReadMessage;
  uint32_t  data[1];
 
};
 
 
typedef struct {
struct jtr_chain_message {
  uint32_t command;
  uint32_t command;
  uint32_t length;
  uint32_t length;
  uint32_t chain;
  uint32_t chain;
} JTAGProxyChainMessage;
};
 
 
/* The responses are messages specific, however convention
/* The responses are messages specific, however convention states the first
   states the first word should be an error code. Again,
   word should be an error code. Again, sticking with 32 bit integers should
   sticking with 32 bit integers should provide maximum
   provide maximum portability. */
   portability. */
 
 
 
typedef struct {
struct jtr_failure_response {
  int32_t status;
  int32_t status;
} JTAGProxyWriteResponse;
};
 
 
typedef struct {
struct jtr_read_response {
  int32_t status;
  int32_t status;
  uint32_t data_H;
  uint32_t  data_h;
  uint32_t data_L;
  uint32_t  data_l;
} JTAGProxyReadResponse;
};
 
 
typedef struct {
struct jtr_write_response {
  int32_t status;
  int32_t status;
} JTAGProxyBlockWriteResponse;
};
 
 
typedef struct {
struct jtr_read_block_response {
  int32_t status;
  int32_t status;
  int32_t nRegisters;
  int32_t   num_regs;
  uint32_t data[1];
  uint32_t data[1];
  /* uint32_t data[nRegisters-1] still unread */
};
} JTAGProxyBlockReadResponse;
 
 
 
typedef struct {
struct jtr_write_block_response {
  int32_t status;
  int32_t status;
} JTAGProxyChainResponse;
};
 
 
 
struct jtr_chain_response {
 
  int32_t  status;
 
};
 
 
 
 
#endif /* GDB_H */
#endif  /* GDB__H */
 
 
 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.