Go to the documentation of this file. 1 #ifndef __iop_crc_par_defs_h
2 #define __iop_crc_par_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 )
90 unsigned int crc_out : 1;
91 unsigned int rev_out : 1;
92 unsigned int inv_out : 1;
93 unsigned int trig : 2;
94 unsigned int poly : 3;
95 unsigned int dummy1 : 23;
97 #define REG_RD_ADDR_iop_crc_par_rw_cfg 0
98 #define REG_WR_ADDR_iop_crc_par_rw_cfg 0
102 #define REG_RD_ADDR_iop_crc_par_rw_init_crc 4
103 #define REG_WR_ADDR_iop_crc_par_rw_init_crc 4
107 #define REG_RD_ADDR_iop_crc_par_rw_correct_crc 8
108 #define REG_WR_ADDR_iop_crc_par_rw_correct_crc 8
113 unsigned int dummy1 : 31;
115 #define REG_RD_ADDR_iop_crc_par_rw_ctrl 12
116 #define REG_WR_ADDR_iop_crc_par_rw_ctrl 12
120 unsigned int tr_dif : 1;
121 unsigned int dummy1 : 31;
123 #define REG_RD_ADDR_iop_crc_par_rw_set_last 16
124 #define REG_WR_ADDR_iop_crc_par_rw_set_last 16
129 unsigned int dummy1 : 24;
131 #define REG_RD_ADDR_iop_crc_par_rw_wr1byte 20
132 #define REG_WR_ADDR_iop_crc_par_rw_wr1byte 20
137 unsigned int dummy1 : 16;
139 #define REG_RD_ADDR_iop_crc_par_rw_wr2byte 24
140 #define REG_WR_ADDR_iop_crc_par_rw_wr2byte 24
145 unsigned int dummy1 : 8;
147 #define REG_RD_ADDR_iop_crc_par_rw_wr3byte 28
148 #define REG_WR_ADDR_iop_crc_par_rw_wr3byte 28
154 #define REG_RD_ADDR_iop_crc_par_rw_wr4byte 32
155 #define REG_WR_ADDR_iop_crc_par_rw_wr4byte 32
160 unsigned int dummy1 : 24;
162 #define REG_RD_ADDR_iop_crc_par_rw_wr1byte_last 36
163 #define REG_WR_ADDR_iop_crc_par_rw_wr1byte_last 36
168 unsigned int dummy1 : 16;
170 #define REG_RD_ADDR_iop_crc_par_rw_wr2byte_last 40
171 #define REG_WR_ADDR_iop_crc_par_rw_wr2byte_last 40
176 unsigned int dummy1 : 8;
178 #define REG_RD_ADDR_iop_crc_par_rw_wr3byte_last 44
179 #define REG_WR_ADDR_iop_crc_par_rw_wr3byte_last 44
185 #define REG_RD_ADDR_iop_crc_par_rw_wr4byte_last 48
186 #define REG_WR_ADDR_iop_crc_par_rw_wr4byte_last 48
192 unsigned int dummy1 : 30;
194 #define REG_RD_ADDR_iop_crc_par_r_stat 52
198 #define REG_RD_ADDR_iop_crc_par_r_sh_reg 56
202 #define REG_RD_ADDR_iop_crc_par_r_crc 60
207 unsigned int dummy1 : 30;
209 #define REG_RD_ADDR_iop_crc_par_rw_strb_rec_dif_in 64
210 #define REG_WR_ADDR_iop_crc_par_rw_strb_rec_dif_in 64