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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [jtag/] [jp2.h] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1581 jcastillo
#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
int dbg_wb_read_block32(unsigned long adr, unsigned long *data, int len);
34
 
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
int dbg_cpu0_read(unsigned long adr, unsigned long *data);
40
 
41
/* read a register from cpu module */
42
int dbg_cpu0_read_ctrl(unsigned long adr, unsigned char *data);
43
 
44
/* write a cpu register */
45
int dbg_cpu0_write(unsigned long adr, unsigned long data);
46
 
47
/* write a cpu module register */
48
int dbg_cpu0_write_ctrl(unsigned long adr, unsigned char data);
49
 
50
 
51
#define DC_SIZE           4
52
#define DC_STATUS_SIZE    4
53
 
54
#define DC_WISHBONE       0
55
#define DC_CPU0           1
56
#define DC_CPU1           2
57
 
58
#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
 
64
#define DBG_CRC_SIZE      32
65
#define DBG_CRC_POLY      0x04c11db7
66
 
67
#define DBG_ERR_OK        0
68
#define DBG_ERR_CRC       8
69
 
70
#define NUM_SOFT_RETRIES  3
71
#define NUM_HARD_RETRIES  3
72
#define NUM_ACCESS_RETRIES 10
73
 
74
#define CHECK(x) check(__FILE__, __LINE__, (x))
75
#endif /* _JP2_H_ */
76
 

powered by: WebSVN 2.1.0

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