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 #define REG_RD_ADDR_timer_rw_tmr0_div 0
90 #define REG_WR_ADDR_timer_rw_tmr0_div 0
94 #define REG_RD_ADDR_timer_r_tmr0_data 4
99 unsigned int freq : 3;
100 unsigned int dummy1 : 27;
102 #define REG_RD_ADDR_timer_rw_tmr0_ctrl 8
103 #define REG_WR_ADDR_timer_rw_tmr0_ctrl 8
107 #define REG_RD_ADDR_timer_rw_tmr1_div 16
108 #define REG_WR_ADDR_timer_rw_tmr1_div 16
112 #define REG_RD_ADDR_timer_r_tmr1_data 20
117 unsigned int freq : 3;
118 unsigned int dummy1 : 27;
120 #define REG_RD_ADDR_timer_rw_tmr1_ctrl 24
121 #define REG_WR_ADDR_timer_rw_tmr1_ctrl 24
125 unsigned int tmr : 24;
126 unsigned int cnt : 8;
128 #define REG_RD_ADDR_timer_rs_cnt_data 32
132 unsigned int tmr : 24;
133 unsigned int cnt : 8;
135 #define REG_RD_ADDR_timer_r_cnt_data 36
139 unsigned int clk : 2;
140 unsigned int dummy1 : 30;
142 #define REG_RD_ADDR_timer_rw_cnt_cfg 40
143 #define REG_WR_ADDR_timer_rw_cnt_cfg 40
147 #define REG_RD_ADDR_timer_rw_trig 48
148 #define REG_WR_ADDR_timer_rw_trig 48
152 unsigned int tmr : 2;
153 unsigned int dummy1 : 30;
155 #define REG_RD_ADDR_timer_rw_trig_cfg 52
156 #define REG_WR_ADDR_timer_rw_trig_cfg 52
160 #define REG_RD_ADDR_timer_r_time 56
164 unsigned int tmr : 2;
165 unsigned int dummy1 : 30;
167 #define REG_RD_ADDR_timer_rw_out 60
168 #define REG_WR_ADDR_timer_rw_out 60
172 unsigned int cnt : 8;
173 unsigned int cmd : 1;
174 unsigned int key : 7;
175 unsigned int dummy1 : 16;
177 #define REG_RD_ADDR_timer_rw_wd_ctrl 64
178 #define REG_WR_ADDR_timer_rw_wd_ctrl 64
182 unsigned int cnt : 8;
183 unsigned int cmd : 1;
184 unsigned int dummy1 : 23;
186 #define REG_RD_ADDR_timer_r_wd_stat 68
190 unsigned int tmr0 : 1;
191 unsigned int tmr1 : 1;
192 unsigned int cnt : 1;
193 unsigned int trig : 1;
194 unsigned int dummy1 : 28;
196 #define REG_RD_ADDR_timer_rw_intr_mask 72
197 #define REG_WR_ADDR_timer_rw_intr_mask 72
201 unsigned int tmr0 : 1;
202 unsigned int tmr1 : 1;
203 unsigned int cnt : 1;
204 unsigned int trig : 1;
205 unsigned int dummy1 : 28;
207 #define REG_RD_ADDR_timer_rw_ack_intr 76
208 #define REG_WR_ADDR_timer_rw_ack_intr 76
212 unsigned int tmr0 : 1;
213 unsigned int tmr1 : 1;
214 unsigned int cnt : 1;
215 unsigned int trig : 1;
216 unsigned int dummy1 : 28;
218 #define REG_RD_ADDR_timer_r_intr 80
222 unsigned int tmr0 : 1;
223 unsigned int tmr1 : 1;
224 unsigned int cnt : 1;
225 unsigned int trig : 1;
226 unsigned int dummy1 : 28;
228 #define REG_RD_ADDR_timer_r_masked_intr 84
232 unsigned int dis : 1;
234 unsigned int dummy1 : 30;
236 #define REG_RD_ADDR_timer_rw_test 88
237 #define REG_WR_ADDR_timer_rw_test 88