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