Go to the documentation of this file. 1 #ifndef __iop_spu_defs_h
2 #define __iop_spu_defs_h
18 #define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
24 #define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
30 #define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
37 #define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
44 #define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
49 #define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
53 #ifndef REG_RD_INT_VECT
54 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
59 #ifndef REG_WR_INT_VECT
60 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
66 #define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
71 #define reg_page_size 8192
75 #define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
80 #define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
87 #define STRIDE_iop_spu_rw_r 4
90 #define REG_RD_ADDR_iop_spu_rw_r 0
91 #define REG_WR_ADDR_iop_spu_rw_r 0
96 unsigned int dummy1 : 20;
98 #define REG_RD_ADDR_iop_spu_rw_seq_pc 64
99 #define REG_WR_ADDR_iop_spu_rw_seq_pc 64
104 unsigned int dummy1 : 20;
106 #define REG_RD_ADDR_iop_spu_rw_fsm_pc 68
107 #define REG_WR_ADDR_iop_spu_rw_fsm_pc 68
113 unsigned int dummy1 : 30;
115 #define REG_RD_ADDR_iop_spu_rw_ctrl 72
116 #define REG_WR_ADDR_iop_spu_rw_ctrl 72
120 unsigned int val0 : 5;
121 unsigned int src0 : 3;
122 unsigned int val1 : 5;
123 unsigned int src1 : 3;
124 unsigned int val2 : 5;
125 unsigned int src2 : 3;
126 unsigned int val3 : 5;
127 unsigned int src3 : 3;
129 #define REG_RD_ADDR_iop_spu_rw_fsm_inputs3_0 76
130 #define REG_WR_ADDR_iop_spu_rw_fsm_inputs3_0 76
134 unsigned int val4 : 5;
135 unsigned int src4 : 3;
136 unsigned int val5 : 5;
137 unsigned int src5 : 3;
138 unsigned int val6 : 5;
139 unsigned int src6 : 3;
140 unsigned int val7 : 5;
141 unsigned int src7 : 3;
143 #define REG_RD_ADDR_iop_spu_rw_fsm_inputs7_4 80
144 #define REG_WR_ADDR_iop_spu_rw_fsm_inputs7_4 80
148 #define REG_RD_ADDR_iop_spu_rw_gio_out 84
149 #define REG_WR_ADDR_iop_spu_rw_gio_out 84
153 #define REG_RD_ADDR_iop_spu_rw_bus0_out 88
154 #define REG_WR_ADDR_iop_spu_rw_bus0_out 88
158 #define REG_RD_ADDR_iop_spu_rw_bus1_out 92
159 #define REG_WR_ADDR_iop_spu_rw_bus1_out 92
163 #define REG_RD_ADDR_iop_spu_r_gio_in 96
167 #define REG_RD_ADDR_iop_spu_r_bus0_in 100
171 #define REG_RD_ADDR_iop_spu_r_bus1_in 104
175 #define REG_RD_ADDR_iop_spu_rw_gio_out_set 108
176 #define REG_WR_ADDR_iop_spu_rw_gio_out_set 108
180 #define REG_RD_ADDR_iop_spu_rw_gio_out_clr 112
181 #define REG_WR_ADDR_iop_spu_rw_gio_out_clr 112
201 unsigned int dummy1 : 16;
203 #define REG_RD_ADDR_iop_spu_rs_wr_stat 116
223 unsigned int dummy1 : 16;
225 #define REG_RD_ADDR_iop_spu_r_wr_stat 120
229 #define REG_RD_ADDR_iop_spu_r_reg_indexed_by_bus0_in 124
233 unsigned int timer_grp_lo : 4;
234 unsigned int fifo_out_last : 1;
235 unsigned int fifo_out_rdy : 1;
236 unsigned int fifo_out_all : 1;
237 unsigned int fifo_in_rdy : 1;
238 unsigned int dmc_out_all : 1;
239 unsigned int dmc_out_dth : 1;
240 unsigned int dmc_out_eop : 1;
241 unsigned int dmc_out_dv : 1;
242 unsigned int dmc_out_last : 1;
243 unsigned int dmc_out_cmd_rq : 1;
244 unsigned int dmc_out_cmd_rdy : 1;
245 unsigned int pcrc_correct : 1;
246 unsigned int timer_grp_hi : 4;
247 unsigned int dmc_in_sth : 1;
248 unsigned int dmc_in_full : 1;
249 unsigned int dmc_in_cmd_rdy : 1;
250 unsigned int spu_gio_out : 4;
251 unsigned int sync_clk12 : 1;
252 unsigned int scrc_out_data : 1;
253 unsigned int scrc_in_err : 1;
254 unsigned int mc_busy : 1;
255 unsigned int mc_owned : 1;
257 #define REG_RD_ADDR_iop_spu_r_stat_in 128
261 #define REG_RD_ADDR_iop_spu_r_trigger_in 132
265 unsigned int c_flag : 1;
266 unsigned int v_flag : 1;
267 unsigned int z_flag : 1;
268 unsigned int n_flag : 1;
269 unsigned int xor_bus0_r2_0 : 1;
270 unsigned int xor_bus1_r3_0 : 1;
271 unsigned int xor_bus0m_r2_0 : 1;
272 unsigned int xor_bus1m_r3_0 : 1;
273 unsigned int fsm_in0 : 1;
274 unsigned int fsm_in1 : 1;
275 unsigned int fsm_in2 : 1;
276 unsigned int fsm_in3 : 1;
277 unsigned int fsm_in4 : 1;
278 unsigned int fsm_in5 : 1;
279 unsigned int fsm_in6 : 1;
280 unsigned int fsm_in7 : 1;
281 unsigned int event0 : 1;
282 unsigned int event1 : 1;
283 unsigned int event2 : 1;
284 unsigned int event3 : 1;
285 unsigned int dummy1 : 12;
287 #define REG_RD_ADDR_iop_spu_r_special_stat 136
292 unsigned int dummy1 : 3;
293 unsigned int imm_hi : 16;
295 #define REG_RD_ADDR_iop_spu_rw_reg_access 140
296 #define REG_WR_ADDR_iop_spu_rw_reg_access 140
298 #define STRIDE_iop_spu_rw_event_cfg 4
303 unsigned int eq_en : 1;
304 unsigned int eq_inv : 1;
305 unsigned int gt_en : 1;
306 unsigned int gt_inv : 1;
307 unsigned int dummy1 : 14;
309 #define REG_RD_ADDR_iop_spu_rw_event_cfg 144
310 #define REG_WR_ADDR_iop_spu_rw_event_cfg 144
312 #define STRIDE_iop_spu_rw_event_mask 4
315 #define REG_RD_ADDR_iop_spu_rw_event_mask 160
316 #define REG_WR_ADDR_iop_spu_rw_event_mask 160
318 #define STRIDE_iop_spu_rw_event_val 4
321 #define REG_RD_ADDR_iop_spu_rw_event_val 176
322 #define REG_WR_ADDR_iop_spu_rw_event_val 176
327 unsigned int dummy1 : 20;
329 #define REG_RD_ADDR_iop_spu_rw_event_ret 192
330 #define REG_WR_ADDR_iop_spu_rw_event_ret 192
336 unsigned int c_flag : 1;
337 unsigned int v_flag : 1;
338 unsigned int z_flag : 1;
339 unsigned int n_flag : 1;
340 unsigned int seq_addr : 12;
341 unsigned int dummy1 : 2;
342 unsigned int fsm_addr : 12;
344 #define REG_RD_ADDR_iop_spu_r_trace 196
350 unsigned int tmr_done : 1;
351 unsigned int inp0 : 1;
352 unsigned int inp1 : 1;
353 unsigned int inp2 : 1;
354 unsigned int inp3 : 1;
355 unsigned int event0 : 1;
356 unsigned int event1 : 1;
357 unsigned int event2 : 1;
358 unsigned int event3 : 1;
359 unsigned int gio_out : 8;
360 unsigned int dummy1 : 1;
361 unsigned int fsm_addr : 12;
363 #define REG_RD_ADDR_iop_spu_r_fsm_trace 200
365 #define STRIDE_iop_spu_rw_brp 4
371 unsigned int dummy1 : 18;
373 #define REG_RD_ADDR_iop_spu_rw_brp 204
374 #define REG_WR_ADDR_iop_spu_rw_brp 204