| prc Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Data Structures | Macros | Functions
Overview

## Data Structures
struct | XPrc
| The XPrc instance data structure. More...

## Macros
#define | XPrc_GetNumberOfVsms(InstancePtr) (InstancePtr)->Config.NumberOfVsms
| This macro is used to get the Number of Virtual Socket Managers. More...
#define | XPrc_GetRequiresClearBitstreams(InstancePtr) (InstancePtr)->Config.RequiresClearBitstreams
| This macro is used to find if Clearing Bitstreams are required. More...
#define | XPrc_GetCpArbitrationProtocol(InstancePtr) (InstancePtr)->Config.Cp_Arbitration_Protocol
| This macro is used to get the CAP Arbitration protocol. More...
#define | XPrc_GetHasAxiLiteIf(InstancePtr) (InstancePtr)->Config.Has_Axi_Lite_If
| This macro is used to discover if the AXI4-Lite register interface is enabled or disabled. More...
#define | XPrc_GetResetActiveLevel(InstancePtr) (InstancePtr)->Config.Reset_Active_Level
| This macro is used to discover if the core's reset is active low (0) or active high (1). More...
#define | XPrc_GetCpFifoDepth(InstancePtr) (InstancePtr)->Config.Cp_Fifo_Depth
| This macro returns the depth of FIFO in the fetch path. More...
#define | XPrc_GetCpFifoType(InstancePtr) (InstancePtr)->Config.Cp_Fifo_Type
| This macro returns the type of the FIFO in the fetch path. More...
#define | XPrc_GetCpFamily(InstancePtr) (InstancePtr)->Config.Cp_Family
| This macro returns the family type of the device being managed. More...
#define | XPrc_GetCdcStages(InstancePtr) (InstancePtr)->Config.Cdc_Stages
| This macro returns the number of synchronization stages used when crossing between clock domains. More...
#define | XPrc_GetCpCompression(InstancePtr) (InstancePtr)->Config.Cp_Compression
| This macro tells the PRC whether partial bitstreams are compressed or not. More...
#define | XPrc_GetRegVsmMsb(InstancePtr) (InstancePtr)->Config.RegVsmMsb
| This macro is used to get the Virtual Socket Manager Select MSB. More...
#define | XPrc_GetRegVsmLsb(InstancePtr) (InstancePtr)->Config.RegVsmLsb
| This macro is used to get the Virtual Socket Manager Select LSB. More...
#define | XPrc_GetRegBankMsb(InstancePtr) (InstancePtr)->Config.RegBankMsb
| This macro is used to get the Bank Select MSB. More...
#define | XPrc_GetRegBankLsb(InstancePtr) (InstancePtr)->Config.RegBankLsb
| This macro is used to get the Bank Select LSB. More...
#define | XPrc_GetRegSelectMsb(InstancePtr) (InstancePtr)->Config.RegSelectMsb
| This macro is used to get the Register Select MSB. More...
#define | XPrc_GetRegSelectLsb(InstancePtr) (InstancePtr)->Config.RegSelectLsb
| This macro is used to get the Register Select LSB. More...
#define | XPrc_GetNumRms(InstancePtr, VsmId) (InstancePtr)->Config.NumberOfRms[VsmId]
| This macro is used to get the number of Reconfigurable Modules in a VSM. More...
#define | XPrc_GetNumRmsAllocated(InstancePtr, VsmId) (InstancePtr)->Config.NumberOfRmsAllocated[VsmId]
| This macro returns the number of Reconfigurable Modules that have been allocated in this VSM. More...
#define | XPrc_GetStartInShutdown(InstancePtr, VsmId) (InstancePtr)->Config.Start_In_Shutdown[VsmId]
| This macro returns if the VSM starts in the Shutdown state. More...
#define | XPrc_GetNumTriggersAllocated(InstancePtr, VsmId) (InstancePtr)->Config.No_Of_Triggers_Allocated[VsmId]
| This macro returns the number of triggers that the Virtual Socket Manager has. More...
#define | XPrc_GetShutdownOnError(InstancePtr, VsmId) (InstancePtr)->Config.Shutdown_On_Error[VsmId]
| This macro returns whether the VSM will enter the shutdown state if an error is detected. More...
#define | XPrc_GetHasPorRm(InstancePtr, VsmId) (InstancePtr)->Config.Has_Por_Rm[VsmId]
| This macro returns whether the VSM contains an RM in the initial configuration bitstream. More...
#define | XPrc_GetPorRm(InstancePtr, VsmId) (InstancePtr)->Config.Por_Rm[VsmId]
| This macro returns the RM in the initial configuration bitstream for this VSM. More...
#define | XPrc_GetHasAxisStatus(InstancePtr, VsmId) (InstancePtr)->Config.Has_Axis_Status[VsmId]
| This macro returns 1 if the AXI4-Stream Status Channel is enabled for this VSM, and 0 if it's disabled. More...
#define | XPrc_GetHasAxisControl(InstancePtr, VsmId) (InstancePtr)->Config.Has_Axis_Control[VsmId]
| This macro returns 1 if the AXI4-Stream Control Channel is enabled for this VSM, and 0 if it's disabled. More...
#define | XPrc_GetSkipRmStartupAfterReset(InstancePtr, VsmId) (InstancePtr)->Config.Skip_Rm_Startup_After_Reset[VsmId]
| This macro returns whether the VSM will skip the Reconfigurable Module startup steps after a reset. More...
#define | XPrc_GetNumHwTriggers(InstancePtr, VsmId) (InstancePtr)->Config.Num_Hw_Triggers[VsmId]
| This macro returns the number of hardware triggers that the VSM has. More...
#define | XPrc_WriteReg(Address, Data) XPrc_Out32((Address), (u32)(Data))
| This macro writes a value to a PRC register. More...
#define | XPrc_ReadReg(Address) XPrc_In32((Address))
| This macro reads a value from a PRC register. More...

## Functions
s32 | XPrc_CfgInitialize (XPrc *InstancePtr, XPrc_Config *ConfigPtr, u32 EffectiveAddr)
| This function initializes a PRC instance. More...
void | XPrc_SendShutdownCommand (XPrc *InstancePtr, u16 VsmId)
| This function instructs the Virtual Socket Manager to enter the shutdown state. More...
void | XPrc_SendRestartWithNoStatusCommand (XPrc *InstancePtr, u16 VsmId)
| This function is used to restart a Virtual Socket Manager in shutdown if the Virtual Socket has not been modified during shutdown. More...
void | XPrc_SendRestartWithStatusCommand (XPrc *InstancePtr, u16 VsmId, u8 Full, u16 RmId)
| This function is used to restart a Virtual Socket Manager in shutdown if the Virtual Socket has been modified during shutdown. More...
void | XPrc_SendProceedCommand (XPrc *InstancePtr, u16 VsmId)
| This function instructs the Virtual Socket Manager to proceed with processing the Reconfigurable Module. More...
void | XPrc_SendUserControlCommand (XPrc *InstancePtr, u16 VsmId, u8 Rm_Shutdown_Req, u8 Rm_Decouple, u8 Sw_Shutdown_Req, u8 Sw_Startup_Req, u8 Rm_Reset)
| This function is used to set the values of Rm_Shutdown_Req, Rm_Decouple, Sw_Shutdown_Req, Sw_Startup_Req, Rm_Reset signals. More...
void | XPrc_SetTriggerToRmMapping (XPrc *InstancePtr, u16 VsmId, u16 TriggerId, u16 RmId)
| This function is used to set a Trigger to Reconfigurable Module mapping in a Virtual Socket Manager. More...
u32 | XPrc_GetTriggerToRmMapping (XPrc *InstancePtr, u16 VsmId, u16 TriggerId)
| This function gets a Trigger to Reconfigurable Module mapping in a Virtual Socket Manager. More...
void | XPrc_SetRmBsIndex (XPrc *InstancePtr, u16 VsmId, u16 RmId, u16 BsIndex)
| This function sets the BS_INDEX field in the RM_BS_INDEX register to specify which row of the Bitstream Information tables holds the partial bitstream for the Reconfigurable Module in the Virtual Socket Manager. More...
void | XPrc_SetRmClearingBsIndex (XPrc *InstancePtr, u16 VsmId, u16 RmId, u16 ClearingBsIndex)
| This function set the CLEAR_BS_INDEX field in the RM_BS_INDEX register to specify which row of the BS Information tables holds the clearing bitstream for the Reconfigurable Module in the Virtual Socket Manager. More...
u32 | XPrc_GetRmBsIndex (XPrc *InstancePtr, u16 VsmId, u16 RmId)
| This function get the BS_INDEX field from the RM_BS_INDEX register for the Reconfigurable Module in the Virtual Socket Manager. More...
u16 | XPrc_GetRmClearingBsIndex (XPrc *InstancePtr, u16 VsmId, u16 RmId)
| This function get the CLEAR_BS_INDEX field from the RM_BS_INDEX register for the Reconfigurable Module in the Virtual Socket Manager. More...
void | XPrc_SetRmControl (XPrc *InstancePtr, u16 VsmId, u16 RmId, u8 ShutdownRequired, u8 StartupRequired, u8 ResetRequired, u8 ResetDuration)
| This function set the control information for Reconfigurable Module. More...
void | XPrc_GetRmControl (XPrc *InstancePtr, u16 VsmId, u16 RmId, u8 *ShutdownRequired, u8 *StartupRequired, u8 *ResetRequired, u8 *ResetDuration)
| This function get the control information for Reconfigurable Module. More...
void | XPrc_SetBsId (XPrc *InstancePtr, u16 VsmId, u16 BsIndex, u16 BsId)
| This function sets the Bitstream Identifier. More...
u32 | XPrc_GetBsId (XPrc *InstancePtr, u16 VsmId, u16 BsIndex)
| This function get the Bitstream Identifier. More...
void | XPrc_SetBsSize (XPrc *InstancePtr, u16 VsmId, u16 BsIndex, u32 BsSize)
| This function sets the Bitstream size in bytes. More...
u32 | XPrc_GetBsSize (XPrc *InstancePtr, u16 VsmId, u16 BsIndex)
| This function get the Bitstream size in bytes. More...
void | XPrc_SetBsAddress (XPrc *InstancePtr, u16 VsmId, u16 BsIndex, u32 BsAddress)
| This function sets the Address of the Bitstream. More...
u32 | XPrc_GetBsAddress (XPrc *InstancePtr, u16 VsmId, u16 BsIndex)
| This function get the Address of the Bitstream. More...
u32 | XPrc_ReadStatusReg (XPrc *InstancePtr, u16 VsmId)
| This function is used to read the VSM's Status Register. More...
u8 | XPrc_IsVsmInShutdown (XPrc *InstancePtr, u32 VsmIdOrStatus)
| This function is used to identify whether a VSM is in the Shutdown state or not. More...
u32 | XPrc_GetVsmState (XPrc *InstancePtr, u32 VsmIdOrStatus)
| This function is used to get a VSM's state. More...
u32 | XPrc_GetVsmErrorStatus (XPrc *InstancePtr, u32 VsmIdOrStatus)
| This function is used to get a VSM's Error Status. More...
u32 | XPrc_GetRmIdFromStatus (XPrc *InstancePtr, u32 VsmIdOrStatus)
| This function is used to extract the identifier of a Reconfigurable Module from a VSM's status register. More...
u32 | XPrc_GetBsIdFromStatus (XPrc *InstancePtr, u32 VsmIdOrStatus)
| This function is used to extract the identifier of a Bitstream from a VSM's status register. More...
void | XPrc_PrintVsmStatus (XPrc *InstancePtr, u32 VsmIdOrStatus, char *Prefix)
| This function is used to Print the VSM Status. More...
void | XPrc_SendSwTrigger (XPrc *InstancePtr, u16 VsmId, u16 TriggerId)
| This function sends a software trigger to a Virtual Socket Manager. More...
u8 | XPrc_IsSwTriggerPending (XPrc *InstancePtr, u16 VsmId, u16 *TriggerId)
| This function is used to find out if there is a Software Trigger pending in a VSM. More...
u32 | XPrc_GetRegisterAddress (XPrc *InstancePtr, u32 VsmId, u8 RegisterType, u16 TableRow)
| The register offsets for the PRC are dynamic. More...
XPrc_Config * | XPrc_LookupConfig (u16 DeviceId)
| This function Looks for the device configuration based on the unique device ID. More...
s32 | XPrc_SelfTest (XPrc *InstancePtr)
| This function runs a self-test on the PRC driver. More...

## Please define XPRC_DEBUG macro to get debug prints of the driver and
define XPRC_DEBUG_CORE to get debug prints of the core.
#define | XPRC_DEBUG_GENERAL (0x00000001)
#define | xprc_dbg_current_types 0
#define | xprc_dbgcore_current_types 0
#define | xprc_printf(type,...)
#define | xprc_core_printf(type,...)

## Virtual Socket Manager Registers
#define | XPRC_MAX_NUMBER_OF_VSMS (32)
| Maximum Number Of Vsms. More...
#define | XPRC_VSM_NUM_GENERAL_REGISTERS (2)
| Number Of General registers. More...
#define | XPRC_VSM_REGISTERS_PER_TRIGGER (1)
| Registers per Trigger. More...
#define | XPRC_VSM_REGISTERS_PER_RM (2)
| Registers per Rm. More...
#define | XPRC_VSM_REGISTERS_PER_BS (3)
| Registers per Bs. More...

## Control Registers
#define | XPRC_CR_VS_FULL (1)
| Virtual Socket In Full State. More...
#define | XPRC_CR_VS_EMPTY (0)
| Virtual Socket In Empty State. More...
#define | XPRC_CR_DEFAULT_BYTE (0)
| Byte field Information for Control register Commands. More...
#define | XPRC_CR_DEFAULT_HALFWORD (0)
| Halfword field information for Control register Commands. More...

## Status Registers
#define | XPRC_SR_SHUTDOWN_ON (1)
| Vsm In Shutdown State. More...
#define | XPRC_SR_SHUTDOWN_OFF (0)
| Vsm not In Shutdown State. More...

## Software Trigger Registers
#define | XPRC_SW_TRIGGER_PENDING (1)
| Software Trigger is Pending. More...
#define | XPRC_NO_SW_TRIGGER_PENDING (0)
| Software Trigger is not Pending. More...

## RM Control Registers
#define | XPRC_RM_CR_MAX_RESETDURATION (256)
| Maximum Number of Reset duration. More...

## Register Table Row
#define | XPRC_REG_TABLE_ROW (0)
| Register Table Row. More...

## Cp_Fifo_Type
#define | CP_FIFO_TYPE_LUTRAM (0)
| Fifo Value for Lutram. More...
#define | CP_FIFO_TYPE_BLOCKRAM (1)
| Fifo Value for Blockram. More...

## Register Bank Numbers
#define | XPRC_VSM_GENERAL_REG_BANK (0)
| General registers. More...
#define | XPRC_VSM_TRIGGER_REG_BANK (1)
| Trigger to Rm register. More...
#define | XPRC_VSM_RM_REG_BANK (2)
| Rm Information register. More...
#define | XPRC_VSM_BS_REG_BANK (3)
| Bs Information register. More...

## Bank Identifier
#define | XPRC_DEFAULT_BANKID (0)
| Default Bank Identifier. More...

## The Table Identifiers within a bank for each Register type
#define | XPRC_STATUS_REG_TABLE_ID (0)
| Status register Table ID. More...
#define | XPRC_CONTROL_REG_TABLE_ID (0)
| Control register Table ID. More...
#define | XPRC_SW_TRIGGER_REG_TABLE_ID (1)
| Sw Trigger register Table ID. More...
#define | XPRC_TRIGGER_REG_TABLE_ID (0)
| Trigger register Table ID. More...
#define | XPRC_RM_BS_INDEX_REG_TABLE_ID (0)
| RmBs Index register Table ID. More...
#define | XPRC_RM_CONTROL_REG_TABLE_ID (1)
| Rm Control register Table ID. More...
#define | XPRC_BS_ID_REG_TABLE_ID (0)
| Bs Identifier register Table ID. More...
#define | XPRC_BS_ADDRESS_REG_TABLE_ID (1)
| Bs Address register Table ID. More...
#define | XPRC_BS_SIZE_REG_TABLE_ID (2)
| Bs Size register Table ID. More...
#define | XPRC_DEFAULT_TABLEID (0)
| Default Table Identifier within the Bank. More...

## These are not addresses. They identify the type of register to be
accessed.
#define | XPRC_STATUS_REG (0)
| Status register. More...
#define | XPRC_CONTROL_REG (1)
| Control register. More...
#define | XPRC_SW_TRIGGER_REG (2)
| Sw Trigger register. More...
#define | XPRC_TRIGGER_REG (3)
| Trigger register. More...
#define | XPRC_RM_BS_INDEX_REG (4)
| RmBs Index register. More...
#define | XPRC_RM_CONTROL_REG (5)
| Rm Control register. More...
#define | XPRC_BS_ID_REG (6)
| Bs Identifier register. More...
#define | XPRC_BS_ADDRESS_REG (7)
| Bs Address register. More...
#define | XPRC_BS_SIZE_REG (8)
| Bs Size register. More...

## Control Register commands
#define | XPRC_CR_SHUTDOWN_CMD (0)
| Shutdown Command. More...
#define | XPRC_CR_RESTART_NO_STATUS_CMD (1)
| Restart With No Status Command. More...
#define | XPRC_CR_RESTART_WITH_STATUS_CMD (2)
| Restart With Status Command. More...
#define | XPRC_CR_OK_TO_PROCEED_CMD (3)
| Proceed Command. More...
#define | XPRC_CR_USER_CTRL_CMD (4)
| User Control Command. More...

## The Command field
#define | XPRC_CR_CMD_FIELD_LSB (0)
| Command Field LSB. More...
#define | XPRC_CR_CMD_FIELD_WIDTH (8)
| Command Field Width. More...
#define | XPRC_CR_CMD_FIELD_MSB (XPRC_CR_CMD_FIELD_LSB + XPRC_CR_CMD_FIELD_WIDTH-1)
| Command Field MSB. More...

## The Byte field
#define | XPRC_CR_BYTE_FIELD_LSB (XPRC_CR_CMD_FIELD_MSB+1)
| Byte Field LSB. More...
#define | XPRC_CR_BYTE_FIELD_WIDTH (8)
| Byte Field Width. More...
#define | XPRC_CR_BYTE_FIELD_MSB (XPRC_CR_BYTE_FIELD_LSB + XPRC_CR_BYTE_FIELD_WIDTH-1)
| Byte Field MSB. More...

## The Halfword field
#define | XPRC_CR_HALFWORD_FIELD_LSB (XPRC_CR_BYTE_FIELD_MSB+1)
| Halfword Field LSB. More...
#define | XPRC_CR_HALFWORD_FIELD_WIDTH (16)
| Halfword Field Width. More...
#define | XPRC_CR_HALFWORD_FIELD_MSB (XPRC_CR_HALFWORD_FIELD_LSB + XPRC_CR_HALFWORD_FIELD_WIDTH-1)
| Halfword Field MSB. More...

## Bit positions for User Control command options within the byte field
#define | XPRC_CR_USER_CONTROL_RM_SHUTDOWN_REQ_BIT (0)
| Rm Shutdown Required. More...
#define | XPRC_CR_USER_CONTROL_RM_DECOUPLE_BIT (1)
| Rm Decouple. More...
#define | XPRC_CR_USER_CONTROL_SW_SHUTDOWN_REQ_BIT (2)
| Sw_Shutdown Required. More...
#define | XPRC_CR_USER_CONTROL_SW_STARTUP_REQ_BIT (3)
| Sw Startup Required. More...
#define | XPRC_CR_USER_CONTROL_RM_RESET_BIT (4)
| Rm Reset. More...

## Status Register Value
#define | XPRC_SR_SHUTDOWN_MASK (0x80)
| Shutdown State Mask. More...

## State is stored in bits 2:0, Mask = 111 = 0x7
#define | XPRC_SR_STATE_MASK (0x7)
| Vsm State Mask. More...
#define | XPRC_SR_STATE_EMPTY (0)
| Empty State Of VSM. More...
#define | XPRC_SR_STATE_HW_SHUTDOWN (1)
| Hardware Shutdown State of VSM. More...
#define | XPRC_SR_STATE_SW_SHUTDOWN (2)
| Software Shutdown State of VSM. More...
#define | XPRC_SR_STATE_RM_UNLOAD (3)
| Reconfigurable Module Unload State Of VSM. More...
#define | XPRC_SR_STATE_RM_LOAD (4)
| Reconfigurable Module Load State Of VSM. More...
#define | XPRC_SR_STATE_SW_STARTUP (5)
| Software Startup State of VSM. More...
#define | XPRC_SR_STATE_RM_RESET (6)
| Reset State of VSM. More...
#define | XPRC_SR_STATE_FULL (7)
| Full State Of VSM. More...
#define | XPRC_SR_ERROR_SHIFT (3)
| Error Shift. More...

## Errors are stored in bits 6:3, Mask = 1111000 = 0x78
#define | XPRC_SR_ERROR_MASK (0x78)
| Error Codes Mask. More...
#define | XPRC_SR_UNKNOWN_ERROR (15)
| Unknown Error. More...
#define | XPRC_SR_BS_COMPATIBLE_ERROR (14)
| Bitstream Compatible Error. More...
#define | XPRC_SR_DECOMPRESS_BAD_FORMAT_ERROR (8)
| Bad compression format error. More...
#define | XPRC_SR_DECOMPRESS_BAD_SIZE_ERROR (7)
| Bad compression size error. More...
#define | XPRC_SR_FETCH_AND_CP_LOST_ERROR (6)
| Fetch and Lost Error. More...
#define | XPRC_SR_FETCH_AND_BS_ERROR (5)
| Fetch and Bitstream Error. More...
#define | XPRC_SR_FETCH_ERROR (4)
| Fetch Error. More...
#define | XPRC_SR_CP_LOST_ERROR (3)
| CP Lost Error. More...
#define | XPRC_SR_BS_ERROR (2)
| Bitstream Error. More...
#define | XPRC_SR_BAD_CONFIG_ERROR (1)
| Bad Configuration Error. More...
#define | XPRC_SR_NO_ERROR (0)
| No Error. More...
#define | XPRC_SR_RMID_SHIFT (8)
| Rm Identifier Shift. More...

## RM_ID is stored in bits 23:8,
Mask = 111111111111111100000000 = 0xFFFF00
#define | XPRC_SR_RMID_MASK (0xFFFF00)
| Rm Identifier Mask. More...
#define | XPRC_SR_BSID_SHIFT (24)
| Bs Identifier Shift. More...

## BS_ID is stored in bits 31:24,
Mask = 11111111000000000000000000000000
#define | XPRC_SR_BSID_MASK (0xFF000000)
| Bs Identifier Mask. More...

## Software Trigger Register Values
This is the largest ID possible. The bits used are will be sized in hardware to match the number of triggers actually allocated.
#define | XPRC_SW_TRIGGER_ID_MASK (0x7FFFFFFF)
| Sw Trigger Id Mask. More...
#define | XPRC_SW_TRIGGER_PENDING_MASK (0x80000000)
| Sw Trigger Pending Mask. More...
#define | XPRC_RM_BS_INDEX_SHIFT (0)
| Rm Bs Index Shift. More...
#define | XPRC_RM_BS_INDEX_MASK (0x0000FFFF)
| Rm Bs Index Mask. More...
#define | XPRC_RM_CLEARING_BS_INDEX_SHIFT (16)
| Clearing Bs Index Shift. More...
#define | XPRC_RM_CLEARING_BS_INDEX_MASK (0xFFFF0000)
| Clearing Bs Index Mask. More...

## RM Control Register constants
#define | XPRC_RM_CR_SHUTDOWN_REQUIRED_SHIFT (0)
| Shutdown Required Shift. More...
#define | XPRC_RM_CR_STARTUP_REQUIRED_SHIFT (2)
| Startup Required Shift. More...
#define | XPRC_RM_CR_RESET_REQUIRED_SHIFT (3)
| Reset Required Shift. More...
#define | XPRC_RM_CR_RESET_DURATION_SHIFT (5)
| Reset Duration Shift. More...

## Shutdown required stored in bits 0:1, 0000000000011 = 0x3
#define | XPRC_RM_CR_SHUTDOWN_REQUIRED_MASK (0x3)
| Shutdown Required Mask. More...

## Startup required stored in bit 2, 0000000000100 = 0x4
#define | XPRC_RM_CR_STARTUP_REQUIRED_MASK (0x4)
| Startup Required Mask. More...

## Reset required stored in bits 3:4, 0000000011000 = 0x18
#define | XPRC_RM_CR_RESET_REQUIRED_MASK (0x18)
| Reset Required Mask. More...

## Reset Duration stored in bits 5:12, 1111111100000 = 0x1FE0
#define | XPRC_RM_CR_RESET_DURATION_MASK (0x1FE0)
| Reset Duration Mask. More...
#define | XPRC_RM_CR_NO_SHUTDOWN_REQUIRED (0)
| No Shutdown Required. More...
#define | XPRC_RM_CR_HW_SHUTDOWN_REQUIRED (1)
| Hardware Only Shutdown Required. More...
#define | XPRC_RM_CR_HW_SW_SHUTDOWN_REQUIRED (2)
| Hardware Shutdown and then Software Shutdown Required. More...
#define | XPRC_RM_CR_SW_HW_SHUTDOWN_REQUIRED (3)
| Software Shutdown and then Hardware Shutdown Required. More...
#define | XPRC_RM_CR_STARTUP_NOT_REQUIRED (0)
| Startup Not Required. More...
#define | XPRC_RM_CR_SW_STARTUP_REQUIRED (1)
| Software Only Startup Required. More...
#define | XPRC_RM_CR_NO_RESET_REQUIRED (0)
| No Reset Required. More...
#define | XPRC_RM_CR_LOW_RESET_REQUIRED (2)
| Low Reset Required. More...
#define | XPRC_RM_CR_HIGH_RESET_REQUIRED (3)
| High Reset Required. More...

## Macro Definition Documentation

#define CP_FIFO_TYPE_BLOCKRAM (1)

Fifo Value for Blockram.

#define CP_FIFO_TYPE_LUTRAM (0)

Fifo Value for Lutram.

#define XPRC_BS_ADDRESS_REG (7)

Bs Address register.

Referenced by XPrc_GetBsAddress(), XPrc_GetRegisterAddress(), and XPrc_SetBsAddress().

#define XPRC_BS_ADDRESS_REG_TABLE_ID (1)

Bs Address register Table ID.

Referenced by XPrc_GetRegisterAddress().

#define XPRC_BS_ID_REG (6)

Bs Identifier register.

Referenced by XPrc_GetBsId(), XPrc_GetRegisterAddress(), and XPrc_SetBsId().

#define XPRC_BS_ID_REG_TABLE_ID (0)

Bs Identifier register Table ID.

Referenced by XPrc_GetRegisterAddress().

#define XPRC_BS_SIZE_REG (8)

Bs Size register.

Referenced by XPrc_GetBsSize(), XPrc_GetRegisterAddress(), and XPrc_SetBsSize().

#define XPRC_BS_SIZE_REG_TABLE_ID (2)

Bs Size register Table ID.

Referenced by XPrc_GetRegisterAddress().

#define XPRC_CONTROL_REG (1)

Control register.

Referenced by XPrc_GetRegisterAddress().

#define XPRC_CONTROL_REG_TABLE_ID (0)

Control register Table ID.

Referenced by XPrc_GetRegisterAddress().

#define XPRC_CR_BYTE_FIELD_LSB (XPRC_CR_CMD_FIELD_MSB+1)

Byte Field LSB.

#define XPRC_CR_BYTE_FIELD_MSB (XPRC_CR_BYTE_FIELD_LSB + XPRC_CR_BYTE_FIELD_WIDTH-1)

Byte Field MSB.

#define XPRC_CR_BYTE_FIELD_WIDTH (8)

Byte Field Width.

#define XPRC_CR_CMD_FIELD_LSB (0)

Command Field LSB.

#define XPRC_CR_CMD_FIELD_MSB (XPRC_CR_CMD_FIELD_LSB + XPRC_CR_CMD_FIELD_WIDTH-1)

Command Field MSB.

#define XPRC_CR_CMD_FIELD_WIDTH (8)

Command Field Width.

#define XPRC_CR_DEFAULT_BYTE (0)

Byte field Information for Control register Commands.

Referenced by XPrc_SendProceedCommand(), XPrc_SendRestartWithNoStatusCommand(), and XPrc_SendShutdownCommand().

#define XPRC_CR_DEFAULT_HALFWORD (0)

Halfword field information for Control register Commands.

Referenced by XPrc_SendProceedCommand(), XPrc_SendRestartWithNoStatusCommand(), XPrc_SendShutdownCommand(), and XPrc_SendUserControlCommand().

#define XPRC_CR_HALFWORD_FIELD_LSB (XPRC_CR_BYTE_FIELD_MSB+1)

Halfword Field LSB.

#define XPRC_CR_HALFWORD_FIELD_MSB (XPRC_CR_HALFWORD_FIELD_LSB + XPRC_CR_HALFWORD_FIELD_WIDTH-1)

Halfword Field MSB.

#define XPRC_CR_HALFWORD_FIELD_WIDTH (16)

Halfword Field Width.

#define XPRC_CR_OK_TO_PROCEED_CMD (3)

Proceed Command.

Referenced by XPrc_SendProceedCommand().

#define XPRC_CR_RESTART_NO_STATUS_CMD (1)

Restart With No Status Command.

Referenced by XPrc_SendRestartWithNoStatusCommand().

#define XPRC_CR_RESTART_WITH_STATUS_CMD (2)

Restart With Status Command.

Referenced by XPrc_SendRestartWithStatusCommand().

#define XPRC_CR_SHUTDOWN_CMD (0)

Shutdown Command.

Referenced by XPrc_SendShutdownCommand().

#define XPRC_CR_USER_CONTROL_RM_DECOUPLE_BIT (1)

Rm Decouple.

Referenced by Xprc_Check_User_Command(), and XPrc_SendUserControlCommand().

#define XPRC_CR_USER_CONTROL_RM_RESET_BIT (4)

Rm Reset.

Referenced by Xprc_Check_User_Command(), and XPrc_SendUserControlCommand().

#define XPRC_CR_USER_CONTROL_RM_SHUTDOWN_REQ_BIT (0)

Rm Shutdown Required.

Referenced by Xprc_Check_User_Command().

#define XPRC_CR_USER_CONTROL_SW_SHUTDOWN_REQ_BIT (2)

Sw_Shutdown Required.

Referenced by Xprc_Check_User_Command(), and XPrc_SendUserControlCommand().

#define XPRC_CR_USER_CONTROL_SW_STARTUP_REQ_BIT (3)

Sw Startup Required.

Referenced by Xprc_Check_User_Command(), and XPrc_SendUserControlCommand().

#define XPRC_CR_USER_CTRL_CMD (4)

User Control Command.

Referenced by XPrc_SendUserControlCommand().

#define XPRC_CR_VS_EMPTY (0)

Virtual Socket In Empty State.

Referenced by Xprc_Check_RestartWithStatus_Command(), and XPrc_SendRestartWithStatusCommand().

#define XPRC_CR_VS_FULL (1)

Virtual Socket In Full State.

Referenced by Xprc_Check_RestartWithStatus_Command(), and XPrc_SendRestartWithStatusCommand().

#define XPRC_DEFAULT_BANKID (0)

Default Bank Identifier.

Referenced by XPrc_GetRegisterAddress().

#define XPRC_DEFAULT_TABLEID (0)

Default Table Identifier within the Bank.

Referenced by XPrc_GetRegisterAddress().

#define XPrc_GetCdcStages | ( |  | InstancePtr | ) | (InstancePtr)->Config.Cdc_Stages

This macro returns the number of synchronization stages used when crossing between clock domains.

Parameters

  InstancePtr | is a pointer to the PRC instance.

Returns
  Returns the number of CDC stages.

Note
  None.

#define XPrc_GetCpArbitrationProtocol | ( |  | InstancePtr | ) | (InstancePtr)->Config.Cp_Arbitration_Protocol

This macro is used to get the CAP Arbitration protocol.

Parameters

  InstancePtr | is a pointer to the PRC instance.

Returns
  Returns the value of the CAP arbitration protocol.

Note
  None.

#define XPrc_GetCpCompression | ( |  | InstancePtr | ) | (InstancePtr)->Config.Cp_Compression

This macro tells the PRC whether partial bitstreams are compressed or not.

Parameters

  InstancePtr | is a pointer to the PRC instance.

Returns
  Returns 0 if PRC is same as before. Returns 1 if decompression block is added to hardware.

Note
  None.

#define XPrc_GetCpFamily | ( |  | InstancePtr | ) | (InstancePtr)->Config.Cp_Family

This macro returns the family type of the device being managed.

Parameters

  InstancePtr | is a pointer to the PRC instance.

Returns
  Returns 7, 8 or 9 for 7 Series, Ultrascale and UltraScale+.

Note
  None.

#define XPrc_GetCpFifoDepth | ( |  | InstancePtr | ) | (InstancePtr)->Config.Cp_Fifo_Depth

This macro returns the depth of FIFO in the fetch path.

Parameters

  InstancePtr | is a pointer to the PRC instance.

Returns
  Return Fifo depth value.

Note
  None.

#define XPrc_GetCpFifoType | ( |  | InstancePtr | ) | (InstancePtr)->Config.Cp_Fifo_Type

This macro returns the type of the FIFO in the fetch path.

Parameters

  InstancePtr | is a pointer to the PRC instance.

Returns
  Returns
  - CP_FIFO_TYPE_LUTRAM for Lutram type
  - CP_FIFO_TYPE_BLOCKRAM for blockram type

Note
  None.

#define XPrc_GetHasAxiLiteIf | ( |  | InstancePtr | ) | (InstancePtr)->Config.Has_Axi_Lite_If

This macro is used to discover if the AXI4-Lite register interface is enabled or disabled.

Parameters

  InstancePtr | is a pointer to the PRC instance.

Returns
  Returns a value when AXI4-Lite interface is enabled or disabled.

Note
  This interface must be enabled for the driver to function.

#define XPrc_GetHasAxisControl | ( |  | InstancePtr,
|  |  | VsmId
| ) |  | (InstancePtr)->Config.Has_Axis_Control[VsmId]

This macro returns 1 if the AXI4-Stream Control Channel is enabled for this VSM, and 0 if it's disabled.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.

Returns
  Returns 1 when the AXI4-Stream Control channel is enabled and 0 when it is disabled.

Note
  None.

#define XPrc_GetHasAxisStatus | ( |  | InstancePtr,
|  |  | VsmId
| ) |  | (InstancePtr)->Config.Has_Axis_Status[VsmId]

This macro returns 1 if the AXI4-Stream Status Channel is enabled for this VSM, and 0 if it's disabled.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.

Returns
  Returns 1 when the AXI4-Stream Status channel is enabled and 0 when it is disabled.

Note
  None.

#define XPrc_GetHasPorRm | ( |  | InstancePtr,
|  |  | VsmId
| ) |  | (InstancePtr)->Config.Has_Por_Rm[VsmId]

This macro returns whether the VSM contains an RM in the initial configuration bitstream.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.

Returns
  Returns 1 if the VSM has an RM in the initial bitstream and 0 if it doesn't.

Note
  This will always return 1 when the device being managed is an UltraScale device.

#define XPrc_GetNumberOfVsms | ( |  | InstancePtr | ) | (InstancePtr)->Config.NumberOfVsms

This macro is used to get the Number of Virtual Socket Managers.

Parameters

  InstancePtr | is a pointer to the PRC instance.

Returns
  Number of Vsms.

Note
  None.

Referenced by Xprc_Check_BsAddress_Reg(), Xprc_Check_BsIndex_Reg(), Xprc_Check_BsSize_Reg(), Xprc_Check_RestartWithStatus_Command(), Xprc_Check_RmControl_Reg(), Xprc_Check_TriggerRmMapping(), Xprc_Check_User_Command(), XPrc_Example(), Xprc_Program_PRC(), and Xprc_Restart_VSMs().

#define XPrc_GetNumHwTriggers | ( |  | InstancePtr,
|  |  | VsmId
| ) |  | (InstancePtr)->Config.Num_Hw_Triggers[VsmId]

This macro returns the number of hardware triggers that the VSM has.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.

Returns
  Returns the number of hardware triggers.

Note
  None.

#define XPrc_GetNumRms | ( |  | InstancePtr,
|  |  | VsmId
| ) |  | (InstancePtr)->Config.NumberOfRms[VsmId]

This macro is used to get the number of Reconfigurable Modules in a VSM.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.

Returns
  The number of RMs that this VSM has.

Note
  None.

Referenced by Xprc_Check_RestartWithStatus_Command(), XPrc_Example(), and Xprc_Program_PRC().

#define XPrc_GetNumRmsAllocated | ( |  | InstancePtr,
|  |  | VsmId
| ) |  | (InstancePtr)->Config.NumberOfRmsAllocated[VsmId]

This macro returns the number of Reconfigurable Modules that have been allocated in this VSM.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.

Returns
  Number of RMs allocated in the VSM.

Note
  None.

Referenced by Xprc_Check_BsAddress_Reg(), Xprc_Check_BsIndex_Reg(), Xprc_Check_BsSize_Reg(), Xprc_Check_RmControl_Reg(), and Xprc_Check_TriggerRmMapping().

#define XPrc_GetNumTriggersAllocated | ( |  | InstancePtr,
|  |  | VsmId
| ) |  | (InstancePtr)->Config.No_Of_Triggers_Allocated[VsmId]

This macro returns the number of triggers that the Virtual Socket Manager has.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.

Returns
  Number of triggers allocated in the Virtual Socket Manager.

Note
  None.

Referenced by Xprc_Check_TriggerRmMapping().

#define XPrc_GetPorRm | ( |  | InstancePtr,
|  |  | VsmId
| ) |  | (InstancePtr)->Config.Por_Rm[VsmId]

This macro returns the RM in the initial configuration bitstream for this VSM.

The returned value is only valid if XPrc_GetHasPorRm() returns 1 for this VSM.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.

Returns
  Returns a RM identifier.

Note
  None.

#define XPrc_GetRegBankLsb | ( |  | InstancePtr | ) | (InstancePtr)->Config.RegBankLsb

This macro is used to get the Bank Select LSB.

Parameters

  InstancePtr | is a pointer to the PRC instance.

Returns
  Lsb of Bank register.

Note
  None.

#define XPrc_GetRegBankMsb | ( |  | InstancePtr | ) | (InstancePtr)->Config.RegBankMsb

This macro is used to get the Bank Select MSB.

Parameters

  InstancePtr | is a pointer to the PRC instance.

Returns
  Msb of Bank register.

Note
  None.

#define XPrc_GetRegSelectLsb | ( |  | InstancePtr | ) | (InstancePtr)->Config.RegSelectLsb

This macro is used to get the Register Select LSB.

Parameters

  InstancePtr | is a pointer to the PRC instance.

Returns
  Lsb of Register selected.

Note
  None.

#define XPrc_GetRegSelectMsb | ( |  | InstancePtr | ) | (InstancePtr)->Config.RegSelectMsb

This macro is used to get the Register Select MSB.

Parameters

  InstancePtr | is a pointer to the PRC instance.

Returns
  Msb of Register selected.

Note
  None.

#define XPrc_GetRegVsmLsb | ( |  | InstancePtr | ) | (InstancePtr)->Config.RegVsmLsb

This macro is used to get the Virtual Socket Manager Select LSB.

Parameters

  InstancePtr | is a pointer to the PRC instance.

Returns
  Lsb of Virtual Socket Manager.

Note
  None.

#define XPrc_GetRegVsmMsb | ( |  | InstancePtr | ) | (InstancePtr)->Config.RegVsmMsb

This macro is used to get the Virtual Socket Manager Select MSB.

Parameters

  InstancePtr | is a pointer to the PRC instance.

Returns
  Msb of Virtual Socket Manager.

Note
  None.

#define XPrc_GetRequiresClearBitstreams | ( |  | InstancePtr | ) | (InstancePtr)->Config.RequiresClearBitstreams

This macro is used to find if Clearing Bitstreams are required.

Parameters

  InstancePtr | is a pointer to the PRC instance.

Returns
  0 if Clearing Bitstreams are not required, 1 if they are.

Note
  Clearing Bitstreams are only required when the device being managed is an UltraScale device.

#define XPrc_GetResetActiveLevel | ( |  | InstancePtr | ) | (InstancePtr)->Config.Reset_Active_Level

This macro is used to discover if the core's reset is active low (0) or active high (1).

Parameters

  InstancePtr | is a pointer to the PRC instance.

Returns
  1 if the core's reset is active high, 0 if it's active low.

Note
  None.

#define XPrc_GetShutdownOnError | ( |  | InstancePtr,
|  |  | VsmId
| ) |  | (InstancePtr)->Config.Shutdown_On_Error[VsmId]

This macro returns whether the VSM will enter the shutdown state if an error is detected.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.

Returns
  Returns 1 if the VSM will enter the shutdown state on an error, 0 if it doesn't.

Note
  None

#define XPrc_GetSkipRmStartupAfterReset | ( |  | InstancePtr,
|  |  | VsmId
| ) |  | (InstancePtr)->Config.Skip_Rm_Startup_After_Reset[VsmId]

This macro returns whether the VSM will skip the Reconfigurable Module startup steps after a reset.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.

Returns
  Returns 1 when the RM startup steps are skipped, and 0 when they aren't.

Note
  None.

#define XPrc_GetStartInShutdown | ( |  | InstancePtr,
|  |  | VsmId
| ) |  | (InstancePtr)->Config.Start_In_Shutdown[VsmId]

This macro returns if the VSM starts in the Shutdown state.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.

Returns
  1 if the VSM starts in Shutdown State, 0 if it starts in the active state.

Note
  None.

#define XPRC_MAX_NUMBER_OF_VSMS (32)

Maximum Number Of Vsms.

Referenced by XPrc_GetBsAddress(), XPrc_GetBsId(), XPrc_GetBsSize(), XPrc_GetRmBsIndex(), XPrc_GetRmClearingBsIndex(), XPrc_GetRmControl(), XPrc_GetTriggerToRmMapping(), XPrc_IsSwTriggerPending(), XPrc_ReadStatusReg(), XPrc_SendProceedCommand(), XPrc_SendRestartWithNoStatusCommand(), XPrc_SendRestartWithStatusCommand(), XPrc_SendShutdownCommand(), XPrc_SendSwTrigger(), XPrc_SendUserControlCommand(), XPrc_SetBsAddress(), XPrc_SetBsId(), XPrc_SetBsSize(), XPrc_SetRmBsIndex(), XPrc_SetRmClearingBsIndex(), XPrc_SetRmControl(), and XPrc_SetTriggerToRmMapping().

#define XPRC_NO_SW_TRIGGER_PENDING (0)

Software Trigger is not Pending.

Referenced by XPrc_IsSwTriggerPending().

#define XPrc_ReadReg | ( |  | Address | ) | XPrc_In32((Address))

This macro reads a value from a PRC register.

A 32 bit read is performed.

Parameters

  Address | is the address of the register to read from.

Returns
  Data read from the register.

Note
  C-style signature: u32 XPrc_ReadReg(u32 Address)

Referenced by XPrc_GetBsAddress(), XPrc_GetBsId(), XPrc_GetBsSize(), XPrc_GetRmBsIndex(), XPrc_GetRmClearingBsIndex(), XPrc_GetRmControl(), XPrc_GetTriggerToRmMapping(), XPrc_IsSwTriggerPending(), XPrc_ReadStatusReg(), XPrc_SelfTest(), and XPrc_SetRmClearingBsIndex().

#define XPRC_REG_TABLE_ROW (0)

Register Table Row.

Referenced by XPrc_IsSwTriggerPending(), XPrc_ReadStatusReg(), XPrc_SelfTest(), and XPrc_SendSwTrigger().

#define XPRC_RM_BS_INDEX_MASK (0x0000FFFF)

Rm Bs Index Mask.

Referenced by XPrc_GetRmBsIndex().

#define XPRC_RM_BS_INDEX_REG (4)

RmBs Index register.

Referenced by XPrc_GetRegisterAddress(), XPrc_GetRmBsIndex(), XPrc_GetRmClearingBsIndex(), XPrc_SetRmBsIndex(), and XPrc_SetRmClearingBsIndex().

#define XPRC_RM_BS_INDEX_REG_TABLE_ID (0)

RmBs Index register Table ID.

Referenced by XPrc_GetRegisterAddress().

#define XPRC_RM_BS_INDEX_SHIFT (0)

Rm Bs Index Shift.

#define XPRC_RM_CLEARING_BS_INDEX_MASK (0xFFFF0000)

Clearing Bs Index Mask.

#define XPRC_RM_CLEARING_BS_INDEX_SHIFT (16)

Clearing Bs Index Shift.

Referenced by XPrc_GetRmClearingBsIndex(), and XPrc_SetRmClearingBsIndex().

#define XPRC_RM_CONTROL_REG (5)

Rm Control register.

Referenced by XPrc_GetRegisterAddress(), XPrc_GetRmControl(), and XPrc_SetRmControl().

#define XPRC_RM_CONTROL_REG_TABLE_ID (1)

Rm Control register Table ID.

Referenced by XPrc_GetRegisterAddress().

#define XPRC_RM_CR_HIGH_RESET_REQUIRED (3)

High Reset Required.

Referenced by XPrc_SetRmControl().

#define XPRC_RM_CR_HW_SHUTDOWN_REQUIRED (1)

Hardware Only Shutdown Required.

#define XPRC_RM_CR_HW_SW_SHUTDOWN_REQUIRED (2)

Hardware Shutdown and then Software Shutdown Required.

#define XPRC_RM_CR_LOW_RESET_REQUIRED (2)

Low Reset Required.

#define XPRC_RM_CR_MAX_RESETDURATION (256)

Maximum Number of Reset duration.

Referenced by XPrc_SetRmControl().

#define XPRC_RM_CR_NO_RESET_REQUIRED (0)

No Reset Required.

#define XPRC_RM_CR_NO_SHUTDOWN_REQUIRED (0)

No Shutdown Required.

#define XPRC_RM_CR_RESET_DURATION_MASK (0x1FE0)

Reset Duration Mask.

Referenced by XPrc_GetRmControl(), and XPrc_SetRmControl().

#define XPRC_RM_CR_RESET_DURATION_SHIFT (5)

Reset Duration Shift.

Referenced by XPrc_GetRmControl(), and XPrc_SetRmControl().

#define XPRC_RM_CR_RESET_REQUIRED_MASK (0x18)

Reset Required Mask.

Referenced by XPrc_GetRmControl(), and XPrc_SetRmControl().

#define XPRC_RM_CR_RESET_REQUIRED_SHIFT (3)

Reset Required Shift.

Referenced by XPrc_GetRmControl(), and XPrc_SetRmControl().

#define XPRC_RM_CR_SHUTDOWN_REQUIRED_MASK (0x3)

Shutdown Required Mask.

Referenced by XPrc_GetRmControl(), and XPrc_SetRmControl().

#define XPRC_RM_CR_SHUTDOWN_REQUIRED_SHIFT (0)

Shutdown Required Shift.

Referenced by XPrc_GetRmControl(), and XPrc_SetRmControl().

#define XPRC_RM_CR_STARTUP_NOT_REQUIRED (0)

Startup Not Required.

Referenced by XPrc_SetRmControl().

#define XPRC_RM_CR_STARTUP_REQUIRED_MASK (0x4)

Startup Required Mask.

Referenced by XPrc_GetRmControl(), and XPrc_SetRmControl().

#define XPRC_RM_CR_STARTUP_REQUIRED_SHIFT (2)

Startup Required Shift.

Referenced by XPrc_GetRmControl(), and XPrc_SetRmControl().

#define XPRC_RM_CR_SW_HW_SHUTDOWN_REQUIRED (3)

Software Shutdown and then Hardware Shutdown Required.

Referenced by XPrc_SetRmControl().

#define XPRC_RM_CR_SW_STARTUP_REQUIRED (1)

Software Only Startup Required.

Referenced by XPrc_SetRmControl().

#define XPRC_SR_BAD_CONFIG_ERROR (1)

Bad Configuration Error.

Referenced by XPrc_PrintVsmStatus().

#define XPRC_SR_BS_COMPATIBLE_ERROR (14)

Bitstream Compatible Error.

Referenced by XPrc_PrintVsmStatus().

#define XPRC_SR_BS_ERROR (2)

Bitstream Error.

Referenced by XPrc_PrintVsmStatus().

#define XPRC_SR_BSID_MASK (0xFF000000)

Bs Identifier Mask.

Referenced by XPrc_GetBsIdFromStatus().

#define XPRC_SR_BSID_SHIFT (24)

Bs Identifier Shift.

Referenced by XPrc_GetBsIdFromStatus().

#define XPRC_SR_CP_LOST_ERROR (3)

CP Lost Error.

Referenced by XPrc_PrintVsmStatus().

#define XPRC_SR_DECOMPRESS_BAD_FORMAT_ERROR (8)

Bad compression format error.

Referenced by XPrc_PrintVsmStatus().

#define XPRC_SR_DECOMPRESS_BAD_SIZE_ERROR (7)

Bad compression size error.

Referenced by XPrc_PrintVsmStatus().

#define XPRC_SR_ERROR_MASK (0x78)

Error Codes Mask.

Referenced by XPrc_GetVsmErrorStatus().

#define XPRC_SR_ERROR_SHIFT (3)

Error Shift.

Referenced by XPrc_GetVsmErrorStatus().

#define XPRC_SR_FETCH_AND_BS_ERROR (5)

Fetch and Bitstream Error.

Referenced by XPrc_PrintVsmStatus().

#define XPRC_SR_FETCH_AND_CP_LOST_ERROR (6)

Fetch and Lost Error.

Referenced by XPrc_PrintVsmStatus().

#define XPRC_SR_FETCH_ERROR (4)

Fetch Error.

Referenced by XPrc_PrintVsmStatus().

#define XPRC_SR_NO_ERROR (0)

No Error.

Referenced by XPrc_PrintVsmStatus().

#define XPRC_SR_RMID_MASK (0xFFFF00)

Rm Identifier Mask.

Referenced by XPrc_GetRmIdFromStatus().

#define XPRC_SR_RMID_SHIFT (8)

Rm Identifier Shift.

Referenced by XPrc_GetRmIdFromStatus().

#define XPRC_SR_SHUTDOWN_MASK (0x80)

Shutdown State Mask.

Referenced by XPrc_IsVsmInShutdown().

#define XPRC_SR_SHUTDOWN_OFF (0)

Vsm not In Shutdown State.

Referenced by XPrc_IsVsmInShutdown().

#define XPRC_SR_SHUTDOWN_ON (1)

Vsm In Shutdown State.

Referenced by XPrc_IsVsmInShutdown().

#define XPRC_SR_STATE_EMPTY (0)

Empty State Of VSM.

Referenced by Xprc_Check_RestartWithStatus_Command(), and XPrc_PrintVsmStatus().

#define XPRC_SR_STATE_FULL (7)

Full State Of VSM.

Referenced by Xprc_Check_RestartWithStatus_Command(), XPrc_Example(), and XPrc_PrintVsmStatus().

#define XPRC_SR_STATE_HW_SHUTDOWN (1)

Hardware Shutdown State of VSM.

Referenced by XPrc_PrintVsmStatus().

#define XPRC_SR_STATE_MASK (0x7)

Vsm State Mask.

Referenced by XPrc_GetVsmState().

#define XPRC_SR_STATE_RM_LOAD (4)

Reconfigurable Module Load State Of VSM.

Referenced by XPrc_PrintVsmStatus().

#define XPRC_SR_STATE_RM_RESET (6)

Reset State of VSM.

Referenced by XPrc_PrintVsmStatus().

#define XPRC_SR_STATE_RM_UNLOAD (3)

Reconfigurable Module Unload State Of VSM.

Referenced by XPrc_PrintVsmStatus().

#define XPRC_SR_STATE_SW_SHUTDOWN (2)

Software Shutdown State of VSM.

Referenced by XPrc_PrintVsmStatus().

#define XPRC_SR_STATE_SW_STARTUP (5)

Software Startup State of VSM.

Referenced by XPrc_PrintVsmStatus().

#define XPRC_SR_UNKNOWN_ERROR (15)

Unknown Error.

#define XPRC_STATUS_REG (0)

Status register.

Referenced by XPrc_GetRegisterAddress(), XPrc_ReadStatusReg(), and XPrc_SelfTest().

#define XPRC_STATUS_REG_TABLE_ID (0)

Status register Table ID.

Referenced by XPrc_GetRegisterAddress().

#define XPRC_SW_TRIGGER_ID_MASK (0x7FFFFFFF)

Sw Trigger Id Mask.

Referenced by XPrc_IsSwTriggerPending().

#define XPRC_SW_TRIGGER_PENDING (1)

Software Trigger is Pending.

Referenced by XPrc_IsSwTriggerPending().

#define XPRC_SW_TRIGGER_PENDING_MASK (0x80000000)

Sw Trigger Pending Mask.

Referenced by XPrc_IsSwTriggerPending().

#define XPRC_SW_TRIGGER_REG (2)

Sw Trigger register.

Referenced by XPrc_GetRegisterAddress(), XPrc_IsSwTriggerPending(), and XPrc_SendSwTrigger().

#define XPRC_SW_TRIGGER_REG_TABLE_ID (1)

Sw Trigger register Table ID.

Referenced by XPrc_GetRegisterAddress().

#define XPRC_TRIGGER_REG (3)

Trigger register.

Referenced by XPrc_GetRegisterAddress(), XPrc_GetTriggerToRmMapping(), and XPrc_SetTriggerToRmMapping().

#define XPRC_TRIGGER_REG_TABLE_ID (0)

Trigger register Table ID.

Referenced by XPrc_GetRegisterAddress().

#define XPRC_VSM_BS_REG_BANK (3)

Bs Information register.

Referenced by XPrc_GetRegisterAddress().

#define XPRC_VSM_GENERAL_REG_BANK (0)

General registers.

Referenced by XPrc_GetRegisterAddress().

#define XPRC_VSM_NUM_GENERAL_REGISTERS (2)

Number Of General registers.

#define XPRC_VSM_REGISTERS_PER_BS (3)

Registers per Bs.

#define XPRC_VSM_REGISTERS_PER_RM (2)

Registers per Rm.

#define XPRC_VSM_REGISTERS_PER_TRIGGER (1)

Registers per Trigger.

#define XPRC_VSM_RM_REG_BANK (2)

Rm Information register.

Referenced by XPrc_GetRegisterAddress().

#define XPRC_VSM_TRIGGER_REG_BANK (1)

Trigger to Rm register.

Referenced by XPrc_GetRegisterAddress().

#define XPrc_WriteReg | ( |  | Address,
|  |  | Data
| ) |  | XPrc_Out32((Address), (u32)(Data))

This macro writes a value to a PRC register.

A 32 bit write is performed.

Parameters

  Address | is the address of the register to write to.
  Data | is the data written to the register.

Returns
  None.

Note
  C-style signature: void XPRC_WriteReg(u32 Address, u32 Data)

Referenced by XPrc_SendSwTrigger(), XPrc_SetBsAddress(), XPrc_SetBsId(), XPrc_SetBsSize(), XPrc_SetRmBsIndex(), XPrc_SetRmClearingBsIndex(), XPrc_SetRmControl(), and XPrc_SetTriggerToRmMapping().

## Function Documentation

s32 XPrc_CfgInitialize | ( | XPrc * | InstancePtr,
|  | XPrc_Config * | ConfigPtr,
|  | u32 | EffectiveAddr
| ) |  |

This function initializes a PRC instance.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  ConfigPtr | points to the XPrc device configuration structure.
  EffectiveAddr | is the device base address in the virtual memory address space. If the address translation is not used then the physical address should be passed.

Returns
  - XST_SUCCESS if initialisation 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 XPrc::Config, and XPrc::IsReady.

Referenced by XPrc_Example(), and XPrc_SelfTestExample().

u32 XPrc_GetBsAddress | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u16 | BsIndex
| ) |  |

This function get the Address of the Bitstream.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  BsIndex | is the row number in the Bitstream Information register bank that holds information about the bitstream.

Returns
  The address of the bitstream in memory

Note
  None.

References XPrc::Config, XPrc::IsReady, XPRC_BS_ADDRESS_REG, XPrc_GetRegisterAddress(), XPRC_MAX_NUMBER_OF_VSMS, and XPrc_ReadReg.

Referenced by Xprc_Check_BsAddress_Reg().

u32 XPrc_GetBsId | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u16 | BsIndex
| ) |  |

This function get the Bitstream Identifier.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  BsIndex | is the row number in the Bitstream Information register bank that holds information about the bitstream.

Returns
  BsId, which is the identifier of the bitstream referenced by BsIdex.

Note
  When the device being managed is 7 Series or UltraScale+, BsID can only be 0. When the device being managed is UltraScale, BsID can be 0 or 1

References XPrc::IsReady, XPRC_BS_ID_REG, XPrc_GetRegisterAddress(), XPRC_MAX_NUMBER_OF_VSMS, and XPrc_ReadReg.

u32 XPrc_GetBsIdFromStatus | ( | XPrc * | InstancePtr,
|  | u32 | VsmIdOrStatus
| ) |  |

This function is used to extract the identifier of a Bitstream from a VSM's status register.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmIdOrStatus | is the identifier of the VSM to access or a pre-read status word.

Returns
  - BS Identifier

Note
  There are two modes of operation. If InstancePtr is NULL then VsmIdOrStatus contains a previously read status value. Just decode it. If InstancePtr is not NULL then read a fresh status value.

References XPrc_ReadStatusReg(), XPRC_SR_BSID_MASK, and XPRC_SR_BSID_SHIFT.

Referenced by XPrc_PrintVsmStatus().

u32 XPrc_GetBsSize | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u16 | BsIndex
| ) |  |

This function get the Bitstream size in bytes.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  BsIndex | is the row number in the Bitstream Information register bank that holds information about the bitstream.

Returns
  The bitstream size in bytes.

Note
  None.

References XPrc::Config, XPrc::IsReady, XPRC_BS_SIZE_REG, XPrc_GetRegisterAddress(), XPRC_MAX_NUMBER_OF_VSMS, and XPrc_ReadReg.

Referenced by Xprc_Check_BsSize_Reg().

u32 XPrc_GetRegisterAddress | ( | XPrc * | InstancePtr,
|  | u32 | VsmId,
|  | u8 | RegisterType,
|  | u16 | TableRow
| ) |  |

The register offsets for the PRC are dynamic.

These could become awkward to use as each Trigger, VS, RM and BS require their own registers so looking up hard wired names would be clumsy. For example a reference to a constant PRC_VS3_TRIGGER7 would be difficult to generate in a loop that iterated over each VS and Trigger.

This function gets the address offset for a register in the PRC. As this is a Direct Hardware Interface, it cannot use device configuration parameters, and multiple instances are supported through the base address.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  RegisterType | is the type of register(XPRC_STATUS_REG, XPRC_CONTROL_REG, XPRC_SW_TRIGGER_REG, XPRC_TRIGGER_REG, etc)
  TableRow | is the row of the table(trigger_id, rm_id, rm_bs_index).

Returns
  Address of the register.

Note
  None

References XPrc::Config, XPRC_BS_ADDRESS_REG, XPRC_BS_ADDRESS_REG_TABLE_ID, XPRC_BS_ID_REG, XPRC_BS_ID_REG_TABLE_ID, XPRC_BS_SIZE_REG, XPRC_BS_SIZE_REG_TABLE_ID, XPRC_CONTROL_REG, XPRC_CONTROL_REG_TABLE_ID, XPRC_DEFAULT_BANKID, XPRC_DEFAULT_TABLEID, XPRC_RM_BS_INDEX_REG, XPRC_RM_BS_INDEX_REG_TABLE_ID, XPRC_RM_CONTROL_REG, XPRC_RM_CONTROL_REG_TABLE_ID, XPRC_STATUS_REG, XPRC_STATUS_REG_TABLE_ID, XPRC_SW_TRIGGER_REG, XPRC_SW_TRIGGER_REG_TABLE_ID, XPRC_TRIGGER_REG, XPRC_TRIGGER_REG_TABLE_ID, XPRC_VSM_BS_REG_BANK, XPRC_VSM_GENERAL_REG_BANK, XPRC_VSM_RM_REG_BANK, and XPRC_VSM_TRIGGER_REG_BANK.

Referenced by XPrc_GetBsAddress(), XPrc_GetBsId(), XPrc_GetBsSize(), XPrc_GetRmBsIndex(), XPrc_GetRmClearingBsIndex(), XPrc_GetRmControl(), XPrc_GetTriggerToRmMapping(), XPrc_IsSwTriggerPending(), XPrc_ReadStatusReg(), XPrc_SelfTest(), XPrc_SendSwTrigger(), XPrc_SetBsAddress(), XPrc_SetBsId(), XPrc_SetBsSize(), XPrc_SetRmBsIndex(), XPrc_SetRmClearingBsIndex(), XPrc_SetRmControl(), and XPrc_SetTriggerToRmMapping().

u32 XPrc_GetRmBsIndex | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u16 | RmId
| ) |  |

This function get the BS_INDEX field from the RM_BS_INDEX register for the Reconfigurable Module in the Virtual Socket Manager.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  RmId | is the identifier of the Reconfigurable Module.

Returns
  Returns BS_INDEX. This is the row number in the Bitstream Information register bank that holds information about the partial bitstream for the Reconfigurable Module.

Note
  None.

References XPrc::IsReady, XPrc_GetRegisterAddress(), XPRC_MAX_NUMBER_OF_VSMS, XPrc_ReadReg, XPRC_RM_BS_INDEX_MASK, and XPRC_RM_BS_INDEX_REG.

Referenced by Xprc_Check_BsIndex_Reg().

u16 XPrc_GetRmClearingBsIndex | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u16 | RmId
| ) |  |

This function get the CLEAR_BS_INDEX field from the RM_BS_INDEX register for the Reconfigurable Module in the Virtual Socket Manager.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  RmId | is the identifier of the Reconfigurable Module.

Returns
  Returns CLEAR_BS_INDEX. This is the row number in the Bitstream Information register bank that holds information about the clearing bitstream for the Reconfigurable Module.

Note
  This is only needed when the device being managed is an UltraScale device.

References XPrc::IsReady, XPrc_GetRegisterAddress(), XPRC_MAX_NUMBER_OF_VSMS, XPrc_ReadReg, XPRC_RM_BS_INDEX_REG, and XPRC_RM_CLEARING_BS_INDEX_SHIFT.

void XPrc_GetRmControl | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u16 | RmId,
|  | u8 * | ShutdownRequired,
|  | u8 * | StartupRequired,
|  | u8 * | ResetRequired,
|  | u8 * | ResetDuration
| ) |  |

This function get the control information for Reconfigurable Module.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  RmId | is the identifier of the Reconfigurable Module.
  ShutdownRequired | value for the Reconfigurable Module. XPRC_RM_CR_NO_SHUTDOWN_REQUIRED(00): No Reconfigurable Module shutdown is required. XPRC_RM_CR_HW_SHUTDOWN_REQUIRED(01) : Hardware Reconfigurable Module shutdown is required. XPRC_RM_CR_HW_SW_SHUTDOWN_REQUIRED(10) : Hardware then software shutdown is required. XPRC_RM_CR_SW_HW_SHUTDOWN_REQUIRED(11) : Software then hardware shutdown is required.
  StartupRequired | value for the Reconfigurable Module. XPRC_RM_CR_STARTUP_NOT_REQUIRED (0) : No start-up is required XPRC_RM_CR_SW_STARTUP_REQUIRED (1) : Software start-up is required.
  ResetRequired | value for the Reconfigurable Module. XPRC_RM_CR_NO_RESET_REQUIRED(00): No Reconfigurable Module Reset is required. 01: RESERVED. XPRC_RM_CR_LOW_RESET_REQUIRED(10) : Active-Low Reconfigurable Module reset is required. XPRC_RM_CR_HIGH_RESET_REQUIRED(11) : Active-High Reconfigurable Module reset is required.
  ResetDuration | value for the Reconfigurable Module. The maximum reset duration is 256 clock cycles.

Returns
  None.

Note
  None.

References XPrc::Config, XPrc::IsReady, XPrc_GetRegisterAddress(), XPRC_MAX_NUMBER_OF_VSMS, XPrc_ReadReg, XPRC_RM_CONTROL_REG, XPRC_RM_CR_RESET_DURATION_MASK, XPRC_RM_CR_RESET_DURATION_SHIFT, XPRC_RM_CR_RESET_REQUIRED_MASK, XPRC_RM_CR_RESET_REQUIRED_SHIFT, XPRC_RM_CR_SHUTDOWN_REQUIRED_MASK, XPRC_RM_CR_SHUTDOWN_REQUIRED_SHIFT, XPRC_RM_CR_STARTUP_REQUIRED_MASK, and XPRC_RM_CR_STARTUP_REQUIRED_SHIFT.

Referenced by Xprc_Check_RmControl_Reg().

u32 XPrc_GetRmIdFromStatus | ( | XPrc * | InstancePtr,
|  | u32 | VsmIdOrStatus
| ) |  |

This function is used to extract the identifier of a Reconfigurable Module from a VSM's status register.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmIdOrStatus | is the identifier of the VSM to access or a pre-read status word.

Returns
  - RM Identifier

Note
  There are two modes of operation. If InstancePtr is NULL then VsmIdOrStatus contains a previously read status value. Just decode it. If InstancePtr is not NULL then read a fresh status value.

References XPrc_ReadStatusReg(), XPRC_SR_RMID_MASK, and XPRC_SR_RMID_SHIFT.

Referenced by Xprc_Check_RestartWithStatus_Command(), XPrc_Example(), and XPrc_PrintVsmStatus().

u32 XPrc_GetTriggerToRmMapping | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u16 | TriggerId
| ) |  |

This function gets a Trigger to Reconfigurable Module mapping in a Virtual Socket Manager.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  TriggerId | specifies the trigger to query.

Returns
  The identifier of the Reconfigurable Module that will be loaded when trigger TriggerId occurs.

Note
  None.

References XPrc::IsReady, XPrc_GetRegisterAddress(), XPRC_MAX_NUMBER_OF_VSMS, XPrc_ReadReg, and XPRC_TRIGGER_REG.

Referenced by Xprc_Check_TriggerRmMapping().

u32 XPrc_GetVsmErrorStatus | ( | XPrc * | InstancePtr,
|  | u32 | VsmIdOrStatus
| ) |  |

This function is used to get a VSM's Error Status.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmIdOrStatus | is an identifier of the VSM to access or a pre-read status word.

Returns
  - 0 if there's no error.
  - Error code if there is an error.

Note
  There are two modes of operation. If InstancePtr is NULL then VsmIdOrStatus contains a previously read status value. Just decode it. If InstancePtr is not NULL then read a fresh status value.

References XPrc_ReadStatusReg(), XPRC_SR_ERROR_MASK, and XPRC_SR_ERROR_SHIFT.

Referenced by XPrc_PrintVsmStatus().

u32 XPrc_GetVsmState | ( | XPrc * | InstancePtr,
|  | u32 | VsmIdOrStatus
| ) |  |

This function is used to get a VSM's state.

Each VSM exist in two states 1. Active State

1. Shutdown State

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmIdOrStatus | is an identifier of the VSM to access or a pre-read status word.

Returns
  State of VSM.

Note
  There are two modes of operation. If InstancePtr is NULL then VsmIdOrStatus contains a previously read status value. Just decode it. If InstancePtr is not NULL then read a fresh status value.

References XPrc_ReadStatusReg(), and XPRC_SR_STATE_MASK.

Referenced by Xprc_Check_RestartWithStatus_Command(), XPrc_Example(), and XPrc_PrintVsmStatus().

u8 XPrc_IsSwTriggerPending | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u16 * | TriggerId
| ) |  |

This function is used to find out if there is a Software Trigger pending in a VSM.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  TriggerId | is a pointer to a variable that will hold the trigger ID that's in the register. This is the last trigger written to the register and may or may not still be pending.

Returns
  - XPRC_SW_TRIGGER_PENDING(1) if software trigger is pending
  - XPRC_NO_SW_TRIGGER_PENDING(0) if software trigger is not pending.

Note
  None.

References XPrc::IsReady, XPrc_GetRegisterAddress(), XPRC_MAX_NUMBER_OF_VSMS, XPRC_NO_SW_TRIGGER_PENDING, XPrc_ReadReg, XPRC_REG_TABLE_ROW, XPRC_SW_TRIGGER_ID_MASK, XPRC_SW_TRIGGER_PENDING, XPRC_SW_TRIGGER_PENDING_MASK, and XPRC_SW_TRIGGER_REG.

u8 XPrc_IsVsmInShutdown | ( | XPrc * | InstancePtr,
|  | u32 | VsmIdOrStatus
| ) |  |

This function is used to identify whether a VSM is in the Shutdown state or not.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmIdOrStatus | is an identifier of the VSM to access or a pre-read status word.

Returns
  - XPRC_SR_SHUTDOWN_ON when VSM is in Shutdown State.
  - XPRC_SR_SHUTDOWN_OFF when VSM is not in Shutdown State.

Note
  There are two modes of operation. If InstancePtr is NULL then VsmIdOrStatus contains a previously read status value. Just decode it. If InstancePtr is not NULL then read a fresh status value.

References XPrc_ReadStatusReg(), XPRC_SR_SHUTDOWN_MASK, XPRC_SR_SHUTDOWN_OFF, and XPRC_SR_SHUTDOWN_ON.

Referenced by Xprc_Check_RestartWithStatus_Command(), XPrc_Example(), XPrc_PrintVsmStatus(), and Xprc_Restart_VSMs().

XPrc_Config * XPrc_LookupConfig | ( | u16 | DeviceId | ) |

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

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

Parameters

  DeviceId | is 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 was found.

Note
  None.

Referenced by XPrc_Example(), and XPrc_SelfTestExample().

void XPrc_PrintVsmStatus | ( | XPrc * | InstancePtr,
|  | u32 | VsmIdOrStatus,
|  | char * | Prefix
| ) |  |

This function is used to Print the VSM Status.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmIdOrStatus | is an identifier of the VSM to access or a pre-read status word.
  Prefix | is a text string that will prefix each line of output.

Returns
  None.

Note
  None.

References XPrc_GetBsIdFromStatus(), XPrc_GetRmIdFromStatus(), XPrc_GetVsmErrorStatus(), XPrc_GetVsmState(), XPrc_IsVsmInShutdown(), XPrc_ReadStatusReg(), XPRC_SR_BAD_CONFIG_ERROR, XPRC_SR_BS_COMPATIBLE_ERROR, XPRC_SR_BS_ERROR, XPRC_SR_CP_LOST_ERROR, XPRC_SR_DECOMPRESS_BAD_FORMAT_ERROR, XPRC_SR_DECOMPRESS_BAD_SIZE_ERROR, XPRC_SR_FETCH_AND_BS_ERROR, XPRC_SR_FETCH_AND_CP_LOST_ERROR, XPRC_SR_FETCH_ERROR, XPRC_SR_NO_ERROR, XPRC_SR_STATE_EMPTY, XPRC_SR_STATE_FULL, XPRC_SR_STATE_HW_SHUTDOWN, XPRC_SR_STATE_RM_LOAD, XPRC_SR_STATE_RM_RESET, XPRC_SR_STATE_RM_UNLOAD, XPRC_SR_STATE_SW_SHUTDOWN, and XPRC_SR_STATE_SW_STARTUP.

Referenced by XPrc_Example().

u32 XPrc_ReadStatusReg | ( | XPrc * | InstancePtr,
|  | u16 | VsmId
| ) |  |

This function is used to read the VSM's Status Register.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.

Returns
  Returns the contents of the VSM's status register.

Note
  None.

References XPrc::IsReady, XPrc_GetRegisterAddress(), XPRC_MAX_NUMBER_OF_VSMS, XPrc_ReadReg, XPRC_REG_TABLE_ROW, and XPRC_STATUS_REG.

Referenced by Xprc_Check_RestartWithStatus_Command(), XPrc_Example(), XPrc_GetBsIdFromStatus(), XPrc_GetRmIdFromStatus(), XPrc_GetVsmErrorStatus(), XPrc_GetVsmState(), XPrc_IsVsmInShutdown(), and XPrc_PrintVsmStatus().

s32 XPrc_SelfTest | ( | XPrc * | InstancePtr | ) |

This function runs a self-test on the PRC driver.

This self test reads from the status register.

Parameters

  InstancePtr | is a pointer to the XPrc instance.

Returns
  - XST_SUCCESS if the test is successful.

Note
  None

References XPrc::IsReady, XPrc_GetRegisterAddress(), XPrc_ReadReg, XPRC_REG_TABLE_ROW, and XPRC_STATUS_REG.

Referenced by XPrc_Example(), and XPrc_SelfTestExample().

void XPrc_SendProceedCommand | ( | XPrc * | InstancePtr,
|  | u16 | VsmId
| ) |  |

This function instructs the Virtual Socket Manager to proceed with processing the Reconfigurable Module.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.

Returns
  None.

Note
  None.

References XPrc::IsReady, XPRC_CR_DEFAULT_BYTE, XPRC_CR_DEFAULT_HALFWORD, XPRC_CR_OK_TO_PROCEED_CMD, and XPRC_MAX_NUMBER_OF_VSMS.

void XPrc_SendRestartWithNoStatusCommand | ( | XPrc * | InstancePtr,
|  | u16 | VsmId
| ) |  |

This function is used to restart a Virtual Socket Manager in shutdown if the Virtual Socket has not been modified during shutdown.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.

Returns
  None.

Note
  None.

References XPrc::IsReady, XPRC_CR_DEFAULT_BYTE, XPRC_CR_DEFAULT_HALFWORD, XPRC_CR_RESTART_NO_STATUS_CMD, and XPRC_MAX_NUMBER_OF_VSMS.

Referenced by Xprc_Check_RestartWithStatus_Command(), and Xprc_Restart_VSMs().

void XPrc_SendRestartWithStatusCommand | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u8 | Full,
|  | u16 | RmId
| ) |  |

This function is used to restart a Virtual Socket Manager in shutdown if the Virtual Socket has been modified during shutdown.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  Full | = 0, if Virtual Socket is empty, Full = 1, if Virtual Socket is full.
  RmId | is the identifier of the Reconfigurable Module loaded while the VSM was in shutdown.

Returns
  None.

Note
  None.

References XPrc::IsReady, XPRC_CR_RESTART_WITH_STATUS_CMD, XPRC_CR_VS_EMPTY, XPRC_CR_VS_FULL, and XPRC_MAX_NUMBER_OF_VSMS.

Referenced by Xprc_Check_RestartWithStatus_Command().

void XPrc_SendShutdownCommand | ( | XPrc * | InstancePtr,
|  | u16 | VsmId
| ) |  |

This function instructs the Virtual Socket Manager to enter the shutdown state.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.

Returns
  None.

Note
  None.

References XPrc::IsReady, XPRC_CR_DEFAULT_BYTE, XPRC_CR_DEFAULT_HALFWORD, XPRC_CR_SHUTDOWN_CMD, and XPRC_MAX_NUMBER_OF_VSMS.

Referenced by Xprc_Check_RestartWithStatus_Command(), and XPrc_Example().

void XPrc_SendSwTrigger | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u16 | TriggerId
| ) |  |

This function sends a software trigger to a Virtual Socket Manager.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  TriggerId | is the trigger to send.

Returns
  None.

Note
  None.

References XPrc::Config, XPrc::IsReady, XPrc_GetRegisterAddress(), XPRC_MAX_NUMBER_OF_VSMS, XPRC_REG_TABLE_ROW, XPRC_SW_TRIGGER_REG, and XPrc_WriteReg.

Referenced by XPrc_Example().

void XPrc_SendUserControlCommand | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u8 | Rm_Shutdown_Req,
|  | u8 | Rm_Decouple,
|  | u8 | Sw_Shutdown_Req,
|  | u8 | Sw_Startup_Req,
|  | u8 | Rm_Reset
| ) |  |

This function is used to set the values of Rm_Shutdown_Req, Rm_Decouple, Sw_Shutdown_Req, Sw_Startup_Req, Rm_Reset signals.

It can only be used when the VSM is in the shutdown state.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  Rm_Shutdown_Req | => Set to 1 to inform the RM Reconfigurable Module that it is to be removed.
  Rm_Decouple | => Set to 1 to enable any external Virtual Socket decoupling logic.
  Sw_Shutdown_Req | => Set to 1 to inform software that the active Reconfigurable Module is to be removed.
  Sw_Startup_Req | => Set to 1 to inform software that the new Reconfigurable Module has been loaded
  Rm_Reset | => Reset signal from the IP to the RM.

Returns
  None.

Note
  None.

References XPrc::IsReady, XPRC_CR_DEFAULT_HALFWORD, XPRC_CR_USER_CONTROL_RM_DECOUPLE_BIT, XPRC_CR_USER_CONTROL_RM_RESET_BIT, XPRC_CR_USER_CONTROL_SW_SHUTDOWN_REQ_BIT, XPRC_CR_USER_CONTROL_SW_STARTUP_REQ_BIT, XPRC_CR_USER_CTRL_CMD, and XPRC_MAX_NUMBER_OF_VSMS.

Referenced by Xprc_Check_User_Command().

void XPrc_SetBsAddress | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u16 | BsIndex,
|  | u32 | BsAddress
| ) |  |

This function sets the Address of the Bitstream.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  BsIndex | is the row number in the Bitstream Information register bank that holds information about the bitstream.
  BsAddress | is the address of the bitstream in memory.

Returns
  None.

Note
  None.

References XPrc::Config, XPrc::IsReady, XPRC_BS_ADDRESS_REG, XPrc_GetRegisterAddress(), XPRC_MAX_NUMBER_OF_VSMS, and XPrc_WriteReg.

Referenced by Xprc_Check_BsAddress_Reg(), and Xprc_Program_PRC().

void XPrc_SetBsId | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u16 | BsIndex,
|  | u16 | BsId
| ) |  |

This function sets the Bitstream Identifier.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  BsIndex | is the row number in the Bitstream Information register bank that holds information about the bitstream.
  BsId | is the identifier of the bitstream referenced by BsIdex.

Returns
  None.

Note
  When the device being managed is 7 Series or UltraScale+, BsID can only be 0. When the device being managed is UltraScale, BsID can be 0 or 1

References XPrc::Config, XPrc::IsReady, XPRC_BS_ID_REG, XPrc_GetRegisterAddress(), XPRC_MAX_NUMBER_OF_VSMS, and XPrc_WriteReg.

void XPrc_SetBsSize | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u16 | BsIndex,
|  | u32 | BsSize
| ) |  |

This function sets the Bitstream size in bytes.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  BsIndex | is the row number in the Bitstream Information register bank that holds information about the bitstream.
  BsSize | is the bitstream size in bytes.

Returns
  None.

Note
  None.

References XPrc::Config, XPrc::IsReady, XPRC_BS_SIZE_REG, XPrc_GetRegisterAddress(), XPRC_MAX_NUMBER_OF_VSMS, and XPrc_WriteReg.

Referenced by Xprc_Check_BsSize_Reg(), and Xprc_Program_PRC().

void XPrc_SetRmBsIndex | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u16 | RmId,
|  | u16 | BsIndex
| ) |  |

This function sets the BS_INDEX field in the RM_BS_INDEX register to specify which row of the Bitstream Information tables holds the partial bitstream for the Reconfigurable Module in the Virtual Socket Manager.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  RmId | is the identifier of the Reconfigurable Module.
  BsIndex | is the row number in the Bitstream Information register bank that holds information about the partial bitstream for the Reconfigurable Module.

Returns
  None.

Note
  This overwrites the entire BS Index register so care is required in Ultrascale parts where clearing bitstreams are required. In those parts, use this first and then call XPrc_SetRmClearingBsIndex.

References XPrc::Config, XPrc::IsReady, XPrc_GetRegisterAddress(), XPRC_MAX_NUMBER_OF_VSMS, XPRC_RM_BS_INDEX_REG, and XPrc_WriteReg.

Referenced by Xprc_Check_BsIndex_Reg(), and Xprc_Program_PRC().

void XPrc_SetRmClearingBsIndex | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u16 | RmId,
|  | u16 | ClearingBsIndex
| ) |  |

This function set the CLEAR_BS_INDEX field in the RM_BS_INDEX register to specify which row of the BS Information tables holds the clearing bitstream for the Reconfigurable Module in the Virtual Socket Manager.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  RmId | is the identifier of the Reconfigurable Module. bitstream.
  ClearingBsIndex | is the row number in the Bitstream Information register bank that holds information about the clearing bitstream for the Reconfigurable Module.

Returns
  None.

Note
  This is only needed when the device being managed is an UltraScale device. This must be called after XPrc_SetRmBsIndex

References XPrc::Config, XPrc::IsReady, XPrc_GetRegisterAddress(), XPRC_MAX_NUMBER_OF_VSMS, XPrc_ReadReg, XPRC_RM_BS_INDEX_REG, XPRC_RM_CLEARING_BS_INDEX_SHIFT, and XPrc_WriteReg.

void XPrc_SetRmControl | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u16 | RmId,
|  | u8 | ShutdownRequired,
|  | u8 | StartupRequired,
|  | u8 | ResetRequired,
|  | u8 | ResetDuration
| ) |  |

This function set the control information for Reconfigurable Module.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  RmId | is the identifier of the Reconfigurable Module.
  ShutdownRequired | value for the Reconfigurable Module. XPRC_RM_CR_NO_SHUTDOWN_REQUIRED(00): No Reconfigurable Module shutdown is required. XPRC_RM_CR_HW_SHUTDOWN_REQUIRED(01) : Hardware Reconfigurable Module shutdown is required. XPRC_RM_CR_HW_SW_SHUTDOWN_REQUIRED(10) : Hardware then software shutdown is required. XPRC_RM_CR_SW_HW_SHUTDOWN_REQUIRED(11) : Software then hardware shutdown is required.
  StartupRequired | value for the Reconfigurable Module. XPRC_RM_CR_STARTUP_NOT_REQUIRED (0) : No start-up is required XPRC_RM_CR_SW_STARTUP_REQUIRED (1) : Software start-up is required.
  ResetRequired | value for the Reconfigurable Module. XPRC_RM_CR_NO_RESET_REQUIRED(00): No Reconfigurable Module Reset is required. 01: RESERVED. XPRC_RM_CR_LOW_RESET_REQUIRED(10) : Active-Low Reconfigurable Module reset is required. XPRC_RM_CR_HIGH_RESET_REQUIRED(11) : Active-High Reconfigurable Module reset is required.
  ResetDuration | value for the Reconfigurable Module. The maximum reset duration is 256 clock cycles.

Returns
  None.

Note
  None.

References XPrc::Config, XPrc::IsReady, XPrc_GetRegisterAddress(), XPRC_MAX_NUMBER_OF_VSMS, XPRC_RM_CONTROL_REG, XPRC_RM_CR_HIGH_RESET_REQUIRED, XPRC_RM_CR_MAX_RESETDURATION, XPRC_RM_CR_RESET_DURATION_MASK, XPRC_RM_CR_RESET_DURATION_SHIFT, XPRC_RM_CR_RESET_REQUIRED_MASK, XPRC_RM_CR_RESET_REQUIRED_SHIFT, XPRC_RM_CR_SHUTDOWN_REQUIRED_MASK, XPRC_RM_CR_SHUTDOWN_REQUIRED_SHIFT, XPRC_RM_CR_STARTUP_NOT_REQUIRED, XPRC_RM_CR_STARTUP_REQUIRED_MASK, XPRC_RM_CR_STARTUP_REQUIRED_SHIFT, XPRC_RM_CR_SW_HW_SHUTDOWN_REQUIRED, XPRC_RM_CR_SW_STARTUP_REQUIRED, and XPrc_WriteReg.

Referenced by Xprc_Check_RmControl_Reg(), and Xprc_Program_PRC().

void XPrc_SetTriggerToRmMapping | ( | XPrc * | InstancePtr,
|  | u16 | VsmId,
|  | u16 | TriggerId,
|  | u16 | RmId
| ) |  |

This function is used to set a Trigger to Reconfigurable Module mapping in a Virtual Socket Manager.

Parameters

  InstancePtr | is a pointer to the PRC instance.
  VsmId | is the identifier of the VSM to access.
  TriggerId | specifies the trigger to modify.
  RmId | specifies Reconfigurable Module to load when trigger TriggerId occurs.

Returns
  None.

Note
  None.

References XPrc::Config, XPrc::IsReady, XPrc_GetRegisterAddress(), XPRC_MAX_NUMBER_OF_VSMS, XPRC_TRIGGER_REG, and XPrc_WriteReg.

Referenced by Xprc_Check_TriggerRmMapping().