1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __iop_scrc_out_defs_h
3 #define __iop_scrc_out_defs_h
6 * This file is autogenerated from
7 * file: ../../inst/io_proc/rtl/iop_scrc_out.r
8 * id: iop_scrc_out.r,v 1.11 2005/02/16 09:13:38 niklaspa Exp
9 * last modfied: Mon Apr 11 16:08:46 2005
11 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile iop_scrc_out_defs.h ../../inst/io_proc/rtl/iop_scrc_out.r
12 * id: $Id: iop_scrc_out_defs.h,v 1.4 2005/04/24 18:31:05 starvik Exp $
13 * Any changes here will be lost.
15 * -*- buffer-read-only: t -*-
17 /* Main access macros */
19 #define REG_RD( scope, inst, reg ) \
20 REG_READ( reg_##scope##_##reg, \
21 (inst) + REG_RD_ADDR_##scope##_##reg )
25 #define REG_WR( scope, inst, reg, val ) \
26 REG_WRITE( reg_##scope##_##reg, \
27 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
31 #define REG_RD_VECT( scope, inst, reg, index ) \
32 REG_READ( reg_##scope##_##reg, \
33 (inst) + REG_RD_ADDR_##scope##_##reg + \
34 (index) * STRIDE_##scope##_##reg )
38 #define REG_WR_VECT( scope, inst, reg, index, val ) \
39 REG_WRITE( reg_##scope##_##reg, \
40 (inst) + REG_WR_ADDR_##scope##_##reg + \
41 (index) * STRIDE_##scope##_##reg, (val) )
45 #define REG_RD_INT( scope, inst, reg ) \
46 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
50 #define REG_WR_INT( scope, inst, reg, val ) \
51 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
54 #ifndef REG_RD_INT_VECT
55 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
56 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
57 (index) * STRIDE_##scope##_##reg )
60 #ifndef REG_WR_INT_VECT
61 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
62 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
63 (index) * STRIDE_##scope##_##reg, (val) )
67 #define REG_TYPE_CONV( type, orgtype, val ) \
68 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
72 #define reg_page_size 8192
76 #define REG_ADDR( scope, inst, reg ) \
77 ( (inst) + REG_RD_ADDR_##scope##_##reg )
81 #define REG_ADDR_VECT( scope, inst, reg, index ) \
82 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
83 (index) * STRIDE_##scope##_##reg )
86 /* C-code for register scope iop_scrc_out */
88 /* Register rw_cfg, scope iop_scrc_out, type rw */
90 unsigned int trig : 2;
91 unsigned int inv_crc : 1;
92 unsigned int dummy1 : 29;
93 } reg_iop_scrc_out_rw_cfg;
94 #define REG_RD_ADDR_iop_scrc_out_rw_cfg 0
95 #define REG_WR_ADDR_iop_scrc_out_rw_cfg 0
97 /* Register rw_ctrl, scope iop_scrc_out, type rw */
99 unsigned int strb_src : 1;
100 unsigned int out_src : 1;
101 unsigned int dummy1 : 30;
102 } reg_iop_scrc_out_rw_ctrl;
103 #define REG_RD_ADDR_iop_scrc_out_rw_ctrl 4
104 #define REG_WR_ADDR_iop_scrc_out_rw_ctrl 4
106 /* Register rw_init_crc, scope iop_scrc_out, type rw */
107 typedef unsigned int reg_iop_scrc_out_rw_init_crc;
108 #define REG_RD_ADDR_iop_scrc_out_rw_init_crc 8
109 #define REG_WR_ADDR_iop_scrc_out_rw_init_crc 8
111 /* Register rw_crc, scope iop_scrc_out, type rw */
112 typedef unsigned int reg_iop_scrc_out_rw_crc;
113 #define REG_RD_ADDR_iop_scrc_out_rw_crc 12
114 #define REG_WR_ADDR_iop_scrc_out_rw_crc 12
116 /* Register rw_data, scope iop_scrc_out, type rw */
118 unsigned int val : 1;
119 unsigned int dummy1 : 31;
120 } reg_iop_scrc_out_rw_data;
121 #define REG_RD_ADDR_iop_scrc_out_rw_data 16
122 #define REG_WR_ADDR_iop_scrc_out_rw_data 16
124 /* Register r_computed_crc, scope iop_scrc_out, type r */
125 typedef unsigned int reg_iop_scrc_out_r_computed_crc;
126 #define REG_RD_ADDR_iop_scrc_out_r_computed_crc 20
131 regk_iop_scrc_out_crc = 0x00000001,
132 regk_iop_scrc_out_data = 0x00000000,
133 regk_iop_scrc_out_dif = 0x00000001,
134 regk_iop_scrc_out_hi = 0x00000000,
135 regk_iop_scrc_out_neg = 0x00000002,
136 regk_iop_scrc_out_no = 0x00000000,
137 regk_iop_scrc_out_pos = 0x00000001,
138 regk_iop_scrc_out_pos_neg = 0x00000003,
139 regk_iop_scrc_out_reg = 0x00000000,
140 regk_iop_scrc_out_rw_cfg_default = 0x00000000,
141 regk_iop_scrc_out_rw_crc_default = 0x00000000,
142 regk_iop_scrc_out_rw_ctrl_default = 0x00000000,
143 regk_iop_scrc_out_rw_data_default = 0x00000000,
144 regk_iop_scrc_out_rw_init_crc_default = 0x00000000,
145 regk_iop_scrc_out_yes = 0x00000001
147 #endif /* __iop_scrc_out_defs_h */