Altera SoCAL  16.0
The Altera SoC Abstraction Layer (SoCAL) API Reference Manual
 All Data Structures Variables Typedefs Groups
alt_scanmgr.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 
35 #ifndef __ALTERA_ALT_SCANMGR_H__
36 #define __ALTERA_ALT_SCANMGR_H__
37 
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #endif /* __cplusplus */
42 
103 #define ALT_SCANMGR_STAT_TRST_E_DONT_RST_FPGA_JTAG 0x0
104 
110 #define ALT_SCANMGR_STAT_TRST_E_RST_FPGA_JTAG 0x1
111 
113 #define ALT_SCANMGR_STAT_TRST_LSB 1
114 
115 #define ALT_SCANMGR_STAT_TRST_MSB 1
116 
117 #define ALT_SCANMGR_STAT_TRST_WIDTH 1
118 
119 #define ALT_SCANMGR_STAT_TRST_SET_MSK 0x00000002
120 
121 #define ALT_SCANMGR_STAT_TRST_CLR_MSK 0xfffffffd
122 
123 #define ALT_SCANMGR_STAT_TRST_RESET 0x0
124 
125 #define ALT_SCANMGR_STAT_TRST_GET(value) (((value) & 0x00000002) >> 1)
126 
127 #define ALT_SCANMGR_STAT_TRST_SET(value) (((value) << 1) & 0x00000002)
128 
140 #define ALT_SCANMGR_STAT_IGNORE_LSB 3
141 
142 #define ALT_SCANMGR_STAT_IGNORE_MSB 3
143 
144 #define ALT_SCANMGR_STAT_IGNORE_WIDTH 1
145 
146 #define ALT_SCANMGR_STAT_IGNORE_SET_MSK 0x00000008
147 
148 #define ALT_SCANMGR_STAT_IGNORE_CLR_MSK 0xfffffff7
149 
150 #define ALT_SCANMGR_STAT_IGNORE_RESET 0x0
151 
152 #define ALT_SCANMGR_STAT_IGNORE_GET(value) (((value) & 0x00000008) >> 3)
153 
154 #define ALT_SCANMGR_STAT_IGNORE_SET(value) (((value) << 3) & 0x00000008)
155 
166 #define ALT_SCANMGR_STAT_RFIFOCNT_LSB 24
167 
168 #define ALT_SCANMGR_STAT_RFIFOCNT_MSB 26
169 
170 #define ALT_SCANMGR_STAT_RFIFOCNT_WIDTH 3
171 
172 #define ALT_SCANMGR_STAT_RFIFOCNT_SET_MSK 0x07000000
173 
174 #define ALT_SCANMGR_STAT_RFIFOCNT_CLR_MSK 0xf8ffffff
175 
176 #define ALT_SCANMGR_STAT_RFIFOCNT_RESET 0x0
177 
178 #define ALT_SCANMGR_STAT_RFIFOCNT_GET(value) (((value) & 0x07000000) >> 24)
179 
180 #define ALT_SCANMGR_STAT_RFIFOCNT_SET(value) (((value) << 24) & 0x07000000)
181 
192 #define ALT_SCANMGR_STAT_WFIFOCNT_LSB 28
193 
194 #define ALT_SCANMGR_STAT_WFIFOCNT_MSB 30
195 
196 #define ALT_SCANMGR_STAT_WFIFOCNT_WIDTH 3
197 
198 #define ALT_SCANMGR_STAT_WFIFOCNT_SET_MSK 0x70000000
199 
200 #define ALT_SCANMGR_STAT_WFIFOCNT_CLR_MSK 0x8fffffff
201 
202 #define ALT_SCANMGR_STAT_WFIFOCNT_RESET 0x0
203 
204 #define ALT_SCANMGR_STAT_WFIFOCNT_GET(value) (((value) & 0x70000000) >> 28)
205 
206 #define ALT_SCANMGR_STAT_WFIFOCNT_SET(value) (((value) << 28) & 0x70000000)
207 
241 #define ALT_SCANMGR_STAT_ACT_E_POSSIBLY_INACT 0x0
242 
247 #define ALT_SCANMGR_STAT_ACT_E_ACT 0x1
248 
250 #define ALT_SCANMGR_STAT_ACT_LSB 31
251 
252 #define ALT_SCANMGR_STAT_ACT_MSB 31
253 
254 #define ALT_SCANMGR_STAT_ACT_WIDTH 1
255 
256 #define ALT_SCANMGR_STAT_ACT_SET_MSK 0x80000000
257 
258 #define ALT_SCANMGR_STAT_ACT_CLR_MSK 0x7fffffff
259 
260 #define ALT_SCANMGR_STAT_ACT_RESET 0x0
261 
262 #define ALT_SCANMGR_STAT_ACT_GET(value) (((value) & 0x80000000) >> 31)
263 
264 #define ALT_SCANMGR_STAT_ACT_SET(value) (((value) << 31) & 0x80000000)
265 
266 #ifndef __ASSEMBLY__
267 
278 {
279  uint32_t : 1;
280  uint32_t trst : 1;
281  uint32_t : 1;
282  const uint32_t ignore : 1;
283  uint32_t : 20;
284  const uint32_t rfifocnt : 3;
285  uint32_t : 1;
286  const uint32_t wfifocnt : 3;
287  const uint32_t active : 1;
288 };
289 
291 typedef volatile struct ALT_SCANMGR_STAT_s ALT_SCANMGR_STAT_t;
292 #endif /* __ASSEMBLY__ */
293 
295 #define ALT_SCANMGR_STAT_OFST 0x0
296 
350 #define ALT_SCANMGR_EN_IOSCANCHAIN0_E_DIS 0x0
351 
356 #define ALT_SCANMGR_EN_IOSCANCHAIN0_E_EN 0x1
357 
359 #define ALT_SCANMGR_EN_IOSCANCHAIN0_LSB 0
360 
361 #define ALT_SCANMGR_EN_IOSCANCHAIN0_MSB 0
362 
363 #define ALT_SCANMGR_EN_IOSCANCHAIN0_WIDTH 1
364 
365 #define ALT_SCANMGR_EN_IOSCANCHAIN0_SET_MSK 0x00000001
366 
367 #define ALT_SCANMGR_EN_IOSCANCHAIN0_CLR_MSK 0xfffffffe
368 
369 #define ALT_SCANMGR_EN_IOSCANCHAIN0_RESET 0x0
370 
371 #define ALT_SCANMGR_EN_IOSCANCHAIN0_GET(value) (((value) & 0x00000001) >> 0)
372 
373 #define ALT_SCANMGR_EN_IOSCANCHAIN0_SET(value) (((value) << 0) & 0x00000001)
374 
397 #define ALT_SCANMGR_EN_IOSCANCHAIN1_E_DIS 0x0
398 
403 #define ALT_SCANMGR_EN_IOSCANCHAIN1_E_EN 0x1
404 
406 #define ALT_SCANMGR_EN_IOSCANCHAIN1_LSB 1
407 
408 #define ALT_SCANMGR_EN_IOSCANCHAIN1_MSB 1
409 
410 #define ALT_SCANMGR_EN_IOSCANCHAIN1_WIDTH 1
411 
412 #define ALT_SCANMGR_EN_IOSCANCHAIN1_SET_MSK 0x00000002
413 
414 #define ALT_SCANMGR_EN_IOSCANCHAIN1_CLR_MSK 0xfffffffd
415 
416 #define ALT_SCANMGR_EN_IOSCANCHAIN1_RESET 0x0
417 
418 #define ALT_SCANMGR_EN_IOSCANCHAIN1_GET(value) (((value) & 0x00000002) >> 1)
419 
420 #define ALT_SCANMGR_EN_IOSCANCHAIN1_SET(value) (((value) << 1) & 0x00000002)
421 
444 #define ALT_SCANMGR_EN_IOSCANCHAIN2_E_DIS 0x0
445 
450 #define ALT_SCANMGR_EN_IOSCANCHAIN2_E_EN 0x1
451 
453 #define ALT_SCANMGR_EN_IOSCANCHAIN2_LSB 2
454 
455 #define ALT_SCANMGR_EN_IOSCANCHAIN2_MSB 2
456 
457 #define ALT_SCANMGR_EN_IOSCANCHAIN2_WIDTH 1
458 
459 #define ALT_SCANMGR_EN_IOSCANCHAIN2_SET_MSK 0x00000004
460 
461 #define ALT_SCANMGR_EN_IOSCANCHAIN2_CLR_MSK 0xfffffffb
462 
463 #define ALT_SCANMGR_EN_IOSCANCHAIN2_RESET 0x0
464 
465 #define ALT_SCANMGR_EN_IOSCANCHAIN2_GET(value) (((value) & 0x00000004) >> 2)
466 
467 #define ALT_SCANMGR_EN_IOSCANCHAIN2_SET(value) (((value) << 2) & 0x00000004)
468 
491 #define ALT_SCANMGR_EN_IOSCANCHAIN3_E_DIS 0x0
492 
497 #define ALT_SCANMGR_EN_IOSCANCHAIN3_E_EN 0x1
498 
500 #define ALT_SCANMGR_EN_IOSCANCHAIN3_LSB 3
501 
502 #define ALT_SCANMGR_EN_IOSCANCHAIN3_MSB 3
503 
504 #define ALT_SCANMGR_EN_IOSCANCHAIN3_WIDTH 1
505 
506 #define ALT_SCANMGR_EN_IOSCANCHAIN3_SET_MSK 0x00000008
507 
508 #define ALT_SCANMGR_EN_IOSCANCHAIN3_CLR_MSK 0xfffffff7
509 
510 #define ALT_SCANMGR_EN_IOSCANCHAIN3_RESET 0x0
511 
512 #define ALT_SCANMGR_EN_IOSCANCHAIN3_GET(value) (((value) & 0x00000008) >> 3)
513 
514 #define ALT_SCANMGR_EN_IOSCANCHAIN3_SET(value) (((value) << 3) & 0x00000008)
515 
540 #define ALT_SCANMGR_EN_FPGAJTAG_E_DIS 0x0
541 
546 #define ALT_SCANMGR_EN_FPGAJTAG_E_EN 0x1
547 
549 #define ALT_SCANMGR_EN_FPGAJTAG_LSB 7
550 
551 #define ALT_SCANMGR_EN_FPGAJTAG_MSB 7
552 
553 #define ALT_SCANMGR_EN_FPGAJTAG_WIDTH 1
554 
555 #define ALT_SCANMGR_EN_FPGAJTAG_SET_MSK 0x00000080
556 
557 #define ALT_SCANMGR_EN_FPGAJTAG_CLR_MSK 0xffffff7f
558 
559 #define ALT_SCANMGR_EN_FPGAJTAG_RESET 0x0
560 
561 #define ALT_SCANMGR_EN_FPGAJTAG_GET(value) (((value) & 0x00000080) >> 7)
562 
563 #define ALT_SCANMGR_EN_FPGAJTAG_SET(value) (((value) << 7) & 0x00000080)
564 
565 #ifndef __ASSEMBLY__
566 
577 {
578  uint32_t ioscanchain0 : 1;
579  uint32_t ioscanchain1 : 1;
580  uint32_t ioscanchain2 : 1;
581  uint32_t ioscanchain3 : 1;
582  uint32_t : 3;
583  uint32_t fpgajtag : 1;
584  uint32_t : 24;
585 };
586 
588 typedef volatile struct ALT_SCANMGR_EN_s ALT_SCANMGR_EN_t;
589 #endif /* __ASSEMBLY__ */
590 
592 #define ALT_SCANMGR_EN_OFST 0x4
593 
627 #define ALT_SCANMGR_FIFOSINGLEBYTE_VALUE_LSB 0
628 
629 #define ALT_SCANMGR_FIFOSINGLEBYTE_VALUE_MSB 7
630 
631 #define ALT_SCANMGR_FIFOSINGLEBYTE_VALUE_WIDTH 8
632 
633 #define ALT_SCANMGR_FIFOSINGLEBYTE_VALUE_SET_MSK 0x000000ff
634 
635 #define ALT_SCANMGR_FIFOSINGLEBYTE_VALUE_CLR_MSK 0xffffff00
636 
637 #define ALT_SCANMGR_FIFOSINGLEBYTE_VALUE_RESET 0x0
638 
639 #define ALT_SCANMGR_FIFOSINGLEBYTE_VALUE_GET(value) (((value) & 0x000000ff) >> 0)
640 
641 #define ALT_SCANMGR_FIFOSINGLEBYTE_VALUE_SET(value) (((value) << 0) & 0x000000ff)
642 
643 #ifndef __ASSEMBLY__
644 
655 {
656  uint32_t value : 8;
657  uint32_t : 24;
658 };
659 
662 #endif /* __ASSEMBLY__ */
663 
665 #define ALT_SCANMGR_FIFOSINGLEBYTE_OFST 0x10
666 
700 #define ALT_SCANMGR_FIFODOUBLEBYTE_VALUE_LSB 0
701 
702 #define ALT_SCANMGR_FIFODOUBLEBYTE_VALUE_MSB 15
703 
704 #define ALT_SCANMGR_FIFODOUBLEBYTE_VALUE_WIDTH 16
705 
706 #define ALT_SCANMGR_FIFODOUBLEBYTE_VALUE_SET_MSK 0x0000ffff
707 
708 #define ALT_SCANMGR_FIFODOUBLEBYTE_VALUE_CLR_MSK 0xffff0000
709 
710 #define ALT_SCANMGR_FIFODOUBLEBYTE_VALUE_RESET 0x0
711 
712 #define ALT_SCANMGR_FIFODOUBLEBYTE_VALUE_GET(value) (((value) & 0x0000ffff) >> 0)
713 
714 #define ALT_SCANMGR_FIFODOUBLEBYTE_VALUE_SET(value) (((value) << 0) & 0x0000ffff)
715 
716 #ifndef __ASSEMBLY__
717 
728 {
729  uint32_t value : 16;
730  uint32_t : 16;
731 };
732 
735 #endif /* __ASSEMBLY__ */
736 
738 #define ALT_SCANMGR_FIFODOUBLEBYTE_OFST 0x14
739 
773 #define ALT_SCANMGR_FIFOTRIPLEBYTE_VALUE_LSB 0
774 
775 #define ALT_SCANMGR_FIFOTRIPLEBYTE_VALUE_MSB 23
776 
777 #define ALT_SCANMGR_FIFOTRIPLEBYTE_VALUE_WIDTH 24
778 
779 #define ALT_SCANMGR_FIFOTRIPLEBYTE_VALUE_SET_MSK 0x00ffffff
780 
781 #define ALT_SCANMGR_FIFOTRIPLEBYTE_VALUE_CLR_MSK 0xff000000
782 
783 #define ALT_SCANMGR_FIFOTRIPLEBYTE_VALUE_RESET 0x0
784 
785 #define ALT_SCANMGR_FIFOTRIPLEBYTE_VALUE_GET(value) (((value) & 0x00ffffff) >> 0)
786 
787 #define ALT_SCANMGR_FIFOTRIPLEBYTE_VALUE_SET(value) (((value) << 0) & 0x00ffffff)
788 
789 #ifndef __ASSEMBLY__
790 
801 {
802  uint32_t value : 24;
803  uint32_t : 8;
804 };
805 
808 #endif /* __ASSEMBLY__ */
809 
811 #define ALT_SCANMGR_FIFOTRIPLEBYTE_OFST 0x18
812 
845 #define ALT_SCANMGR_FIFOQUADBYTE_VALUE_LSB 0
846 
847 #define ALT_SCANMGR_FIFOQUADBYTE_VALUE_MSB 31
848 
849 #define ALT_SCANMGR_FIFOQUADBYTE_VALUE_WIDTH 32
850 
851 #define ALT_SCANMGR_FIFOQUADBYTE_VALUE_SET_MSK 0xffffffff
852 
853 #define ALT_SCANMGR_FIFOQUADBYTE_VALUE_CLR_MSK 0x00000000
854 
855 #define ALT_SCANMGR_FIFOQUADBYTE_VALUE_RESET 0x0
856 
857 #define ALT_SCANMGR_FIFOQUADBYTE_VALUE_GET(value) (((value) & 0xffffffff) >> 0)
858 
859 #define ALT_SCANMGR_FIFOQUADBYTE_VALUE_SET(value) (((value) << 0) & 0xffffffff)
860 
861 #ifndef __ASSEMBLY__
862 
873 {
874  uint32_t value : 32;
875 };
876 
879 #endif /* __ASSEMBLY__ */
880 
882 #define ALT_SCANMGR_FIFOQUADBYTE_OFST 0x1c
883 
884 #ifndef __ASSEMBLY__
885 
896 {
898  volatile ALT_SCANMGR_EN_t en;
899  volatile uint32_t _pad_0x8_0xf[2];
904 };
905 
907 typedef volatile struct ALT_SCANMGR_s ALT_SCANMGR_t;
910 {
911  volatile uint32_t stat;
912  volatile uint32_t en;
913  volatile uint32_t _pad_0x8_0xf[2];
914  volatile uint32_t fifosinglebyte;
915  volatile uint32_t fifodoublebyte;
916  volatile uint32_t fifotriplebyte;
917  volatile uint32_t fifoquadbyte;
918 };
919 
921 typedef volatile struct ALT_SCANMGR_raw_s ALT_SCANMGR_raw_t;
922 #endif /* __ASSEMBLY__ */
923 
925 #ifdef __cplusplus
926 }
927 #endif /* __cplusplus */
928 #endif /* __ALTERA_ALT_SCANMGR_H__ */
929