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

Subversion Repositories adv_debug_sys

[/] [adv_debug_sys/] [tags/] [ADS_RELEASE_1_0_0/] [Software/] [adv_jtag_bridge/] [adv_debug_module.h] - Blame information for rev 45

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

Line No. Rev Author Line
1 4 nyawn
#ifndef _ADV_DEBUG_MODULE_H_
2
#define _ADV_DEBUG_MODULE_H_
3
 
4
// Contains opcodes, commands, and constants related to
5
// the Advanced Debug Unit hardware module
6
 
7
// Definitions for the top-level debug unit.  This really just consists
8
// of a single register, used to select the active debug module ("chain").
9
#define DBG_MODULE_SELECT_REG_SIZE 2
10
#define DBG_MAX_MODULES 4  // used to size an array
11
 
12
#define DC_WISHBONE 0
13
#define DC_CPU0     1
14
#define DC_CPU1     2
15
 
16
// The polynomial used to generate the CRC code
17
#define DBG_CRC_POLY 0xedb88320
18
 
19
 
20
// These are for the internal registers in the Wishbone module
21
// The first is the length of the index register,
22
// the indexes of the various registers are defined after that
23
#define DBG_WB_REG_SEL_LEN 1
24
#define DBG_WB_REG_ERROR 0
25
 
26
// Opcode definitions for the Wishbone module
27
#define DBG_WB_OPCODE_LEN   4
28
#define DBG_WB_CMD_NOP      0x0
29
#define DBG_WB_CMD_BWRITE8  0x1
30
#define DBG_WB_CMD_BWRITE16 0x2
31
#define DBG_WB_CMD_BWRITE32 0x3
32
#define DBG_WB_CMD_BREAD8   0x5
33
#define DBG_WB_CMD_BREAD16  0x6
34
#define DBG_WB_CMD_BREAD32  0x7
35
#define DBG_WB_CMD_IREG_WR  0x9  // This is both a select and a write
36
#define DBG_WB_CMD_IREG_SEL 0xd  // There is no 'read', the current register is always read.  Use a NOP to read.
37
 
38
 
39
// Internal register definitions for the CPU0 module
40
#define DBG_CPU0_REG_SEL_LEN 1
41
#define DBG_CPU0_REG_STATUS 0
42
 
43
// Opcode definitions for the first CPU module
44
#define DBG_CPU0_OPCODE_LEN   4
45
#define DBG_CPU0_CMD_NOP      0x0
46
#define DBG_CPU0_CMD_BWRITE32 0x3
47
#define DBG_CPU0_CMD_BREAD32  0x7
48
#define DBG_CPU0_CMD_IREG_WR  0x9  // This is both a select and a write
49
#define DBG_CPU0_CMD_IREG_SEL 0xd  // There is no 'read', the current register is always read.  Use a NOP to read.
50
 
51
// Internal register definitions for the CPU1 module
52
#define DBG_CPU1_REG_SEL_LEN 1
53
#define DBG_CPU1_REG_STATUS 0
54
 
55
// Opcode definitions for the second CPU module
56
#define DBG_CPU1_OPCODE_LEN   4
57
#define DBG_CPU1_CMD_NOP      0x0
58
#define DBG_CPU1_CMD_BWRITE32 0x3
59
#define DBG_CPU1_CMD_BREAD32  0x7
60
#define DBG_CPU1_CMD_IREG_WR  0x9  // This is both a select and a write
61
#define DBG_CPU1_CMD_IREG_SEL 0xd  // There is no 'read', the current register is always read.  Use a NOP to read.
62
 
63
#endif

powered by: WebSVN 2.1.0

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