Altera SoCAL  20.1
The Altera SoC Abstraction Layer (SoCAL) API Reference Manual
 All Groups
alt_fpgamgrdata.h
1 /***********************************************************************************
2 * *
3 * Copyright 2013-2015 Altera Corporation. All Rights Reserved. *
4 * *
5 * Redistribution and use in source and binary forms, with or without *
6 * modification, are permitted provided that the following conditions are met: *
7 * *
8 * 1. Redistributions of source code must retain the above copyright notice, *
9 * this list of conditions and the following disclaimer. *
10 * *
11 * 2. Redistributions in binary form must reproduce the above copyright notice, *
12 * this list of conditions and the following disclaimer in the documentation *
13 * and/or other materials provided with the distribution. *
14 * *
15 * 3. Neither the name of the copyright holder nor the names of its contributors *
16 * may be used to endorse or promote products derived from this software without *
17 * specific prior written permission. *
18 * *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" *
20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE *
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE *
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE *
23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF *
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS *
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN *
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) *
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
29 * POSSIBILITY OF SUCH DAMAGE. *
30 * *
31 ***********************************************************************************/
32 
33 /* Altera - ALT_FPGAMGRDATA */
34 
35 #ifndef __ALTERA_ALT_FPGAMGRDATA_H__
36 #define __ALTERA_ALT_FPGAMGRDATA_H__
37 
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #endif /* __cplusplus */
42 
43 /*
44  * Component : FPGA Manager Module Configuration Data - ALT_FPGAMGRDATA
45  * FPGA Manager Module Configuration Data
46  *
47  * Registers in the FPGA Manager module accessible via its AXI slave
48  *
49  */
50 /*
51  * Register : Write Data Register - data
52  *
53  * Used to send configuration image to FPGA.
54  *
55  * The DATA register accepts 4 bytes of the configuration image on each write. The
56  * configuration image byte-stream is converted into a 4-byte word with little-
57  * endian ordering. If the configuration image is not an integer multiple of 4
58  * bytes, software should pad the configuration image with extra zero bytes to make
59  * it an integer multiple of 4 bytes.
60  *
61  * The FPGA Manager converts the DATA to 16 bits wide when writing CB.DATA for
62  * partial reconfiguration.
63  *
64  * The FPGA Manager waits to transmit the data to the CB until the FPGA is able to
65  * receive it. For a full configuration, the FPGA Manager waits until the FPGA
66  * exits the Reset Phase and enters the Configuration Phase. For a partial
67  * reconfiguration, the FPGA Manager waits until the CB.PR_READY signal indicates
68  * that the FPGA is ready.
69  *
70  * Register Layout
71  *
72  * Bits | Access | Reset | Description
73  * :-------|:-------|:--------|:-----------------
74  * [31:0] | RW | Unknown | Write Data Value
75  *
76  */
77 /*
78  * Field : Write Data Value - value
79  *
80  * Accepts configuration image to be sent to CB when the HPS configures the FPGA.
81  * Software normally just writes this register. If software reads this register, it
82  * returns the value 0 and replies with an AXI SLVERR error.
83  *
84  * Field Access Macros:
85  *
86  */
87 /* The Least Significant Bit (LSB) position of the ALT_FPGAMGRDATA_DATA_VALUE register field. */
88 #define ALT_FPGAMGRDATA_DATA_VALUE_LSB 0
89 /* The Most Significant Bit (MSB) position of the ALT_FPGAMGRDATA_DATA_VALUE register field. */
90 #define ALT_FPGAMGRDATA_DATA_VALUE_MSB 31
91 /* The width in bits of the ALT_FPGAMGRDATA_DATA_VALUE register field. */
92 #define ALT_FPGAMGRDATA_DATA_VALUE_WIDTH 32
93 /* The mask used to set the ALT_FPGAMGRDATA_DATA_VALUE register field value. */
94 #define ALT_FPGAMGRDATA_DATA_VALUE_SET_MSK 0xffffffff
95 /* The mask used to clear the ALT_FPGAMGRDATA_DATA_VALUE register field value. */
96 #define ALT_FPGAMGRDATA_DATA_VALUE_CLR_MSK 0x00000000
97 /* The reset value of the ALT_FPGAMGRDATA_DATA_VALUE register field is UNKNOWN. */
98 #define ALT_FPGAMGRDATA_DATA_VALUE_RESET 0x0
99 /* Extracts the ALT_FPGAMGRDATA_DATA_VALUE field value from a register. */
100 #define ALT_FPGAMGRDATA_DATA_VALUE_GET(value) (((value) & 0xffffffff) >> 0)
101 /* Produces a ALT_FPGAMGRDATA_DATA_VALUE register field value suitable for setting the register. */
102 #define ALT_FPGAMGRDATA_DATA_VALUE_SET(value) (((value) << 0) & 0xffffffff)
103 
104 #ifndef __ASSEMBLY__
105 /*
106  * WARNING: The C register and register group struct declarations are provided for
107  * convenience and illustrative purposes. They should, however, be used with
108  * caution as the C language standard provides no guarantees about the alignment or
109  * atomicity of device memory accesses. The recommended practice for writing
110  * hardware drivers is to use the SoCAL access macros and alt_read_word() and
111  * alt_write_word() functions.
112  *
113  * The struct declaration for register ALT_FPGAMGRDATA_DATA.
114  */
115 struct ALT_FPGAMGRDATA_DATA_s
116 {
117  uint32_t value : 32; /* Write Data Value */
118 };
119 
120 /* The typedef declaration for register ALT_FPGAMGRDATA_DATA. */
121 typedef volatile struct ALT_FPGAMGRDATA_DATA_s ALT_FPGAMGRDATA_DATA_t;
122 #endif /* __ASSEMBLY__ */
123 
124 /* The byte offset of the ALT_FPGAMGRDATA_DATA register from the beginning of the component. */
125 #define ALT_FPGAMGRDATA_DATA_OFST 0x0
126 
127 #ifndef __ASSEMBLY__
128 /*
129  * WARNING: The C register and register group struct declarations are provided for
130  * convenience and illustrative purposes. They should, however, be used with
131  * caution as the C language standard provides no guarantees about the alignment or
132  * atomicity of device memory accesses. The recommended practice for writing
133  * hardware drivers is to use the SoCAL access macros and alt_read_word() and
134  * alt_write_word() functions.
135  *
136  * The struct declaration for register group ALT_FPGAMGRDATA.
137  */
138 struct ALT_FPGAMGRDATA_s
139 {
140  ALT_FPGAMGRDATA_DATA_t data; /* ALT_FPGAMGRDATA_DATA */
141 };
142 
143 /* The typedef declaration for register group ALT_FPGAMGRDATA. */
144 typedef volatile struct ALT_FPGAMGRDATA_s ALT_FPGAMGRDATA_t;
145 /* The struct declaration for the raw register contents of register group ALT_FPGAMGRDATA. */
146 struct ALT_FPGAMGRDATA_raw_s
147 {
148  volatile uint32_t data; /* ALT_FPGAMGRDATA_DATA */
149 };
150 
151 /* The typedef declaration for the raw register contents of register group ALT_FPGAMGRDATA. */
152 typedef volatile struct ALT_FPGAMGRDATA_raw_s ALT_FPGAMGRDATA_raw_t;
153 #endif /* __ASSEMBLY__ */
154 
155 
156 #ifdef __cplusplus
157 }
158 #endif /* __cplusplus */
159 #endif /* __ALTERA_ALT_FPGAMGRDATA_H__ */
160