Go to the documentation of this file. 1 #ifndef __iop_mpu_defs_h
2 #define __iop_mpu_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_mpu_rw_r 4
90 #define REG_RD_ADDR_iop_mpu_rw_r 0
91 #define REG_WR_ADDR_iop_mpu_rw_r 0
96 unsigned int dummy1 : 31;
98 #define REG_RD_ADDR_iop_mpu_rw_ctrl 128
99 #define REG_WR_ADDR_iop_mpu_rw_ctrl 128
104 unsigned int dummy1 : 20;
106 #define REG_RD_ADDR_iop_mpu_r_pc 132
110 unsigned int instr_reg_busy : 1;
111 unsigned int intr_busy : 1;
112 unsigned int intr_vect : 16;
113 unsigned int dummy1 : 14;
115 #define REG_RD_ADDR_iop_mpu_r_stat 136
119 #define REG_RD_ADDR_iop_mpu_rw_instr 140
120 #define REG_WR_ADDR_iop_mpu_rw_instr 140
124 #define REG_RD_ADDR_iop_mpu_rw_immediate 144
125 #define REG_WR_ADDR_iop_mpu_rw_immediate 144
129 unsigned int intr_vect : 16;
130 unsigned int pc : 12;
132 unsigned int instr_reg_busy : 1;
133 unsigned int intr_busy : 1;
134 unsigned int dummy1 : 1;
136 #define REG_RD_ADDR_iop_mpu_r_trace 148
156 unsigned int dummy1 : 16;
158 #define REG_RD_ADDR_iop_mpu_r_wr_stat 152
160 #define STRIDE_iop_mpu_rw_thread 4
164 unsigned int dummy1 : 20;
166 #define REG_RD_ADDR_iop_mpu_rw_thread 156
167 #define REG_WR_ADDR_iop_mpu_rw_thread 156
169 #define STRIDE_iop_mpu_rw_intr 4
173 unsigned int dummy1 : 20;
175 #define REG_RD_ADDR_iop_mpu_rw_intr 196
176 #define REG_WR_ADDR_iop_mpu_rw_intr 196