rcp.vh
8.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
/************************************************************************\
* *
* Copyright (C) 1994, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
\************************************************************************/
// $Id: rcp.vh,v 1.1 2002/03/28 00:26:13 berndt Exp $
`include "reality.vh"
// bus widths
parameter CBUS_SELECT_SIZE = 2;
parameter CBUS_COMMAND_SIZE = 3;
parameter CBUS_DATA_SIZE = 32;
parameter DBUS_DATA_SIZE = 64;
parameter EBUS_DATA_SIZE = 8;
parameter XBUS_DATA_SIZE = 64;
parameter CP0_DATA_SIZE = 32;
parameter IOBUF_ADDRESS_SIZE = 4;
parameter IOBUF_DATA_SIZE = 64;
parameter DRAM_ADDRESS_SIZE = 24;
parameter PBUS_ADDRESS_SIZE = 32;
parameter DMA_OFFSET_SIZE = 3;
parameter DMA_MASK_SIZE = 8;
parameter DMA_ADDRESS_SIZE = 32;
parameter DMA_LENGTH_SIZE = 7;
parameter DMA_READ_SIZE = 1;
parameter DMA_DELAY_SIZE = 8;
parameter DMA_DEVICE_SIZE = 4;
parameter IO_OFFSET_SIZE = 2;
parameter BUS_ID_OFFSET = 20;
parameter BUS_ID_SIZE = 12;
parameter RSP_VERSION = 8'd2;
parameter RDP_VERSION = 8'd2;
parameter RAC_VERSION = 8'd1;
parameter IO_VERSION = 8'd2;
parameter RCP_VERSION = {RSP_VERSION,
RDP_VERSION,
RAC_VERSION,
IO_VERSION};
// cbus select
parameter
CBUS_ADDRESS_SELECT = 2'd0,
CBUS_LENGTH_SELECT = 2'd1,
CBUS_DATA_SELECT = 2'd2;
// cbus command
parameter
CBUS_IDLE_COMMAND = 3'd0,
CBUS_DMA_COMMAND = 3'd1,
CBUS_WRITE_COMMAND = 3'd2,
CBUS_READ_COMMAND = 3'd3,
CBUS_RESPONSE_COMMAND = 3'd4,
CBUS_REFRESH_COMMAND = 3'd5;
// DMA transaction types
parameter
DMA_BLOCK = LOW,
DMA_SUBBLOCK = HIGH,
DMA_NON_MASKED = LOW,
DMA_MASKED = HIGH,
DMA_UP = LOW,
DMA_DOWN = HIGH,
DMA_SEQ = LOW,
DMA_NSEQ = HIGH,
DMA_WRITE = LOW,
DMA_READ = HIGH;
// DBUS - CBUS address definitions
parameter
DBUS_ADDRESS_START = 32'h0000_0000,
DBUS_ADDRESS_END = 32'h03ff_ffff,
CBUS_ADDRESS_START = 32'h0400_0000,
CBUS_ADDRESS_END = 32'hffff_ffff;
// configuration registers address space
parameter
BUS_ID_DRAM = 'h000,
BUS_ID_RDRAM_CONFIG = 'h03f,
BUS_ID_CBUS_START = 'h040,
BUS_ID_SP = 'h040,
BUS_ID_CMD = 'h041,
BUS_ID_SPAN = 'h042,
BUS_ID_MI = 'h043,
BUS_ID_VI = 'h044,
BUS_ID_AI = 'h045,
BUS_ID_PI = 'h046,
BUS_ID_RI = 'h047,
BUS_ID_SI = 'h048,
BUS_ID_PBUS = 'h050,
BUS_ID_PIF = 'h1fc,
BUS_ID_EXT_START = 'h800;
parameter
BUS_ADDRESS_DRAM = 32'h0000_0000,
BUS_ADDRESS_RDRAM_CONFIG = 32'h03f0_0000,
BUS_ADDRESS_SP = 32'h0400_0000,
BUS_ADDRESS_CMD = 32'h0410_0000,
BUS_ADDRESS_SPAN = 32'h0420_0000,
BUS_ADDRESS_MI = 32'h0430_0000,
BUS_ADDRESS_VI = 32'h0440_0000,
BUS_ADDRESS_AI = 32'h0450_0000,
BUS_ADDRESS_PI = 32'h0460_0000,
BUS_ADDRESS_RI = 32'h0470_0000,
BUS_ADDRESS_SI = 32'h0480_0000,
BUS_ADDRESS_PBUS = 32'h0500_0000,
BUS_ADDRESS_PIF = 32'h1fc0_0000,
BUS_ADDRESS_EXT = 32'h8000_0000;
parameter
BUS_ADDRESS_SP_DMEM = BUS_ADDRESS_SP + 20'h0_0000,
BUS_ADDRESS_SP_IMEM = BUS_ADDRESS_SP + 20'h0_1000,
BUS_ADDRESS_SP_MASTER = BUS_ADDRESS_SP + 20'h4_0000,
BUS_ADDRESS_SP_SLAVE = BUS_ADDRESS_SP + 20'h4_0004,
BUS_ADDRESS_SP_READ = BUS_ADDRESS_SP + 20'h4_0008,
BUS_ADDRESS_SP_WRITE = BUS_ADDRESS_SP + 20'h4_000c,
BUS_ADDRESS_SP_STATUS = BUS_ADDRESS_SP + 20'h4_0010,
BUS_ADDRESS_SP_FULL = BUS_ADDRESS_SP + 20'h4_0014,
BUS_ADDRESS_SP_BUSY = BUS_ADDRESS_SP + 20'h4_0018,
BUS_ADDRESS_SP_SEMAPHORE = BUS_ADDRESS_SP + 20'h4_001c,
BUS_ADDRESS_SP_PC = BUS_ADDRESS_SP + 20'h8_0000,
BUS_ADDRESS_SP_BIST = BUS_ADDRESS_SP + 20'h8_0004;
parameter
BUS_ADDRESS_CMD_START = BUS_ADDRESS_CMD + 20'h0_0000,
BUS_ADDRESS_CMD_END = BUS_ADDRESS_CMD + 20'h0_0004,
BUS_ADDRESS_CMD_CURRENT = BUS_ADDRESS_CMD + 20'h0_0008,
BUS_ADDRESS_CMD_STATUS = BUS_ADDRESS_CMD + 20'h0_000c,
BUS_ADDRESS_CMD_CLOCK = BUS_ADDRESS_CMD + 20'h0_0010,
BUS_ADDRESS_CMD_FIFO_BUSY = BUS_ADDRESS_CMD + 20'h0_0014,
BUS_ADDRESS_CMD_PIPE_BUSY = BUS_ADDRESS_CMD + 20'h0_0018,
BUS_ADDRESS_CMD_TMEM_BUSY = BUS_ADDRESS_CMD + 20'h0_001c;
parameter
BUS_ADDRESS_SPAN_BIST = BUS_ADDRESS_SPAN + 20'h0_0000,
BUS_ADDRESS_SPAN_MODE = BUS_ADDRESS_SPAN + 20'h0_0004,
BUS_ADDRESS_SPAN_ADDR = BUS_ADDRESS_SPAN + 20'h0_0008,
BUS_ADDRESS_SPAN_DATA = BUS_ADDRESS_SPAN + 20'h0_000c;
parameter
BUS_ADDRESS_MI_INIT_MODE = BUS_ADDRESS_MI + 20'h0_0000,
BUS_ADDRESS_MI_VERSION = BUS_ADDRESS_MI + 20'h0_0004,
BUS_ADDRESS_MI_INTERRUPT = BUS_ADDRESS_MI + 20'h0_0008,
BUS_ADDRESS_MI_MASK = BUS_ADDRESS_MI + 20'h0_000c;
parameter
BUS_ADDRESS_PI_DRAM_ADDRESS = BUS_ADDRESS_PI + 20'h0_0000,
BUS_ADDRESS_PI_PBUS_ADDRESS = BUS_ADDRESS_PI + 20'h0_0004,
BUS_ADDRESS_PI_READ_LENGTH = BUS_ADDRESS_PI + 20'h0_0008,
BUS_ADDRESS_PI_WRITE_LENGTH = BUS_ADDRESS_PI + 20'h0_000c,
BUS_ADDRESS_PI_STATUS = BUS_ADDRESS_PI + 20'h0_0010,
BUS_ADDRESS_PI_DOM1_LAT = BUS_ADDRESS_PI + 20'h0_0014,
BUS_ADDRESS_PI_DOM1_PWD = BUS_ADDRESS_PI + 20'h0_0018,
BUS_ADDRESS_PI_DOM1_PGS = BUS_ADDRESS_PI + 20'h0_001c,
BUS_ADDRESS_PI_DOM1_RLS = BUS_ADDRESS_PI + 20'h0_0020,
BUS_ADDRESS_PI_DOM2_LAT = BUS_ADDRESS_PI + 20'h0_0024,
BUS_ADDRESS_PI_DOM2_PWD = BUS_ADDRESS_PI + 20'h0_0028,
BUS_ADDRESS_PI_DOM2_PGS = BUS_ADDRESS_PI + 20'h0_002c,
BUS_ADDRESS_PI_DOM2_RLS = BUS_ADDRESS_PI + 20'h0_0030,
BUS_ADDRESS_PI_IO_READ_REG = BUS_ADDRESS_PI + 20'h0_0034,
BUS_ADDRESS_PI_IO_WRITE_REG = BUS_ADDRESS_PI + 20'h0_0038;
parameter
BUS_ADDRESS_RI_MODE = BUS_ADDRESS_RI + 20'h0_0000,
BUS_ADDRESS_RI_CONFIG = BUS_ADDRESS_RI + 20'h0_0004,
BUS_ADDRESS_RI_CURRENT_LOAD = BUS_ADDRESS_RI + 20'h0_0008,
BUS_ADDRESS_RI_SELECT = BUS_ADDRESS_RI + 20'h0_000c,
BUS_ADDRESS_RI_REFRESH = BUS_ADDRESS_RI + 20'h0_0010,
BUS_ADDRESS_RI_LATENCY = BUS_ADDRESS_RI + 20'h0_0014,
BUS_ADDRESS_RI_ERROR = BUS_ADDRESS_RI + 20'h0_0018,
BUS_ADDRESS_RI_VALID = BUS_ADDRESS_RI + 20'h0_001c;
parameter
BUS_ADDRESS_SI_DRAM_ADDRESS = BUS_ADDRESS_SI + 20'h0_0000,
BUS_ADDRESS_SI_PIF_AD_RD64B = BUS_ADDRESS_SI + 20'h0_0004,
BUS_ADDRESS_SI_PIF_AD_WR4B = BUS_ADDRESS_SI + 20'h0_0008,
BUS_ADDRESS_SI_PIF_AD_WR64B = BUS_ADDRESS_SI + 20'h0_0010,
BUS_ADDRESS_SI_PIF_AD_RD4BCPU= BUS_ADDRESS_SI + 20'h0_0014,
BUS_ADDRESS_SI_STATUS = BUS_ADDRESS_SI + 20'h0_0018;
parameter
BUS_ADDRESS_SI_PIF_ADDRESS = BUS_ADDRESS_SI + 20'h0_0004,
BUS_ADDRESS_SI_READ_LENGTH = BUS_ADDRESS_SI + 20'h0_0008,
BUS_ADDRESS_SI_WRITE_LENGTH = BUS_ADDRESS_SI + 20'h0_000c;
parameter
BUS_ADDRESS_AI_DRAM_ADDRESS = BUS_ADDRESS_AI + 20'h0_0000,
BUS_ADDRESS_AI_LENGTH = BUS_ADDRESS_AI + 20'h0_0004,
BUS_ADDRESS_AI_CONTROL = BUS_ADDRESS_AI + 20'h0_0008,
BUS_ADDRESS_AI_STATUS = BUS_ADDRESS_AI + 20'h0_000c,
BUS_ADDRESS_AI_DACRATE = BUS_ADDRESS_AI + 20'h0_0010,
BUS_ADDRESS_AI_BITRATE = BUS_ADDRESS_AI + 20'h0_0014;
parameter
BUS_ADDRESS_VI_CTRL = BUS_ADDRESS_VI + 20'h0_0000,
BUS_ADDRESS_VI_ORIGIN = BUS_ADDRESS_VI + 20'h0_0004,
BUS_ADDRESS_VI_WIDTH = BUS_ADDRESS_VI + 20'h0_0008,
BUS_ADDRESS_VI_V_INT = BUS_ADDRESS_VI + 20'h0_000c,
BUS_ADDRESS_VI_V_CURRENT = BUS_ADDRESS_VI + 20'h0_0010,
BUS_ADDRESS_VI_BURST = BUS_ADDRESS_VI + 20'h0_0014,
BUS_ADDRESS_VI_V_SYNC = BUS_ADDRESS_VI + 20'h0_0018,
BUS_ADDRESS_VI_H_SYNC = BUS_ADDRESS_VI + 20'h0_001c,
BUS_ADDRESS_VI_LEAP = BUS_ADDRESS_VI + 20'h0_0020,
BUS_ADDRESS_VI_H_START = BUS_ADDRESS_VI + 20'h0_0024,
BUS_ADDRESS_VI_V_START = BUS_ADDRESS_VI + 20'h0_0028,
BUS_ADDRESS_VI_V_BURST = BUS_ADDRESS_VI + 20'h0_002c,
BUS_ADDRESS_VI_X_SCALE = BUS_ADDRESS_VI + 20'h0_0030,
BUS_ADDRESS_VI_Y_SCALE = BUS_ADDRESS_VI + 20'h0_0034,
BUS_ADDRESS_VI_TEST_ADDR = BUS_ADDRESS_VI + 20'h0_0038,
BUS_ADDRESS_VI_TEST_DATA = BUS_ADDRESS_VI + 20'h0_003c;
parameter
BUS_ADDRESS_MASK = 32'hfff0_0000;
// DMA master and slave id codes
parameter
BUS_DEVICE_SP = 4'd0,
BUS_DEVICE_DP_CMD = 4'd1,
BUS_DEVICE_DP_SPAN = 4'd2,
BUS_DEVICE_MI = 4'd3,
BUS_DEVICE_VI = 4'd4,
BUS_DEVICE_SI = 4'd5,
BUS_DEVICE_PI = 4'd6,
BUS_DEVICE_RI = 4'd7,
BUS_DEVICE_AI = 4'd8,
BUS_DEVICE_MEM = 4'd9;
// rbus bus widths
parameter
RBUS_DATA_SIZE = 64,
RBUS_EXTEND_SIZE = 8,
RBUS_CONTROL_SIZE = 8,
RBUS_ENABLE_SIZE = 8;
// maximum DMA packet size
parameter MAX_DMA_LENGTH = 7'd15;
// RAC bus widths
parameter
RAC_RECEIVE_DATA_SIZE = 10,
RAC_TRANSMIT_DATA_SIZE = 11,
RAC_RAMBUS_DATA_SIZE = 9,
RAC_SELECT_SIZE = 4,
RAC_CURRENT_SIZE = 6;