| cframe Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

Data Structures | Functions
xcframe.h File Reference

## Overview

This is the file which contains header files related to CFRAME block.

    MODIFICATION HISTORY:

    Ver   Who  Date        Changes
    ----- ---- -------- -------------------------------------------------------
    1.00  kc   12/21/2017 Initial release
    1.01  bsv  06/11/2019 Added XCframe_ClearCframeErr API
    1.02  bsv  17/02/2020 XCframe_SafetyWriteReg API added
    1.03  bsv  07/15/2021 Fix doxygen warnings
    1.04  ng   06/30/23   Added support for system device tree flow
    1.5   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 function

Note

## Data Structures
struct | XCframe_Config
| This typedef contains configuration information for a CFRAME core. More...
struct | XCframe
| The XCframe driver instance data structure. More...

## Functions
XCframe_Config * | XCframe_LookupConfig (u16 DeviceId)
| XCframe_LookupConfig returns a reference to an XCframe_Config structure based on the unique device id, DeviceId. More...
s32 | XCframe_CfgInitialize (XCframe *InstancePtr, const XCframe_Config *CfgPtr, u32 EffectiveAddr)
| This function initializes an CFRAME core. More...
s32 | XCframe_SelfTest (const XCframe *InstancePtr)
| This function runs a self-test on the driver and hardware device. 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_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_ReadReg (const XCframe *InstancePtr, u32 AddrOffset, XCframe_FrameNo FrameNo, u32 *ValPtr)
| This function reads the 128 bit CFRAME register. More...
void | XCframe_ClearCframeErr (const XCframe *InstancePtr)
| This function clears CFRAME ISRs and is called as part of CFRAME error recovery. 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...
u32 | XCframe_GetLastFrameAddr (XCframe *InstancePtr, u32 BlockType, XCframe_FrameNo CframeNo)
| This function returns the last Cframe address of given cframeno and blocktype. More...

## Function Documentation

void XCframe_BramTrim | ( | const XCframe * | InstancePtr,
|  | u32 | TrimValue
| ) |  |

This function writes the BRAM TRIM value.

Parameters

  InstancePtr | is a pointer to the XCframe instance.
  TrimValue | is to hold BRAM TRIM value

Returns
  None

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.

Parameters

  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.

Returns
  - XST_SUCCESS if initialization was successful.

Note
  None.

void XCframe_ClearCframeErr | ( | const XCframe * | InstancePtr | ) |

This function clears CFRAME ISRs and is called as part of CFRAME error recovery.

Parameters

  InstancePtr | is a pointer to the XCframe instance

Returns
  None

void XCframe_CramTrim | ( | const XCframe * | InstancePtr,
|  | u32 | TrimValue
| ) |  |

This function writes the CRAM TRIM value.

Parameters

  InstancePtr | is a pointer to the XCframe instance.
  TrimValue | is to hold CRAM TRIM value

Returns
  None

u32 XCframe_GetLastFrameAddr | ( | XCframe * | InstancePtr,
|  | u32 | BlockType,
|  | XCframe_FrameNo | CframeNo
| ) |  |

This function returns the last Cframe address of given cframeno and blocktype.

Parameters

  InstancePtr | is a pointer to the XCframe instance
  BlockType | is block type
  CframeNo | is the index of cframe

Returns
  Last Frame Address

void XCframe_ReadReg | ( | const XCframe * | InstancePtr,
|  | u32 | AddrOffset,
|  | XCframe_FrameNo | FrameNo,
|  | u32 * | ValPtr
| ) |  |

This function reads the 128 bit CFRAME register.

Parameters

  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

Returns
  None

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.

Parameters

  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

Returns
  Success or Failure

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.

Parameters

  InstancePtr | is a pointer to the XCframe instance.
  CframeNo | is the index of frame
  CframeLen | is total length of Cframes
  FrameAddr | is frame address

Returns
  None

void XCframe_UramTrim | ( | const XCframe * | InstancePtr,
|  | u32 | TrimValue
| ) |  |

This function writes the BRAM TRIM value.

Parameters

  InstancePtr | is a pointer to the XCframe instance.
  TrimValue | is to hold URAM TRIM value

Returns
  None

void XCframe_VggTrim | ( | const XCframe * | InstancePtr,
|  | const Xuint128 * | TrimVal
| ) |  |

This function writes the VGG TRIM value.

Parameters

  InstancePtr | is a pointer to the XCframe instance.
  TrimVal | is pointer to the TRIM value

Returns
  None

void XCframe_WriteCmd | ( | const XCframe * | InstancePtr,
|  | XCframe_FrameNo | CframeNo,
|  | u32 | Cmd
| ) |  |

This function writes the value to CFRAME cmd register.

Parameters

  InstancePtr | is a pointer to the XCframe instance.
  CframeNo | is the index of frame
  Cmd | to be initiated by CFRAME block

Returns
  None

void XCframe_WriteReg | ( | const XCframe * | InstancePtr,
|  | u32 | AddrOffset,
|  | XCframe_FrameNo | FrameNo,
|  | const Xuint128 * | Val
| ) |  |

This function writes to 128 bit CFRAME register.

Parameters

  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

Returns
  None