Go to the documentation of this file.
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 )
89 unsigned int data : 8;
90 unsigned int dummy1 : 24;
92 #define REG_RD_ADDR_gio_rw_pa_dout 0
93 #define REG_WR_ADDR_gio_rw_pa_dout 0
97 unsigned int data : 8;
98 unsigned int dummy1 : 24;
100 #define REG_RD_ADDR_gio_r_pa_din 4
105 unsigned int dummy1 : 24;
107 #define REG_RD_ADDR_gio_rw_pa_oe 8
108 #define REG_WR_ADDR_gio_rw_pa_oe 8
112 unsigned int pa0 : 3;
113 unsigned int pa1 : 3;
114 unsigned int pa2 : 3;
115 unsigned int pa3 : 3;
116 unsigned int pa4 : 3;
117 unsigned int pa5 : 3;
118 unsigned int pa6 : 3;
119 unsigned int pa7 : 3;
120 unsigned int dummy1 : 8;
122 #define REG_RD_ADDR_gio_rw_intr_cfg 12
123 #define REG_WR_ADDR_gio_rw_intr_cfg 12
127 unsigned int pa0 : 1;
128 unsigned int pa1 : 1;
129 unsigned int pa2 : 1;
130 unsigned int pa3 : 1;
131 unsigned int pa4 : 1;
132 unsigned int pa5 : 1;
133 unsigned int pa6 : 1;
134 unsigned int pa7 : 1;
135 unsigned int dummy1 : 24;
137 #define REG_RD_ADDR_gio_rw_intr_mask 16
138 #define REG_WR_ADDR_gio_rw_intr_mask 16
142 unsigned int pa0 : 1;
143 unsigned int pa1 : 1;
144 unsigned int pa2 : 1;
145 unsigned int pa3 : 1;
146 unsigned int pa4 : 1;
147 unsigned int pa5 : 1;
148 unsigned int pa6 : 1;
149 unsigned int pa7 : 1;
150 unsigned int dummy1 : 24;
152 #define REG_RD_ADDR_gio_rw_ack_intr 20
153 #define REG_WR_ADDR_gio_rw_ack_intr 20
157 unsigned int pa0 : 1;
158 unsigned int pa1 : 1;
159 unsigned int pa2 : 1;
160 unsigned int pa3 : 1;
161 unsigned int pa4 : 1;
162 unsigned int pa5 : 1;
163 unsigned int pa6 : 1;
164 unsigned int pa7 : 1;
165 unsigned int dummy1 : 24;
167 #define REG_RD_ADDR_gio_r_intr 24
171 unsigned int pa0 : 1;
172 unsigned int pa1 : 1;
173 unsigned int pa2 : 1;
174 unsigned int pa3 : 1;
175 unsigned int pa4 : 1;
176 unsigned int pa5 : 1;
177 unsigned int pa6 : 1;
178 unsigned int pa7 : 1;
179 unsigned int dummy1 : 24;
181 #define REG_RD_ADDR_gio_r_masked_intr 28
185 unsigned int data : 18;
186 unsigned int dummy1 : 14;
188 #define REG_RD_ADDR_gio_rw_pb_dout 32
189 #define REG_WR_ADDR_gio_rw_pb_dout 32
193 unsigned int data : 18;
194 unsigned int dummy1 : 14;
196 #define REG_RD_ADDR_gio_r_pb_din 36
200 unsigned int oe : 18;
201 unsigned int dummy1 : 14;
203 #define REG_RD_ADDR_gio_rw_pb_oe 40
204 #define REG_WR_ADDR_gio_rw_pb_oe 40
208 unsigned int data : 18;
209 unsigned int dummy1 : 14;
211 #define REG_RD_ADDR_gio_rw_pc_dout 48
212 #define REG_WR_ADDR_gio_rw_pc_dout 48
216 unsigned int data : 18;
217 unsigned int dummy1 : 14;
219 #define REG_RD_ADDR_gio_r_pc_din 52
223 unsigned int oe : 18;
224 unsigned int dummy1 : 14;
226 #define REG_RD_ADDR_gio_rw_pc_oe 56
227 #define REG_WR_ADDR_gio_rw_pc_oe 56
232 unsigned int dummy1 : 14;
234 #define REG_RD_ADDR_gio_rw_pd_dout 64
235 #define REG_WR_ADDR_gio_rw_pd_dout 64
239 unsigned int data : 18;
240 unsigned int dummy1 : 14;
242 #define REG_RD_ADDR_gio_r_pd_din 68
246 unsigned int oe : 18;
247 unsigned int dummy1 : 14;
249 #define REG_RD_ADDR_gio_rw_pd_oe 72
250 #define REG_WR_ADDR_gio_rw_pd_oe 72
255 unsigned int dummy1 : 14;
257 #define REG_RD_ADDR_gio_rw_pe_dout 80
258 #define REG_WR_ADDR_gio_rw_pe_dout 80
263 unsigned int dummy1 : 14;
265 #define REG_RD_ADDR_gio_r_pe_din 84
269 unsigned int oe : 18;
270 unsigned int dummy1 : 14;
272 #define REG_RD_ADDR_gio_rw_pe_oe 88
273 #define REG_WR_ADDR_gio_rw_pe_oe 88