1 #ifndef __bif_core_defs_h
2 #define __bif_core_defs_h
5 * This file is autogenerated from
6 * file: ../../inst/bif/rtl/bif_core_regs.r
7 * id: bif_core_regs.r,v 1.17 2005/02/04 13:28:22 np Exp
8 * last modfied: Mon Apr 11 16:06:33 2005
10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile bif_core_defs.h ../../inst/bif/rtl/bif_core_regs.r
11 * id: $Id: bif_core_defs.h,v 1.3 2005/04/24 18:30:58 starvik Exp $
12 * Any changes here will be lost.
14 * -*- buffer-read-only: t -*-
16 /* Main access macros */
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 )
85 /* C-code for register scope bif_core */
87 /* Register rw_grp1_cfg, scope bif_core, type rw */
96 unsigned int wr_extend
: 1;
97 unsigned int erc_en
: 1;
98 unsigned int mode
: 1;
99 unsigned int dummy1
: 10;
100 } reg_bif_core_rw_grp1_cfg
;
101 #define REG_RD_ADDR_bif_core_rw_grp1_cfg 0
102 #define REG_WR_ADDR_bif_core_rw_grp1_cfg 0
104 /* Register rw_grp2_cfg, scope bif_core, type rw */
111 unsigned int ewb
: 2;
113 unsigned int wr_extend
: 1;
114 unsigned int erc_en
: 1;
115 unsigned int mode
: 1;
116 unsigned int dummy1
: 10;
117 } reg_bif_core_rw_grp2_cfg
;
118 #define REG_RD_ADDR_bif_core_rw_grp2_cfg 4
119 #define REG_WR_ADDR_bif_core_rw_grp2_cfg 4
121 /* Register rw_grp3_cfg, scope bif_core, type rw */
128 unsigned int ewb
: 2;
130 unsigned int wr_extend
: 1;
131 unsigned int erc_en
: 1;
132 unsigned int mode
: 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;
138 } reg_bif_core_rw_grp3_cfg
;
139 #define REG_RD_ADDR_bif_core_rw_grp3_cfg 8
140 #define REG_WR_ADDR_bif_core_rw_grp3_cfg 8
142 /* Register rw_grp4_cfg, scope bif_core, type rw */
149 unsigned int ewb
: 2;
151 unsigned int wr_extend
: 1;
152 unsigned int erc_en
: 1;
153 unsigned int mode
: 1;
154 unsigned int dummy1
: 4;
155 unsigned int gated_csp4
: 2;
156 unsigned int gated_csp5
: 2;
157 unsigned int gated_csp6
: 2;
158 } reg_bif_core_rw_grp4_cfg
;
159 #define REG_RD_ADDR_bif_core_rw_grp4_cfg 12
160 #define REG_WR_ADDR_bif_core_rw_grp4_cfg 12
162 /* Register rw_sdram_cfg_grp0, scope bif_core, type rw */
164 unsigned int bank_sel
: 5;
166 unsigned int type
: 1;
169 unsigned int wmm
: 1;
170 unsigned int sh16
: 1;
171 unsigned int grp_sel
: 5;
172 unsigned int dummy1
: 12;
173 } reg_bif_core_rw_sdram_cfg_grp0
;
174 #define REG_RD_ADDR_bif_core_rw_sdram_cfg_grp0 16
175 #define REG_WR_ADDR_bif_core_rw_sdram_cfg_grp0 16
177 /* Register rw_sdram_cfg_grp1, scope bif_core, type rw */
179 unsigned int bank_sel
: 5;
181 unsigned int type
: 1;
184 unsigned int wmm
: 1;
185 unsigned int sh16
: 1;
186 unsigned int dummy1
: 17;
187 } reg_bif_core_rw_sdram_cfg_grp1
;
188 #define REG_RD_ADDR_bif_core_rw_sdram_cfg_grp1 20
189 #define REG_WR_ADDR_bif_core_rw_sdram_cfg_grp1 20
191 /* Register rw_sdram_timing, scope bif_core, type rw */
194 unsigned int rcd
: 3;
197 unsigned int dpl
: 2;
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;
204 } reg_bif_core_rw_sdram_timing
;
205 #define REG_RD_ADDR_bif_core_rw_sdram_timing 24
206 #define REG_WR_ADDR_bif_core_rw_sdram_timing 24
208 /* Register rw_sdram_cmd, scope bif_core, type rw */
210 unsigned int cmd
: 3;
211 unsigned int mrs_data
: 15;
212 unsigned int dummy1
: 14;
213 } reg_bif_core_rw_sdram_cmd
;
214 #define REG_RD_ADDR_bif_core_rw_sdram_cmd 28
215 #define REG_WR_ADDR_bif_core_rw_sdram_cmd 28
217 /* Register rs_sdram_ref_stat, scope bif_core, type rs */
220 unsigned int dummy1
: 31;
221 } reg_bif_core_rs_sdram_ref_stat
;
222 #define REG_RD_ADDR_bif_core_rs_sdram_ref_stat 32
224 /* Register r_sdram_ref_stat, scope bif_core, type r */
227 unsigned int dummy1
: 31;
228 } reg_bif_core_r_sdram_ref_stat
;
229 #define REG_RD_ADDR_bif_core_r_sdram_ref_stat 36
234 regk_bif_core_bank2
= 0x00000000,
235 regk_bif_core_bank4
= 0x00000001,
236 regk_bif_core_bit10
= 0x0000000a,
237 regk_bif_core_bit11
= 0x0000000b,
238 regk_bif_core_bit12
= 0x0000000c,
239 regk_bif_core_bit13
= 0x0000000d,
240 regk_bif_core_bit14
= 0x0000000e,
241 regk_bif_core_bit15
= 0x0000000f,
242 regk_bif_core_bit16
= 0x00000010,
243 regk_bif_core_bit17
= 0x00000011,
244 regk_bif_core_bit18
= 0x00000012,
245 regk_bif_core_bit19
= 0x00000013,
246 regk_bif_core_bit20
= 0x00000014,
247 regk_bif_core_bit21
= 0x00000015,
248 regk_bif_core_bit22
= 0x00000016,
249 regk_bif_core_bit23
= 0x00000017,
250 regk_bif_core_bit24
= 0x00000018,
251 regk_bif_core_bit25
= 0x00000019,
252 regk_bif_core_bit26
= 0x0000001a,
253 regk_bif_core_bit27
= 0x0000001b,
254 regk_bif_core_bit28
= 0x0000001c,
255 regk_bif_core_bit29
= 0x0000001d,
256 regk_bif_core_bit9
= 0x00000009,
257 regk_bif_core_bw16
= 0x00000001,
258 regk_bif_core_bw32
= 0x00000000,
259 regk_bif_core_bwe
= 0x00000000,
260 regk_bif_core_cwe
= 0x00000001,
261 regk_bif_core_e15us
= 0x00000001,
262 regk_bif_core_e7800ns
= 0x00000002,
263 regk_bif_core_grp0
= 0x00000000,
264 regk_bif_core_grp1
= 0x00000001,
265 regk_bif_core_mrs
= 0x00000003,
266 regk_bif_core_no
= 0x00000000,
267 regk_bif_core_none
= 0x00000000,
268 regk_bif_core_nop
= 0x00000000,
269 regk_bif_core_off
= 0x00000000,
270 regk_bif_core_pre
= 0x00000002,
271 regk_bif_core_r_sdram_ref_stat_default
= 0x00000001,
272 regk_bif_core_rd
= 0x00000002,
273 regk_bif_core_ref
= 0x00000001,
274 regk_bif_core_rs_sdram_ref_stat_default
= 0x00000001,
275 regk_bif_core_rw_grp1_cfg_default
= 0x000006cf,
276 regk_bif_core_rw_grp2_cfg_default
= 0x000006cf,
277 regk_bif_core_rw_grp3_cfg_default
= 0x000006cf,
278 regk_bif_core_rw_grp4_cfg_default
= 0x000006cf,
279 regk_bif_core_rw_sdram_cfg_grp1_default
= 0x00000000,
280 regk_bif_core_slf
= 0x00000004,
281 regk_bif_core_wr
= 0x00000001,
282 regk_bif_core_yes
= 0x00000001
284 #endif /* __bif_core_defs_h */