[processor-sdk/performance-audio-sr.git] / psdk_cust / pdk_k2g_1_0_1_0_eng / packages / ti / csl / csl_cgemAux.h
1 /**
2 * @file csl_cgemAux.h
3 *
4 * @brief
5 * This is the CGEM Auxilary Header file.
6 *
7 * \par
8 * ============================================================================
9 * @n (C) Copyright 2010 Texas Instruments, Inc.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 *
15 * Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 *
18 * Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the
21 * distribution.
22 *
23 * Neither the name of Texas Instruments Incorporated nor the names of
24 * its contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
26 *
27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
30 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 *
39 */
41 #ifndef _CSL_CGEMAUX_H_
42 #define _CSL_CGEMAUX_H_
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
48 #include <ti/csl/csl_cgem.h>
50 /** @addtogroup CSL_CGEM_FUNCTION
51 @{ */
53 /** ============================================================================
54 * @n@b CSL_CGEM_getECFGPriorityLevel
55 *
56 * @b Description
57 * @n This function gets the UMC priority level of MDMA requests.
58 *
59 * @b Arguments
60 @verbatim
61 priorityLevel - Priority Level populated by this API
62 @endverbatim
63 *
64 * <b> Return Value </b>
65 * @n None
66 *
67 * <b> Pre Condition </b>
68 * @n None
69 *
70 * <b> Post Condition </b>
71 * @n None
72 *
73 * @b Reads
74 * @n CGEM_ECFGARBE_PRI
75 *
76 * @b Example
77 * @verbatim
78 Uint8 priorityLevel;
80 CSL_CGEM_getECFGPriorityLevel (&priorityLevel);
82 @endverbatim
83 * =============================================================================
84 */
85 static inline void CSL_CGEM_getECFGPriorityLevel(Uint8* priorityLevel)
86 {
87 *priorityLevel = CSL_FEXT(hCGEM->ECFGARBE, CGEM_ECFGARBE_PRI);
88 }
90 /** ============================================================================
91 * @n@b CSL_CGEM_setECFGPriorityLevel
92 *
93 * @b Description
94 * @n This function sets the UMC priority level of MDMA requests.
95 *
96 * @b Arguments
97 @verbatim
98 priorityLevel - Priority Level to be configured
99 @endverbatim
100 *
101 * <b> Return Value </b>
102 * @n None
103 *
104 * <b> Pre Condition </b>
105 * @n None
106 *
107 * <b> Post Condition </b>
108 * @n None
109 *
110 * @b Writes
111 * @n CGEM_ECFGARBE_PRI
112 *
113 * @b Example
114 * @verbatim
116 CSL_CGEM_setECFGPriorityLevel (1);
118 @endverbatim
119 * =============================================================================
120 */
121 static inline void CSL_CGEM_setECFGPriorityLevel(Uint8 priorityLevel)
122 {
123 CSL_FINS(hCGEM->ECFGARBE, CGEM_ECFGARBE_PRI, priorityLevel);
124 }
126 /** ============================================================================
127 * @n@b CSL_CGEM_getEMCFaultAddress
128 *
129 * @b Description
130 * @n This function gets the EMC Fault address
131 *
132 * @b Arguments
133 @verbatim
134 faultAddress - Fault Address populated by this API
135 @endverbatim
136 *
137 * <b> Return Value </b>
138 * @n None
139 *
140 * <b> Pre Condition </b>
141 * @n None
142 *
143 * <b> Post Condition </b>
144 * @n None
145 *
146 * @b Reads
147 * @n CGEM_ICFGMPFAR
148 *
149 * @b Example
150 * @verbatim
151 Uint32 faultAddress;
153 CSL_CGEM_getEMCFaultAddress (&faultAddress);
155 @endverbatim
156 * =============================================================================
157 */
158 static inline void CSL_CGEM_getEMCFaultAddress(Uint32* faultAddress)
159 {
160 *faultAddress = hCGEM->ICFGMPFAR;
161 }
163 /** ============================================================================
164 * @n@b CSL_CGEM_getEMCFaultStatus
165 *
166 * @b Description
167 * @n This function gets the EMC Fault status
168 *
169 * @b Arguments
170 @verbatim
171 faultStatus - Fault Status populated by this API
172 faultId - Fault Identifier populated by this API
173 @endverbatim
174 *
175 * <b> Return Value </b>
176 * @n None
177 *
178 * <b> Pre Condition </b>
179 * @n None
180 *
181 * <b> Post Condition </b>
182 * @n None
183 *
184 * @b Reads
185 * @n CGEM_ICFGMPFSR_FID
186 *
187 * @b Example
188 * @verbatim
189 Uint8 faultStatus;
190 Uint8 faultId;
192 // Get the EMC Fault Status
193 CSL_CGEM_getEMCFaultStatus (&faultStatus, &faultId);
194 if (faultStatus != 0)
195 {
196 // Fault Detected
197 }
198 else
199 {
200 // No Fault
201 }
203 @endverbatim
204 * =============================================================================
205 */
206 static inline void CSL_CGEM_getEMCFaultStatus(Uint8* faultStatus, Uint8* faultId)
207 {
208 Uint32 value = hCGEM->ICFGMPFSR;
210 *faultStatus = CSL_FEXTR(value, 7, 0);
211 *faultId = CSL_FEXT(value, CGEM_ICFGMPFSR_FID);
212 }
214 /** ============================================================================
215 * @n@b CSL_CGEM_clearEMCFault
216 *
217 * @b Description
218 * @n This function clears the EMC Fault
219 *
220 * @b Arguments
221 @verbatim
222 None
223 @endverbatim
224 *
225 * <b> Return Value </b>
226 * @n None
227 *
228 * <b> Pre Condition </b>
229 * @n None
230 *
231 * <b> Post Condition </b>
232 * @n None
233 *
234 * @b Writes
235 * @n CGEM_ICFGMPFCR_MPFCLR=1
236 *
237 * @b Affects
238 * @n CGEM_ICFGMPFSR=0
239 *
240 * @b Example
241 * @verbatim
242 Uint8 faultStatus;
243 Uint8 faultId;
245 // Get the EMC Fault Status
246 CSL_CGEM_getEMCFaultStatus (&faultStatus, &faultId);
247 if (faultStatus != 0)
248 {
249 // Fault Detected
250 ...
251 // Clear the EMC Fault
252 CSL_CGEM_clearEMCFault();
253 }
254 else
255 {
256 // No Fault
257 }
259 @endverbatim
260 * =============================================================================
261 */
262 static inline void CSL_CGEM_clearEMCFault(void)
263 {
264 hCGEM->ICFGMPFCR = CSL_FMK(CGEM_ICFGMPFCR_MPFCLR, 1);
265 }
267 /** ============================================================================
268 * @n@b CSL_CGEM_getECFGErrorStatus
269 *
270 * @b Description
271 * @n This function gets the ECFG Error Status
272 *
273 * @b Arguments
274 @verbatim
275 stat - Transaction Status populated by this API
276 xid - Transaction ID populated by this API
277 err - Error Detected populated by this API
278 @endverbatim
279 *
280 * <b> Return Value </b>
281 * @n None
282 *
283 * <b> Pre Condition </b>
284 * @n None
285 *
286 * <b> Post Condition </b>
287 * @n None
288 *
289 * @b Reads
290 * @n CGEM_ECFGERR_STAT, CGEM_ECFGERR_XID, CGEM_ECFGERR_ERR
291 *
292 * @b Example
293 * @verbatim
294 Uint8 stat;
295 Uint8 xid;
296 Uint8 err;
298 // Get the ECFG Error Status
299 CSL_CGEM_getECFGErrorStatus (&stat, &xid, &err);
301 @endverbatim
302 * =============================================================================
303 */
304 static inline void CSL_CGEM_getECFGErrorStatus
305 (
306 Uint8* stat,
307 Uint8* xid,
308 Uint8* err
309 )
310 {
311 Uint32 value = hCGEM->ECFGERR;
313 *stat = CSL_FEXT(value, CGEM_ECFGERR_STAT);
314 *xid = CSL_FEXT(value, CGEM_ECFGERR_XID);
315 *err = CSL_FEXT(value, CGEM_ECFGERR_ERR);
316 }
318 /** ============================================================================
319 * @n@b CSL_CGEM_clearECFGError
320 *
321 * @b Description
322 * @n This function clears the ECFG Error Status
323 *
324 * @b Arguments
325 @verbatim
326 None
327 @endverbatim
328 *
329 * <b> Return Value </b>
330 * @n None
331 *
332 * <b> Pre Condition </b>
333 * @n None
334 *
335 * <b> Post Condition </b>
336 * @n None
337 *
338 * @b Writes
339 * @n CGEM_ECFGERRCLR_CLR=1
340 *
341 * @b Affects
342 * @n CGEM_ECFGERR=0
343 *
344 * @b Example
345 * @verbatim
346 Uint8 stat;
347 Uint8 xid;
348 Uint8 err;
350 // Get the ECFG Error Status
351 CSL_CGEM_getECFGErrorStatus (&stat, &xid, &err);
352 ...
353 // Clear the ECFG Error
354 CSL_CGEM_clearECFGError();
356 @endverbatim
357 * =============================================================================
358 */
359 static inline void CSL_CGEM_clearECFGError(void)
360 {
361 hCGEM->ECFGERRCLR = CSL_FMK(CGEM_ECFGERRCLR_CLR, 1);
362 }
364 /** ============================================================================
365 * @n@b CSL_CGEM_isL2EDCEnabled
366 *
367 * @b Description
368 * @n This function is used to check if the L2 EDC is enabled or not?
369 *
370 * @b Arguments
371 @verbatim
372 None
373 @endverbatim
374 *
375 * <b> Return Value </b>
376 * @n TRUE - L2 EDC is enabled.
377 * @n FALSE - L2 EDC is disabled.
378 *
379 * <b> Pre Condition </b>
380 * @n None
381 *
382 * <b> Post Condition </b>
383 * @n None
384 *
385 * @b Reads
386 * @n CGEM_L2EDSTAT_EN
387 *
388 * @b Example
389 * @verbatim
391 // Check if L2-EDC is enabled or not?
392 if (CSL_CGEM_isL2EDCEnabled() == TRUE)
393 {
394 // L2 EDC is enabled
395 }
396 else
397 {
398 // L2 EDC is disabled.
399 }
401 @endverbatim
402 * =============================================================================
403 */
404 static inline Bool CSL_CGEM_isL2EDCEnabled(void)
405 {
406 return (Bool)CSL_FEXT(hCGEM->L2EDSTAT, CGEM_L2EDSTAT_EN);
407 }
409 /** ============================================================================
410 * @n@b CSL_CGEM_isL2EDCSuspended
411 *
412 * @b Description
413 * @n This function is used to check if the L2 EDC is suspended or not?
414 *
415 * @b Arguments
416 @verbatim
417 None
418 @endverbatim
419 *
420 * <b> Return Value </b>
421 * @n TRUE - L2 EDC is suspended.
422 * @n FALSE - L2 EDC is NOT suspended.
423 *
424 * <b> Pre Condition </b>
425 * @n None
426 *
427 * <b> Post Condition </b>
428 * @n None
429 *
430 * @b Reads
431 * @n CGEM_L2EDSTAT_SUSP
432 *
433 * @b Example
434 * @verbatim
436 // Check if L2-EDC is suspended or not?
437 if (CSL_CGEM_isL2EDCSuspended() == TRUE)
438 {
439 // L2 EDC is suspended
440 }
441 else
442 {
443 // L2 EDC is not suspended.
444 }
446 @endverbatim
447 * =============================================================================
448 */
449 static inline Bool CSL_CGEM_isL2EDCSuspended(void)
450 {
451 return (Bool)CSL_FEXT(hCGEM->L2EDSTAT, CGEM_L2EDSTAT_SUSP);
452 }
454 /** ============================================================================
455 * @n@b CSL_CGEM_getL2EDCErrorStatus
456 *
457 * @b Description
458 * @n This function gets the error status associated with the L2 EDC.
459 *
460 * @b Arguments
461 @verbatim
462 derr - DERR field populated by this API
463 perr - Parity Check error field populated by this API
464 dmaerr - DMA Error populated by this API
465 verr - Victim Error field populated by this API
466 nerr - NERR field populated by this API
467 @endverbatim
468 *
469 * <b> Return Value </b>
470 * @n None
471 *
472 * <b> Pre Condition </b>
473 * @n None
474 *
475 * <b> Post Condition </b>
476 * @n None
477 *
478 * @b Reads
479 * @n CGEM_L2EDSTAT_DERR, CGEM_L2EDSTAT_PERR, CGEM_L2EDSTAT_DMAERR,
480 * @n CGEM_L2EDSTAT_VERR, CGEM_L2EDSTAT_NERR
481 *
482 * @b Example
483 * @verbatim
485 Uint8 derr;
486 Uint8 perr;
487 Uint8 dmaerr;
488 Uint8 verr;
489 Uint8 nerr;
491 // Get the L2 EDC Error Status
492 CSL_CGEM_getL2EDCErrorStatus(&derr, &perr, &dmaerr, &verr, &nerr);
494 @endverbatim
495 * =============================================================================
496 */
497 static inline void CSL_CGEM_getL2EDCErrorStatus
498 (
499 Uint8* derr,
500 Uint8* perr,
501 Uint8* dmaerr,
502 Uint8* verr,
503 Uint8* nerr
504 )
505 {
506 Uint32 value = hCGEM->L2EDSTAT;
508 *derr = CSL_FEXT(value, CGEM_L2EDSTAT_DERR);
509 *perr = CSL_FEXT(value, CGEM_L2EDSTAT_PERR);
510 *dmaerr = CSL_FEXT(value, CGEM_L2EDSTAT_DMAERR);
511 *verr = CSL_FEXT(value, CGEM_L2EDSTAT_VERR);
512 *nerr = CSL_FEXT(value, CGEM_L2EDSTAT_NERR);
513 }
515 /** ============================================================================
516 * @n@b CSL_CGEM_getL2EDCBitPosition
517 *
518 * @b Description
519 * @n This function gets the bit position on which 128bit half of the 256bit
520 * word caused the error.
521 *
522 * @b Arguments
523 @verbatim
524 bitPos - BitPos populated by this API
525 @endverbatim
526 *
527 * <b> Return Value </b>
528 * @n None
529 *
530 * <b> Pre Condition </b>
531 * @n None
532 *
533 * <b> Post Condition </b>
534 * @n None
535 *
536 * @b Reads
537 * @n CGEM_L2EDSTAT_BITPOS
538 *
539 * @b Example
540 * @verbatim
542 Uint8 bitPos;
544 // Get the L2 EDC Bit Position
545 CSL_CGEM_getL2EDCBitPosition(&bitPos);
547 @endverbatim
548 * =============================================================================
549 */
550 static inline void CSL_CGEM_getL2EDCBitPosition (Uint8* bitPos)
551 {
552 *bitPos = CSL_FEXT(hCGEM->L2EDSTAT, CGEM_L2EDSTAT_BITPOS);
553 }
555 /** ============================================================================
556 * @n@b CSL_CGEM_clearL2EDCErrorStatus
557 *
558 * @b Description
559 * @n This function clears the error status associated with the L2 EDC.
560 *
561 * @b Arguments
562 @verbatim
563 derr - DERR field to be cleared.
564 perr - Parity Check Error field to be cleared.
565 dmaerr - DMA Error to be cleared.
566 verr - Victim Error to be cleared.
567 @endverbatim
568 *
569 * <b> Return Value </b>
570 * @n None
571 *
572 * <b> Pre Condition </b>
573 * @n None
574 *
575 * <b> Post Condition </b>
576 * @n None
577 *
578 * @b Writes
579 * @n CGEM_L2EDCMD_DCLR, CGEM_L2EDCMD_PCLR, CGEM_L2EDCMD_DMACLR,
580 * @n CGEM_L2EDCMD_VCLR
581 *
582 * @b Affects
583 * @n CGEM_L2EDSTAT_DERR=0, CGEM_L2EDSTAT_PERR=0, CGEM_L2EDSTAT_DMAERR=0,
584 * @n CGEM_L2EDSTAT_VERR=0, CGEM_L2EDSTAT_NERR=0
585 *
586 * @b Example
587 * @verbatim
589 Uint8 derr;
590 Uint8 perr;
591 Uint8 dmaerr;
592 Uint8 verr;
593 Uint8 nerr;
595 // Get the L2 EDC Error Status
596 CSL_CGEM_getL2EDCErrorStatus(&derr, &perr, &dmaerr, &verr, &nerr);
597 ...
598 // Clear the L2 EDC Error Status
599 CSL_CGEM_clearL2EDCErrorStatus(derr, perr, dmaerr, verr);
600 ...
601 @endverbatim
602 * =============================================================================
603 */
604 static inline void CSL_CGEM_clearL2EDCErrorStatus
605 (
606 Uint8 derr,
607 Uint8 perr,
608 Uint8 dmaerr,
609 Uint8 verr
610 )
611 {
612 Uint32 value = 0;
614 /* We dont want to touch the SUSP, DIS or EN bits in the L2EDCMD register */
615 CSL_FINS(value, CGEM_L2EDCMD_DCLR, derr);
616 CSL_FINS(value, CGEM_L2EDCMD_PCLR, perr);
617 CSL_FINS(value, CGEM_L2EDCMD_DMACLR, dmaerr);
618 CSL_FINS(value, CGEM_L2EDCMD_VCLR, verr);
620 /* Since we are configuring the SUSP, DIS or EN bits i.e. they are set to 0. The
621 * write here to the register should not have any affect on the ED State. */
622 hCGEM->L2EDCMD = value;
623 }
625 /** ============================================================================
626 * @n@b CSL_CGEM_enableL2EDC
627 *
628 * @b Description
629 * @n This function enables the L2 EDC
630 *
631 * @b Arguments
632 @verbatim
633 None
634 @endverbatim
635 *
636 * <b> Return Value </b>
637 * @n None
638 *
639 * <b> Pre Condition </b>
640 * @n None
641 *
642 * <b> Post Condition </b>
643 * @n None
644 *
645 * @b Writes
646 * @n CGEM_L2EDCMD_EN=1
647 *
648 * @b Affects
649 * @n CGEM_L2EDSTAT_EN=1
650 *
651 * @b Example
652 * @verbatim
654 // Enable L2 EDC
655 CSL_CGEM_enableL2EDC();
657 @endverbatim
658 * =============================================================================
659 */
660 static inline void CSL_CGEM_enableL2EDC(void)
661 {
662 hCGEM->L2EDCMD = CSL_FMK(CGEM_L2EDCMD_EN, 1);
663 }
665 /** ============================================================================
666 * @n@b CSL_CGEM_disableL2EDC
667 *
668 * @b Description
669 * @n This function disables the L2 EDC
670 *
671 * @b Arguments
672 @verbatim
673 None
674 @endverbatim
675 *
676 * <b> Return Value </b>
677 * @n None
678 *
679 * <b> Pre Condition </b>
680 * @n None
681 *
682 * <b> Post Condition </b>
683 * @n None
684 *
685 * @b Writes
686 * @n CGEM_L2EDCMD_DIS=1
687 *
688 * @b Affects
689 * @n CGEM_L2EDSTAT_DIS=1
690 *
691 * @b Example
692 * @verbatim
694 // Disable L2 EDC
695 CSL_CGEM_disableL2EDC();
697 @endverbatim
698 * =============================================================================
699 */
700 static inline void CSL_CGEM_disableL2EDC(void)
701 {
702 hCGEM->L2EDCMD = CSL_FMK (CGEM_L2EDCMD_DIS, 1);
703 }
705 /** ============================================================================
706 * @n@b CSL_CGEM_suspendL2EDC
707 *
708 * @b Description
709 * @n This function suspends the L2 EDC
710 *
711 * @b Arguments
712 @verbatim
713 None
714 @endverbatim
715 *
716 * <b> Return Value </b>
717 * @n None
718 *
719 * <b> Pre Condition </b>
720 * @n None
721 *
722 * <b> Post Condition </b>
723 * @n None
724 *
725 * @b Writes
726 * @n CGEM_L2EDCMD_SUSP=1
727 *
728 * @b Affects
729 * @n CGEM_L2EDSTAT_SUSP=1
730 *
731 * @b Example
732 * @verbatim
734 // Suspend L2 EDC
735 CSL_CGEM_suspendL2EDC();
737 @endverbatim
738 * =============================================================================
739 */
740 static inline void CSL_CGEM_suspendL2EDC(void)
741 {
742 hCGEM->L2EDCMD = CSL_FMK (CGEM_L2EDCMD_SUSP, 1);
743 }
745 /** ============================================================================
746 * @n@b CSL_CGEM_getL2EDCErrorInfo
747 *
748 * @b Description
749 * @n This function gets the L2 EDC Error Information
750 *
751 * @b Arguments
752 @verbatim
753 errAddr - Error Address populated by this API
754 l2way - The way in the cache which caused the error.
755 ram - Flag which indicates if the error was detected in CACHE or RAM
756 @endverbatim
757 *
758 * <b> Return Value </b>
759 * @n None
760 *
761 * <b> Pre Condition </b>
762 * @n None
763 *
764 * <b> Post Condition </b>
765 * @n None
766 *
767 * @b Reads
768 * @n CGEM_L2EDADDR_ADDR,CGEM_L2EDADDR_WAY,CGEM_L2EDADDR_RAM
769 *
770 * @b Example
771 * @verbatim
773 Uint32 errAddr;
774 Uint8 l2way;
775 Uint8 ram;
777 // Get the L2 EDC Error Information.
778 CSL_CGEM_getL2EDCErrorInfo(&errAddr, &l2way, &ram);
780 @endverbatim
781 * =============================================================================
782 */
783 static inline void CSL_CGEM_getL2EDCErrorInfo(Uint32* errAddr, Uint8* l2way, Uint8* ram)
784 {
785 Uint32 value = hCGEM->L2EDADDR;
787 *errAddr = CSL_FEXT(value, CGEM_L2EDADDR_ADDR);
788 *l2way = CSL_FEXT(value, CGEM_L2EDADDR_WAY);
789 *ram = CSL_FEXT(value, CGEM_L2EDADDR_RAM);
790 }
792 /** ============================================================================
793 * @n@b CSL_CGEM_getL2EDCCounters
794 *
795 * @b Description
796 * @n This function gets the L2 EDC Error event counters
797 *
798 * @b Arguments
799 @verbatim
800 correctParityCnt - Correctable Parity Error Counters
801 nonCorrectParityCnt - Non-Correctable Parity Error Counters
802 @endverbatim
803 *
804 * <b> Return Value </b>
805 * @n None
806 *
807 * <b> Pre Condition </b>
808 * @n None
809 *
810 * <b> Post Condition </b>
811 * @n None
812 *
813 * @b Reads
814 * @n CGEM_L2EDADDR_ADDR,CGEM_L2EDADDR_WAY,CGEM_L2EDADDR_RAM
815 *
816 * @b Example
817 * @verbatim
819 Uint8 correctParityCnt;
820 Uint8 nonCorrectParityCnt;
822 // Get the L2 EDC Error event counters.
823 CSL_CGEM_getL2EDCCounters(&correctParityCnt, &nonCorrectParityCnt);
825 @endverbatim
826 * =============================================================================
827 */
828 static inline void CSL_CGEM_getL2EDCCounters(Uint8* correctParityCnt, Uint8* nonCorrectParityCnt)
829 {
830 *correctParityCnt = CSL_FEXT(hCGEM->L2EDCPEC, CGEM_L2EDCPEC_CNT);
831 *nonCorrectParityCnt = CSL_FEXT(hCGEM->L2EDCNEC, CGEM_L2EDCNEC_CNT);
832 }
834 /** ============================================================================
835 * @n@b CSL_CGEM_getMDMAErrorStatus
836 *
837 * @b Description
838 * @n This function gets the MDMA Error Status
839 *
840 * @b Arguments
841 @verbatim
842 stat - Transaction Status populated by this API
843 xid - Transaction ID populated by this API
844 err - Error Detected populated by this API
845 @endverbatim
846 *
847 * <b> Return Value </b>
848 * @n None
849 *
850 * <b> Pre Condition </b>
851 * @n None
852 *
853 * <b> Post Condition </b>
854 * @n None
855 *
856 * @b Reads
857 * @n CGEM_MDMAERR_STAT, CGEM_MDMAERR_XID, CGEM_MDMAERR_ERR
858 *
859 * @b Example
860 * @verbatim
861 Uint8 stat;
862 Uint8 xid;
863 Uint8 err;
865 // Get the MDMA Error Status
866 CSL_CGEM_getMDMAErrorStatus(&stat, &xid, &err);
868 @endverbatim
869 * =============================================================================
870 */
871 static inline void CSL_CGEM_getMDMAErrorStatus(Uint8* stat, Uint8* xid, Uint8* err)
872 {
873 Uint32 value = hCGEM->MDMAERR;
875 *stat = CSL_FEXT(value, CGEM_MDMAERR_STAT);
876 *xid = CSL_FEXT(value, CGEM_MDMAERR_XID);
877 *err = CSL_FEXT(value, CGEM_MDMAERR_ERR);
878 }
880 /** ============================================================================
881 * @n@b CSL_CGEM_clearMDMAError
882 *
883 * @b Description
884 * @n This function clears the MDMA Error Status
885 *
886 * @b Arguments
887 @verbatim
888 None
889 @endverbatim
890 *
891 * <b> Return Value </b>
892 * @n None
893 *
894 * <b> Pre Condition </b>
895 * @n None
896 *
897 * <b> Post Condition </b>
898 * @n None
899 *
900 * @b Writes
901 * @n CGEM_MDMAERRCLR_CLR=1
902 *
903 * @b Affects
904 * @n CGEM_MDMAERR_STAT=0, CGEM_MDMAERR_XID=0, CGEM_MDMAERR_ERR=0
905 *
906 * @b Example
907 * @verbatim
908 Uint8 stat;
909 Uint8 xid;
910 Uint8 err;
912 // Get the MDMA Error Status
913 CSL_CGEM_getMDMAErrorStatus(&stat, &xid, &err);
914 ...
915 // Clear the MDMA Error Status
916 CSL_CGEM_clearMDMAError();
918 @endverbatim
919 * =============================================================================
920 */
921 static inline void CSL_CGEM_clearMDMAError(void)
922 {
923 hCGEM->MDMAERRCLR = CSL_FMK(CGEM_MDMAERRCLR_CLR, 1);
924 }
926 /** ============================================================================
927 * @n@b CSL_CGEM_enableEDCDMCExternal
928 *
929 * @b Description
930 * @n This function is used to enable the EDC on DMC reads from an external
931 * address(Hits L2 cache) if L2EDCMD is enabled.
932 *
933 * @b Arguments
934 @verbatim
935 None
936 @endverbatim
937 *
938 * <b> Return Value </b>
939 * @n None
940 *
941 * <b> Pre Condition </b>
942 * @n None
943 *
944 * <b> Post Condition </b>
945 * @n None
946 *
947 * @b Writes
948 * @n CGEM_L2EDCEN_DL2CEN=1
949 *
950 * @b Example
951 * @verbatim
953 CSL_CGEM_enableEDCDMCExternal();
955 @endverbatim
956 * =============================================================================
957 */
958 static inline void CSL_CGEM_enableEDCDMCExternal(void)
959 {
960 hCGEM->L2EDCEN = CSL_FMK (CGEM_L2EDCEN_DL2CEN, 1);
961 }
963 /** ============================================================================
964 * @n@b CSL_CGEM_disableEDCDMCExternal
965 *
966 * @b Description
967 * @n This function is used to disable the EDC on DMC reads from an external
968 * address(Hits L2 cache) if L2EDCMD is enabled.
969 *
970 * @b Arguments
971 @verbatim
972 None
973 @endverbatim
974 *
975 * <b> Return Value </b>
976 * @n None
977 *
978 * <b> Pre Condition </b>
979 * @n None
980 *
981 * <b> Post Condition </b>
982 * @n None
983 *
984 * @b Writes
985 * @n CGEM_L2EDCEN_DL2CEN=0
986 *
987 * @b Example
988 * @verbatim
990 CSL_CGEM_disableEDCDMCExternal();
992 @endverbatim
993 * =============================================================================
994 */
995 static inline void CSL_CGEM_disableEDCDMCExternal(void)
996 {
997 hCGEM->L2EDCEN = CSL_FMK (CGEM_L2EDCEN_DL2CEN, 0);
998 }
1000 /** ============================================================================
1001 * @n@b CSL_CGEM_enableEDCPMCExternal
1002 *
1003 * @b Description
1004 * @n This function is used to enable the EDC on PMC reads from an external
1005 * address(Hits L2 cache) if L2EDCMD is enabled.
1006 *
1007 * @b Arguments
1008 @verbatim
1009 None
1010 @endverbatim
1011 *
1012 * <b> Return Value </b>
1013 * @n None
1014 *
1015 * <b> Pre Condition </b>
1016 * @n None
1017 *
1018 * <b> Post Condition </b>
1019 * @n None
1020 *
1021 * @b Writes
1022 * @n CGEM_L2EDCEN_PL2CEN=1
1023 *
1024 * @b Example
1025 * @verbatim
1027 CSL_CGEM_enableEDCPMCExternal();
1029 @endverbatim
1030 * =============================================================================
1031 */
1032 static inline void CSL_CGEM_enableEDCPMCExternal(void)
1033 {
1034 hCGEM->L2EDCEN = CSL_FMK (CGEM_L2EDCEN_PL2CEN, 1);
1035 }
1037 /** ============================================================================
1038 * @n@b CSL_CGEM_disableEDCPMCExternal
1039 *
1040 * @b Description
1041 * @n This function is used to disable the EDC on PMC reads from an external
1042 * address(Hits L2 cache) if L2EDCMD is enabled.
1043 *
1044 * @b Arguments
1045 @verbatim
1046 None
1047 @endverbatim
1048 *
1049 * <b> Return Value </b>
1050 * @n None
1051 *
1052 * <b> Pre Condition </b>
1053 * @n None
1054 *
1055 * <b> Post Condition </b>
1056 * @n None
1057 *
1058 * @b Writes
1059 * @n CGEM_L2EDCEN_PL2CEN=0
1060 *
1061 * @b Example
1062 * @verbatim
1064 CSL_CGEM_disableEDCPMCExternal();
1066 @endverbatim
1067 * =============================================================================
1068 */
1069 static inline void CSL_CGEM_disableEDCPMCExternal(void)
1070 {
1071 hCGEM->L2EDCEN = CSL_FMK (CGEM_L2EDCEN_PL2CEN, 0);
1072 }
1074 /** ============================================================================
1075 * @n@b CSL_CGEM_enableEDCDMCL2SRAM
1076 *
1077 * @b Description
1078 * @n This function is used to enable the EDC on DMC reads from a L2SRAM.
1079 *
1080 * @b Arguments
1081 @verbatim
1082 None
1083 @endverbatim
1084 *
1085 * <b> Return Value </b>
1086 * @n None
1087 *
1088 * <b> Pre Condition </b>
1089 * @n None
1090 *
1091 * <b> Post Condition </b>
1092 * @n None
1093 *
1094 * @b Writes
1095 * @n CGEM_L2EDCEN_DL2SEN=1
1096 *
1097 * @b Example
1098 * @verbatim
1100 CSL_CGEM_enableEDCDMCL2SRAM();
1102 @endverbatim
1103 * =============================================================================
1104 */
1105 static inline void CSL_CGEM_enableEDCDMCL2SRAM(void)
1106 {
1107 hCGEM->L2EDCEN = CSL_FMK(CGEM_L2EDCEN_DL2SEN, 1);
1108 }
1110 /** ============================================================================
1111 * @n@b CSL_CGEM_disableEDCDMCL2SRAM
1112 *
1113 * @b Description
1114 * @n This function is used to disable the EDC on DMC reads from a L2SRAM.
1115 *
1116 * @b Arguments
1117 @verbatim
1118 None
1119 @endverbatim
1120 *
1121 * <b> Return Value </b>
1122 * @n None
1123 *
1124 * <b> Pre Condition </b>
1125 * @n None
1126 *
1127 * <b> Post Condition </b>
1128 * @n None
1129 *
1130 * @b Writes
1131 * @n CGEM_L2EDCEN_DL2SEN=0
1132 *
1133 * @b Example
1134 * @verbatim
1136 CSL_CGEM_disableEDCDMCL2SRAM();
1138 @endverbatim
1139 * =============================================================================
1140 */
1141 static inline void CSL_CGEM_disableEDCDMCL2SRAM(void)
1142 {
1143 hCGEM->L2EDCEN = CSL_FMK(CGEM_L2EDCEN_DL2SEN, 0);
1144 }
1146 /** ============================================================================
1147 * @n@b CSL_CGEM_enableEDCPMCL2SRAM
1148 *
1149 * @b Description
1150 * @n This function is used to enable the EDC on PMC reads from a L2SRAM.
1151 *
1152 * @b Arguments
1153 @verbatim
1154 None
1155 @endverbatim
1156 *
1157 * <b> Return Value </b>
1158 * @n None
1159 *
1160 * <b> Pre Condition </b>
1161 * @n None
1162 *
1163 * <b> Post Condition </b>
1164 * @n None
1165 *
1166 * @b Writes
1167 * @n CGEM_L2EDCEN_PL2SEN=1
1168 *
1169 * @b Example
1170 * @verbatim
1172 CSL_CGEM_enableEDCPMCL2SRAM();
1174 @endverbatim
1175 * =============================================================================
1176 */
1177 static inline void CSL_CGEM_enableEDCPMCL2SRAM(void)
1178 {
1179 hCGEM->L2EDCEN = CSL_FMK(CGEM_L2EDCEN_PL2SEN, 1);
1180 }
1182 /** ============================================================================
1183 * @n@b CSL_CGEM_disableEDCPMCL2SRAM
1184 *
1185 * @b Description
1186 * @n This function is used to disable the EDC on PMC reads from a L2SRAM.
1187 *
1188 * @b Arguments
1189 @verbatim
1190 None
1191 @endverbatim
1192 *
1193 * <b> Return Value </b>
1194 * @n None
1195 *
1196 * <b> Pre Condition </b>
1197 * @n None
1198 *
1199 * <b> Post Condition </b>
1200 * @n None
1201 *
1202 * @b Writes
1203 * @n CGEM_L2EDCEN_PL2SEN=0
1204 *
1205 * @b Example
1206 * @verbatim
1208 CSL_CGEM_disableEDCPMCL2SRAM();
1210 @endverbatim
1211 * =============================================================================
1212 */
1213 static inline void CSL_CGEM_disableEDCPMCL2SRAM(void)
1214 {
1215 hCGEM->L2EDCEN = CSL_FMK(CGEM_L2EDCEN_PL2SEN, 0);
1216 }
1218 /** ============================================================================
1219 * @n@b CSL_CGEM_enableEDCSDMAL2SRAM
1220 *
1221 * @b Description
1222 * @n This function is used to enable the EDC on SDMA reads from L2SRAM.
1223 *
1224 * @b Arguments
1225 @verbatim
1226 None
1227 @endverbatim
1228 *
1229 * <b> Return Value </b>
1230 * @n None
1231 *
1232 * <b> Pre Condition </b>
1233 * @n None
1234 *
1235 * <b> Post Condition </b>
1236 * @n None
1237 *
1238 * @b Writes
1239 * @n CGEM_L2EDCEN_SDMAEN=1
1240 *
1241 * @b Example
1242 * @verbatim
1244 CSL_CGEM_enableEDCSDMAL2SRAM();
1246 @endverbatim
1247 * =============================================================================
1248 */
1249 static inline void CSL_CGEM_enableEDCSDMAL2SRAM(void)
1250 {
1251 hCGEM->L2EDCEN = CSL_FMK(CGEM_L2EDCEN_SDMAEN, 1);
1252 }
1254 /** ============================================================================
1255 * @n@b CSL_CGEM_disableEDCSDMAL2SRAM
1256 *
1257 * @b Description
1258 * @n This function is used to disable the EDC on SDMA reads from L2SRAM.
1259 *
1260 * @b Arguments
1261 @verbatim
1262 None
1263 @endverbatim
1264 *
1265 * <b> Return Value </b>
1266 * @n None
1267 *
1268 * <b> Pre Condition </b>
1269 * @n None
1270 *
1271 * <b> Post Condition </b>
1272 * @n None
1273 *
1274 * @b Writes
1275 * @n CGEM_L2EDCEN_SDMAEN=0
1276 *
1277 * @b Example
1278 * @verbatim
1280 CSL_CGEM_disableEDCSDMAL2SRAM();
1282 @endverbatim
1283 * =============================================================================
1284 */
1285 static inline void CSL_CGEM_disableEDCSDMAL2SRAM(void)
1286 {
1287 hCGEM->L2EDCEN = CSL_FMK (CGEM_L2EDCEN_SDMAEN, 0);
1288 }
1290 /** ============================================================================
1291 * @n@b CSL_CGEM_getPMCErrorDetectionStatus
1292 *
1293 * @b Description
1294 * @n This function is used to get the PMC error detection status
1295 *
1296 * @b Arguments
1297 @verbatim
1298 dmaErr - DMA Error Status populated by this API
1299 perr - PERR Status populated by this API
1300 @endverbatim
1301 *
1302 * <b> Return Value </b>
1303 * @n None
1304 *
1305 * <b> Pre Condition </b>
1306 * @n None
1307 *
1308 * <b> Post Condition </b>
1309 * @n None
1310 *
1311 * @b Reads
1312 * @n CGEM_L1PEDSTAT_DMAERR, CGEM_L1PEDSTAT_PERR
1313 *
1314 * @b Example
1315 * @verbatim
1317 Uint8 dmaErr;
1318 Uint8 perr
1320 CSL_CGEM_getPMCErrorDetectionStatus(&dmaErr, &perr);
1322 @endverbatim
1323 * =============================================================================
1324 */
1325 static inline void CSL_CGEM_getPMCErrorDetectionStatus(Uint8* dmaErr, Uint8* perr)
1326 {
1327 Uint32 value = hCGEM->L1PEDSTAT;
1329 *dmaErr = CSL_FEXT (value, CGEM_L1PEDSTAT_DMAERR);
1330 *perr = CSL_FEXT (value, CGEM_L1PEDSTAT_PERR);
1331 }
1333 /** ============================================================================
1334 * @n@b CSL_CGEM_isPMCErrorDetectionEnabled
1335 *
1336 * @b Description
1337 * @n This function is used to check if the PMC Error Detection is enabled or
1338 * not?
1339 *
1340 * @b Arguments
1341 @verbatim
1342 None
1343 @endverbatim
1344 *
1345 * <b> Return Value </b>
1346 * @n TRUE - PMC Error Detection is enabled
1347 * @n FALSE - PMC Error Detection is disabled
1348 *
1349 * <b> Pre Condition </b>
1350 * @n None
1351 *
1352 * <b> Post Condition </b>
1353 * @n None
1354 *
1355 * @b Reads
1356 * @n CGEM_L1PEDSTAT_EN
1357 *
1358 * @b Example
1359 * @verbatim
1361 if (CSL_CGEM_isPMCErrorDetectionEnabled() == TRUE)
1362 {
1363 // PMC Error Detection is enabled
1364 }
1365 else
1366 {
1367 // PMC Error Detection is disabled
1368 }
1370 @endverbatim
1371 * =============================================================================
1372 */
1373 static inline Bool CSL_CGEM_isPMCErrorDetectionEnabled(void)
1374 {
1375 return CSL_FEXT(hCGEM->L1PEDSTAT, CGEM_L1PEDSTAT_EN);
1376 }
1378 /** ============================================================================
1379 * @n@b CSL_CGEM_isPMCErrorDetectionSuspended
1380 *
1381 * @b Description
1382 * @n This function is used to check if the PMC Error Detection is suspended or
1383 * not?
1384 *
1385 * @b Arguments
1386 @verbatim
1387 None
1388 @endverbatim
1389 *
1390 * <b> Return Value </b>
1391 * @n TRUE - PMC Error Detection is suspended
1392 * @n FALSE - PMC Error Detection is not suspended
1393 *
1394 * <b> Pre Condition </b>
1395 * @n None
1396 *
1397 * <b> Post Condition </b>
1398 * @n None
1399 *
1400 * @b Reads
1401 * @n CGEM_L1PEDSTAT_SUSP
1402 *
1403 * @b Example
1404 * @verbatim
1406 if (CSL_CGEM_isPMCErrorDetectionSuspended() == TRUE)
1407 {
1408 // PMC Error Detection is suspended
1409 }
1410 else
1411 {
1412 // PMC Error Detection is not suspended
1413 }
1415 @endverbatim
1416 * =============================================================================
1417 */
1418 static inline Bool CSL_CGEM_isPMCErrorDetectionSuspended(void)
1419 {
1420 return CSL_FEXT(hCGEM->L1PEDSTAT, CGEM_L1PEDSTAT_SUSP);
1421 }
1423 /** ============================================================================
1424 * @n@b CSL_CGEM_clearPMCErrorDetectionStatus
1425 *
1426 * @b Description
1427 * @n This function is used to clear the PMC error detection status
1428 *
1429 * @b Arguments
1430 @verbatim
1431 dmaErr - DMA Error status to be cleared
1432 perr - PERR status to be cleared
1433 @endverbatim
1434 *
1435 * <b> Return Value </b>
1436 * @n None
1437 *
1438 * <b> Pre Condition </b>
1439 * @n None
1440 *
1441 * <b> Post Condition </b>
1442 * @n None
1443 *
1444 * @b Writes
1445 * @n CGEM_L1PEDCMD_DMACLR, CGEM_L1PEDCMD_PCLR
1446 *
1447 * @b Affects
1448 * @n CGEM_L1PEDSTAT_DMAERR=0, CGEM_L1PEDSTAT_PERR=0
1449 *
1450 * @b Example
1451 * @verbatim
1453 Uint8 dmaErr;
1454 Uint8 perr
1456 // Get the PMC Error Detection status
1457 CSL_CGEM_getPMCErrorDetectionStatus(&dmaErr, &perr);
1458 ...
1459 // Clear the PMC errors.
1460 CSL_CGEM_clearPMCErrorDetectionStatus(dmaErr, perr);
1462 @endverbatim
1463 * =============================================================================
1464 */
1465 static inline void CSL_CGEM_clearPMCErrorDetectionStatus(Uint8 dmaErr, Uint8 perr)
1466 {
1467 Uint32 value = 0;
1469 /* We dont want to touch the EN, SUSP or DIS bits in the L1PEDCMD register */
1470 CSL_FINS (value, CGEM_L1PEDCMD_DMACLR, dmaErr);
1471 CSL_FINS (value, CGEM_L1PEDCMD_PCLR, perr);
1473 /* Since we are writing 0 to the SUSP, DIS or EN bits we should preserve the ED
1474 * state as indicated in the specification. */
1475 hCGEM->L1PEDCMD = value;
1476 }
1478 /** ============================================================================
1479 * @n@b CSL_CGEM_enablePMCErrorDetection
1480 *
1481 * @b Description
1482 * @n This function is used to enable the PMC error detection status
1483 *
1484 * @b Arguments
1485 @verbatim
1486 None
1487 @endverbatim
1488 *
1489 * <b> Return Value </b>
1490 * @n None
1491 *
1492 * <b> Pre Condition </b>
1493 * @n None
1494 *
1495 * <b> Post Condition </b>
1496 * @n None
1497 *
1498 * @b Writes
1499 * @n CGEM_L1PEDCMD_EN=1
1500 *
1501 * @b Affects
1502 * @n CGEM_L1PEDSTAT_EN=1
1503 *
1504 * @b Example
1505 * @verbatim
1507 // Enable the PMC Error Detection
1508 CSL_CGEM_enablePMCErrorDetection();
1510 @endverbatim
1511 * =============================================================================
1512 */
1513 static inline void CSL_CGEM_enablePMCErrorDetection(void)
1514 {
1515 hCGEM->L1PEDCMD = CSL_FMK (CGEM_L1PEDCMD_EN, 1);
1516 }
1518 /** ============================================================================
1519 * @n@b CSL_CGEM_disablePMCErrorDetection
1520 *
1521 * @b Description
1522 * @n This function is used to disable the PMC error detection status
1523 *
1524 * @b Arguments
1525 @verbatim
1526 None
1527 @endverbatim
1528 *
1529 * <b> Return Value </b>
1530 * @n None
1531 *
1532 * <b> Pre Condition </b>
1533 * @n None
1534 *
1535 * <b> Post Condition </b>
1536 * @n None
1537 *
1538 * @b Writes
1539 * @n CGEM_L1PEDCMD_DIS=1
1540 *
1541 * @b Affects
1542 * @n CGEM_L1PEDSTAT_DIS=1
1543 *
1544 * @b Example
1545 * @verbatim
1547 // Disable the PMC Error Detection
1548 CSL_CGEM_disablePMCErrorDetection();
1550 @endverbatim
1551 * =============================================================================
1552 */
1553 static inline void CSL_CGEM_disablePMCErrorDetection(void)
1554 {
1555 hCGEM->L1PEDCMD = CSL_FMK (CGEM_L1PEDCMD_DIS, 1);
1556 }
1558 /** ============================================================================
1559 * @n@b CSL_CGEM_suspendPMCErrorDetection
1560 *
1561 * @b Description
1562 * @n This function is used to suspend the PMC error detection status
1563 *
1564 * @b Arguments
1565 @verbatim
1566 None
1567 @endverbatim
1568 *
1569 * <b> Return Value </b>
1570 * @n None
1571 *
1572 * <b> Pre Condition </b>
1573 * @n None
1574 *
1575 * <b> Post Condition </b>
1576 * @n None
1577 *
1578 * @b Writes
1579 * @n CGEM_L1PEDCMD_SUSP=1
1580 *
1581 * @b Affects
1582 * @n CGEM_L1PEDSTAT_SUSP=1
1583 *
1584 * @b Example
1585 * @verbatim
1587 // Suspend the PMC Error Detection
1588 CSL_CGEM_suspendPMCErrorDetection();
1590 @endverbatim
1591 * =============================================================================
1592 */
1593 static inline void CSL_CGEM_suspendPMCErrorDetection(void)
1594 {
1595 hCGEM->L1PEDCMD = CSL_FMK (CGEM_L1PEDCMD_SUSP, 1);
1596 }
1598 /** ============================================================================
1599 * @n@b CSL_CGEM_getPMCErrorInfo
1600 *
1601 * @b Description
1602 * @n This function is used to get the PMC Error Detection information
1603 *
1604 * @b Arguments
1605 @verbatim
1606 errAddress - Error Address which is populated by this API
1607 errRAM - Error RAM status which is populated by this API
1608 @endverbatim
1609 *
1610 * <b> Return Value </b>
1611 * @n None
1612 *
1613 * <b> Pre Condition </b>
1614 * @n None
1615 *
1616 * <b> Post Condition </b>
1617 * @n None
1618 *
1619 * @b Reads
1620 * @n CGEM_L1PEDADDR_ADDR, CGEM_L1PEDADDR_RAM
1621 *
1622 * @b Example
1623 * @verbatim
1625 Uint32 errAddress;
1626 Uint8 errRAM;
1628 // Get the PMC Error Detection Information
1629 CSL_CGEM_getPMCErrorInfo(&errAddress, &errRAM);
1631 @endverbatim
1632 * =============================================================================
1633 */
1634 static inline void CSL_CGEM_getPMCErrorInfo(Uint32* errAddress, Uint8* errRAM)
1635 {
1636 Uint32 value = hCGEM->L1PEDADDR;
1638 *errAddress = CSL_FEXT (value, CGEM_L1PEDADDR_ADDR);
1639 *errRAM = CSL_FEXT (value, CGEM_L1PEDADDR_RAM);
1640 }
1642 /**
1643 @}
1644 */
1646 #ifdef __cplusplus
1647 }
1648 #endif
1650 #endif /* _CSL_CGEMAUX_H_ */