Go to the documentation of this file. 1 #ifndef __bif_core_defs_h
2 #define __bif_core_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 )
96 unsigned int wr_extend : 1;
97 unsigned int erc_en : 1;
99 unsigned int dummy1 : 10;
101 #define REG_RD_ADDR_bif_core_rw_grp1_cfg 0
102 #define REG_WR_ADDR_bif_core_rw_grp1_cfg 0
111 unsigned int ewb : 2;
113 unsigned int wr_extend : 1;
114 unsigned int erc_en : 1;
116 unsigned int dummy1 : 10;
118 #define REG_RD_ADDR_bif_core_rw_grp2_cfg 4
119 #define REG_WR_ADDR_bif_core_rw_grp2_cfg 4
128 unsigned int ewb : 2;
130 unsigned int wr_extend : 1;
131 unsigned int erc_en : 1;
133 unsigned int dummy1 : 2;
134 unsigned int gated_csp0 : 2;
135 unsigned int gated_csp1 : 2;
136 unsigned int gated_csp2 : 2;
137 unsigned int gated_csp3 : 2;
139 #define REG_RD_ADDR_bif_core_rw_grp3_cfg 8
140 #define REG_WR_ADDR_bif_core_rw_grp3_cfg 8
149 unsigned int ewb : 2;
151 unsigned int wr_extend : 1;
152 unsigned int erc_en : 1;
154 unsigned int dummy1 : 4;
155 unsigned int gated_csp4 : 2;
156 unsigned int gated_csp5 : 2;
157 unsigned int gated_csp6 : 2;
159 #define REG_RD_ADDR_bif_core_rw_grp4_cfg 12
160 #define REG_WR_ADDR_bif_core_rw_grp4_cfg 12
164 unsigned int bank_sel : 5;
169 unsigned int wmm : 1;
170 unsigned int sh16 : 1;
171 unsigned int grp_sel : 5;
172 unsigned int dummy1 : 12;
174 #define REG_RD_ADDR_bif_core_rw_sdram_cfg_grp0 16
175 #define REG_WR_ADDR_bif_core_rw_sdram_cfg_grp0 16
179 unsigned int bank_sel : 5;
184 unsigned int wmm : 1;
185 unsigned int sh16 : 1;
186 unsigned int dummy1 : 17;
188 #define REG_RD_ADDR_bif_core_rw_sdram_cfg_grp1 20
189 #define REG_WR_ADDR_bif_core_rw_sdram_cfg_grp1 20
194 unsigned int rcd : 3;
198 unsigned int pde : 1;
199 unsigned int ref : 2;
200 unsigned int cpd : 1;
201 unsigned int sdcke : 1;
202 unsigned int sdclk : 1;
203 unsigned int dummy1 : 13;
205 #define REG_RD_ADDR_bif_core_rw_sdram_timing 24
206 #define REG_WR_ADDR_bif_core_rw_sdram_timing 24
211 unsigned int mrs_data : 15;
212 unsigned int dummy1 : 14;
214 #define REG_RD_ADDR_bif_core_rw_sdram_cmd 28
215 #define REG_WR_ADDR_bif_core_rw_sdram_cmd 28
220 unsigned int dummy1 : 31;
222 #define REG_RD_ADDR_bif_core_rs_sdram_ref_stat 32
227 unsigned int dummy1 : 31;
229 #define REG_RD_ADDR_bif_core_r_sdram_ref_stat 36