Hardware Libraries  20.1
Stratix 10 SoC Hardware Manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
alt_clkmgr_altera.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_CLKMGR_ALTERA */
34 
35 #ifndef __ALT_SOCAL_CLKMGR_ALTERA_H__
36 #define __ALT_SOCAL_CLKMGR_ALTERA_H__
37 
38 #ifndef __ASSEMBLY__
39 #ifdef __cplusplus
40 #include <cstdint>
41 extern "C"
42 {
43 #else /* __cplusplus */
44 #include <stdint.h>
45 #endif /* __cplusplus */
46 #endif /* __ASSEMBLY__ */
47 
48 /*
49  * Component : Altera internal use only registers Group - CLKMGR_ALTERA
50  * Altera internal use only registers Group
51  *
52  * Contains registers with settings for Altera internal use.
53  *
54  */
55 /*
56  * Register : jtag
57  *
58  * Jtag control registers for the PLLs
59  *
60  * Register Layout
61  *
62  * Bits | Access | Reset | Description
63  * :-------|:-------|:------|:----------------------------
64  * [7:0] | RW | 0x80 | ALT_CLKMGR_ALTERA_JTAG_ADDR
65  * [8] | RW | 0x1 | ALT_CLKMGR_ALTERA_JTAG_RST
66  * [31:9] | ??? | 0x0 | *UNDEFINED*
67  *
68  */
69 /*
70  * Field : addr
71  *
72  * JTAG address for both the PLLs
73  *
74  * Field Access Macros:
75  *
76  */
77 /* The Least Significant Bit (LSB) position of the ALT_CLKMGR_ALTERA_JTAG_ADDR register field. */
78 #define ALT_CLKMGR_ALTERA_JTAG_ADDR_LSB 0
79 /* The Most Significant Bit (MSB) position of the ALT_CLKMGR_ALTERA_JTAG_ADDR register field. */
80 #define ALT_CLKMGR_ALTERA_JTAG_ADDR_MSB 7
81 /* The width in bits of the ALT_CLKMGR_ALTERA_JTAG_ADDR register field. */
82 #define ALT_CLKMGR_ALTERA_JTAG_ADDR_WIDTH 8
83 /* The mask used to set the ALT_CLKMGR_ALTERA_JTAG_ADDR register field value. */
84 #define ALT_CLKMGR_ALTERA_JTAG_ADDR_SET_MSK 0x000000ff
85 /* The mask used to clear the ALT_CLKMGR_ALTERA_JTAG_ADDR register field value. */
86 #define ALT_CLKMGR_ALTERA_JTAG_ADDR_CLR_MSK 0xffffff00
87 /* The reset value of the ALT_CLKMGR_ALTERA_JTAG_ADDR register field. */
88 #define ALT_CLKMGR_ALTERA_JTAG_ADDR_RESET 0x80
89 /* Extracts the ALT_CLKMGR_ALTERA_JTAG_ADDR field value from a register. */
90 #define ALT_CLKMGR_ALTERA_JTAG_ADDR_GET(value) (((value) & 0x000000ff) >> 0)
91 /* Produces a ALT_CLKMGR_ALTERA_JTAG_ADDR register field value suitable for setting the register. */
92 #define ALT_CLKMGR_ALTERA_JTAG_ADDR_SET(value) (((value) << 0) & 0x000000ff)
93 
94 /*
95  * Field : rst
96  *
97  * Jtag rst signal. Its an active low signal.
98  *
99  * 1- reset de-asserted
100  *
101  * 0- reset asserted
102  *
103  * Field Access Macros:
104  *
105  */
106 /* The Least Significant Bit (LSB) position of the ALT_CLKMGR_ALTERA_JTAG_RST register field. */
107 #define ALT_CLKMGR_ALTERA_JTAG_RST_LSB 8
108 /* The Most Significant Bit (MSB) position of the ALT_CLKMGR_ALTERA_JTAG_RST register field. */
109 #define ALT_CLKMGR_ALTERA_JTAG_RST_MSB 8
110 /* The width in bits of the ALT_CLKMGR_ALTERA_JTAG_RST register field. */
111 #define ALT_CLKMGR_ALTERA_JTAG_RST_WIDTH 1
112 /* The mask used to set the ALT_CLKMGR_ALTERA_JTAG_RST register field value. */
113 #define ALT_CLKMGR_ALTERA_JTAG_RST_SET_MSK 0x00000100
114 /* The mask used to clear the ALT_CLKMGR_ALTERA_JTAG_RST register field value. */
115 #define ALT_CLKMGR_ALTERA_JTAG_RST_CLR_MSK 0xfffffeff
116 /* The reset value of the ALT_CLKMGR_ALTERA_JTAG_RST register field. */
117 #define ALT_CLKMGR_ALTERA_JTAG_RST_RESET 0x1
118 /* Extracts the ALT_CLKMGR_ALTERA_JTAG_RST field value from a register. */
119 #define ALT_CLKMGR_ALTERA_JTAG_RST_GET(value) (((value) & 0x00000100) >> 8)
120 /* Produces a ALT_CLKMGR_ALTERA_JTAG_RST register field value suitable for setting the register. */
121 #define ALT_CLKMGR_ALTERA_JTAG_RST_SET(value) (((value) << 8) & 0x00000100)
122 
123 #ifndef __ASSEMBLY__
124 /*
125  * WARNING: The C register and register group struct declarations are provided for
126  * convenience and illustrative purposes. They should, however, be used with
127  * caution as the C language standard provides no guarantees about the alignment or
128  * atomicity of device memory accesses. The recommended practice for coding device
129  * drivers is to use the SoCAL access macros in conjunction with alt_read_word()
130  * and alt_write_word() functions for 32 bit registers and alt_read_dword() and
131  * alt_write_dword() functions for 64 bit registers.
132  *
133  * The struct declaration for register ALT_CLKMGR_ALTERA_JTAG.
134  */
135 struct ALT_CLKMGR_ALTERA_JTAG_s
136 {
137  volatile uint32_t addr : 8; /* ALT_CLKMGR_ALTERA_JTAG_ADDR */
138  volatile uint32_t rst : 1; /* ALT_CLKMGR_ALTERA_JTAG_RST */
139  uint32_t : 23; /* *UNDEFINED* */
140 };
141 
142 /* The typedef declaration for register ALT_CLKMGR_ALTERA_JTAG. */
143 typedef struct ALT_CLKMGR_ALTERA_JTAG_s ALT_CLKMGR_ALTERA_JTAG_t;
144 #endif /* __ASSEMBLY__ */
145 
146 /* The reset value of the ALT_CLKMGR_ALTERA_JTAG register. */
147 #define ALT_CLKMGR_ALTERA_JTAG_RESET 0x00000180
148 /* The byte offset of the ALT_CLKMGR_ALTERA_JTAG register from the beginning of the component. */
149 #define ALT_CLKMGR_ALTERA_JTAG_OFST 0x0
150 
151 #ifndef __ASSEMBLY__
152 /*
153  * WARNING: The C register and register group struct declarations are provided for
154  * convenience and illustrative purposes. They should, however, be used with
155  * caution as the C language standard provides no guarantees about the alignment or
156  * atomicity of device memory accesses. The recommended practice for coding device
157  * drivers is to use the SoCAL access macros in conjunction with alt_read_word()
158  * and alt_write_word() functions for 32 bit registers and alt_read_dword() and
159  * alt_write_dword() functions for 64 bit registers.
160  *
161  * The struct declaration for register group ALT_CLKMGR_ALTERA.
162  */
163 struct ALT_CLKMGR_ALTERA_s
164 {
165  volatile ALT_CLKMGR_ALTERA_JTAG_t jtag; /* ALT_CLKMGR_ALTERA_JTAG */
166  volatile uint32_t _pad_0x4_0x20[7]; /* *UNDEFINED* */
167 };
168 
169 /* The typedef declaration for register group ALT_CLKMGR_ALTERA. */
170 typedef struct ALT_CLKMGR_ALTERA_s ALT_CLKMGR_ALTERA_t;
171 /* The struct declaration for the raw register contents of register group ALT_CLKMGR_ALTERA. */
172 struct ALT_CLKMGR_ALTERA_raw_s
173 {
174  volatile uint32_t jtag; /* ALT_CLKMGR_ALTERA_JTAG */
175  volatile uint32_t _pad_0x4_0x20[7]; /* *UNDEFINED* */
176 };
177 
178 /* The typedef declaration for the raw register contents of register group ALT_CLKMGR_ALTERA. */
179 typedef struct ALT_CLKMGR_ALTERA_raw_s ALT_CLKMGR_ALTERA_raw_t;
180 #endif /* __ASSEMBLY__ */
181 
182 
183 #ifdef __cplusplus
184 }
185 #endif /* __cplusplus */
186 #endif /* __ALT_SOCAL_CLKMGR_ALTERA_H__ */
187