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

Subversion Repositories xulalx25soc

[/] [xulalx25soc/] [trunk/] [sw/] [regdefs.h] - Blame information for rev 26

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

Line No. Rev Author Line
1 5 dgisselq
////////////////////////////////////////////////////////////////////////////////
2
//
3
// Filename:    regdefs.h
4
//
5
// Project:     XuLA2 board
6
//
7
// Purpose:     
8
//
9
//
10
// Creator:     Dan Gisselquist, Ph.D.
11
//              Gisselquist Technology, LLC
12
//
13
////////////////////////////////////////////////////////////////////////////////
14
//
15
// Copyright (C) 2015, Gisselquist Technology, LLC
16
//
17
// This program is free software (firmware): you can redistribute it and/or
18
// modify it under the terms of  the GNU General Public License as published
19
// by the Free Software Foundation, either version 3 of the License, or (at
20
// your option) any later version.
21
//
22
// This program is distributed in the hope that it will be useful, but WITHOUT
23
// ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
24
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
25
// for more details.
26
//
27
// License:     GPL, v3, as defined and found on www.gnu.org,
28
//              http://www.gnu.org/licenses/gpl.html
29
//
30
//
31
////////////////////////////////////////////////////////////////////////////////
32
//
33
//
34
#ifndef REGDEFS_H
35
#define REGDEFS_H
36
 
37
// #define      R_RESET         0x00000100
38
// #define      R_STATUS        0x00000101
39
// #define      R_CONTROL       0x00000101
40
#define R_VERSION       0x00000102
41
#define R_ICONTROL      0x00000103
42
#define R_BUSERR        0x00000104
43
#define R_DATE          0x00000105
44
#define R_GPIO          0x00000106
45
#define R_UART_CTRL     0x00000107
46
#define R_PWM_INTERVAL  0x00000108
47
#define R_PWM_DATA      0x00000109
48
#define R_UART_RX       0x0000010a
49
#define R_UART_TX       0x0000010b
50
#define R_SPIF_EREG     0x0000010c
51
#define R_SPIF_CREG     0x0000010d
52
#define R_SPIF_SREG     0x0000010e
53
#define R_SPIF_IDREG    0x0000010f
54
#define R_CLOCK         0x00000110
55
#define R_TIMER         0x00000111
56
#define R_STOPWATCH     0x00000112
57
#define R_CKALARM       0x00000113
58
#define R_CKSPEED       0x00000114
59
 
60
// GPS registers
61
//                      0x00000114
62
//                      0x00000115
63
//                      0x00000116
64
//                      0x00000117
65
 
66
// WB Scope registers wb_addr[31:3]==30'h23, i.e. 46, 8c, 118
67
#define R_QSCOPE        0x00000118      // Quad SPI scope ctrl
68
#define R_QSCOPED       0x00000119      //      and data
69
#define R_CFGSCOPE      0x0000011a      // Configuration/ICAPE scope control
70
#define R_CFGSCOPED     0x0000011b      //      and data
71
#define R_RAMSCOPE      0x0000011c      // SDRAM scope control
72
#define R_RAMSCOPED     0x0000011d      //      and data
73
#define R_CPUSCOPE      0x0000011e      // SDRAM scope control
74
#define R_CPUSCOPED     0x0000011f      //      and data
75
//
76
// SD Card
77
//                      0x00000120
78
//                      0x00000121
79
//                      0x00000122
80
//                      0x00000123
81
//
82
// Unused/open
83
// #define SOMETHING    0x00000124 -- 0x013f    (28 spaces)
84
//
85
// FPGA CONFIG/ICAP REGISTERS
86
#define R_CFG_CRC       0x00000140
87
#define R_CFG_FAR_MAJ   0x00000141
88
#define R_CFG_FAR_MIN   0x00000142
89
#define R_CFG_FDRI      0x00000143
90
#define R_CFG_FDRO      0x00000144
91
#define R_CFG_CMD       0x00000145
92
#define R_CFG_CTL       0x00000146
93
#define R_CFG_MASK      0x00000147
94
#define R_CFG_STAT      0x00000148
95
#define R_CFG_LOUT      0x00000149
96
#define R_CFG_COR1      0x0000014a
97
#define R_CFG_COR2      0x0000014b
98
#define R_CFG_PWRDN     0x0000014c
99
#define R_CFG_FLR       0x0000014d
100
#define R_CFG_IDCODE    0x0000014e
101
#define R_CFG_CWDT      0x0000014f
102
#define R_CFG_HCOPT     0x00000150
103
#define R_CFG_CSBO      0x00000152
104
#define R_CFG_GEN1      0x00000153
105
#define R_CFG_GEN2      0x00000154
106
#define R_CFG_GEN3      0x00000155
107
#define R_CFG_GEN4      0x00000156
108
#define R_CFG_GEN5      0x00000157
109
#define R_CFG_MODE      0x00000158
110
#define R_CFG_GWE       0x00000159
111
#define R_CFG_GTS       0x0000015a
112
#define R_CFG_MFWR      0x0000015b
113
#define R_CFG_CCLK      0x0000015c
114
#define R_CFG_SEU       0x0000015d
115
#define R_CFG_EXP       0x0000015e
116
#define R_CFG_RDBK      0x0000015f
117
#define R_CFG_BOOTSTS   0x00000160
118
#define R_CFG_EYE       0x00000161
119
#define R_CFG_CBC       0x00000162
120
 
121
// RAM memory space
122
#define RAMBASE         0x00002000
123
#define MEMWORDS        (1<<13)
124
// Flash memory space
125
#define SPIFLASH        0x00040000
126
#define FLASHWORDS      (1<<18)
127
// SDRAM memory space
128
#define SDRAMBASE       0x00800000
129
// Zip CPU Control and Debug registers
130
#define R_ZIPCTRL       0x01000000
131 11 dgisselq
#define R_ZIPDATA       0x01000001
132 5 dgisselq
 
133
 
134
// Interrupt control constants
135
#define GIE             0x80000000      // Enable all interrupts
136 24 dgisselq
#define SCOPEN          0x80080008      // Enable WBSCOPE interrupts
137 5 dgisselq
 
138
// Flash control constants
139
#define ERASEFLAG       0x80000000
140
#define DISABLEWP       0x10000000
141
 
142
#define SZPAGE          64
143
#define PGLEN           64
144
#define NPAGES          32
145
#define SECTORSZ        (NPAGES * SZPAGE)
146
#define NSECTORS        256
147
#define SECTOROF(A)     (A & (-1<<10))
148
#define PAGEOF(A)       (A & (-1<<6))
149
 
150
#define RAMLEN          0x02000
151
 
152
// ZIP Control sequences
153
#define CPU_GO          0x0000
154
#define CPU_RESET       0x0040
155
#define CPU_INT         0x0080
156
#define CPU_STEP        0x0100
157
#define CPU_STALL       0x0200
158
#define CPU_HALT        0x0400
159
#define CPU_CLRCACHE    0x0800
160
#define CPU_sR0         (0x0000|CPU_HALT)
161
#define CPU_sSP         (0x000d|CPU_HALT)
162
#define CPU_sCC         (0x000e|CPU_HALT)
163
#define CPU_sPC         (0x000f|CPU_HALT)
164
#define CPU_uR0         (0x0010|CPU_HALT)
165
#define CPU_uSP         (0x001d|CPU_HALT)
166
#define CPU_uCC         (0x001e|CPU_HALT)
167
#define CPU_uPC         (0x001f|CPU_HALT)
168
 
169
// Scop definition/sequences
170
#define SCOPE_NO_RESET  0x80000000
171
#define SCOPE_TRIGGER   (0x08000000|SCOPE_NO_RESET)
172
#define SCOPE_DISABLE   (0x04000000)
173
 
174
typedef struct {
175
        unsigned        m_addr;
176
        const char      *m_name;
177
} REGNAME;
178
 
179
extern  const   REGNAME *bregs;
180
extern  const   int     NREGS;
181
// #define      NREGS   (sizeof(bregs)/sizeof(bregs[0]))
182
 
183
extern  unsigned        addrdecode(const char *v);
184
extern  const   char *addrname(const unsigned v);
185
 
186
#include "ttybus.h"
187
// #include "portbus.h"
188
 
189
typedef TTYBUS  FPGA;
190
 
191
#endif

powered by: WebSVN 2.1.0

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