cframe: xcframe.h File Reference

| cframe Xilinx SDK Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

Data Structures
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

Note

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

## Frame Num
#define | XCframe_Printf(...)
enum | XCframe_FrameNo
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, XCframe_Config *CfgPtr, u32 EffectiveAddr)
| This function initializes an CFRAME core. More...
s32 | XCframe_SelfTest (XCframe *InstancePtr)
| This function runs a self-test on the driver and hardware device. More...
void | XCframe_WriteReg (XCframe *InstancePtr, u32 AddrOffset, XCframe_FrameNo FrameNo, Xuint128 *Value128)
| This function writes the 128 bit CFRAME register. More...
void | XCframe_WriteCmd (XCframe *InstancePtr, XCframe_FrameNo CframeNo, u32 Cmd)
| This function writes the value to CFRAME cmd register. More...
void | XCframe_VggTrim (XCframe *InstancePtr, Xuint128 *TrimVal)
| This function writes the VGG TRIM value. More...
void | XCframe_CramTrim (XCframe *InstancePtr, u32 TrimValue)
| This function writes the BRAM TRIM value. More...
void | XCframe_BramTrim (XCframe *InstancePtr, u32 TrimValue)
| This function writes the BRAM TRIM value. More...
void | XCframe_UramTrim (XCframe *InstancePtr, u32 TrimValue)
| This function writes the BRAM TRIM value. More...
void | XCframe_SetReadParam (XCframe *InstancePtr, XCframe_FrameNo CframeNo, u32 CframeLen)
| This function sets the CFRAME read parameters with mentioned CFRAME length and frame number. More...
void | XCframe_ReadReg (XCframe *InstancePtr, u32 AddrOffset, XCframe_FrameNo FrameNo, u32 *ValPtr)
| This function reads the 128 bit CFRAME register. More...
void | XCframe_ClearCframeErr (XCframe *InstancePtr)
| This function clears CFRAME ISRs and is called as part of CFRAME error recovery. More...

## Function Documentation

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

This function writes the BRAM TRIM value.

Parameters

  InstancePtr | is a pointer to the XCframe instance.
  Value | Trim value to be applied for

Returns
  None

References XCframe_WriteCmd(), and XCframe_WriteReg().

s32 XCframe_CfgInitialize | ( | XCframe * | InstancePtr,
|  | 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.

References XCframe_Config::BaseAddress, XCframe::Config, and XCframe::IsReady.

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

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

Parameters

  XCframe | Instance Pointer

Returns
  None

References XCframe_WriteReg().

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

This function writes the BRAM TRIM value.

Parameters

  InstancePtr | is a pointer to the XCframe instance.
  Value | Trim value to be applied for

Returns
  None

References XCframe_WriteReg().

void XCframe_ReadReg | ( | 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.
  Addr | CFRAME register address
  ValPtr | 128 bit variable to store the read data

Returns
  None

References XCframe_Config::BaseAddress, XCframe::Config, and XCframe_ReadReg32.

void XCframe_SetReadParam | ( | XCframe * | InstancePtr,
|  | XCframe_FrameNo | CframeNo,
|  | u32 | CframeLen
| ) |  |

This function sets the CFRAME read parameters with mentioned CFRAME length and frame number.

Parameters

  @return | None

References XCframe_WriteCmd(), and XCframe_WriteReg().

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

This function writes the BRAM TRIM value.

Parameters

  InstancePtr | is a pointer to the XCframe instance.
  Value | Trim value to be applied

Returns
  None

References XCframe_WriteCmd(), and XCframe_WriteReg().

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

This function writes the VGG TRIM value.

Parameters

  InstancePtr | is a pointer to the XCframe instance.
  Value | Trim value to be applied for

Returns
  None

References XCframe_WriteReg().

void XCframe_WriteCmd | ( | 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.
  Cmd | to be initiated by CFRAME block

Returns
  None

References XCframe_WriteReg().

Referenced by XCframe_BramTrim(), XCframe_SetReadParam(), and XCframe_UramTrim().

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

This function writes the 128 bit CFRAME register.

Parameters

  InstancePtr | is a pointer to the XCframe instance.
  Addr | CFRAME register address
  Value128 | 128 bit value to be stored

Returns
  None

References XCframe_Config::BaseAddress, XCframe::Config, and XCframe_WriteReg32.

Referenced by XCframe_BramTrim(), XCframe_ClearCframeErr(), XCframe_CramTrim(), XCframe_SetReadParam(), XCframe_UramTrim(), XCframe_VggTrim(), and XCframe_WriteCmd().