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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [jtag/] [jp2.h] - Blame information for rev 1773

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1246 markom
#ifndef _JP2_H_
2
#define _JP2_H_
3
 
4
#define Boolean int
5
#define false 0
6
#define true 1
7
 
8
/* Selects crc trailer size in bits. Currently supported: 8 */
9
#define CRC_SIZE (8)
10
 
11
/* Scan chain size in bits.  */
12
#define SC_SIZE (4)
13
 
14
#ifndef ULONGEST
15
#define ULONGEST unsigned long
16
#endif
17
 
18
extern unsigned int serverPort;
19
extern unsigned int server_fd;
20
extern void HandleServerSocket(Boolean block);
21
 
22
extern int err;
23
extern void JTAGRequest(void);
24
extern void GDBRequest(void);
25
 
26
/* read a word from wishbone */
27
int dbg_wb_read32(unsigned long adr, unsigned long *data);
28
 
29
/* write a word to wishbone */
30
int dbg_wb_write32(unsigned long adr, unsigned long data);
31
 
32
/* read a block from wishbone */
33 1259 markom
int dbg_wb_read_block32(unsigned long adr, unsigned long *data, int len);
34 1246 markom
 
35
/* write a block to wishbone */
36
int dbg_wb_write_block32(unsigned long adr, unsigned long *data, int len);
37
 
38
/* read a register from cpu */
39 1274 markom
int dbg_cpu0_read(unsigned long adr, unsigned long *data);
40 1246 markom
 
41
/* read a register from cpu module */
42 1274 markom
int dbg_cpu0_read_ctrl(unsigned long adr, unsigned char *data);
43 1246 markom
 
44
/* write a cpu register */
45 1274 markom
int dbg_cpu0_write(unsigned long adr, unsigned long data);
46 1246 markom
 
47
/* write a cpu module register */
48 1274 markom
int dbg_cpu0_write_ctrl(unsigned long adr, unsigned char data);
49 1246 markom
 
50
 
51 1274 markom
#define DC_SIZE           4
52 1246 markom
#define DC_STATUS_SIZE    4
53
 
54 1274 markom
#define DC_WISHBONE       0
55
#define DC_CPU0           1
56
#define DC_CPU1           2
57 1246 markom
 
58 1274 markom
#define DI_GO          0
59
#define DI_READ_CMD    1
60
#define DI_WRITE_CMD   2
61
#define DI_READ_CTRL   3
62
#define DI_WRITE_CTRL  4
63 1246 markom
 
64
#define DBG_CRC_SIZE      32
65
#define DBG_CRC_POLY      0x04c11db7
66
 
67
#define DBG_ERR_OK        0
68 1274 markom
#define DBG_ERR_CRC       8
69 1246 markom
 
70
#define NUM_SOFT_RETRIES  3
71
#define NUM_HARD_RETRIES  3
72
#define NUM_ACCESS_RETRIES 10
73
 
74 1259 markom
#define CHECK(x) check(__FILE__, __LINE__, (x))
75 1246 markom
#endif /* _JP2_H_ */
76
 

powered by: WebSVN 2.1.0

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