iLLD_TC27xC  1.0
IfxCif.c
Go to the documentation of this file.
1 /**
2  * \file IfxCif.c
3  * \brief CIF basic functionality
4  *
5  * \version iLLD_0_1_0_10
6  * \copyright Copyright (c) 2013 Infineon Technologies AG. All rights reserved.
7  *
8  *
9  * IMPORTANT NOTICE
10  *
11  *
12  * Infineon Technologies AG (Infineon) is supplying this file for use
13  * exclusively with Infineon's microcontroller products. This file can be freely
14  * distributed within development tools that are supporting such microcontroller
15  * products.
16  *
17  * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
18  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
19  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
20  * INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
21  * OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
22  *
23  */
24 
25 /******************************************************************************/
26 /*----------------------------------Includes----------------------------------*/
27 /******************************************************************************/
28 
29 #include "IfxCif.h"
30 #include "Scu/Std/IfxScuWdt.h"
31 
32 /******************************************************************************/
33 /*-------------------------Function Implementations---------------------------*/
34 /******************************************************************************/
35 
37 {
39  {
40  MODULE_CIF.MIEP.STA_ERR_CLR.B.EP_5_IC_SIZE_ERR_CLR = 1;
41  }
43  {
44  MODULE_CIF.MIEP.STA_ERR_CLR.B.EP_4_IC_SIZE_ERR_CLR = 1;
45  }
47  {
48  MODULE_CIF.MIEP.STA_ERR_CLR.B.EP_3_IC_SIZE_ERR_CLR = 1;
49  }
51  {
52  MODULE_CIF.MIEP.STA_ERR_CLR.B.EP_2_IC_SIZE_ERR_CLR = 1;
53  }
55  {
56  MODULE_CIF.MIEP.STA_ERR_CLR.B.EP_1_IC_SIZE_ERR_CLR = 1;
57  }
58  else
59  {
61  }
62 }
63 
64 
66 {
67  if (5 > z)
68  {
69  MODULE_CIF.MIEP.ICR.U = (((uint32)1 << (uint32)interruptSource) << ((uint32)z * IfxCif_EpInterrupts_Count));
70  }
71  else
72  {
74  }
75 }
76 
77 
79 {
81  {
82  MODULE_CIF.ISP.ERR_CLR.B.OUTFORM_SIZE_ERR_CLR = 1;
83  }
85  {
86  MODULE_CIF.ISP.ERR_CLR.B.IS_SIZE_ERR_CLR = 1;
87  }
89  {
90  MODULE_CIF.ISP.ERR_CLR.B.INFORM_SIZE_ERR_CLR = 1;
91  }
92  else
93  {
95  }
96 }
97 
98 
100 {
102  {
103  MODULE_CIF.ISP.ICR.B.ICR_WD_TRIG = 1;
104  }
105  else if (interruptSource == IfxCif_IspInterruptSources_StartEdgeOfHSync)
106  {
107  MODULE_CIF.ISP.ICR.B.ICR_H_START = 1;
108  }
109  else if (interruptSource == IfxCif_IspInterruptSources_StartEdgeOfVSync)
110  {
111  MODULE_CIF.ISP.ICR.B.ICR_V_START = 1;
112  }
113  else if (interruptSource == IfxCif_IspInterruptSources_SampledInputFrameComplete)
114  {
115  MODULE_CIF.ISP.ICR.B.ICR_FRAME_IN = 1;
116  }
118  {
119  MODULE_CIF.ISP.ICR.B.ICR_PIC_SIZE_ERR = 1;
120  }
121  else if (interruptSource == IfxCif_IspInterruptSources_LossOfData)
122  {
123  MODULE_CIF.ISP.ICR.B.ICR_DATA_LOSS = 1;
124  }
125  else if (interruptSource == IfxCif_IspInterruptSources_FrameCompletelyPutOut)
126  {
127  MODULE_CIF.ISP.ICR.B.ICR_FRAME = 1;
128  }
129  else if (interruptSource == IfxCif_IspInterruptSources_IspTurnedOff)
130  {
131  MODULE_CIF.ISP.ICR.B.ICR_ISP_OFF = 1;
132  }
133 }
134 
135 
137 {
138  if (interruptSource == IfxCif_JpeInterruptSources_VlcTableError)
139  {
140  MODULE_CIF.JPE.ERROR_ISR.B.VLC_TABLE_ERR = 1;
141  }
142  else if (interruptSource == IfxCif_JpeInterruptSources_R2BImageSizeError)
143  {
144  MODULE_CIF.JPE.ERROR_ISR.B.R2B_IMG_SIZE_ERR = 1;
145  }
146  else if (interruptSource == IfxCif_JpeInterruptSources_DcTableError)
147  {
148  MODULE_CIF.JPE.ERROR_ISR.B.DCT_ERR = 1;
149  }
150  else if (interruptSource == IfxCif_JpeInterruptSources_VlcSymbolError)
151  {
152  MODULE_CIF.JPE.ERROR_ISR.B.VLC_SYMBOL_ERR = 1;
153  }
154  else if (interruptSource == IfxCif_JpeInterruptSources_HeaderGenerationComplete)
155  {
156  MODULE_CIF.JPE.STATUS_ISR.B.GEN_HEADER_DONE = 1;
157  }
158  else if (interruptSource == IfxCif_JpeInterruptSources_EncodingComplete)
159  {
160  MODULE_CIF.JPE.STATUS_ISR.B.ENCODE_DONE = 1;
161  }
162  else
163  {
164  IFXCIF_DEBUG;
165  }
166 }
167 
168 
170 {
171  if (interruptSource == IfxCif_MiInterruptSources_BusError)
172  {
173  MODULE_CIF.MI.ICR.B.BUS_ERROR = 1;
174  }
175  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureCr)
176  {
177  MODULE_CIF.MI.ICR.B.WRAP_MP_CR = 1;
178  }
179  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureCb)
180  {
181  MODULE_CIF.MI.ICR.B.WRAP_MP_CB = 1;
182  }
183  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureY)
184  {
185  MODULE_CIF.MI.ICR.B.WRAP_MP_Y = 1;
186  }
187  else if (interruptSource == IfxCif_MiInterruptSources_FillMainPictureY)
188  {
189  MODULE_CIF.MI.ICR.B.FILL_MPY = 1;
190  }
191  else if (interruptSource == IfxCif_MiInterruptSources_MacroBlockLine)
192  {
193  MODULE_CIF.MI.ICR.B.MBLK_LINE = 1;
194  }
195  else if (interruptSource == IfxCif_MiInterruptSources_MainPictureFrameEnd)
196  {
197  MODULE_CIF.MI.ICR.B.MP_FRAME_END = 1;
198  }
199  else
200  {
201  IFXCIF_DEBUG;
202  }
203 }
204 
205 
207 {
209  {
210  MODULE_CIF.MI.STATUS_CLR.B.EP_5_FIFO_FULL = 1;
211  }
213  {
214  MODULE_CIF.MI.STATUS_CLR.B.EP_4_FIFO_FULL = 1;
215  }
217  {
218  MODULE_CIF.MI.STATUS_CLR.B.EP_3_FIFO_FULL = 1;
219  }
221  {
222  MODULE_CIF.MI.STATUS_CLR.B.EP_2_FIFO_FULL = 1;
223  }
225  {
226  MODULE_CIF.MI.STATUS_CLR.B.EP_1_FIFO_FULL = 1;
227  }
229  {
230  MODULE_CIF.MI.STATUS_CLR.B.BUS_WRITE_ERROR = 1;
231  }
233  {
234  MODULE_CIF.MI.STATUS_CLR.B.MP_CR_FIFO_FULL = 1;
235  }
237  {
238  MODULE_CIF.MI.STATUS_CLR.B.MP_CB_FIFO_FULL = 1;
239  }
241  {
242  MODULE_CIF.MI.STATUS_CLR.B.MP_Y_FIFO_FULL = 1;
243  }
244  else
245  {
246  IFXCIF_DEBUG;
247  }
248 }
249 
250 
252 {
254  {
255  MODULE_CIF.WD.ICR.B.ICR_WD_VES_TO = 1;
256  }
258  {
259  MODULE_CIF.WD.ICR.B.ICR_WD_VSE_TO = 1;
260  }
262  {
263  MODULE_CIF.WD.ICR.B.ICR_WD_HES_TO = 1;
264  }
266  {
267  MODULE_CIF.WD.ICR.B.ICR_WD_HSE_TO = 1;
268  }
269  else
270  {
271  IFXCIF_DEBUG;
272  }
273 }
274 
275 
277 {
279  {
280  MODULE_CIF.DP.CTRL.B.RST_PD = 1;
281  }
282  else if (counter == IfxCif_DpCounters_TimestampCounter)
283  {
284  MODULE_CIF.DP.CTRL.B.RST_TSC = 1;
285  }
286  else if (counter == IfxCif_DpCounters_LineNumberCounter)
287  {
288  MODULE_CIF.DP.CTRL.B.RST_LNC = 1;
289  }
290  else if (counter == IfxCif_DpCounters_FrameNumberCounter)
291  {
292  MODULE_CIF.DP.CTRL.B.RST_FNC = 1;
293  }
294  else
295  {
296  IFXCIF_DEBUG;
297  }
298 }
299 
300 
302 {
303  if (5 > z)
304  {
305  Ifx_CIF_MIEP_CH_INIT init;
306  init.U = MODULE_CIF.MIEP.CH_1S[z].INIT.U;
307  init.B.MI_EP_CFG_UPD = 1;
308  MODULE_CIF.MIEP.CH_1S[z].INIT.U = init.U;
309  }
310  else
311  {
312  IFXCIF_DEBUG;
313  }
314 }
315 
316 
318 {
319  if (5 > z)
320  {
321  Ifx_CIF_MIEP_CH_INIT init;
322  init.U = MODULE_CIF.MIEP.CH_1S[z].INIT.U;
323  init.B.MI_EP_SKIP = 1;
324  MODULE_CIF.MIEP.CH_1S[z].INIT.U = init.U;
325  }
326  else
327  {
328  IFXCIF_DEBUG;
329  }
330 }
331 
332 
334 {
335  uint16 retValue = 0xffff;
336 
337  if (tier == IfxCif_ImageTiers_Horizontal)
338  {
339  retValue = MODULE_CIF.ISP.OUT_H_OFFS_SHD.B.ISP_OUT_H_OFFS_SHD;
340  }
341  else if (tier == IfxCif_ImageTiers_Vertical)
342  {
343  retValue = MODULE_CIF.ISP.OUT_V_OFFS_SHD.B.ISP_OUT_V_OFFS_SHD;
344  }
345  else
346  {
347  IFXCIF_DEBUG;
348  }
349 
350  return retValue;
351 }
352 
353 
355 {
356  uint16 retValue = 0xffff;
357 
358  if (tier == IfxCif_ImageTiers_Horizontal)
359  {
360  retValue = MODULE_CIF.ISP.OUT_H_SIZE_SHD.B.ISP_OUT_H_SIZE_SHD;
361  }
362  else if (tier == IfxCif_ImageTiers_Vertical)
363  {
364  retValue = MODULE_CIF.ISP.OUT_V_SIZE_SHD.B.ISP_OUT_V_SIZE_SHD;
365  }
366  else
367  {
368  IFXCIF_DEBUG;
369  }
370 
371  return retValue;
372 }
373 
374 
376 {
378 
380  {
381  retValue = MODULE_CIF.DP.CTRL.B.UDS8;
382  }
384  {
385  retValue = MODULE_CIF.DP.CTRL.B.UDS7;
386  }
388  {
389  retValue = MODULE_CIF.DP.CTRL.B.UDS6;
390  }
392  {
393  retValue = MODULE_CIF.DP.CTRL.B.UDS5;
394  }
396  {
397  retValue = MODULE_CIF.DP.CTRL.B.UDS4;
398  }
400  {
401  retValue = MODULE_CIF.DP.CTRL.B.UDS3;
402  }
404  {
405  retValue = MODULE_CIF.DP.CTRL.B.UDS2;
406  }
408  {
409  retValue = MODULE_CIF.DP.CTRL.B.UDS1;
410  }
411  else if (source == IfxCif_DpControlSources_TimestampCounter)
412  {
413  retValue = MODULE_CIF.DP.CTRL.B.TSC_EN;
414  }
416  {
417  retValue = MODULE_CIF.DP.CTRL.B.LNC_EN;
418  }
420  {
421  retValue = MODULE_CIF.DP.CTRL.B.FNC_EN;
422  }
423  else
424  {
425  IFXCIF_DEBUG;
426  }
427 
428  return retValue;
429 }
430 
431 
433 {
434  uint32 retValue = 0xffffffff;
435 
436 #ifdef __TASKING__
437 #pragma warn Function IfxCif_getDpCounter is not compilable.
438  IFXCIF_DEBUG;
439 #else
440 
442  {
443  retValue = MODULE_CIF.DP.PDIV_STAT.B.PDIV_VAL;
444  }
445  else if (counter == IfxCif_DpCounters_TimestampCounter)
446  {
447  retValue = MODULE_CIF.DP.TSC_STAT.B.TSC_VAL;
448  }
449  else if (counter == IfxCif_DpCounters_LineNumberCounter)
450  {
451  retValue = MODULE_CIF.DP.FLC_STAT.B.LNC_VAL;
452  }
453  else if (counter == IfxCif_DpCounters_FrameNumberCounter)
454  {
455  retValue = MODULE_CIF.DP.FLC_STAT.B.FNC_VAL;
456  }
457  else
458  {
459  IFXCIF_DEBUG;
460  }
461 
462 #endif
463 
464  return retValue;
465 }
466 
467 
469 {
470  uint16 retValue = 0xffff;
471 
472  if (8 > x)
473  {
474  retValue = MODULE_CIF.DP.UDS_1S[x].B.UDS;
475  }
476  else
477  {
478  IFXCIF_DEBUG;
479  }
480 
481  return retValue;
482 }
483 
484 
486 {
487  uint32 retValue = 0xffffffff;
488 
489  if (5 > z)
490  {
491  /* read base address from unsigned component of the register structure because lower bits are tied
492  * to 0 as base address needs to be a word aligned value */
493  retValue = MODULE_CIF.MIEP.CH_1S[z].BASE_AD_SHD.U;
494  }
495  else
496  {
497  IFXCIF_DEBUG;
498  }
499 
500  return retValue;
501 }
502 
503 
505 {
506  uint32 retValue = 0xffffffff;
507 
508  if (5 > z)
509  {
510  /* read base address from unsigned component of the register structure because lower bits are tied to 0
511  * as base address needs to be a word aligned value */
512  retValue = MODULE_CIF.MIEP.CH_1S[z].BASE_AD_INIT.U;
513  }
514  else
515  {
516  IFXCIF_DEBUG;
517  }
518 
519  return retValue;
520 }
521 
522 
524 {
525  uint16 retValue = 0xffff;
526 
527  if (5 > z)
528  {
529  if (tier == IfxCif_ImageTiers_Horizontal)
530  {
531  retValue = MODULE_CIF.EP_IC_1S[z].DISPLACE.B.DX;
532  }
533  else if (tier == IfxCif_ImageTiers_Vertical)
534  {
535  retValue = MODULE_CIF.EP_IC_1S[z].DISPLACE.B.DY;
536  }
537  else
538  {
539  IFXCIF_DEBUG;
540  }
541  }
542  else
543  {
544  IFXCIF_DEBUG;
545  }
546 
547  return retValue;
548 }
549 
550 
552 {
553  uint16 retValue = 0xffff;
554 
555  if (5 > z)
556  {
557  if (tier == IfxCif_ImageTiers_Horizontal)
558  {
559  retValue = MODULE_CIF.EP_IC_1S[z].H_OFFS_SHD.B.H_OFFS_SHD;
560  }
561  else if (tier == IfxCif_ImageTiers_Vertical)
562  {
563  retValue = MODULE_CIF.EP_IC_1S[z].V_OFFS_SHD.B.V_OFFS_SHD;
564  }
565  else
566  {
567  IFXCIF_DEBUG;
568  }
569  }
570  else
571  {
572  IFXCIF_DEBUG;
573  }
574 
575  return retValue;
576 }
577 
578 
580 {
581  uint16 retValue = 0xffff;
582 
583  if (5 > z)
584  {
585  if (tier == IfxCif_ImageTiers_Horizontal)
586  {
587  retValue = MODULE_CIF.EP_IC_1S[z].H_SIZE_SHD.B.H_SIZE_SHD;
588  }
589  else if (tier == IfxCif_ImageTiers_Vertical)
590  {
591  retValue = MODULE_CIF.EP_IC_1S[z].V_SIZE_SHD.B.V_SIZE_SHD;
592  }
593  else
594  {
595  IFXCIF_DEBUG;
596  }
597  }
598  else
599  {
600  IFXCIF_DEBUG;
601  }
602 
603  return retValue;
604 }
605 
606 
608 {
610 
611  if (5 > z)
612  {
613  retValue = MODULE_CIF.EP_IC_1S[z].CTRL.B.IC_EN;
614  }
615  else
616  {
617  IFXCIF_DEBUG;
618  }
619 
620  return retValue;
621 }
622 
623 
625 {
626  uint16 retValue = 0xffff;
627 
628  if (5 > z)
629  {
630  if (tier == IfxCif_ImageTiers_Horizontal)
631  {
632  retValue = MODULE_CIF.EP_IC_1S[z].MAX_DX.B.MAX_DX;
633  }
634  else if (tier == IfxCif_ImageTiers_Vertical)
635  {
636  retValue = MODULE_CIF.EP_IC_1S[z].MAX_DY.B.MAX_DY;
637  }
638  else
639  {
640  IFXCIF_DEBUG;
641  }
642  }
643  else
644  {
645  IFXCIF_DEBUG;
646  }
647 
648  return retValue;
649 }
650 
651 
653 {
654  uint16 retValue = 0xffff;
655 
656  if (5 > z)
657  {
658  if (tier == IfxCif_ImageTiers_Horizontal)
659  {
660  retValue = MODULE_CIF.EP_IC_1S[z].H_OFFS.B.H_OFFS;
661  }
662  else if (tier == IfxCif_ImageTiers_Vertical)
663  {
664  retValue = MODULE_CIF.EP_IC_1S[z].V_OFFS.B.V_OFFS;
665  }
666  else
667  {
668  IFXCIF_DEBUG;
669  }
670  }
671  else
672  {
673  IFXCIF_DEBUG;
674  }
675 
676  return retValue;
677 }
678 
679 
681 {
682  uint16 retValue = 0xffff;
683 
684  if (5 > z)
685  {
686  if (tier == IfxCif_ImageTiers_Horizontal)
687  {
688  retValue = MODULE_CIF.EP_IC_1S[z].H_SIZE.B.H_SIZE;
689  }
690  else if (tier == IfxCif_ImageTiers_Vertical)
691  {
692  retValue = MODULE_CIF.EP_IC_1S[z].V_SIZE.B.V_SIZE;
693  }
694  else
695  {
696  IFXCIF_DEBUG;
697  }
698  }
699  else
700  {
701  IFXCIF_DEBUG;
702  }
703 
704  return retValue;
705 }
706 
707 
709 {
711 
712  if (5 > z)
713  {
714  if (0 != MODULE_CIF.EP_IC_1S[z].RECENTER.B.RECENTER)
715  {
716  retValue = IfxCif_State_Enabled;
717  }
718  }
719  else
720  {
721  IFXCIF_DEBUG;
722  }
723 
724  return retValue;
725 }
726 
727 
729 {
731 
733  {
734  retValue = MODULE_CIF.MIEP.STA_ERR.B.EP_5_FIFO_FULL;
735  }
736  else if (source == IfxCif_EpErrorSources_ExtraPath4FifoFull)
737  {
738  retValue = MODULE_CIF.MIEP.STA_ERR.B.EP_4_FIFO_FULL;
739  }
740  else if (source == IfxCif_EpErrorSources_ExtraPath3FifoFull)
741  {
742  retValue = MODULE_CIF.MIEP.STA_ERR.B.EP_3_FIFO_FULL;
743  }
744  else if (source == IfxCif_EpErrorSources_ExtraPath2FifoFull)
745  {
746  retValue = MODULE_CIF.MIEP.STA_ERR.B.EP_2_FIFO_FULL;
747  }
748  else if (source == IfxCif_EpErrorSources_ExtraPath1FifoFull)
749  {
750  retValue = MODULE_CIF.MIEP.STA_ERR.B.EP_1_FIFO_FULL;
751  }
753  {
754  retValue = MODULE_CIF.MIEP.STA_ERR.B.EP_5_IC_SIZE_ERR;
755  }
757  {
758  retValue = MODULE_CIF.MIEP.STA_ERR.B.EP_4_IC_SIZE_ERR;
759  }
761  {
762  retValue = MODULE_CIF.MIEP.STA_ERR.B.EP_3_IC_SIZE_ERR;
763  }
765  {
766  retValue = MODULE_CIF.MIEP.STA_ERR.B.EP_2_IC_SIZE_ERR;
767  }
769  {
770  retValue = MODULE_CIF.MIEP.STA_ERR.B.EP_1_IC_SIZE_ERR;
771  }
772  else
773  {
774  IFXCIF_DEBUG;
775  }
776 
777  return retValue;
778 }
779 
780 
782 {
784 
785  if (5 > z)
786  {
788  {
789  retValue = MODULE_CIF.MIEP.CH_1S[z].CTRL.B.INIT_OFFSET_EN;
790  }
791  else if (feature == IfxCif_EpFeatures_InitBaseAddress)
792  {
793  retValue = MODULE_CIF.MIEP.CH_1S[z].CTRL.B.INIT_BASE_EN;
794  }
795  else if (feature == IfxCif_EpFeatures_ByteSwap)
796  {
797  retValue = MODULE_CIF.MIEP.CH_1S[z].CTRL.B.BYTE_SWAP;
798  }
799  else if (feature == IfxCif_EpFeatures_PictureDataPath)
800  {
801  retValue = MODULE_CIF.MIEP.CH_1S[z].CTRL.B.EP_ENABLE;
802  }
803  else
804  {
805  IFXCIF_DEBUG;
806  }
807  }
808  else
809  {
810  IFXCIF_DEBUG;
811  }
812 
813  return retValue;
814 }
815 
816 
818 {
819  uint32 retValue = 0xffffffff;
820 
821  if (5 > z)
822  {
823  /* read size from unsigned component of the register structure because lower bits are tied to 0
824  * as size needs to be a word aligned value */
825  retValue = MODULE_CIF.MIEP.CH_1S[z].SIZE_INIT.U;
826  }
827  else
828  {
829  IFXCIF_DEBUG;
830  }
831 
832  return retValue;
833 }
834 
835 
837 {
838  uint32 retValue = 0xffffffff;
839 
840  if (5 > z)
841  {
842  /* read interrupt offset from unsigned component of the register structure because lower bits are tied
843  * to 0 as interrupt offset needs to be a word aligned value */
844  retValue = MODULE_CIF.MIEP.CH_1S[z].IRQ_OFFS_INIT.U;
845  }
846  else
847  {
848  IFXCIF_DEBUG;
849  }
850 
851  return retValue;
852 }
853 
854 
856 {
857  uint32 retValue = 0xffffffff;
858 
859  if (5 > z)
860  {
861  /* read offset counter from unsigned component of the register structure because lower bits are tied
862  * to 0 as offset counter needs to be a word aligned value */
863  retValue = MODULE_CIF.MIEP.CH_1S[z].OFFS_CNT_INIT.U;
864  }
865  else
866  {
867  IFXCIF_DEBUG;
868  }
869 
870  return retValue;
871 }
872 
873 
875 {
877 
878  if (5 > z)
879  {
880  retValue = MODULE_CIF.MIEP.CH_1S[z].CTRL_SHD.B.EP_ENABLE_IN;
881  }
882  else
883  {
884  IFXCIF_DEBUG;
885  }
886 
887  return retValue;
888 }
889 
890 
892 {
894 
895  if (5 > z)
896  {
897  if (0 !=
898  (MODULE_CIF.MIEP.IMSC.
899  U & (((uint32)1 << (uint32)interruptSource) << ((uint32)z * IfxCif_EpInterrupts_Count))))
900  {
901  retValue = IfxCif_State_Enabled;
902  }
903  }
904  else
905  {
906  IFXCIF_DEBUG;
907  }
908 
909  return retValue;
910 }
911 
912 
914 {
915  uint32 retValue = 0xffffffff;
916 
917  if (5 > z)
918  {
919  /* read interrupt offset from unsigned component of the register structure because lower bits are tied
920  * to 0 as interrupt offset needs to be a word aligned value */
921  retValue = MODULE_CIF.MIEP.CH_1S[z].IRQ_OFFS_SHD.U;
922  }
923  else
924  {
925  IFXCIF_DEBUG;
926  }
927 
928  return retValue;
929 }
930 
931 
933 {
934  uint32 retValue = 0xffffffff;
935 
936  if (5 > z)
937  {
938  /* read offset counter from unsigned component of the register structure because lower bits are tied
939  * to 0 as offset counter needs to be a word aligned value */
940  retValue = MODULE_CIF.MIEP.CH_1S[z].OFFS_CNT_SHD.U;
941  }
942  else
943  {
944  IFXCIF_DEBUG;
945  }
946 
947  return retValue;
948 }
949 
950 
952 {
953  uint32 retValue = 0xffffffff;
954 
955  if (5 > z)
956  {
957  /* read offset counter from unsigned component of the register structure because lower bits are tied
958  * to 0 as offset counter needs to be a word aligned value */
959  retValue = MODULE_CIF.MIEP.CH_1S[z].OFFS_CNT_START.U;
960  }
961  else
962  {
963  IFXCIF_DEBUG;
964  }
965 
966  return retValue;
967 }
968 
969 
971 {
973 
974  if (5 > z)
975  {
976  retValue = MODULE_CIF.MIEP.CH_1S[z].CTRL_SHD.B.EP_ENABLE_OUT;
977  }
978  else
979  {
980  IFXCIF_DEBUG;
981  }
982 
983  return retValue;
984 }
985 
986 
988 {
989  uint8 retValue = 0xff;
990 
991  if (5 > z)
992  {
993  retValue = MODULE_CIF.EP_IC_1S[z].RECENTER.B.RECENTER;
994  }
995  else
996  {
997  IFXCIF_DEBUG;
998  }
999 
1000  return retValue;
1001 }
1002 
1003 
1005 {
1006  uint32 retValue = 0xffffffff;
1007 
1008  if (5 > z)
1009  {
1010  /* read size from unsigned component of the register structure because lower bits are tied
1011  * to 0 as size needs to be a word aligned value */
1012  retValue = MODULE_CIF.MIEP.CH_1S[z].SIZE_SHD.U;
1013  }
1014  else
1015  {
1016  IFXCIF_DEBUG;
1017  }
1018 
1019  return retValue;
1020 }
1021 
1022 
1024 {
1026 
1027  if (5 > z)
1028  {
1029  retValue = MODULE_CIF.MIEP.CH_1S[z].CTRL.B.EP_WRITE_FORMAT;
1030  }
1031  else
1032  {
1033  IFXCIF_DEBUG;
1034  }
1035 
1036  return retValue;
1037 }
1038 
1039 
1041 {
1042  uint8 retValue = 0xff;
1043 
1044  if (table == IfxCif_HuffmanTables_Table0)
1045  {
1046  retValue = MODULE_CIF.JPE.TAC0_LEN.B.TAC0_LEN;
1047  }
1048  else if (table == IfxCif_HuffmanTables_Table1)
1049  {
1050  retValue = MODULE_CIF.JPE.TAC1_LEN.B.TAC1_LEN;
1051  }
1052  else
1053  {
1054  IFXCIF_DEBUG;
1055  }
1056 
1057  return retValue;
1058 }
1059 
1060 
1062 {
1064 
1065  if (table == IfxCif_HuffmanTables_Table0)
1066  {
1067  if (1 != (MODULE_CIF.JPE.AC_TABLE_SELECT.B.AC_TABLE_SELECT & ~(1 << component)))
1068  {
1069  retValue = IfxCif_State_Enabled;
1070  }
1071  }
1072  else if (table == IfxCif_HuffmanTables_Table1)
1073  {
1074  if (0 != (MODULE_CIF.JPE.AC_TABLE_SELECT.B.AC_TABLE_SELECT & ~(1 << component)))
1075  {
1076  retValue = IfxCif_State_Enabled;
1077  }
1078  }
1079  else
1080  {
1081  IFXCIF_DEBUG;
1082  }
1083 
1084  return retValue;
1085 }
1086 
1087 
1089 {
1090  uint8 retValue = 0xff;
1091 
1092  if (table == IfxCif_HuffmanTables_Table0)
1093  {
1094  retValue = MODULE_CIF.JPE.TDC0_LEN.B.TDC0_LEN;
1095  }
1096  else if (table == IfxCif_HuffmanTables_Table1)
1097  {
1098  retValue = MODULE_CIF.JPE.TDC1_LEN.B.TDC1_LEN;
1099  }
1100  else
1101  {
1102  IFXCIF_DEBUG;
1103  }
1104 
1105  return retValue;
1106 }
1107 
1108 
1110 {
1112 
1113  if (table == IfxCif_HuffmanTables_Table0)
1114  {
1115  if (1 != (MODULE_CIF.JPE.DC_TABLE_SELECT.B.DC_TABLE_SELECT & ~(1 << component)))
1116  {
1117  retValue = IfxCif_State_Enabled;
1118  }
1119  }
1120  else if (table == IfxCif_HuffmanTables_Table1)
1121  {
1122  if (0 != (MODULE_CIF.JPE.DC_TABLE_SELECT.B.DC_TABLE_SELECT & ~(1 << component)))
1123  {
1124  retValue = IfxCif_State_Enabled;
1125  }
1126  }
1127  else
1128  {
1129  IFXCIF_DEBUG;
1130  }
1131 
1132  return retValue;
1133 }
1134 
1135 
1137 {
1139 
1140  if (submodule == IfxCif_Submodules_Debug)
1141  {
1142  if (0 != MODULE_CIF.ICCL.B.CIF_DEBUG_PATH_CLK_EN)
1143  {
1144  retValue = IfxCif_State_Enabled;
1145  }
1146  }
1147  else if (submodule == IfxCif_Submodules_ExtraPaths)
1148  {
1149  if (0 != MODULE_CIF.ICCL.B.CIF_EXTRA_PATHS_CLK_ENABLE)
1150  {
1151  retValue = IfxCif_State_Enabled;
1152  }
1153  }
1154  else if (submodule == IfxCif_Submodules_LinearDownscaler)
1155  {
1156  if (0 != MODULE_CIF.ICCL.B.CIF_LIN_DSCALER_CLK_ENABLE)
1157  {
1158  retValue = IfxCif_State_Enabled;
1159  }
1160  }
1161  else if (submodule == IfxCif_Submodules_SecurityWatchdog)
1162  {
1163  if (0 != MODULE_CIF.ICCL.B.CIF_WATCHDOG_CLK_ENABLE)
1164  {
1165  retValue = IfxCif_State_Enabled;
1166  }
1167  }
1168 
1169  else if (submodule == IfxCif_Submodules_MemoryInterface)
1170  {
1171  if (0 != MODULE_CIF.ICCL.B.CIF_MI_CLK_ENABLE)
1172  {
1173  retValue = IfxCif_State_Enabled;
1174  }
1175  }
1176  else if (submodule == IfxCif_Submodules_JpegEncoder)
1177  {
1178  if (0 != MODULE_CIF.ICCL.B.CIF_JPEG_CLK_ENABLE)
1179  {
1180  retValue = IfxCif_State_Enabled;
1181  }
1182  }
1183  else if (submodule == IfxCif_Submodules_ImageSignalProcessing)
1184  {
1185  if (0 != MODULE_CIF.ICCL.B.CIF_ISP_CLK_ENABLE)
1186  {
1187  retValue = IfxCif_State_Enabled;
1188  }
1189  }
1190  else
1191  {
1192  IFXCIF_DEBUG;
1193  }
1194 
1195  return retValue;
1196 }
1197 
1198 
1200 {
1201  uint16 retValue = 0xffff;
1202 
1203  if (tier == IfxCif_ImageTiers_Horizontal)
1204  {
1205  retValue = MODULE_CIF.ISP.ACQ_H_OFFS.B.ACQ_H_OFFS;
1206  }
1207  else if (tier == IfxCif_ImageTiers_Vertical)
1208  {
1209  retValue = MODULE_CIF.ISP.ACQ_V_OFFS.B.ACQ_V_OFFS;
1210  }
1211  else
1212  {
1213  IFXCIF_DEBUG;
1214  }
1215 
1216  return retValue;
1217 }
1218 
1219 
1221 {
1222  uint16 retValue = 0xffff;
1223 
1224  if (tier == IfxCif_ImageTiers_Horizontal)
1225  {
1226  retValue = MODULE_CIF.ISP.ACQ_H_SIZE.B.ACQ_H_SIZE;
1227  }
1228  else if (tier == IfxCif_ImageTiers_Vertical)
1229  {
1230  retValue = MODULE_CIF.ISP.ACQ_V_SIZE.B.ACQ_V_SIZE;
1231  }
1232  else
1233  {
1234  IFXCIF_DEBUG;
1235  }
1236 
1237  return retValue;
1238 }
1239 
1240 
1242 {
1244 
1246  {
1247  if (0 != MODULE_CIF.ISP.ERR.B.OUTFORM_SIZE_ERR)
1248  {
1249  retValue = IfxCif_ErrorState_Error;
1250  }
1251  }
1253  {
1254  if (0 != MODULE_CIF.ISP.ERR.B.IS_SIZE_ERR)
1255  {
1256  retValue = IfxCif_ErrorState_Error;
1257  }
1258  }
1259  else if (errorSource == IfxCif_IspErrorSources_SizeErrorInInformSubmodule)
1260  {
1261  if (0 != MODULE_CIF.ISP.ERR.B.INFORM_SIZE_ERR)
1262  {
1263  retValue = IfxCif_ErrorState_Error;
1264  }
1265  }
1266  else
1267  {
1268  IFXCIF_DEBUG;
1269  }
1270 
1271  return retValue;
1272 }
1273 
1274 
1276 {
1278 
1279  if (1 != MODULE_CIF.ISP.ACQ_PROP.B.INPUT_SELECTION_NO_APP)
1280  {
1281  retValue = IfxCif_State_Enabled;
1282  }
1283  else
1284  {
1285  IFXCIF_DEBUG;
1286  }
1287 
1288  return retValue;
1289 }
1290 
1291 
1293 {
1295 
1297  {
1298  if (0 != MODULE_CIF.ISP.IMSC.B.IMSC_WD_TRIG)
1299  {
1300  retValue = IfxCif_State_Enabled;
1301  }
1302  }
1303  else if (interruptSource == IfxCif_IspInterruptSources_StartEdgeOfHSync)
1304  {
1305  if (0 != MODULE_CIF.ISP.IMSC.B.IMSC_H_START)
1306  {
1307  retValue = IfxCif_State_Enabled;
1308  }
1309  }
1310  else if (interruptSource == IfxCif_IspInterruptSources_StartEdgeOfVSync)
1311  {
1312  if (0 != MODULE_CIF.ISP.IMSC.B.IMSC_V_START)
1313  {
1314  retValue = IfxCif_State_Enabled;
1315  }
1316  }
1317  else if (interruptSource == IfxCif_IspInterruptSources_SampledInputFrameComplete)
1318  {
1319  if (0 != MODULE_CIF.ISP.IMSC.B.IMSC_FRAME_IN)
1320  {
1321  retValue = IfxCif_State_Enabled;
1322  }
1323  }
1324  else if (interruptSource == IfxCif_IspInterruptSources_PictureSizeViolationOccurred)
1325  {
1326  if (0 != MODULE_CIF.ISP.IMSC.B.IMSC_PIC_SIZE_ERR)
1327  {
1328  retValue = IfxCif_State_Enabled;
1329  }
1330  }
1331  else if (interruptSource == IfxCif_IspInterruptSources_LossOfData)
1332  {
1333  if (0 != MODULE_CIF.ISP.IMSC.B.IMSC_DATA_LOSS)
1334  {
1335  retValue = IfxCif_State_Enabled;
1336  }
1337  }
1338  else if (interruptSource == IfxCif_IspInterruptSources_FrameCompletelyPutOut)
1339  {
1340  if (0 != MODULE_CIF.ISP.IMSC.B.IMSC_FRAME)
1341  {
1342  retValue = IfxCif_State_Enabled;
1343  }
1344  }
1345  else if (interruptSource == IfxCif_IspInterruptSources_IspTurnedOff)
1346  {
1347  if (0 != MODULE_CIF.ISP.IMSC.B.IMSC_ISP_OFF)
1348  {
1349  retValue = IfxCif_State_Enabled;
1350  }
1351  }
1352 
1353  return retValue;
1354 }
1355 
1356 
1358 {
1359  uint16 retValue = 0xffff;
1360 
1361  if (tier == IfxCif_ImageTiers_Horizontal)
1362  {
1363  retValue = MODULE_CIF.ISP.OUT_H_OFFS.B.ISP_OUT_H_OFFS;
1364  }
1365  else if (tier == IfxCif_ImageTiers_Vertical)
1366  {
1367  retValue = MODULE_CIF.ISP.OUT_V_OFFS.B.ISP_OUT_V_OFFS;
1368  }
1369  else
1370  {
1371  IFXCIF_DEBUG;
1372  }
1373 
1374  return retValue;
1375 }
1376 
1377 
1379 {
1380  uint16 retValue = 0xffff;
1381 
1382  if (tier == IfxCif_ImageTiers_Horizontal)
1383  {
1384  retValue = MODULE_CIF.ISP.OUT_H_SIZE.B.ISP_OUT_H_SIZE;
1385  }
1386  else if (tier == IfxCif_ImageTiers_Vertical)
1387  {
1388  retValue = MODULE_CIF.ISP.OUT_V_SIZE.B.ISP_OUT_V_SIZE;
1389  }
1390  else
1391  {
1392  IFXCIF_DEBUG;
1393  }
1394 
1395  return retValue;
1396 }
1397 
1398 
1400 {
1401  uint16 retValue = 0xffff;
1402 
1403  if (tier == IfxCif_ImageTiers_Horizontal)
1404  {
1405  retValue = MODULE_CIF.ISPIS.DISPLACE.B.DX;
1406  }
1407  else if (tier == IfxCif_ImageTiers_Vertical)
1408  {
1409  retValue = MODULE_CIF.ISPIS.DISPLACE.B.DY;
1410  }
1411  else
1412  {
1413  IFXCIF_DEBUG;
1414  }
1415 
1416  return retValue;
1417 }
1418 
1419 
1421 {
1422  uint16 retValue = 0xffff;
1423 
1424  if (tier == IfxCif_ImageTiers_Horizontal)
1425  {
1426  retValue = MODULE_CIF.ISPIS.H_OFFS_SHD.B.IS_H_OFFS_SHD;
1427  }
1428  else if (tier == IfxCif_ImageTiers_Vertical)
1429  {
1430  retValue = MODULE_CIF.ISPIS.V_OFFS_SHD.B.IS_V_OFFS_SHD;
1431  }
1432  else
1433  {
1434  IFXCIF_DEBUG;
1435  }
1436 
1437  return retValue;
1438 }
1439 
1440 
1442 {
1443  uint16 retValue = 0xffff;
1444 
1445  if (tier == IfxCif_ImageTiers_Horizontal)
1446  {
1447  retValue = MODULE_CIF.ISPIS.H_SIZE_SHD.B.ISP_H_SIZE_SHD;
1448  }
1449  else if (tier == IfxCif_ImageTiers_Vertical)
1450  {
1451  retValue = MODULE_CIF.ISPIS.V_SIZE_SHD.B.ISP_V_SIZE_SHD;
1452  }
1453  else
1454  {
1455  IFXCIF_DEBUG;
1456  }
1457 
1458  return retValue;
1459 }
1460 
1461 
1463 {
1464  uint16 retValue = 0xffff;
1465 
1466  if (tier == IfxCif_ImageTiers_Horizontal)
1467  {
1468  retValue = MODULE_CIF.ISPIS.MAX_DX.B.IS_MAX_DX;
1469  }
1470  else if (tier == IfxCif_ImageTiers_Vertical)
1471  {
1472  retValue = MODULE_CIF.ISPIS.MAX_DY.B.IS_MAX_DY;
1473  }
1474  else
1475  {
1476  IFXCIF_DEBUG;
1477  }
1478 
1479  return retValue;
1480 }
1481 
1482 
1484 {
1485  uint16 retValue = 0xffff;
1486 
1487  if (tier == IfxCif_ImageTiers_Horizontal)
1488  {
1489  retValue = MODULE_CIF.ISPIS.H_OFFS.B.IS_H_OFFS;
1490  }
1491  else if (tier == IfxCif_ImageTiers_Vertical)
1492  {
1493  retValue = MODULE_CIF.ISPIS.V_OFFS.B.IS_V_OFFS;
1494  }
1495  else
1496  {
1497  IFXCIF_DEBUG;
1498  }
1499 
1500  return retValue;
1501 }
1502 
1503 
1505 {
1506  uint16 retValue = 0xffff;
1507 
1508  if (tier == IfxCif_ImageTiers_Horizontal)
1509  {
1510  retValue = MODULE_CIF.ISPIS.H_SIZE.B.IS_H_SIZE;
1511  }
1512  else if (tier == IfxCif_ImageTiers_Vertical)
1513  {
1514  retValue = MODULE_CIF.ISPIS.V_SIZE.B.IS_V_SIZE;
1515  }
1516  else
1517  {
1518  IFXCIF_DEBUG;
1519  }
1520 
1521  return retValue;
1522 }
1523 
1524 
1526 {
1528 
1529  if (0 != MODULE_CIF.ISPIS.RECENTER.B.RECENTER)
1530  {
1531  retValue = IfxCif_State_Enabled;
1532  }
1533 
1534  return retValue;
1535 }
1536 
1537 
1539 {
1541 
1543  {
1544  retValue = MODULE_CIF.JPE.DEBUG.B.DEB_BAD_TABLE_ACCESS;
1545  }
1546  else if (source == IfxCif_JpeDebugSignalSources_VlcTableBusy)
1547  {
1548  retValue = MODULE_CIF.JPE.DEBUG.B.DEB_VLC_TABLE_BUSY;
1549  }
1550  else if (source == IfxCif_JpeDebugSignalSources_R2BMemoryFull)
1551  {
1552  retValue = MODULE_CIF.JPE.DEBUG.B.DEB_R2B_MEMORY_FULL;
1553  }
1554  else if (source == IfxCif_JpeDebugSignalSources_VlcEncodeBusy)
1555  {
1556  retValue = MODULE_CIF.JPE.DEBUG.B.DEB_VLC_ENCODE_BUSY;
1557  }
1559  {
1560  retValue = MODULE_CIF.JPE.DEBUG.B.DEB_QIQ_TABLE_ACC;
1561  }
1562  else
1563  {
1564  IFXCIF_DEBUG;
1565  }
1566 
1567  return retValue;
1568 }
1569 
1570 
1572 {
1574 
1575  if (interruptSource == IfxCif_JpeInterruptSources_VlcTableError)
1576  {
1577  retValue = MODULE_CIF.JPE.ERROR_IMR.B.VLC_TABLE_ERR;
1578  }
1579  else if (interruptSource == IfxCif_JpeInterruptSources_R2BImageSizeError)
1580  {
1581  retValue = MODULE_CIF.JPE.ERROR_IMR.B.R2B_IMG_SIZE_ERR;
1582  }
1583  else if (interruptSource == IfxCif_JpeInterruptSources_DcTableError)
1584  {
1585  retValue = MODULE_CIF.JPE.ERROR_IMR.B.DCT_ERR;
1586  }
1587  else if (interruptSource == IfxCif_JpeInterruptSources_VlcSymbolError)
1588  {
1589  retValue = MODULE_CIF.JPE.ERROR_IMR.B.VLC_SYMBOL_ERR;
1590  }
1591  else if (interruptSource == IfxCif_JpeInterruptSources_HeaderGenerationComplete)
1592  {
1593  retValue = MODULE_CIF.JPE.STATUS_IMR.B.GEN_HEADER_DONE;
1594  }
1595  else if (interruptSource == IfxCif_JpeInterruptSources_EncodingComplete)
1596  {
1597  retValue = MODULE_CIF.JPE.STATUS_IMR.B.ENCODE_DONE;
1598  }
1599  else
1600  {
1601  IFXCIF_DEBUG;
1602  }
1603 
1604  return retValue;
1605 }
1606 
1607 
1609 {
1611 
1612  if (component == IfxCif_JpeQTableSelectorComponents_Y)
1613  {
1614  retValue = MODULE_CIF.JPE.TQ_Y_SELECT.B.TQ0_SELECT;
1615  }
1616  else if (component == IfxCif_JpeQTableSelectorComponents_U)
1617  {
1618  retValue = MODULE_CIF.JPE.TQ_U_SELECT.B.TQ1_SELECT;
1619  }
1620  else if (component == IfxCif_JpeQTableSelectorComponents_V)
1621  {
1622  retValue = MODULE_CIF.JPE.TQ_V_SELECT.B.TQ2_SELECT;
1623  }
1624  else
1625  {
1626  IFXCIF_DEBUG;
1627  }
1628 
1629  return retValue;
1630 }
1631 
1632 
1634 {
1636 
1637  if (source == IfxCif_JpeScalingValueSources_Y)
1638  {
1639  retValue = MODULE_CIF.JPE.Y_SCALE_EN.B.Y_SCALE_EN;
1640  }
1641  else if (source == IfxCif_JpeScalingValueSources_CbCr)
1642  {
1643  retValue = MODULE_CIF.JPE.CBCR_SCALE_EN.B.CBCR_SCALE_EN;
1644  }
1645  else
1646  {
1647  IFXCIF_DEBUG;
1648  }
1649 
1650  return retValue;
1651 }
1652 
1653 
1655 {
1656  uint16 retValue = 0xffff;
1657 
1658  if (tier == IfxCif_ImageTiers_Horizontal)
1659  {
1660  retValue = MODULE_CIF.JPE.ENC_HSIZE.B.ENC_HSIZE;
1661  }
1662  else if (tier == IfxCif_ImageTiers_Vertical)
1663  {
1664  retValue = MODULE_CIF.JPE.ENC_VSIZE.B.ENC_VSIZE;
1665  }
1666  else
1667  {
1668  IFXCIF_DEBUG;
1669  }
1670 
1671  return retValue;
1672 }
1673 
1674 
1676 {
1678 
1679  if ((0 != MODULE_CIF.BBB.KRST0.B.RST) && (0 != MODULE_CIF.BBB.KRST1.B.RST))
1680  {
1681  retValue = IfxCif_State_Enabled;
1682  }
1683 
1684  return retValue;
1685 }
1686 
1687 
1689 {
1691 
1692  if (tier == IfxCif_ImageTiers_Horizontal)
1693  {
1694  retValue = MODULE_CIF.LDS.CTRL.B.LDS_H_EN;
1695  }
1696  else if (tier == IfxCif_ImageTiers_Vertical)
1697  {
1698  retValue = MODULE_CIF.LDS.CTRL.B.LDS_V_EN;
1699  }
1700  else
1701  {
1702  IFXCIF_DEBUG;
1703  }
1704 
1705  return retValue;
1706 }
1707 
1708 
1710 {
1711  uint8 retValue = 0xff;
1712 
1713  if (tier == IfxCif_ImageTiers_Horizontal)
1714  {
1715  retValue = MODULE_CIF.LDS.FAC.B.LDS_H_FAC;
1716  }
1717  else if (tier == IfxCif_ImageTiers_Vertical)
1718  {
1719  retValue = MODULE_CIF.LDS.FAC.B.LDS_V_FAC;
1720  }
1721  else
1722  {
1723  IFXCIF_DEBUG;
1724  }
1725 
1726  return retValue;
1727 }
1728 
1729 
1731 {
1733 
1734  if (tier == IfxCif_ImageTiers_Horizontal)
1735  {
1736  retValue = MODULE_CIF.LDS.CTRL.B.LDS_H_MODE;
1737  }
1738  else if (tier == IfxCif_ImageTiers_Vertical)
1739  {
1740  retValue = MODULE_CIF.LDS.CTRL.B.LDS_V_MODE;
1741  }
1742  else
1743  {
1744  IFXCIF_DEBUG;
1745  }
1746 
1747  return retValue;
1748 }
1749 
1750 
1752 {
1753  uint32 retValue = 0xffffffff;
1754 
1755  /* read base address from unsigned component of the register structure because lower bits are tied to 0
1756  * as base address needs to be a word aligned value */
1757  if (component == IfxCif_MiMainPicturePathComponents_Y)
1758  {
1759  retValue = MODULE_CIF.MI.MP_Y_BASE_AD_INIT.U;
1760  }
1761  else if (component == IfxCif_MiMainPicturePathComponents_Cb)
1762  {
1763  retValue = MODULE_CIF.MI.MP_CB_BASE_AD_INIT.U;
1764  }
1765  else if (component == IfxCif_MiMainPicturePathComponents_Cr)
1766  {
1767  retValue = MODULE_CIF.MI.MP_CR_BASE_AD_INIT.U;
1768  }
1769  else
1770  {
1771  IFXCIF_DEBUG;
1772  }
1773 
1774  return retValue;
1775 }
1776 
1777 
1779 {
1781 
1782  if (5 > z)
1783  {
1784  if (0 !=
1785  (MODULE_CIF.MIEP.MIS.
1786  U & (((uint32)1 << (uint32)interruptSource) << ((uint32)z * IfxCif_EpInterrupts_Count))))
1787  {
1789  }
1790  else
1791  {}
1792  }
1793  else
1794  {
1795  IFXCIF_DEBUG;
1796  }
1797 
1798  return retValue;
1799 }
1800 
1801 
1803 {
1805 
1807  {
1808  if (0 != MODULE_CIF.ISP.MIS.B.MIS_WD_TRIG)
1809  {
1811  }
1812  }
1813  else if (interruptSource == IfxCif_IspInterruptSources_StartEdgeOfHSync)
1814  {
1815  if (0 != MODULE_CIF.ISP.MIS.B.MIS_H_START)
1816  {
1818  }
1819  }
1820  else if (interruptSource == IfxCif_IspInterruptSources_StartEdgeOfVSync)
1821  {
1822  if (0 != MODULE_CIF.ISP.MIS.B.MIS_V_START)
1823  {
1825  }
1826  }
1827  else if (interruptSource == IfxCif_IspInterruptSources_SampledInputFrameComplete)
1828  {
1829  if (0 != MODULE_CIF.ISP.MIS.B.MIS_FRAME_IN)
1830  {
1832  }
1833  }
1834  else if (interruptSource == IfxCif_IspInterruptSources_PictureSizeViolationOccurred)
1835  {
1836  if (0 != MODULE_CIF.ISP.MIS.B.MIS_PIC_SIZE_ERR)
1837  {
1839  }
1840  }
1841  else if (interruptSource == IfxCif_IspInterruptSources_LossOfData)
1842  {
1843  if (0 != MODULE_CIF.ISP.MIS.B.MIS_DATA_LOSS)
1844  {
1846  }
1847  }
1848  else if (interruptSource == IfxCif_IspInterruptSources_FrameCompletelyPutOut)
1849  {
1850  if (0 != MODULE_CIF.ISP.MIS.B.MIS_FRAME)
1851  {
1853  }
1854  }
1855  else if (interruptSource == IfxCif_IspInterruptSources_IspTurnedOff)
1856  {
1857  if (0 != MODULE_CIF.ISP.MIS.B.MIS_ISP_OFF)
1858  {
1860  }
1861  }
1862  else
1863  {
1864  IFXCIF_DEBUG;
1865  }
1866 
1867  return retValue;
1868 }
1869 
1870 
1872 {
1874 
1875  if (interruptSource == IfxCif_JpeInterruptSources_VlcTableError)
1876  {
1877  retValue = MODULE_CIF.JPE.ERROR_MIS.B.VLC_TABLE_ERR;
1878  }
1879  else if (interruptSource == IfxCif_JpeInterruptSources_R2BImageSizeError)
1880  {
1881  retValue = MODULE_CIF.JPE.ERROR_MIS.B.R2B_IMG_SIZE_ERR;
1882  }
1883  else if (interruptSource == IfxCif_JpeInterruptSources_DcTableError)
1884  {
1885  retValue = MODULE_CIF.JPE.ERROR_MIS.B.DCT_ERR;
1886  }
1887  else if (interruptSource == IfxCif_JpeInterruptSources_VlcSymbolError)
1888  {
1889  retValue = MODULE_CIF.JPE.ERROR_MIS.B.VLC_SYMBOL_ERR;
1890  }
1891  else if (interruptSource == IfxCif_JpeInterruptSources_HeaderGenerationComplete)
1892  {
1893  retValue = MODULE_CIF.JPE.STATUS_MIS.B.GEN_HEADER_DONE;
1894  }
1895  else if (interruptSource == IfxCif_JpeInterruptSources_EncodingComplete)
1896  {
1897  retValue = MODULE_CIF.JPE.STATUS_MIS.B.ENCODE_DONE;
1898  }
1899  else
1900  {
1901  IFXCIF_DEBUG;
1902  }
1903 
1904  return retValue;
1905 }
1906 
1907 
1909 {
1911 
1912  if (interruptSource == IfxCif_MiInterruptSources_BusError)
1913  {
1914  retValue = MODULE_CIF.MI.MIS.B.BUS_ERROR;
1915  }
1916  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureCr)
1917  {
1918  retValue = MODULE_CIF.MI.MIS.B.WRAP_MP_CR;
1919  }
1920  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureCb)
1921  {
1922  retValue = MODULE_CIF.MI.MIS.B.WRAP_MP_CB;
1923  }
1924  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureY)
1925  {
1926  retValue = MODULE_CIF.MI.MIS.B.WRAP_MP_Y;
1927  }
1928  else if (interruptSource == IfxCif_MiInterruptSources_FillMainPictureY)
1929  {
1930  retValue = MODULE_CIF.MI.MIS.B.FILL_MP_Y;
1931  }
1932  else if (interruptSource == IfxCif_MiInterruptSources_MacroBlockLine)
1933  {
1934  retValue = MODULE_CIF.MI.MIS.B.MBLK_LINE;
1935  }
1936  else if (interruptSource == IfxCif_MiInterruptSources_MainPictureFrameEnd)
1937  {
1938  retValue = MODULE_CIF.MI.MIS.B.MP_FRAME_END;
1939  }
1940  else
1941  {
1942  IFXCIF_DEBUG;
1943  }
1944 
1945  return retValue;
1946 }
1947 
1948 
1950 {
1952 
1954  {
1955  retValue = MODULE_CIF.WD.MIS.B.MIS_WD_VES_TO;
1956  }
1958  {
1959  retValue = MODULE_CIF.WD.MIS.B.MIS_WD_VSE_TO;
1960  }
1962  {
1963  retValue = MODULE_CIF.WD.MIS.B.MIS_WD_HES_TO;
1964  }
1966  {
1967  retValue = MODULE_CIF.WD.MIS.B.MIS_WD_HSE_TO;
1968  }
1969  else
1970  {
1971  IFXCIF_DEBUG;
1972  }
1973 
1974  return retValue;
1975 }
1976 
1977 
1979 {
1981 
1982  if (dataPath == IfxCif_MiDataPaths_RawData)
1983  {
1984  retValue = MODULE_CIF.MI.CTRL_SHD.B.RAW_ENABLE_IN;
1985  }
1986  else if (dataPath == IfxCif_MiDataPaths_JpegData)
1987  {
1988  retValue = MODULE_CIF.MI.CTRL_SHD.B.JPEG_ENABLE_IN;
1989  }
1990  else if (dataPath == IfxCif_MiDataPaths_MainPictureData)
1991  {
1992  retValue = MODULE_CIF.MI.CTRL_SHD.B.MP_ENABLE_IN;
1993  }
1994  else
1995  {
1996  IFXCIF_DEBUG;
1997  }
1998 
1999  return retValue;
2000 }
2001 
2002 
2004 {
2006 
2007  if (dataPath == IfxCif_MiDataPaths_RawData)
2008  {
2009  retValue = MODULE_CIF.MI.CTRL_SHD.B.RAW_ENABLE_OUT;
2010  }
2011  else if (dataPath == IfxCif_MiDataPaths_JpegData)
2012  {
2013  retValue = MODULE_CIF.MI.CTRL_SHD.B.JPEG_ENABLE_OUT;
2014  }
2015  else if (dataPath == IfxCif_MiDataPaths_MainPictureData)
2016  {
2017  retValue = MODULE_CIF.MI.CTRL_SHD.B.MP_ENABLE_OUT;
2018  }
2019  else
2020  {
2021  IFXCIF_DEBUG;
2022  }
2023 
2024  return retValue;
2025 }
2026 
2027 
2029 {
2031 
2032  if (dataPath == IfxCif_MiDataPaths_RawData)
2033  {
2034  retValue = MODULE_CIF.MI.CTRL.B.RAW_ENABLE;
2035  }
2036  else if (dataPath == IfxCif_MiDataPaths_JpegData)
2037  {
2038  retValue = MODULE_CIF.MI.CTRL.B.JPEG_ENABLE;
2039  }
2040  else if (dataPath == IfxCif_MiDataPaths_MainPictureData)
2041  {
2042  retValue = MODULE_CIF.MI.CTRL.B.MP_ENABLE;
2043  }
2044  else
2045  {
2046  IFXCIF_DEBUG;
2047  }
2048 
2049  return retValue;
2050 }
2051 
2052 
2054 {
2056 
2057  if (interruptSource == IfxCif_MiInterruptSources_BusError)
2058  {
2059  retValue = MODULE_CIF.MI.IMSC.B.BUS_ERROR;
2060  }
2061  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureCr)
2062  {
2063  retValue = MODULE_CIF.MI.IMSC.B.WRAP_MP_CR;
2064  }
2065  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureCb)
2066  {
2067  retValue = MODULE_CIF.MI.IMSC.B.WRAP_MP_CB;
2068  }
2069  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureY)
2070  {
2071  retValue = MODULE_CIF.MI.IMSC.B.WRAP_MP_Y;
2072  }
2073  else if (interruptSource == IfxCif_MiInterruptSources_FillMainPictureY)
2074  {
2075  retValue = MODULE_CIF.MI.IMSC.B.FILL_MP_Y;
2076  }
2077  else if (interruptSource == IfxCif_MiInterruptSources_MacroBlockLine)
2078  {
2079  retValue = MODULE_CIF.MI.IMSC.B.MBLK_LINE;
2080  }
2081  else if (interruptSource == IfxCif_MiInterruptSources_MainPictureFrameEnd)
2082  {
2083  retValue = MODULE_CIF.MI.IMSC.B.MP_FRAME_END;
2084  }
2085  else
2086  {
2087  IFXCIF_DEBUG;
2088  }
2089 
2090  return retValue;
2091 }
2092 
2093 
2095 {
2096  uint32 retValue = 0xffffffff;
2097 
2098  if (component == IfxCif_MiMainPicturePathComponents_Y)
2099  {
2100  retValue = MODULE_CIF.MI.MP_Y_BASE_AD_SHD.B.MP_Y_BASE_AD;
2101  }
2102  else if (component == IfxCif_MiMainPicturePathComponents_Cb)
2103  {
2104  retValue = MODULE_CIF.MI.MP_CB_BASE_AD_SHD.B.MP_CB_BASE_AD;
2105  }
2106  else if (component == IfxCif_MiMainPicturePathComponents_Cr)
2107  {
2108  retValue = MODULE_CIF.MI.MP_CR_BASE_AD_SHD.B.MP_CR_BASE_AD;
2109  }
2110  else
2111  {
2112  IFXCIF_DEBUG;
2113  }
2114 
2115  return retValue;
2116 }
2117 
2118 
2120 {
2121  uint32 retValue = 0xffffffff;
2122 
2123  /* read size from unsigned component of the register structure because lower bits are tied to 0
2124  * as size needs to be a word aligned value */
2125  if (component == IfxCif_MiMainPicturePathComponents_Y)
2126  {
2127  retValue = MODULE_CIF.MI.MP_Y_SIZE_INIT.U;
2128  }
2129  else if (component == IfxCif_MiMainPicturePathComponents_Cb)
2130  {
2131  retValue = MODULE_CIF.MI.MP_CB_SIZE_INIT.U;
2132  }
2133  else if (component == IfxCif_MiMainPicturePathComponents_Cr)
2134  {
2135  retValue = MODULE_CIF.MI.MP_CR_SIZE_INIT.U;
2136  }
2137  else
2138  {
2139  IFXCIF_DEBUG;
2140  }
2141 
2142  return retValue;
2143 }
2144 
2145 
2147 {
2148  uint32 retValue = 0xffffffff;
2149 
2150  /* read offset counter from unsigned component of the register structure because lower bits are tied to 0
2151  * as offset counter needs to be a word aligned value */
2152  if (component == IfxCif_MiMainPicturePathComponents_Y)
2153  {
2154  retValue = MODULE_CIF.MI.MP_Y_OFFS_CNT_INIT.U;
2155  }
2156  else if (component == IfxCif_MiMainPicturePathComponents_Cb)
2157  {
2158  retValue = MODULE_CIF.MI.MP_CB_OFFS_CNT_INIT.U;
2159  }
2160  else if (component == IfxCif_MiMainPicturePathComponents_Cr)
2161  {
2162  retValue = MODULE_CIF.MI.MP_CR_OFFS_CNT_INIT.U;
2163  }
2164  else
2165  {
2166  IFXCIF_DEBUG;
2167  }
2168 
2169  return retValue;
2170 }
2171 
2172 
2174 {
2175  uint32 retValue = 0xffffffff;
2176 
2177  if (component == IfxCif_MiMainPicturePathComponents_Y)
2178  {
2179  retValue = MODULE_CIF.MI.MP_Y_OFFS_CNT_SHD.B.MP_Y_OFFS_CNT;
2180  }
2181  else if (component == IfxCif_MiMainPicturePathComponents_Cb)
2182  {
2183  retValue = MODULE_CIF.MI.MP_CB_OFFS_CNT_SHD.B.MP_CB_OFFS_CNT;
2184  }
2185  else if (component == IfxCif_MiMainPicturePathComponents_Cr)
2186  {
2187  retValue = MODULE_CIF.MI.MP_CR_OFFS_CNT_SHD.B.MP_CR_OFFS_CNT;
2188  }
2189  else
2190  {
2191  IFXCIF_DEBUG;
2192  }
2193 
2194  return retValue;
2195 }
2196 
2197 
2199 {
2200  uint32 retValue = 0xffffffff;
2201 
2202  /* read offset counter from unsigned component of the register structure because lower bits are tied to 0
2203  * as offset counter needs to be a word aligned value */
2204  if (component == IfxCif_MiMainPicturePathComponents_Y)
2205  {
2206  retValue = MODULE_CIF.MI.MP_Y_OFFS_CNT_START.U;
2207  }
2208  else if (component == IfxCif_MiMainPicturePathComponents_Cb)
2209  {
2210  retValue = MODULE_CIF.MI.MP_CB_OFFS_CNT_START.U;
2211  }
2212  else if (component == IfxCif_MiMainPicturePathComponents_Cr)
2213  {
2214  retValue = MODULE_CIF.MI.MP_CR_OFFS_CNT_START.U;
2215  }
2216  else
2217  {
2218  IFXCIF_DEBUG;
2219  }
2220 
2221  return retValue;
2222 }
2223 
2224 
2226 {
2227  uint32 retValue = 0xffffffff;
2228 
2229  if (component == IfxCif_MiMainPicturePathComponents_Y)
2230  {
2231  retValue = MODULE_CIF.MI.MP_Y_SIZE_SHD.B.MP_Y_SIZE;
2232  }
2233  else if (component == IfxCif_MiMainPicturePathComponents_Cb)
2234  {
2235  retValue = MODULE_CIF.MI.MP_CB_SIZE_SHD.B.MP_CB_SIZE;
2236  }
2237  else if (component == IfxCif_MiMainPicturePathComponents_Cr)
2238  {
2239  retValue = MODULE_CIF.MI.MP_CR_SIZE_SHD.B.MP_CR_SIZE;
2240  }
2241  else
2242  {
2243  IFXCIF_DEBUG;
2244  }
2245 
2246  return retValue;
2247 }
2248 
2249 
2251 {
2253 
2255  {
2256  retValue = MODULE_CIF.MI.STATUS.B.BUS_WRITE_ERROR;
2257  }
2259  {
2260  retValue = MODULE_CIF.MI.STATUS.B.MP_CR_FIFO_FULL;
2261  }
2263  {
2264  retValue = MODULE_CIF.MI.STATUS.B.MP_CB_FIFO_FULL;
2265  }
2267  {
2268  retValue = MODULE_CIF.MI.STATUS.B.MP_Y_FIFO_FULL;
2269  }
2270  else
2271  {
2272  IFXCIF_DEBUG;
2273  }
2274 
2275  return retValue;
2276 }
2277 
2278 
2280 {
2282 
2283  if (5 > z)
2284  {
2285  if (0 !=
2286  (MODULE_CIF.MIEP.RIS.
2287  U & (((uint32)1 << (uint32)interruptSource) << ((uint32)z * IfxCif_EpInterrupts_Count))))
2288  {
2290  }
2291  }
2292  else
2293  {
2294  IFXCIF_DEBUG;
2295  }
2296 
2297  return retValue;
2298 }
2299 
2300 
2302 {
2304 
2306  {
2307  if (0 != MODULE_CIF.ISP.RIS.B.RIS_WD_TRIG)
2308  {
2310  }
2311  }
2312  else if (interruptSource == IfxCif_IspInterruptSources_StartEdgeOfHSync)
2313  {
2314  if (0 != MODULE_CIF.ISP.RIS.B.RIS_H_START)
2315  {
2317  }
2318  }
2319  else if (interruptSource == IfxCif_IspInterruptSources_StartEdgeOfVSync)
2320  {
2321  if (0 != MODULE_CIF.ISP.RIS.B.RIS_V_START)
2322  {
2324  }
2325  }
2326  else if (interruptSource == IfxCif_IspInterruptSources_SampledInputFrameComplete)
2327  {
2328  if (0 != MODULE_CIF.ISP.RIS.B.RIS_FRAME_IN)
2329  {
2331  }
2332  }
2333  else if (interruptSource == IfxCif_IspInterruptSources_PictureSizeViolationOccurred)
2334  {
2335  if (0 != MODULE_CIF.ISP.RIS.B.RIS_PIC_SIZE_ERR)
2336  {
2338  }
2339  }
2340  else if (interruptSource == IfxCif_IspInterruptSources_LossOfData)
2341  {
2342  if (0 != MODULE_CIF.ISP.RIS.B.RIS_DATA_LOSS)
2343  {
2345  }
2346  }
2347  else if (interruptSource == IfxCif_IspInterruptSources_FrameCompletelyPutOut)
2348  {
2349  if (0 != MODULE_CIF.ISP.RIS.B.RIS_FRAME)
2350  {
2352  }
2353  }
2354  else if (interruptSource == IfxCif_IspInterruptSources_IspTurnedOff)
2355  {
2356  if (0 != MODULE_CIF.ISP.RIS.B.RIS_ISP_OFF)
2357  {
2359  }
2360  }
2361 
2362  return retValue;
2363 }
2364 
2365 
2367 {
2369 
2370  if (interruptSource == IfxCif_JpeInterruptSources_VlcTableError)
2371  {
2372  retValue = MODULE_CIF.JPE.ERROR_RIS.B.VLC_TABLE_ERR;
2373  }
2374  else if (interruptSource == IfxCif_JpeInterruptSources_R2BImageSizeError)
2375  {
2376  retValue = MODULE_CIF.JPE.ERROR_RIS.B.R2B_IMG_SIZE_ERR;
2377  }
2378  else if (interruptSource == IfxCif_JpeInterruptSources_DcTableError)
2379  {
2380  retValue = MODULE_CIF.JPE.ERROR_RIS.B.DCT_ERR;
2381  }
2382  else if (interruptSource == IfxCif_JpeInterruptSources_VlcSymbolError)
2383  {
2384  retValue = MODULE_CIF.JPE.ERROR_RIS.B.VLC_SYMBOL_ERR;
2385  }
2386  else if (interruptSource == IfxCif_JpeInterruptSources_HeaderGenerationComplete)
2387  {
2388  retValue = MODULE_CIF.JPE.STATUS_RIS.B.GEN_HEADER_DONE;
2389  }
2390  else if (interruptSource == IfxCif_JpeInterruptSources_EncodingComplete)
2391  {
2392  retValue = MODULE_CIF.JPE.STATUS_RIS.B.ENCODE_DONE;
2393  }
2394  else
2395  {
2396  IFXCIF_DEBUG;
2397  }
2398 
2399  return retValue;
2400 }
2401 
2402 
2404 {
2406 
2407  if (interruptSource == IfxCif_MiInterruptSources_BusError)
2408  {
2409  retValue = MODULE_CIF.MI.RIS.B.BUS_ERROR;
2410  }
2411  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureCr)
2412  {
2413  retValue = MODULE_CIF.MI.RIS.B.WRAP_MP_CR;
2414  }
2415  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureCb)
2416  {
2417  retValue = MODULE_CIF.MI.RIS.B.WRAP_MP_CB;
2418  }
2419  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureY)
2420  {
2421  retValue = MODULE_CIF.MI.RIS.B.WRAP_MP_Y;
2422  }
2423  else if (interruptSource == IfxCif_MiInterruptSources_FillMainPictureY)
2424  {
2425  retValue = MODULE_CIF.MI.RIS.B.FILL_MP_Y;
2426  }
2427  else if (interruptSource == IfxCif_MiInterruptSources_MacroBlockLine)
2428  {
2429  retValue = MODULE_CIF.MI.RIS.B.MBLK_LINE;
2430  }
2431  else if (interruptSource == IfxCif_MiInterruptSources_MainPictureFrameEnd)
2432  {
2433  retValue = MODULE_CIF.MI.RIS.B.MP_FRAME_END;
2434  }
2435  else
2436  {
2437  IFXCIF_DEBUG;
2438  }
2439 
2440  return retValue;
2441 }
2442 
2443 
2445 {
2447 
2449  {
2450  retValue = MODULE_CIF.WD.RIS.B.RIS_WD_VES_TO;
2451  }
2453  {
2454  retValue = MODULE_CIF.WD.RIS.B.RIS_WD_VSE_TO;
2455  }
2457  {
2458  retValue = MODULE_CIF.WD.RIS.B.RIS_WD_HES_TO;
2459  }
2461  {
2462  retValue = MODULE_CIF.WD.RIS.B.RIS_WD_HSE_TO;
2463  }
2464  else
2465  {
2466  IFXCIF_DEBUG;
2467  }
2468 
2469  return retValue;
2470 }
2471 
2472 
2474 {
2476 
2478  {
2479  retValue = MODULE_CIF.WD.IMSC.B.IMSC_WD_VES_TO;
2480  }
2482  {
2483  retValue = MODULE_CIF.WD.IMSC.B.IMSC_WD_VSE_TO;
2484  }
2486  {
2487  retValue = MODULE_CIF.WD.IMSC.B.IMSC_WD_HES_TO;
2488  }
2490  {
2491  retValue = MODULE_CIF.WD.IMSC.B.IMSC_WD_HSE_TO;
2492  }
2493  else
2494  {
2495  IFXCIF_DEBUG;
2496  }
2497 
2498  return retValue;
2499 }
2500 
2501 
2503 {
2504  uint16 retValue = 0xffff;
2505 
2506  if (tier == IfxCif_ImageTiers_Horizontal)
2507  {
2509  {
2510  retValue = MODULE_CIF.WD.H_TIMEOUT.B.WD_HES_TO;
2511  }
2512  else if (timeoutCounter == IfxCif_SecurityWatchdogTimeoutCounters_StartEnd)
2513  {
2514  retValue = MODULE_CIF.WD.H_TIMEOUT.B.WD_HSE_TO;
2515  }
2516  else
2517  {
2518  IFXCIF_DEBUG;
2519  }
2520  }
2521  else if (tier == IfxCif_ImageTiers_Vertical)
2522  {
2524  {
2525  retValue = MODULE_CIF.WD.V_TIMEOUT.B.WD_VES_TO;
2526  }
2527  else if (timeoutCounter == IfxCif_SecurityWatchdogTimeoutCounters_StartEnd)
2528  {
2529  retValue = MODULE_CIF.WD.V_TIMEOUT.B.WD_VSE_TO;
2530  }
2531  else
2532  {
2533  IFXCIF_DEBUG;
2534  }
2535  }
2536  else
2537  {
2538  IFXCIF_DEBUG;
2539  }
2540 
2541  return retValue;
2542 }
2543 
2544 
2546 {
2548 
2549  if (submodule == IfxCif_Submodules_AllModules)
2550  {
2551  if (0 != MODULE_CIF.IRCL.B.CIF_GLOBAL_RST)
2552  {
2553  retValue = IfxCif_State_Enabled;
2554  }
2555  }
2556  else if (submodule == IfxCif_Submodules_Debug)
2557  {
2558  if (0 != MODULE_CIF.IRCL.B.CIF_DEBUG_PATH_RST)
2559  {
2560  retValue = IfxCif_State_Enabled;
2561  }
2562  }
2563  else if (submodule == IfxCif_Submodules_ExtraPaths)
2564  {
2565  if (0 != MODULE_CIF.IRCL.B.CIF_EXTRA_PATHS_RST)
2566  {
2567  retValue = IfxCif_State_Enabled;
2568  }
2569  }
2570  else if (submodule == IfxCif_Submodules_LinearDownscaler)
2571  {
2572  if (0 != MODULE_CIF.IRCL.B.CIF_LIN_DSCALER_RST)
2573  {
2574  retValue = IfxCif_State_Enabled;
2575  }
2576  }
2577  else if (submodule == IfxCif_Submodules_SecurityWatchdog)
2578  {
2579  if (0 != MODULE_CIF.IRCL.B.CIF_WATCHDOG_RST)
2580  {
2581  retValue = IfxCif_State_Enabled;
2582  }
2583  }
2584  else if (submodule == IfxCif_Submodules_MemoryInterface)
2585  {
2586  if (0 != MODULE_CIF.IRCL.B.CIF_MI_SOFT_RST)
2587  {
2588  retValue = IfxCif_State_Enabled;
2589  }
2590  }
2591  else if (submodule == IfxCif_Submodules_JpegEncoder)
2592  {
2593  if (0 != MODULE_CIF.IRCL.B.CIF_JPEG_SOFT_RST)
2594  {
2595  retValue = IfxCif_State_Enabled;
2596  }
2597  }
2598  else if (submodule == IfxCif_Submodules_ImageSignalProcessing)
2599  {
2600  if (0 != MODULE_CIF.IRCL.B.CIF_ISP_SOFT_RST)
2601  {
2602  retValue = IfxCif_State_Enabled;
2603  }
2604  }
2605  else if (submodule == IfxCif_Submodules_YCSplitter)
2606  {
2607  if (0 != MODULE_CIF.IRCL.B.CIF_YCS_SOFT_RST)
2608  {
2609  retValue = IfxCif_State_Enabled;
2610  }
2611  }
2612  else
2613  {
2614  IFXCIF_DEBUG;
2615  }
2616 
2617  return retValue;
2618 }
2619 
2620 
2621 void IfxCif_programJpeTable(IfxCif_JpeTableId tableId, const uint8 *tableEntry, uint8 length)
2622 {
2623  uint16 i;
2624  boolean programTable = TRUE;
2625 
2626  if ((tableId == IfxCif_JpeTableId_QTable0) || (tableId == IfxCif_JpeTableId_QTable1))
2627  {
2628  MODULE_CIF.JPE.TABLE_ID.B.TABLE_ID = tableId;
2629  }
2630  else if (tableId == IfxCif_JpeTableId_VlcDcTable0)
2631  {
2632  MODULE_CIF.JPE.TABLE_ID.B.TABLE_ID = tableId;
2634  }
2635  else if (tableId == IfxCif_JpeTableId_VlcDcTable1)
2636  {
2637  MODULE_CIF.JPE.TABLE_ID.B.TABLE_ID = tableId;
2639  }
2640  else if (tableId == IfxCif_JpeTableId_VlcAcTable0)
2641  {
2642  MODULE_CIF.JPE.TABLE_ID.B.TABLE_ID = tableId;
2644  }
2645  else if (tableId == IfxCif_JpeTableId_VlcAcTable1)
2646  {
2647  MODULE_CIF.JPE.TABLE_ID.B.TABLE_ID = tableId;
2649  }
2650  else
2651  {
2652  IFXCIF_DEBUG;
2653  programTable = FALSE;
2654  }
2655 
2656  if (programTable != FALSE)
2657  {
2658  for (i = 0; i < (length / 2); i++)
2659  {
2660  Ifx_CIF_JPE_TABLE_DATA data;
2661  data.B.TABLE_WDATA_H = tableEntry[i * 2 + 1];
2662  data.B.TABLE_WDATA_L = tableEntry[i * 2];
2663  MODULE_CIF.JPE.TABLE_DATA.U = data.U;
2664  }
2665  }
2666 }
2667 
2668 
2670 {
2672  {
2673  MODULE_CIF.WD.CTRL.B.RST_PD_CNT = 1;
2674  }
2675  else if (counter == IfxCif_SecurityWatchdogCounters_Vertical)
2676  {
2677  MODULE_CIF.WD.CTRL.B.RST_V_CNT = 1;
2678  }
2679  else if (counter == IfxCif_SecurityWatchdogCounters_Horizontal)
2680  {
2681  MODULE_CIF.WD.CTRL.B.RST_H_CNT = 1;
2682  }
2683  else
2684  {
2685  IFXCIF_DEBUG;
2686  }
2687 }
2688 
2689 
2691 {
2693  {
2694  MODULE_CIF.DP.CTRL.B.UDS8 = enableState;
2695  }
2696  else if (source == IfxCif_DpControlSources_UserDefinedSymbol7)
2697  {
2698  MODULE_CIF.DP.CTRL.B.UDS7 = enableState;
2699  }
2700  else if (source == IfxCif_DpControlSources_UserDefinedSymbol6)
2701  {
2702  MODULE_CIF.DP.CTRL.B.UDS6 = enableState;
2703  }
2704  else if (source == IfxCif_DpControlSources_UserDefinedSymbol5)
2705  {
2706  MODULE_CIF.DP.CTRL.B.UDS5 = enableState;
2707  }
2708  else if (source == IfxCif_DpControlSources_UserDefinedSymbol4)
2709  {
2710  MODULE_CIF.DP.CTRL.B.UDS4 = enableState;
2711  }
2712  else if (source == IfxCif_DpControlSources_UserDefinedSymbol3)
2713  {
2714  MODULE_CIF.DP.CTRL.B.UDS3 = enableState;
2715  }
2716  else if (source == IfxCif_DpControlSources_UserDefinedSymbol2)
2717  {
2718  MODULE_CIF.DP.CTRL.B.UDS2 = enableState;
2719  }
2720  else if (source == IfxCif_DpControlSources_UserDefinedSymbol1)
2721  {
2722  MODULE_CIF.DP.CTRL.B.UDS1 = enableState;
2723  }
2724  else if (source == IfxCif_DpControlSources_TimestampCounter)
2725  {
2726  MODULE_CIF.DP.CTRL.B.TSC_EN = enableState;
2727  }
2728  else if (source == IfxCif_DpControlSources_LineNumberCounter)
2729  {
2730  MODULE_CIF.DP.CTRL.B.LNC_EN = enableState;
2731  }
2732  else if (source == IfxCif_DpControlSources_FrameNumberCounter)
2733  {
2734  MODULE_CIF.DP.CTRL.B.FNC_EN = enableState;
2735  }
2736  else
2737  {
2738  IFXCIF_DEBUG;
2739  }
2740 }
2741 
2742 
2743 void IfxCif_setDpCounter(IfxCif_DpCounters counter, uint32 counterValue)
2744 {
2745  // only the predivider counter can be set
2746  if (counter == IfxCif_DpCounters_PredividerCounter)
2747  {
2748  MODULE_CIF.DP.PDIV_CTRL.B.PDIV_VAL = counterValue;
2749  }
2750  else
2751  {
2752  IFXCIF_DEBUG;
2753  }
2754 }
2755 
2756 
2758 {
2759  if (8 > x)
2760  {
2761  MODULE_CIF.DP.UDS_1S[x].B.UDS = value;
2762  }
2763  else
2764  {
2765  IFXCIF_DEBUG;
2766  }
2767 }
2768 
2769 
2771 {
2772  if (5 > z)
2773  {
2774  /* write base address to unsigned component of the register structure because lower bits are tied to 0
2775  * as base address needs to be a word aligned value */
2776  MODULE_CIF.MIEP.CH_1S[z].BASE_AD_INIT.U = (uint32)baseAddress;
2777  }
2778  else
2779  {
2780  IFXCIF_DEBUG;
2781  }
2782 }
2783 
2784 
2786 {
2787  if (5 > z)
2788  {
2789  if (tier == IfxCif_ImageTiers_Horizontal)
2790  {
2791  MODULE_CIF.EP_IC_1S[z].DISPLACE.B.DX = displacement;
2792  }
2793  else if (tier == IfxCif_ImageTiers_Vertical)
2794  {
2795  MODULE_CIF.EP_IC_1S[z].DISPLACE.B.DY = displacement;
2796  }
2797  else
2798  {
2799  IFXCIF_DEBUG;
2800  }
2801  }
2802  else
2803  {
2804  IFXCIF_DEBUG;
2805  }
2806 }
2807 
2808 
2810 {
2811  if (5 > z)
2812  {
2813  MODULE_CIF.EP_IC_1S[z].CTRL.B.IC_EN = enableState;
2814  }
2815  else
2816  {
2817  IFXCIF_DEBUG;
2818  }
2819 }
2820 
2821 
2823 {
2824  if (5 > z)
2825  {
2826  if (tier == IfxCif_ImageTiers_Horizontal)
2827  {
2828  MODULE_CIF.EP_IC_1S[z].MAX_DX.B.MAX_DX = displacement;
2829  }
2830  else if (tier == IfxCif_ImageTiers_Vertical)
2831  {
2832  MODULE_CIF.EP_IC_1S[z].MAX_DY.B.MAX_DY = displacement;
2833  }
2834  else
2835  {
2836  IFXCIF_DEBUG;
2837  }
2838  }
2839  else
2840  {
2841  IFXCIF_DEBUG;
2842  }
2843 }
2844 
2845 
2847 {
2848  if (5 > z)
2849  {
2850  if (tier == IfxCif_ImageTiers_Horizontal)
2851  {
2852  MODULE_CIF.EP_IC_1S[z].H_OFFS.B.H_OFFS = offset;
2853  }
2854  else if (tier == IfxCif_ImageTiers_Vertical)
2855  {
2856  MODULE_CIF.EP_IC_1S[z].V_OFFS.B.V_OFFS = offset;
2857  }
2858  else
2859  {
2860  IFXCIF_DEBUG;
2861  }
2862  }
2863  else
2864  {
2865  IFXCIF_DEBUG;
2866  }
2867 }
2868 
2869 
2871 {
2872  if (5 > z)
2873  {
2874  MODULE_CIF.EP_IC_1S[z].H_OFFS.B.H_OFFS = hOffset;
2875  MODULE_CIF.EP_IC_1S[z].V_OFFS.B.V_OFFS = vOffset;
2876  }
2877  else
2878  {
2879  IFXCIF_DEBUG;
2880  }
2881 }
2882 
2883 
2885 {
2886  if (5 > z)
2887  {
2888  if (tier == IfxCif_ImageTiers_Horizontal)
2889  {
2890  MODULE_CIF.EP_IC_1S[z].H_SIZE.B.H_SIZE = size;
2891  }
2892  else if (tier == IfxCif_ImageTiers_Vertical)
2893  {
2894  MODULE_CIF.EP_IC_1S[z].V_SIZE.B.V_SIZE = size;
2895  }
2896  else
2897  {
2898  IFXCIF_DEBUG;
2899  }
2900  }
2901  else
2902  {
2903  IFXCIF_DEBUG;
2904  }
2905 }
2906 
2907 
2909 {
2910  if (5 > z)
2911  {
2912  MODULE_CIF.EP_IC_1S[z].H_SIZE.B.H_SIZE = hSize;
2913  MODULE_CIF.EP_IC_1S[z].V_SIZE.B.V_SIZE = vSize;
2914  }
2915  else
2916  {
2917  IFXCIF_DEBUG;
2918  }
2919 }
2920 
2921 
2923 {
2924  if (5 > z)
2925  {
2926  if (feature == IfxCif_EpFeatures_InitOffsetCounter)
2927  {
2928  MODULE_CIF.MIEP.CH_1S[z].CTRL.B.INIT_OFFSET_EN = enableState;
2929  }
2930  else if (feature == IfxCif_EpFeatures_InitBaseAddress)
2931  {
2932  MODULE_CIF.MIEP.CH_1S[z].CTRL.B.INIT_BASE_EN = enableState;
2933  }
2934  else if (feature == IfxCif_EpFeatures_ByteSwap)
2935  {
2936  MODULE_CIF.MIEP.CH_1S[z].CTRL.B.BYTE_SWAP = enableState;
2937  }
2938  else if (feature == IfxCif_EpFeatures_PictureDataPath)
2939  {
2940  MODULE_CIF.MIEP.CH_1S[z].CTRL.B.EP_ENABLE = enableState;
2941  }
2942  else
2943  {
2944  IFXCIF_DEBUG;
2945  }
2946  }
2947  else
2948  {
2949  IFXCIF_DEBUG;
2950  }
2951 }
2952 
2953 
2955 {
2956  if (5 > z)
2957  {
2958  /* write size to unsigned component of the register structure because lower bits are tied to 0
2959  * as size needs to be a word aligned value */
2960  MODULE_CIF.MIEP.CH_1S[z].SIZE_INIT.U = size;
2961  }
2962  else
2963  {
2964  IFXCIF_DEBUG;
2965  }
2966 }
2967 
2968 
2970 {
2971  if (5 > z)
2972  {
2973  /* write interrupt offset to unsigned component of the register structure because lower bits are tied
2974  * to 0 as interrupt offset needs to be a word aligned value */
2975  MODULE_CIF.MIEP.CH_1S[z].IRQ_OFFS_INIT.U = interruptOffset;
2976  }
2977  else
2978  {
2979  IFXCIF_DEBUG;
2980  }
2981 }
2982 
2983 
2985 {
2986  if (5 > z)
2987  {
2988  /* write offset counter to unsigned component of the register structure because lower bits are tied
2989  * to 0 as offset counter needs to be a word aligned value */
2990  MODULE_CIF.MIEP.CH_1S[z].OFFS_CNT_INIT.U = offsetCounter;
2991  }
2992  else
2993  {
2994  IFXCIF_DEBUG;
2995  }
2996 }
2997 
2998 
3000 {
3001  if (5 > z)
3002  {
3003  if (IfxCif_State_Enabled == interruptEnableState)
3004  {
3005  MODULE_CIF.MIEP.IMSC.U |=
3006  (((uint32)1 << (uint32)interruptSource) << ((uint32)z * IfxCif_EpInterrupts_Count));
3007  }
3008  else
3009  {
3010  MODULE_CIF.MIEP.IMSC.U &=
3011  ~(((uint32)1 << (uint32)interruptSource) << ((uint32)z * IfxCif_EpInterrupts_Count));
3012  }
3013  }
3014  else
3015  {
3016  IFXCIF_DEBUG;
3017  }
3018 }
3019 
3020 
3022 {
3023  if (5 > z)
3024  {
3025  MODULE_CIF.MIEP.ISR.U = (((uint32)1 << (uint32)interruptSource) << ((uint32)z * IfxCif_EpInterrupts_Count));
3026  }
3027  else
3028  {
3029  IFXCIF_DEBUG;
3030  }
3031 }
3032 
3033 
3035 {
3036  if (5 > z)
3037  {
3038  /* write offset counter to unsigned component of the register structure because lower bits are tied
3039  * to 0 as offset counter needs to be a word aligned value */
3040  MODULE_CIF.MIEP.CH_1S[z].OFFS_CNT_START.U = offsetCounter;
3041  }
3042  else
3043  {
3044  IFXCIF_DEBUG;
3045  }
3046 }
3047 
3048 
3050 {
3051  if (5 > z)
3052  {
3053  MODULE_CIF.EP_IC_1S[z].RECENTER.B.RECENTER = value;
3054  }
3055  else
3056  {
3057  IFXCIF_DEBUG;
3058  }
3059 }
3060 
3061 
3063 {
3064  if (5 > z)
3065  {
3066  MODULE_CIF.MIEP.CH_1S[z].CTRL.B.EP_WRITE_FORMAT = writeFormat;
3067  }
3068  else
3069  {
3070  IFXCIF_DEBUG;
3071  }
3072 }
3073 
3074 
3076 {
3077  if (table == IfxCif_HuffmanTables_Table0)
3078  {
3079  MODULE_CIF.JPE.TAC0_LEN.U = length; // 32-bit access is needed
3080  }
3081  else if (table == IfxCif_HuffmanTables_Table1)
3082  {
3083  MODULE_CIF.JPE.TAC1_LEN.U = length; // 32-bit access is needed
3084  }
3085  else
3086  {
3087  IFXCIF_DEBUG;
3088  }
3089 }
3090 
3091 
3093 {
3094  if (table == IfxCif_HuffmanTables_Table0)
3095  {
3096  MODULE_CIF.JPE.AC_TABLE_SELECT.B.AC_TABLE_SELECT &= ~(1 << component);
3097  }
3098  else if (table == IfxCif_HuffmanTables_Table1)
3099  {
3100  MODULE_CIF.JPE.AC_TABLE_SELECT.B.AC_TABLE_SELECT |= (1 << component);
3101  }
3102  else
3103  {
3104  IFXCIF_DEBUG;
3105  }
3106 }
3107 
3108 
3110 {
3111  if (table == IfxCif_HuffmanTables_Table0)
3112  {
3113  MODULE_CIF.JPE.TDC0_LEN.U = length; // 32-bit access is needed
3114  }
3115  else if (table == IfxCif_HuffmanTables_Table1)
3116  {
3117  MODULE_CIF.JPE.TDC1_LEN.U = length; // 32-bit access is needed
3118  }
3119  else
3120  {
3121  IFXCIF_DEBUG;
3122  }
3123 }
3124 
3125 
3127 {
3128  if (table == IfxCif_HuffmanTables_Table0)
3129  {
3130  MODULE_CIF.JPE.DC_TABLE_SELECT.B.DC_TABLE_SELECT &= ~(1 << component);
3131  }
3132  else if (table == IfxCif_HuffmanTables_Table1)
3133  {
3134  MODULE_CIF.JPE.DC_TABLE_SELECT.B.DC_TABLE_SELECT |= (1 << component);
3135  }
3136  else
3137  {
3138  IFXCIF_DEBUG;
3139  }
3140 }
3141 
3142 
3144 {
3145  Ifx_CIF_ICCL iccl = MODULE_CIF.ICCL;
3146 
3147  if (submodule == IfxCif_Submodules_Debug)
3148  {
3149  iccl.B.CIF_DEBUG_PATH_CLK_EN = clockState;
3150  }
3151  else if (submodule == IfxCif_Submodules_ExtraPaths)
3152  {
3153  iccl.B.CIF_EXTRA_PATHS_CLK_ENABLE = clockState;
3154  }
3155  else if (submodule == IfxCif_Submodules_LinearDownscaler)
3156  {
3157  iccl.B.CIF_LIN_DSCALER_CLK_ENABLE = clockState;
3158  }
3159  else if (submodule == IfxCif_Submodules_SecurityWatchdog)
3160  {
3161  iccl.B.CIF_WATCHDOG_CLK_ENABLE = clockState;
3162  }
3163  else if (submodule == IfxCif_Submodules_MemoryInterface)
3164  {
3165  iccl.B.CIF_MI_CLK_ENABLE = clockState;
3166  }
3167  else if (submodule == IfxCif_Submodules_JpegEncoder)
3168  {
3169  iccl.B.CIF_JPEG_CLK_ENABLE = clockState;
3170  }
3171  else if (submodule == IfxCif_Submodules_ImageSignalProcessing)
3172  {
3173  iccl.B.CIF_ISP_CLK_ENABLE = clockState;
3174  }
3175  else
3176  {
3177  IFXCIF_DEBUG;
3178  }
3179 
3180  MODULE_CIF.ICCL.U = iccl.U;
3181 }
3182 
3183 
3185 {
3186  if (tier == IfxCif_ImageTiers_Horizontal)
3187  {
3188  MODULE_CIF.ISP.ACQ_H_OFFS.B.ACQ_H_OFFS = offset;
3189  }
3190  else if (tier == IfxCif_ImageTiers_Vertical)
3191  {
3192  MODULE_CIF.ISP.ACQ_V_OFFS.B.ACQ_V_OFFS = offset;
3193  }
3194  else
3195  {
3196  IFXCIF_DEBUG;
3197  }
3198 }
3199 
3200 
3202 {
3203  if (tier == IfxCif_ImageTiers_Horizontal)
3204  {
3205  MODULE_CIF.ISP.ACQ_H_SIZE.B.ACQ_H_SIZE = size;
3206  }
3207  else if (tier == IfxCif_ImageTiers_Vertical)
3208  {
3209  MODULE_CIF.ISP.ACQ_V_SIZE.B.ACQ_V_SIZE = size;
3210  }
3211  else
3212  {
3213  IFXCIF_DEBUG;
3214  }
3215 }
3216 
3217 
3219 {
3220  /* CIF module has a NO append enable bit -> invert appendState */
3221  if (appendState == IfxCif_State_Enabled)
3222  {
3223  MODULE_CIF.ISP.ACQ_PROP.B.INPUT_SELECTION_NO_APP = 0;
3224  }
3225  else
3226  {
3227  MODULE_CIF.ISP.ACQ_PROP.B.INPUT_SELECTION_NO_APP = 1;
3228  }
3229 }
3230 
3231 
3233 {
3235  {
3236  MODULE_CIF.ISP.IMSC.B.IMSC_WD_TRIG = interruptEnableState;
3237  }
3238  else if (interruptSource == IfxCif_IspInterruptSources_StartEdgeOfHSync)
3239  {
3240  MODULE_CIF.ISP.IMSC.B.IMSC_H_START = interruptEnableState;
3241  }
3242  else if (interruptSource == IfxCif_IspInterruptSources_StartEdgeOfVSync)
3243  {
3244  MODULE_CIF.ISP.IMSC.B.IMSC_V_START = interruptEnableState;
3245  }
3246  else if (interruptSource == IfxCif_IspInterruptSources_SampledInputFrameComplete)
3247  {
3248  MODULE_CIF.ISP.IMSC.B.IMSC_FRAME_IN = interruptEnableState;
3249  }
3250  else if (interruptSource == IfxCif_IspInterruptSources_PictureSizeViolationOccurred)
3251  {
3252  MODULE_CIF.ISP.IMSC.B.IMSC_PIC_SIZE_ERR = interruptEnableState;
3253  }
3254  else if (interruptSource == IfxCif_IspInterruptSources_LossOfData)
3255  {
3256  MODULE_CIF.ISP.IMSC.B.IMSC_DATA_LOSS = interruptEnableState;
3257  }
3258  else if (interruptSource == IfxCif_IspInterruptSources_FrameCompletelyPutOut)
3259  {
3260  MODULE_CIF.ISP.IMSC.B.IMSC_FRAME = interruptEnableState;
3261  }
3262  else if (interruptSource == IfxCif_IspInterruptSources_IspTurnedOff)
3263  {
3264  MODULE_CIF.ISP.IMSC.B.IMSC_ISP_OFF = interruptEnableState;
3265  }
3266 }
3267 
3268 
3270 {
3272  {
3273  MODULE_CIF.ISP.ISR.B.ISR_WD_TRIG = 1;
3274  }
3275  else if (interruptSource == IfxCif_IspInterruptSources_StartEdgeOfHSync)
3276  {
3277  MODULE_CIF.ISP.ISR.B.ISR_H_START = 1;
3278  }
3279  else if (interruptSource == IfxCif_IspInterruptSources_StartEdgeOfVSync)
3280  {
3281  MODULE_CIF.ISP.ISR.B.ISR_V_START = 1;
3282  }
3283  else if (interruptSource == IfxCif_IspInterruptSources_SampledInputFrameComplete)
3284  {
3285  MODULE_CIF.ISP.ISR.B.ISR_FRAME_IN = 1;
3286  }
3287  else if (interruptSource == IfxCif_IspInterruptSources_PictureSizeViolationOccurred)
3288  {
3289  MODULE_CIF.ISP.ISR.B.ISR_PIC_SIZE_ERR = 1;
3290  }
3291  else if (interruptSource == IfxCif_IspInterruptSources_LossOfData)
3292  {
3293  MODULE_CIF.ISP.ISR.B.ISR_DATA_LOSS = 1;
3294  }
3295  else if (interruptSource == IfxCif_IspInterruptSources_FrameCompletelyPutOut)
3296  {
3297  MODULE_CIF.ISP.ISR.B.ISR_FRAME = 1;
3298  }
3299  else if (interruptSource == IfxCif_IspInterruptSources_IspTurnedOff)
3300  {
3301  MODULE_CIF.ISP.ISR.B.ISR_ISP_OFF = 1;
3302  }
3303 }
3304 
3305 
3307 {
3308  if (tier == IfxCif_ImageTiers_Horizontal)
3309  {
3310  MODULE_CIF.ISP.OUT_H_OFFS.B.ISP_OUT_H_OFFS = offset;
3311  }
3312  else if (tier == IfxCif_ImageTiers_Vertical)
3313  {
3314  MODULE_CIF.ISP.OUT_V_OFFS.B.ISP_OUT_V_OFFS = offset;
3315  }
3316  else
3317  {
3318  IFXCIF_DEBUG;
3319  }
3320 }
3321 
3322 
3324 {
3325  if (tier == IfxCif_ImageTiers_Horizontal)
3326  {
3327  MODULE_CIF.ISP.OUT_H_SIZE.B.ISP_OUT_H_SIZE = pictureSize;
3328  }
3329  else if (tier == IfxCif_ImageTiers_Vertical)
3330  {
3331  MODULE_CIF.ISP.OUT_V_SIZE.B.ISP_OUT_V_SIZE = pictureSize;
3332  }
3333  else
3334  {
3335  IFXCIF_DEBUG;
3336  }
3337 }
3338 
3339 
3341 {
3342  if (tier == IfxCif_ImageTiers_Horizontal)
3343  {
3344  MODULE_CIF.ISPIS.DISPLACE.B.DX = displacement;
3345  }
3346  else if (tier == IfxCif_ImageTiers_Vertical)
3347  {
3348  MODULE_CIF.ISPIS.DISPLACE.B.DY = displacement;
3349  }
3350  else
3351  {
3352  IFXCIF_DEBUG;
3353  }
3354 }
3355 
3356 
3358 {
3359  if (tier == IfxCif_ImageTiers_Horizontal)
3360  {
3361  MODULE_CIF.ISPIS.MAX_DX.B.IS_MAX_DX = displacement;
3362  }
3363  else if (tier == IfxCif_ImageTiers_Vertical)
3364  {
3365  MODULE_CIF.ISPIS.MAX_DY.B.IS_MAX_DY = displacement;
3366  }
3367  else
3368  {
3369  IFXCIF_DEBUG;
3370  }
3371 }
3372 
3373 
3375 {
3376  if (tier == IfxCif_ImageTiers_Horizontal)
3377  {
3378  MODULE_CIF.ISPIS.H_OFFS.B.IS_H_OFFS = offset;
3379  }
3380  else if (tier == IfxCif_ImageTiers_Vertical)
3381  {
3382  MODULE_CIF.ISPIS.V_OFFS.B.IS_V_OFFS = offset;
3383  }
3384  else
3385  {
3386  IFXCIF_DEBUG;
3387  }
3388 }
3389 
3390 
3392 {
3393  if (tier == IfxCif_ImageTiers_Horizontal)
3394  {
3395  MODULE_CIF.ISPIS.H_SIZE.B.IS_H_SIZE = size;
3396  }
3397  else if (tier == IfxCif_ImageTiers_Vertical)
3398  {
3399  MODULE_CIF.ISPIS.V_SIZE.B.IS_V_SIZE = size;
3400  }
3401  else
3402  {
3403  IFXCIF_DEBUG;
3404  }
3405 }
3406 
3407 
3409 {
3410  if (interruptSource == IfxCif_JpeInterruptSources_VlcTableError)
3411  {
3412  MODULE_CIF.JPE.ERROR_IMR.B.VLC_TABLE_ERR = interruptEnableState;
3413  }
3414  else if (interruptSource == IfxCif_JpeInterruptSources_R2BImageSizeError)
3415  {
3416  MODULE_CIF.JPE.ERROR_IMR.B.R2B_IMG_SIZE_ERR = interruptEnableState;
3417  }
3418  else if (interruptSource == IfxCif_JpeInterruptSources_DcTableError)
3419  {
3420  MODULE_CIF.JPE.ERROR_IMR.B.DCT_ERR = interruptEnableState;
3421  }
3422  else if (interruptSource == IfxCif_JpeInterruptSources_VlcSymbolError)
3423  {
3424  MODULE_CIF.JPE.ERROR_IMR.B.VLC_SYMBOL_ERR = interruptEnableState;
3425  }
3426  else if (interruptSource == IfxCif_JpeInterruptSources_HeaderGenerationComplete)
3427  {
3428  MODULE_CIF.JPE.STATUS_IMR.B.GEN_HEADER_DONE = interruptEnableState;
3429  }
3430  else if (interruptSource == IfxCif_JpeInterruptSources_EncodingComplete)
3431  {
3432  MODULE_CIF.JPE.STATUS_IMR.B.ENCODE_DONE = interruptEnableState;
3433  }
3434  else
3435  {
3436  IFXCIF_DEBUG;
3437  }
3438 }
3439 
3440 
3442 {
3443  if (interruptSource == IfxCif_JpeInterruptSources_VlcTableError)
3444  {
3445  MODULE_CIF.JPE.ERROR_ICR.B.VLC_TABLE_ERR = 1;
3446  }
3447  else if (interruptSource == IfxCif_JpeInterruptSources_R2BImageSizeError)
3448  {
3449  MODULE_CIF.JPE.ERROR_ICR.B.R2B_IMG_SIZE_ERR = 1;
3450  }
3451  else if (interruptSource == IfxCif_JpeInterruptSources_DcTableError)
3452  {
3453  MODULE_CIF.JPE.ERROR_ICR.B.DCT_ERR = 1;
3454  }
3455  else if (interruptSource == IfxCif_JpeInterruptSources_VlcSymbolError)
3456  {
3457  MODULE_CIF.JPE.ERROR_ICR.B.VLC_SYMBOL_ERR = 1;
3458  }
3459  else if (interruptSource == IfxCif_JpeInterruptSources_HeaderGenerationComplete)
3460  {
3461  MODULE_CIF.JPE.STATUS_ICR.B.GEN_HEADER_DONE = 1;
3462  }
3463  else if (interruptSource == IfxCif_JpeInterruptSources_EncodingComplete)
3464  {
3465  MODULE_CIF.JPE.STATUS_ICR.B.ENCODE_DONE = 1;
3466  }
3467  else
3468  {
3469  IFXCIF_DEBUG;
3470  }
3471 }
3472 
3473 
3475 {
3476  if (component == IfxCif_JpeQTableSelectorComponents_Y)
3477  {
3478  MODULE_CIF.JPE.TQ_Y_SELECT.B.TQ0_SELECT = selector;
3479  }
3480  else if (component == IfxCif_JpeQTableSelectorComponents_U)
3481  {
3482  MODULE_CIF.JPE.TQ_U_SELECT.B.TQ1_SELECT = selector;
3483  }
3484  else if (component == IfxCif_JpeQTableSelectorComponents_V)
3485  {
3486  MODULE_CIF.JPE.TQ_V_SELECT.B.TQ2_SELECT = selector;
3487  }
3488  else
3489  {
3490  IFXCIF_DEBUG;
3491  }
3492 }
3493 
3494 
3496 {
3497  if (source == IfxCif_JpeScalingValueSources_Y)
3498  {
3499  MODULE_CIF.JPE.Y_SCALE_EN.B.Y_SCALE_EN = scalingEnable;
3500  }
3501  else if (source == IfxCif_JpeScalingValueSources_CbCr)
3502  {
3503  MODULE_CIF.JPE.CBCR_SCALE_EN.B.CBCR_SCALE_EN = scalingEnable;
3504  }
3505  else
3506  {
3507  IFXCIF_DEBUG;
3508  }
3509 }
3510 
3511 
3513 {
3514  if (tier == IfxCif_ImageTiers_Horizontal)
3515  {
3516  MODULE_CIF.JPE.ENC_HSIZE.B.ENC_HSIZE = size;
3517  }
3518  else if (tier == IfxCif_ImageTiers_Vertical)
3519  {
3520  MODULE_CIF.JPE.ENC_VSIZE.B.ENC_VSIZE = size;
3521  }
3522  else
3523  {
3524  IFXCIF_DEBUG;
3525  }
3526 }
3527 
3528 
3530 {
3531  Ifx_CIF_LDS_CTRL ldsCtrl = MODULE_CIF.LDS.CTRL;
3532 
3533  if (tier == IfxCif_ImageTiers_Horizontal)
3534  {
3535  ldsCtrl.B.LDS_H_EN = enableState;
3536  }
3537  else if (tier == IfxCif_ImageTiers_Vertical)
3538  {
3539  ldsCtrl.B.LDS_V_EN = enableState;
3540  }
3541  else
3542  {
3543  IFXCIF_DEBUG;
3544  }
3545 
3546  MODULE_CIF.LDS.CTRL.U = ldsCtrl.U;
3547 }
3548 
3549 
3551 {
3552  Ifx_CIF_LDS_FAC ldsFac = MODULE_CIF.LDS.FAC;
3553 
3554  if (tier == IfxCif_ImageTiers_Horizontal)
3555  {
3556  ldsFac.B.LDS_H_FAC = factor;
3557  }
3558  else if (tier == IfxCif_ImageTiers_Vertical)
3559  {
3560  ldsFac.B.LDS_V_FAC = factor;
3561  }
3562  else
3563  {
3564  IFXCIF_DEBUG;
3565  }
3566 
3567  MODULE_CIF.LDS.FAC.U = ldsFac.U;
3568 }
3569 
3570 
3572 {
3573  Ifx_CIF_LDS_FAC ldsFac = MODULE_CIF.LDS.FAC;
3574 
3575  ldsFac.B.LDS_H_FAC = horizFactor;
3576  ldsFac.B.LDS_V_FAC = vertFactor;
3577  MODULE_CIF.LDS.FAC.U = ldsFac.U;
3578 }
3579 
3580 
3582 {
3583  Ifx_CIF_LDS_CTRL ldsCtrl = MODULE_CIF.LDS.CTRL;
3584 
3585  if (tier == IfxCif_ImageTiers_Horizontal)
3586  {
3587  ldsCtrl.B.LDS_H_MODE = mode;
3588  }
3589  else if (tier == IfxCif_ImageTiers_Vertical)
3590  {
3591  ldsCtrl.B.LDS_V_MODE = mode;
3592  }
3593  else
3594  {
3595  IFXCIF_DEBUG;
3596  }
3597 
3598  MODULE_CIF.LDS.CTRL.U = ldsCtrl.U;
3599 }
3600 
3601 
3603 {
3604  Ifx_CIF_LDS_CTRL ldsCtrl = MODULE_CIF.LDS.CTRL;
3605 
3606  ldsCtrl.B.LDS_H_EN = (horizMode != IfxCif_LinearDownscalerScalingMode_Disabled);
3607  ldsCtrl.B.LDS_V_EN = (vertMode != IfxCif_LinearDownscalerScalingMode_Disabled);
3608  ldsCtrl.B.LDS_H_MODE = horizMode;
3609  ldsCtrl.B.LDS_V_MODE = vertMode;
3610  MODULE_CIF.LDS.CTRL.U = ldsCtrl.U;
3611 }
3612 
3613 
3615 {
3616  if (dataPath == IfxCif_MiDataPaths_RawData)
3617  {
3618  MODULE_CIF.MI.CTRL.B.RAW_ENABLE = enableState;
3619  }
3620  else if (dataPath == IfxCif_MiDataPaths_JpegData)
3621  {
3622  MODULE_CIF.MI.CTRL.B.JPEG_ENABLE = enableState;
3623  }
3624  else if (dataPath == IfxCif_MiDataPaths_MainPictureData)
3625  {
3626  MODULE_CIF.MI.CTRL.B.MP_ENABLE = enableState;
3627  }
3628  else
3629  {
3630  IFXCIF_DEBUG;
3631  }
3632 }
3633 
3634 
3636 {
3637  if (interruptSource == IfxCif_MiInterruptSources_BusError)
3638  {
3639  MODULE_CIF.MI.IMSC.B.BUS_ERROR = interruptEnableState;
3640  }
3641  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureCr)
3642  {
3643  MODULE_CIF.MI.IMSC.B.WRAP_MP_CR = interruptEnableState;
3644  }
3645  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureCb)
3646  {
3647  MODULE_CIF.MI.IMSC.B.WRAP_MP_CB = interruptEnableState;
3648  }
3649  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureY)
3650  {
3651  MODULE_CIF.MI.IMSC.B.WRAP_MP_Y = interruptEnableState;
3652  }
3653  else if (interruptSource == IfxCif_MiInterruptSources_FillMainPictureY)
3654  {
3655  MODULE_CIF.MI.IMSC.B.FILL_MP_Y = interruptEnableState;
3656  }
3657  else if (interruptSource == IfxCif_MiInterruptSources_MacroBlockLine)
3658  {
3659  MODULE_CIF.MI.IMSC.B.MBLK_LINE = interruptEnableState;
3660  }
3661  else if (interruptSource == IfxCif_MiInterruptSources_MainPictureFrameEnd)
3662  {
3663  MODULE_CIF.MI.IMSC.B.MP_FRAME_END = interruptEnableState;
3664  }
3665  else
3666  {
3667  IFXCIF_DEBUG;
3668  }
3669 }
3670 
3671 
3673 {
3674  if (interruptSource == IfxCif_MiInterruptSources_BusError)
3675  {
3676  MODULE_CIF.MI.ISR.B.Bus_ERROR = 1;
3677  }
3678  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureCr)
3679  {
3680  MODULE_CIF.MI.ISR.B.WRAP_MP_CR = 1;
3681  }
3682  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureCb)
3683  {
3684  MODULE_CIF.MI.ISR.B.WRAP_MP_CB = 1;
3685  }
3686  else if (interruptSource == IfxCif_MiInterruptSources_WrapMainPictureY)
3687  {
3688  MODULE_CIF.MI.ISR.B.WRAP_MP_Y = 1;
3689  }
3690  else if (interruptSource == IfxCif_MiInterruptSources_FillMainPictureY)
3691  {
3692  MODULE_CIF.MI.ISR.B.FILL_MP_Y = 1;
3693  }
3694  else if (interruptSource == IfxCif_MiInterruptSources_MacroBlockLine)
3695  {
3696  MODULE_CIF.MI.ISR.B.MBLK_LINE = 1;
3697  }
3698  else if (interruptSource == IfxCif_MiInterruptSources_MainPictureFrameEnd)
3699  {
3700  MODULE_CIF.MI.ISR.B.MP_FRAME_END = 1;
3701  }
3702  else
3703  {
3704  IFXCIF_DEBUG;
3705  }
3706 }
3707 
3708 
3710 {
3711  MODULE_CIF.MI.CTRL.B.BURST_LEN_LUM = burstLength;
3712 }
3713 
3714 
3716 {
3717  uint32 baseAddress = (uint32)address;
3718 
3719  /* write base address to unsigned component of the register structure because lower bits are tied to 0
3720  * as base address needs to be a word aligned value */
3721  if (component == IfxCif_MiMainPicturePathComponents_Y)
3722  {
3723  MODULE_CIF.MI.MP_Y_BASE_AD_INIT.U = baseAddress;
3724  }
3725  else if (component == IfxCif_MiMainPicturePathComponents_Cb)
3726  {
3727  MODULE_CIF.MI.MP_CB_BASE_AD_INIT.U = baseAddress;
3728  }
3729  else if (component == IfxCif_MiMainPicturePathComponents_Cr)
3730  {
3731  MODULE_CIF.MI.MP_CR_BASE_AD_INIT.U = baseAddress;
3732  }
3733  else
3734  {
3735  IFXCIF_DEBUG;
3736  }
3737 }
3738 
3739 
3741 {
3742  /* write size to unsigned component of the register structure because lower bits are tied to 0
3743  * as size needs to be a word aligned value */
3744  if (component == IfxCif_MiMainPicturePathComponents_Y)
3745  {
3746  MODULE_CIF.MI.MP_Y_SIZE_INIT.U = size;
3747  }
3748  else if (component == IfxCif_MiMainPicturePathComponents_Cb)
3749  {
3750  MODULE_CIF.MI.MP_CB_SIZE_INIT.U = size;
3751  }
3752  else if (component == IfxCif_MiMainPicturePathComponents_Cr)
3753  {
3754  MODULE_CIF.MI.MP_CR_SIZE_INIT.U = size;
3755  }
3756  else
3757  {
3758  IFXCIF_DEBUG;
3759  }
3760 }
3761 
3762 
3764 {
3765  /* write offset counter to unsigned component of the register structure because lower bits are tied to 0
3766  * as offset counter needs to be a word aligned value */
3767  if (component == IfxCif_MiMainPicturePathComponents_Y)
3768  {
3769  MODULE_CIF.MI.MP_Y_OFFS_CNT_INIT.U = offsetCounter;
3770  }
3771  else if (component == IfxCif_MiMainPicturePathComponents_Cb)
3772  {
3773  MODULE_CIF.MI.MP_CB_OFFS_CNT_INIT.U = offsetCounter;
3774  }
3775  else if (component == IfxCif_MiMainPicturePathComponents_Cr)
3776  {
3777  MODULE_CIF.MI.MP_CR_OFFS_CNT_INIT.U = offsetCounter;
3778  }
3779  else
3780  {
3781  IFXCIF_DEBUG;
3782  }
3783 }
3784 
3785 
3787 {
3789  IfxScuWdt_clearCpuEndinit(l_TempVar);
3790 
3791  /* bit is inverted */
3792  MODULE_CIF.BBB.CLC.B.DISR = (IfxCif_State_Enabled == state) ? 0 : 1;
3793 
3794  while (MODULE_CIF.BBB.CLC.B.DISS == 1U)
3795  {}
3796 
3797  IfxScuWdt_setCpuEndinit(l_TempVar);
3798 }
3799 
3800 
3802 {
3804  {
3805  MODULE_CIF.WD.IMSC.B.IMSC_WD_VES_TO = interruptEnableState;
3806  }
3808  {
3809  MODULE_CIF.WD.IMSC.B.IMSC_WD_VSE_TO = interruptEnableState;
3810  }
3812  {
3813  MODULE_CIF.WD.IMSC.B.IMSC_WD_HES_TO = interruptEnableState;
3814  }
3816  {
3817  MODULE_CIF.WD.IMSC.B.IMSC_WD_HSE_TO = interruptEnableState;
3818  }
3819  else
3820  {
3821  IFXCIF_DEBUG;
3822  }
3823 }
3824 
3825 
3827 {
3829  {
3830  MODULE_CIF.WD.ISR.B.ISR_WD_VES_TO = 1;
3831  }
3833  {
3834  MODULE_CIF.WD.ISR.B.ISR_WD_VSE_TO = 1;
3835  }
3837  {
3838  MODULE_CIF.WD.ISR.B.ISR_WD_HES_TO = 1;
3839  }
3841  {
3842  MODULE_CIF.WD.ISR.B.ISR_WD_HSE_TO = 1;
3843  }
3844  else
3845  {
3846  IFXCIF_DEBUG;
3847  }
3848 }
3849 
3850 
3852 {
3853  if (tier == IfxCif_ImageTiers_Horizontal)
3854  {
3856  {
3857  MODULE_CIF.WD.H_TIMEOUT.B.WD_HES_TO = timeout;
3858  }
3859  else if (timeoutCounter == IfxCif_SecurityWatchdogTimeoutCounters_StartEnd)
3860  {
3861  MODULE_CIF.WD.H_TIMEOUT.B.WD_HSE_TO = timeout;
3862  }
3863  else
3864  {
3865  IFXCIF_DEBUG;
3866  }
3867  }
3868  else if (tier == IfxCif_ImageTiers_Vertical)
3869  {
3871  {
3872  MODULE_CIF.WD.V_TIMEOUT.B.WD_VES_TO = timeout;
3873  }
3874  else if (timeoutCounter == IfxCif_SecurityWatchdogTimeoutCounters_StartEnd)
3875  {
3876  MODULE_CIF.WD.V_TIMEOUT.B.WD_VSE_TO = timeout;
3877  }
3878  else
3879  {
3880  IFXCIF_DEBUG;
3881  }
3882  }
3883  else
3884  {
3885  IFXCIF_DEBUG;
3886  }
3887 }
3888 
3889 
3891 {
3892  if (submodule == IfxCif_Submodules_AllModules)
3893  {
3894  MODULE_CIF.IRCL.B.CIF_GLOBAL_RST = resetMode;
3895  }
3896  else if (submodule == IfxCif_Submodules_Debug)
3897  {
3898  MODULE_CIF.IRCL.B.CIF_DEBUG_PATH_RST = resetMode;
3899  }
3900  else if (submodule == IfxCif_Submodules_ExtraPaths)
3901  {
3902  MODULE_CIF.IRCL.B.CIF_EXTRA_PATHS_RST = resetMode;
3903  }
3904  else if (submodule == IfxCif_Submodules_LinearDownscaler)
3905  {
3906  MODULE_CIF.IRCL.B.CIF_LIN_DSCALER_RST = resetMode;
3907  }
3908  else if (submodule == IfxCif_Submodules_SecurityWatchdog)
3909  {
3910  MODULE_CIF.IRCL.B.CIF_WATCHDOG_RST = resetMode;
3911  }
3912  else if (submodule == IfxCif_Submodules_MemoryInterface)
3913  {
3914  MODULE_CIF.IRCL.B.CIF_MI_SOFT_RST = resetMode;
3915  }
3916  else if (submodule == IfxCif_Submodules_JpegEncoder)
3917  {
3918  MODULE_CIF.IRCL.B.CIF_JPEG_SOFT_RST = resetMode;
3919  }
3920  else if (submodule == IfxCif_Submodules_ImageSignalProcessing)
3921  {
3922  MODULE_CIF.IRCL.B.CIF_ISP_SOFT_RST = resetMode;
3923  }
3924  else if (submodule == IfxCif_Submodules_YCSplitter)
3925  {
3926  MODULE_CIF.IRCL.B.CIF_YCS_SOFT_RST = resetMode;
3927  }
3928  else
3929  {
3930  IFXCIF_DEBUG;
3931  }
3932 }