dbp_sim.h 897 Bytes
#ifndef __DBP_SIM_H__
#define __DBP_SIM_H__

/*************************************************************************
 *
 *  File: dbp_sim.h
 *
 *  Simulator debug port
 */

#define PKT_DATA_WORD  8 

typedef struct _IpcPktStruct {
        unsigned int    length;
        unsigned int    code;
        unsigned int    size;
        unsigned int    address;
        unsigned int    data[PKT_DATA_WORD<<1];
} IpcPkt;

#define BD_JTAG_WRITE             0x80004400
#define BD_JTAG_READ              0x80004401
#define BD_JTAG_ENABLE            0x80004402
#define OPEN_ALIVE_SOCKET         0x80004000
#define CLOSE_ALIVE_SOCKET        0x80004001
#define REQ_STALL                 5
#define	RSP_OK                    1

int sim_jtag_write(int fd, int data);
int sim_jtag_read(int fd);
int sim_jtag_stall(int fd, int cycles);
int open_simulator_sock();
int keep_alive_sock(int fd, int alive);

#endif