prd
Vitis Drivers API Documentation
Overview

Data Structures

struct  XPrd
 The XPrd instance data structure. More...
 

Macros

#define XPrd_ReadReg(Address)   Xil_In32(Address)
 This macro reads a value from the given register. More...
 
#define XPrd_WriteReg(Address, Data)   Xil_Out32(Address, (u32)(Data))
 This macro writes a value to the given register. More...
 

Enumerations

enum  XPrd_State { XPRD_DECOUPLER_OFF, XPRD_DECOUPLER_ON }
 

Functions

s32 XPrd_CfgInitialize (XPrd *InstancePtr, XPrd_Config *ConfigPtr, u32 EffectiveAddress)
 This function initializes a XPrd instance/driver. More...
 
void XPrd_SetDecouplerState (XPrd *InstancePtr, XPrd_State DecouplerValue)
 This function is used to set Decoupler On or Off. More...
 
XPrd_State XPrd_GetDecouplerState (XPrd *InstancePtr)
 This function is used to read the state of the Decoupler. More...
 
XPrd_Config * XPrd_LookupConfig (u16 DeviceId)
 This function looks for the device configuration based on the unique device ID. More...
 
s32 XPrd_SelfTest (XPrd *InstancePtr)
 This function runs a self-test for the PRD driver. More...
 

Register Offset

#define XPRD_CTRL_OFFSET   (0x000)
 Control register Offset and status register is also mappped to same address as Control register. More...
 

Register Mask

#define XPRD_CTRL_DECOUPLER_MASK   (0x00000001)
 Decoupler Mask. More...
 

Macro Definition Documentation

#define XPRD_CTRL_DECOUPLER_MASK   (0x00000001)

Decoupler Mask.

Referenced by XPrd_GetDecouplerState().

#define XPRD_CTRL_OFFSET   (0x000)

Control register Offset and status register is also mappped to same address as Control register.

Referenced by XPrd_GetDecouplerState(), XPrd_SelfTest(), and XPrd_SetDecouplerState().

#define XPrd_ReadReg (   Address)    Xil_In32(Address)

This macro reads a value from the given register.

Parameters
Addressis the address of the register to read from.
Returns
The 32-bit value read from register.
Note
None.

Referenced by XPrd_GetDecouplerState(), and XPrd_SelfTest().

#define XPrd_WriteReg (   Address,
  Data 
)    Xil_Out32(Address, (u32)(Data))

This macro writes a value to the given register.

Parameters
Addressis the address of the register to write to.
Datais the 32-bit value to write to the register.
Returns
None.
Note
None.

Referenced by XPrd_SetDecouplerState().

Enumeration Type Documentation

enum XPrd_State
Enumerator
XPRD_DECOUPLER_OFF 

Decoupler Off.

XPRD_DECOUPLER_ON 

Decoupler On.

Function Documentation

s32 XPrd_CfgInitialize ( XPrd InstancePtr,
XPrd_Config *  ConfigPtr,
u32  EffectiveAddress 
)

This function initializes a XPrd instance/driver.

Parameters
InstancePtris a pointer to the XPrd instance.
ConfigPtrpoints to the XPrd device configuration structure.
EffectiveAddressis the device base address in the virtual memory address space. If the address translation is not used then the physical address is passed.
Returns
  • XST_SUCCESS if initialization was successful.
Note
None.

Set some default values for instance data, don't indicate the device is ready to use until everything has been initialized successfully.

References XPrd::Config, and XPrd::IsReady.

Referenced by XPrd_Example(), and XPrd_SelfTestExample().

XPrd_State XPrd_GetDecouplerState ( XPrd InstancePtr)

This function is used to read the state of the Decoupler.

Parameters
InstancePtris a pointer to the XPrd instance.
Returns
Returns decoupler state.
  • XPRD_DECOUPLER_ON(1) if Decoupler is enabled.
  • XPRD_DECOUPLER_OFF(0) if Decoupler is disabled.
Note
None.

References XPrd::Config, XPrd::IsReady, XPRD_CTRL_DECOUPLER_MASK, XPRD_CTRL_OFFSET, XPRD_DECOUPLER_OFF, XPRD_DECOUPLER_ON, and XPrd_ReadReg.

Referenced by XPrd_TestDecouplerState().

XPrd_Config * XPrd_LookupConfig ( u16  DeviceId)

This function looks for the device configuration based on the unique device ID.

The table XPrd_ConfigTable[] contains the configuration information for each device in the system.

Parameters
DeviceIdis the unique device ID of the device being looked up.
Returns
A pointer to the configuration table entry corresponding to the given device ID, or NULL if no match is found.
Note
None.

Referenced by XPrd_Example(), and XPrd_SelfTestExample().

s32 XPrd_SelfTest ( XPrd InstancePtr)

This function runs a self-test for the PRD driver.

This self test reads the value from the status register.

Parameters
InstancePtris a pointer to the XPrd instance.
Returns
  • XST_SUCCESS if the test was successful.
Note
None.

References XPrd::Config, XPrd::IsReady, XPRD_CTRL_OFFSET, and XPrd_ReadReg.

Referenced by XPrd_Example(), and XPrd_SelfTestExample().

void XPrd_SetDecouplerState ( XPrd InstancePtr,
XPrd_State  DecouplerValue 
)

This function is used to set Decoupler On or Off.

Parameters
InstancePtris a pointer to the XPrd instance.
DecouplerValueis to set Decoupler On or Off. Value can be either 0 or 1. Values are
  • XPRD_DECOUPLER_OFF(0) if Decoupler is Off
  • XPRD_DECOUPLER_ON(1) if Decoupler is On
Returns
None
Note
When Decoupler is On then it separates the Reconfigurable partition from static logic while Partial Reconfiguration occurs.

References XPrd::Config, XPrd::IsReady, XPRD_CTRL_OFFSET, XPRD_DECOUPLER_OFF, XPRD_DECOUPLER_ON, and XPrd_WriteReg.

Referenced by XPrd_TestDecouplerState().