![]() |
cframe
Vitis Drivers API Documentation
|
This file which contains the code related to CFRAME block.
MODIFICATION HISTORY:
Ver Who Date Changes
----- ---- -------- -------------------------------------------------------
1.00 kc 11/10/2017 Initial release
1.01 bsv 05/29/2019 XCframe_ReadReg API added
1.02 bsv 11/06/2019 XCframe_ClearCframeErr API added
1.03 bsv 02/17/2020 XCframe_SafetyWriteReg API added
1.04 bsv 07/15/2021 Fix doxygen warnings
1.5 mss 09/04/2023 Fixed MISRA-C violation 10.1
mss 09/04/2023 Fixed MISRA-C violation 10.4
mss 09/04/2023 Fixed MISRA-C violation 7.2
mss 09/04/2023 Fixed MISRA-C violation 4.6
mss 09/04/2023 Fixed MISRA-C violation 8.13
pre 08/22/2024 Added XCframe_GetLastFrameAddr function and modified
XCframe_SetReadParam functionMacros | |
| #define | XCFRAME_LAST_FRAME_BOT_OFFSET (0x220U) |
| Offset of LAST_FRAME_BOT register. More... | |
| #define | XCFRAME_MAX_BLKTYPE_IN_FAR_BOT (4U) |
| Maximum value of block type in FAR_BOT register. More... | |
| #define | XCFRAME_FAR_TOP_OFFSET_WRT_BOT (0x10U) |
| Offset of CFRAME_FAR_TOP regiter w.r.t CFRAME_FAR_BOT. More... | |
| #define | XCFRAME_128BIT_IN_WORDS (4U) |
| Size of 128bit in words. More... | |
| #define | XCFRAME_BLKTYPE0_MASK (0xFFFFFU) |
| Mask to read blocktype 0 values. More... | |
| #define | XCFRAME_BLKTYPE1_WORD0_SHIFT (20U) |
| Shift value to read blocktype1 value from word0. More... | |
| #define | XCFRAME_BLKTYPE1_WORD0_MASK (0xFFFU) |
| Mask to read blocktype1 value from word0. More... | |
| #define | XCFRAME_BLKTYPE1_WORD1_SHIFT (12U) |
| Shift value to read blocktype1 value from word1. More... | |
| #define | XCFRAME_BLKTYPE1_WORD1_MASK (0xFFU) |
| Mask to read blocktype1 value from word1. More... | |
| #define | XCFRAME_BLKTYPE2_WORD1_SHIFT (8U) |
| Shift value to read blocktype2 value from word1. More... | |
| #define | XCFRAME_BLKTYPE2_WORD1_MASK (0xFFFFFU) |
| Mask to read blocktype1 value from word1. More... | |
| #define | XCFRAME_BLKTYPE3_WORD1_SHIFT (28U) |
| Shift value to read blocktype3 value from word1. More... | |
| #define | XCFRAME_BLKTYPE3_WORD1_MASK (0xFU) |
| Mask to read blocktype3 value from word1. More... | |
| #define | XCFRAME_BLKTYPE3_WORD2_SHIFT (4U) |
| Shift value to read blocktype3 value from word2. More... | |
| #define | XCFRAME_BLKTYPE3_WORD2_MASK (0xFFFFU) |
| Mask to read blocktype3 value from word2. More... | |
| #define | XCFRAME_WORD0_OFFSET (0U) |
| Offset of word0. More... | |
| #define | XCFRAME_WORD1_OFFSET (1U) |
| Offset of word1. More... | |
| #define | XCFRAME_WORD2_OFFSET (2U) |
| Offset of word2. More... | |
Enumerations | |
| enum | XCframe_Blktype { BLOCKTYPE0 = 0, BLOCKTYPE1, BLOCKTYPE2, BLOCKTYPE3, BLOCKTYPE4, BLOCKTYPE5, BLOCKTYPE6 } |
Functions | |
| s32 | XCframe_CfgInitialize (XCframe *InstancePtr, const XCframe_Config *CfgPtr, u32 EffectiveAddr) |
| This function initializes an CFRAME core. More... | |
| void | XCframe_WriteReg (const XCframe *InstancePtr, u32 AddrOffset, XCframe_FrameNo FrameNo, const Xuint128 *Val) |
| This function writes to 128 bit CFRAME register. More... | |
| void | XCframe_ReadReg (const XCframe *InstancePtr, u32 AddrOffset, XCframe_FrameNo FrameNo, u32 *ValPtr) |
| This function reads the 128 bit CFRAME register. More... | |
| s32 | XCframe_SafetyWriteReg (const XCframe *InstancePtr, u32 AddrOffset, XCframe_FrameNo FrameNo, const Xuint128 *Val) |
| This function writes to 128 bit CFRAME register and reads it back to validate the write operation. More... | |
| void | XCframe_WriteCmd (const XCframe *InstancePtr, XCframe_FrameNo CframeNo, u32 Cmd) |
| This function writes the value to CFRAME cmd register. More... | |
| void | XCframe_VggTrim (const XCframe *InstancePtr, const Xuint128 *TrimVal) |
| This function writes the VGG TRIM value. More... | |
| void | XCframe_CramTrim (const XCframe *InstancePtr, u32 TrimValue) |
| This function writes the CRAM TRIM value. More... | |
| void | XCframe_BramTrim (const XCframe *InstancePtr, u32 TrimValue) |
| This function writes the BRAM TRIM value. More... | |
| void | XCframe_UramTrim (const XCframe *InstancePtr, u32 TrimValue) |
| This function writes the BRAM TRIM value. More... | |
| void | XCframe_SetReadParam (const XCframe *InstancePtr, XCframe_FrameNo CframeNo, u32 CframeLen, u32 FrameAddr) |
| This function sets the CFRAME read parameters with mentioned CFRAME length and frame number. More... | |
| void | XCframe_ClearCframeErr (const XCframe *InstancePtr) |
| This function clears CFRAME ISRs and is called as part of CFRAME error recovery. More... | |
| u32 | XCframe_GetLastFrameAddr (XCframe *InstancePtr, u32 BlockType, XCframe_FrameNo CframeNo) |
| This function returns the last Cframe address of given cframeno and blocktype. More... | |
| #define XCFRAME_128BIT_IN_WORDS (4U) |
Size of 128bit in words.
| #define XCFRAME_BLKTYPE0_MASK (0xFFFFFU) |
Mask to read blocktype 0 values.
| #define XCFRAME_BLKTYPE1_WORD0_MASK (0xFFFU) |
Mask to read blocktype1 value from word0.
| #define XCFRAME_BLKTYPE1_WORD0_SHIFT (20U) |
Shift value to read blocktype1 value from word0.
| #define XCFRAME_BLKTYPE1_WORD1_MASK (0xFFU) |
Mask to read blocktype1 value from word1.
| #define XCFRAME_BLKTYPE1_WORD1_SHIFT (12U) |
Shift value to read blocktype1 value from word1.
| #define XCFRAME_BLKTYPE2_WORD1_MASK (0xFFFFFU) |
Mask to read blocktype1 value from word1.
| #define XCFRAME_BLKTYPE2_WORD1_SHIFT (8U) |
Shift value to read blocktype2 value from word1.
| #define XCFRAME_BLKTYPE3_WORD1_MASK (0xFU) |
Mask to read blocktype3 value from word1.
| #define XCFRAME_BLKTYPE3_WORD1_SHIFT (28U) |
Shift value to read blocktype3 value from word1.
| #define XCFRAME_BLKTYPE3_WORD2_MASK (0xFFFFU) |
Mask to read blocktype3 value from word2.
| #define XCFRAME_BLKTYPE3_WORD2_SHIFT (4U) |
Shift value to read blocktype3 value from word2.
| #define XCFRAME_FAR_TOP_OFFSET_WRT_BOT (0x10U) |
Offset of CFRAME_FAR_TOP regiter w.r.t CFRAME_FAR_BOT.
| #define XCFRAME_LAST_FRAME_BOT_OFFSET (0x220U) |
Offset of LAST_FRAME_BOT register.
| #define XCFRAME_MAX_BLKTYPE_IN_FAR_BOT (4U) |
Maximum value of block type in FAR_BOT register.
| #define XCFRAME_WORD0_OFFSET (0U) |
Offset of word0.
| #define XCFRAME_WORD1_OFFSET (1U) |
Offset of word1.
| #define XCFRAME_WORD2_OFFSET (2U) |
Offset of word2.
| enum XCframe_Blktype |
| void XCframe_BramTrim | ( | const XCframe * | InstancePtr, |
| u32 | TrimValue | ||
| ) |
This function writes the BRAM TRIM value.
| InstancePtr | is a pointer to the XCframe instance. |
| TrimValue | is to hold BRAM TRIM value |
| s32 XCframe_CfgInitialize | ( | XCframe * | InstancePtr, |
| const XCframe_Config * | CfgPtr, | ||
| u32 | EffectiveAddr | ||
| ) |
This function initializes an CFRAME core.
This function must be called prior to using an CFRAME driver.
| InstancePtr | is a pointer to the XCframe instance. |
| CfgPtr | is a reference to a structure containing information about a specific XCframe instance. |
| EffectiveAddr | is the device base address in the virtual memory address space. The caller is responsible for keeping the address mapping from EffectiveAddr to the device physical base address unchanged once this function is invoked. Unexpected errors may occur if the address mapping changes after this function is called. If address translation is not used, pass in the physical address instead. |
| void XCframe_ClearCframeErr | ( | const XCframe * | InstancePtr | ) |
This function clears CFRAME ISRs and is called as part of CFRAME error recovery.
| InstancePtr | is a pointer to the XCframe instance |
| void XCframe_CramTrim | ( | const XCframe * | InstancePtr, |
| u32 | TrimValue | ||
| ) |
This function writes the CRAM TRIM value.
| InstancePtr | is a pointer to the XCframe instance. |
| TrimValue | is to hold CRAM TRIM value |
| u32 XCframe_GetLastFrameAddr | ( | XCframe * | InstancePtr, |
| u32 | BlockType, | ||
| XCframe_FrameNo | CframeNo | ||
| ) |
This function returns the last Cframe address of given cframeno and blocktype.
| InstancePtr | is a pointer to the XCframe instance |
| BlockType | is block type |
| CframeNo | is the index of cframe |
| void XCframe_ReadReg | ( | const XCframe * | InstancePtr, |
| u32 | AddrOffset, | ||
| XCframe_FrameNo | FrameNo, | ||
| u32 * | ValPtr | ||
| ) |
This function reads the 128 bit CFRAME register.
| InstancePtr | is a pointer to the XCframe instance. |
| AddrOffset | is offset of the Cframe register |
| FrameNo | is the index of frame |
| ValPtr | 128 bit variable to store the read data |
| s32 XCframe_SafetyWriteReg | ( | const XCframe * | InstancePtr, |
| u32 | AddrOffset, | ||
| XCframe_FrameNo | FrameNo, | ||
| const Xuint128 * | Val | ||
| ) |
This function writes to 128 bit CFRAME register and reads it back to validate the write operation.
| InstancePtr | is a pointer to the XCframe instance. |
| AddrOffset | is offset of the Cframe register |
| FrameNo | is the index of frame |
| Val | is pointer to the value to be written |
| void XCframe_SetReadParam | ( | const XCframe * | InstancePtr, |
| XCframe_FrameNo | CframeNo, | ||
| u32 | CframeLen, | ||
| u32 | FrameAddr | ||
| ) |
This function sets the CFRAME read parameters with mentioned CFRAME length and frame number.
| InstancePtr | is a pointer to the XCframe instance. |
| CframeNo | is the index of frame |
| CframeLen | is total length of Cframes |
| FrameAddr | is frame address |
| void XCframe_UramTrim | ( | const XCframe * | InstancePtr, |
| u32 | TrimValue | ||
| ) |
This function writes the BRAM TRIM value.
| InstancePtr | is a pointer to the XCframe instance. |
| TrimValue | is to hold URAM TRIM value |
| void XCframe_VggTrim | ( | const XCframe * | InstancePtr, |
| const Xuint128 * | TrimVal | ||
| ) |
This function writes the VGG TRIM value.
| InstancePtr | is a pointer to the XCframe instance. |
| TrimVal | is pointer to the TRIM value |
| void XCframe_WriteCmd | ( | const XCframe * | InstancePtr, |
| XCframe_FrameNo | CframeNo, | ||
| u32 | Cmd | ||
| ) |
This function writes the value to CFRAME cmd register.
| InstancePtr | is a pointer to the XCframe instance. |
| CframeNo | is the index of frame |
| Cmd | to be initiated by CFRAME block |
| void XCframe_WriteReg | ( | const XCframe * | InstancePtr, |
| u32 | AddrOffset, | ||
| XCframe_FrameNo | FrameNo, | ||
| const Xuint128 * | Val | ||
| ) |
This function writes to 128 bit CFRAME register.
| InstancePtr | is a pointer to the XCframe instance. |
| AddrOffset | is offset of the Cframe register |
| FrameNo | is the index of frame |
| Val | is pointer to the value to be written |