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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [jtag/] [jp2.h] - Diff between revs 1274 and 1380

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

Rev 1274 Rev 1380
Line 1... Line 1...
#ifndef _JP2_H_
#ifndef _JP2_H_
#define _JP2_H_
#define _JP2_H_
 
 
//#define DEBUG 1
 
//#define DEBUG2 1
 
 
 
#define Boolean int
#define Boolean int
#define false 0
#define false 0
#define true 1
#define true 1
 
 
#define GDB_IN "../sim/rtl_sim/run/gdb_in.dat"
 
#define GDB_OUT "../sim/rtl_sim/run/gdb_out.dat"
 
 
 
#ifdef DEBUG
 
#define debug printf
 
#else
 
#define debug
 
#endif
 
 
 
#ifdef DEBUG2
 
#define debug2 printf
 
#else
 
#define debug2
 
#endif
 
 
 
#if (DEBUG) || (DEBUG2)
 
#define flush_debug() fflush(stdout)
 
#else
 
#define flush_debug()
 
#endif
 
 
 
#define LPT_BASE (base)
 
#define LPT_READ (LPT_BASE+1)
 
#define LPT_WRITE LPT_BASE
 
#if RTL_SIM
 
#define TCLK_BIT (0x01) /* D0, pin #2 */
 
#define TRST_BIT (0x02) /* D1, pin #3 */
 
#define TDI_BIT  (0x04) /* D2, pin #4 */
 
#define TMS_BIT  (0x08) /* D0, pin #5 */
 
#define TDO_BIT  (0x20) /* PE, pin #12 */
 
#define TMS      (0x02)
 
#define TDI      (0x01)
 
#else
 
#ifdef XILINX_PARALLEL_CABLE_III
 
#define TCLK_BIT (0x02) /* D1 pin 3 */
 
#define TRST_BIT (0x10) /* Not used */
 
#define TDI_BIT  (0x01) /* D0 pin 2 */
 
#define TMS_BIT  (0x04) /* D2 pin 4 */
 
#define TDO_BIT  (0x10) /* S6 pin 13*/
 
#define TMS      (0x02)
 
#define TDI      (0x01)
 
#else
 
#ifdef XESS_PARALLEL_CABLE
 
#define TCLK_BIT (0x04) /* D2 pin 4 */
 
#define TRST_BIT (0x08) /* D3 pin 5 */
 
#define TDI_BIT  (0x10) /* D4 pin 6 */
 
#define TMS_BIT  (0x20) /* D5 pin 7 */
 
#define TDO_BIT  (0x20) /* S5 pin 12*/
 
#define TMS      (0x02)
 
#define TDI      (0x01)
 
#endif
 
#endif
 
#endif
 
 
 
#ifdef RTL_SIM
 
# define JTAG_WAIT() usleep(1000)
 
# define JTAG_RETRY_WAIT() usleep (1000)
 
#else
 
# define JTAG_WAIT() {      \
 
  int i;        \
 
  volatile int j;   \
 
  for(i = 0; i < 1000; i++) \
 
    j = i;      \
 
  }
 
# define JTAG_RETRY_WAIT() usleep (1000)
 
#endif
 
 
 
/* Selects crc trailer size in bits. Currently supported: 8 */
/* Selects crc trailer size in bits. Currently supported: 8 */
#define CRC_SIZE (8)
#define CRC_SIZE (8)
 
 
/* Scan chain size in bits.  */
/* Scan chain size in bits.  */
#define SC_SIZE (4)
#define SC_SIZE (4)

powered by: WebSVN 2.1.0

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