xilsem
Vitis Drivers API Documentation
XilSEM Versal Client APIs

Functions

XStatus XSem_RegisterEvent (XIpiPsu *IpiInst, XSem_Notifier *Notifier)
 This function is used to register/un-register event notification with XilSEM Server. More...
 
XStatus XSem_CmdCfrInit (XIpiPsu *IpiInst, XSemIpiResp *Resp)
 This function is used to initialize CRAM scan from user application. More...
 
XStatus XSem_CmdCfrStartScan (XIpiPsu *IpiInst, XSemIpiResp *Resp)
 This function is used to start CRAM scan from user application. More...
 
XStatus XSem_CmdCfrStopScan (XIpiPsu *IpiInst, XSemIpiResp *Resp)
 This function is used to stop CRAM scan from user application. More...
 
XStatus XSem_CmdCfrNjctErr (XIpiPsu *IpiInst, XSemCfrErrInjData *ErrDetail, XSemIpiResp *Resp)
 This function is used to inject an error at a valid location in CRAM from user application. More...
 
XStatus XSem_CmdCfrGetStatus (XSemCfrStatus *CfrStatusInfo)
 This function is used to read all CRAM Status registers from PMC RAM and send to user application. More...
 
XStatus XSem_CmdCfrReadFrameEcc (XIpiPsu *IpiInst, u32 CframeAddr, u32 RowLoc, XSemIpiResp *Resp)
 This function is used to Read frame ECC of a particular Frame. More...
 
XStatus XSem_CmdNpiStartScan (XIpiPsu *IpiInst, XSemIpiResp *Resp)
 This function is used to start NPI scan from user application. More...
 
XStatus XSem_CmdNpiStopScan (XIpiPsu *IpiInst, XSemIpiResp *Resp)
 This function is used to stop NPI scan from user application. More...
 
XStatus XSem_CmdNpiInjectError (XIpiPsu *IpiInst, XSemIpiResp *Resp)
 This function is used to inject SHA error in NPI descriptor list (in the first NPI descriptor) from user application. More...
 
XStatus XSem_CmdNpiGetGldnSha (XIpiPsu *IpiInst, XSemIpiResp *Resp, XSem_DescriptorData *DescData)
 This function is used to get golden SHA. More...
 
XStatus XSem_CmdNpiGetStatus (XSemNpiStatus *NpiStatusInfo)
 This function is used to read all NPI Status registers from PMC RAM and send to user application. More...
 
XStatus XSem_CmdGetConfig (XIpiPsu *IpiInst, XSemIpiResp *Resp)
 This function is used to read CRAM & NPI configuration. More...
 
u32 XSem_CmdCfrGetCrc (u32 RowIndex)
 This function is used to read CFRAME golden CRC for a row. More...
 
void XSem_CmdCfrGetTotalFrames (u32 RowIndex, u32 *FrameCntPtr)
 This function is used to read total frames in a row. More...
 

Function Documentation

u32 XSem_CmdCfrGetCrc ( u32  RowIndex)

This function is used to read CFRAME golden CRC for a row.

Parameters
[in]RowIndexRow index for which CRC to be read (Min: 0 , Max: CFU_ROW_RANGE -1)
Returns
This API returns the Golden CRC for a given Row.
Note
  • Total number of rows is not same for all platforms.
  • The number maximum rows (CFU_ROW_RANGE) can be obtained by reading the address CFU_ROW_RANGE(0XF12B006C).

SEU Golden Hardware CRC from first scan is stored in Bits [95:64] of CFRAME_SEU_CRC_ADDR (128-Bit) register

Read CRC register word 0

Read CRC register word 1

Read CRC register word 2 and store it as GoldenCrc

Read CRC register word 3

Return GoldenCrc

References CFRAME_BASE_ADDRESS, CFRAME_ROW_OFFSET, and CFRAME_SEU_CRC_ADDR.

Referenced by main().

XStatus XSem_CmdCfrGetStatus ( XSemCfrStatus CfrStatusInfo)

This function is used to read all CRAM Status registers from PMC RAM and send to user application.

Parameters
[out]CfrStatusInfoStructure Pointer with CRAM Status details
  • CfrStatusInfo->Status: Provides details about CRAM scan
    • Bit [31-25]: Reserved
    • Bit [24:20]: CRAM Error codes
      • 00001: Unexpected CRC error when CRAM is not in observation state
      • 00010: Unexpected ECC error when CRAM is not in Observation or Initialization state
      • 00011: Safety write error in SEU handler
      • 00100: ECC/CRC ISR not found in any Row
      • 00101: CRAM Initialization is not done
      • 00110: CRAM Start Scan failure
      • 00111: CRAM Stop Scan failure
      • 01000: Invalid Row for Error Injection
      • 01001: Invalid QWord for Error Injection
      • 01010: Invalid Bit for Error Injection
      • 01011: Invalid Frame Address for Error Injection
      • 01100: Unexpected Bit flip during Error Injection
      • 01101: Masked Bit during Injection
      • 01110: Invalid Block Type for Error Injection
      • 01111: CRC or Uncorrectable Error or correctable error(when correction is disabled) is active in CRAM
      • 10000: ECC or CRC Error detected during CRAM Calibration in case of SWECC
    • Bit [19-18]: Reserved
    • Bit [17]: 0: CRAM scan is enabled in design 1: CRAM scan is disabled in design
    • Bit [16]: 0: CRAM scan is not initialized 1: CRAM Initialization is completed
    • Bit [15-14]: CRAM Correctable ECC error status
      • 00: No Correctable error encountered
      • 01: Correctable error is detected and corrected
      • 10: Correctable error is detected but not corrected (Correction is disabled)
      • 11: Reserved
    • Bit [13]: 0: No error in CRAM scan 1: CRAM scan has internal error (Null pointer access/Safety write error) In this error condition, scan will be stopped and an event will be sent to R5.
    • Bit [12]: 0: No error in error decoding 1: Invalid Error Location is reported In this error condition, scan will be stopped and an event will be sent to R5.
    • Bit [11]: 0: No correctable error detected 1: Correctable ECC error detected In this condition, an event will be sent to R5. If correction is disabled, then scan will be stopped. Else, scan will continue to run.
    • Bit [10]: 0: No CRC error 1: CRC error is detected by CRAM. In this error condition, scan will be stopped and an event will be sent to R5.
    • Bit [09]: 0: No uncorrectable error 1: Uncorrectable ECC error is detected In this error condition, scan will be stopped and an event will be sent to R5.
    • Bit [08]: 0: No error in CRAM scan start-up test 1: CRAM start-up test failure In this error condition, scan will be stopped.
    • Bit [07]: 0: No error during CRAM calibration` 1: CRAM Calibration Timeout error In this error condition, scan will be stopped and an event will be sent to R5.
    • Bit [06]: 0: CRAM scan is not in the fatal state 1: CRAM scan is in the fatal state This bit is for CRAM scan state.
    • Bit [05]: 0: CRAM scan is not in the error injection state 1: CRAM scan is in the error injection state This bit is for CRAM scan state.
    • Bit [04]: 0: CRAM scan is not in the idle state 1: CRAM scan is in the idle state This bit is for CRAM scan state.
    • Bit [03]: 0: CRAM scan is not in the correction state 1: CRAM scan is in the correction state This bit is for CRAM scan state.
    • Bit [02]: 0: CRAM scan is not in the observation state 1: CRAM scan is in the observation state This bit is for CRAM scan state.
    • Bit [01]: 0: CRAM scan is not in the Initialization state 1: CRAM scan is in the Initialization state This bit is for CRAM scan state.
    • Bit [00]: CRAM Scan is included in design This bit is for CRAM scan state.
  • CfrStatusInfo->ErrAddrL: This stores the low address of the last 7 corrected error details if correction is enabled in design.
    • Bit [31:28]: Reserved
    • Bit [27:23]: QWord location where error was detected
    • Bit [22:16]: Bit location where error was detected
    • Bit [15:2]: Reserved
    • Bit [1:0]: Define validity of error address.
      • 00: Info not available
      • 01: Address out of range
      • 10: Reserved
      • 11: Address valid
  • CfrStatusInfo->ErrAddrH: This stores the high address of the last 7 corrected error details if correction is enabled in design.
    • Bits[31:27]: Reserved
    • Bits[26:23]: Row number where error was detected
    • Bits[22:20]: Block type of the frame
    • Bits[19:0]: Frame address where error was detected
  • CfrStatusInfo->ErrCorCnt: Counter value of Correctable Error Bits
Returns
This API returns the success or failure.
  • XST_FAILURE: If NULL pointer reference of CfrStatusInfo
  • XST_SUCCESS: On successful read from PMC RAM

References XSemCfrStatus::ErrAddrH, XSemCfrStatus::ErrAddrL, XSemCfrStatus::ErrCorCnt, MAX_CRAMERR_REGISTER_CNT, PMC_RAM_SEM_CRAM_COR_BITCNT, PMC_RAM_SEM_CRAM_STATUS, PMC_RAM_SEM_CRAMERR_ADDRH0, PMC_RAM_SEM_CRAMERR_ADDRL0, and XSemCfrStatus::Status.

Referenced by main().

void XSem_CmdCfrGetTotalFrames ( u32  RowIndex,
u32 *  FrameCntPtr 
)

This function is used to read total frames in a row.

Parameters
[in]RowIndexRow index for which total number of frames is to be read (Min: 0 , Max: CFU_ROW_RANGE -1)
[out]FrameCntPtrPointer to store Total frames
  • FrameCntPtr[0] : Type_0 total frames
  • FrameCntPtr[1] : Type_1 total frames
  • FrameCntPtr[2] : Type_2 total frames
  • FrameCntPtr[3] : Type_3 total frames
  • FrameCntPtr[4] : Type_4 total frames
  • FrameCntPtr[5] : Type_5 total frames
  • FrameCntPtr[6] : Type_6 total frames
Note
  • Total number of frames in a row is not same for all rows.
  • XSem_CmdCfrGetTotalFrames API is provided to know the total number of frames in a row for each block. Output param (FrameCntPtr) of XSem_CmdCfrGetTotalFrames API is updated with total number of frames of each block type for the input row. If a particular block in a row has 0 frames, then error injection shall not be performed. Range of Frame number: 0 to (FrameCntPtr[n] - 1) where n is block type with range 0 to 6.
  • The safe location to perform error injection is QWORD 12 which has ECC bits. The error injection will not change the design behaviour.

References CFRAME_BASE_ADDRESS, CFRAME_BIT_0_19_MASK, CFRAME_BIT_20_39_MASK_HIGH, CFRAME_BIT_20_39_MASK_LOW, CFRAME_BIT_20_39_SHIFT_L, CFRAME_BIT_20_39_SHIFT_R, CFRAME_BIT_40_59_MASK, CFRAME_BIT_40_59_SHIFT_R, CFRAME_BIT_60_79_MASK_HIGH, CFRAME_BIT_60_79_MASK_LOW, CFRAME_BIT_60_79_SHIFT_L, CFRAME_BIT_60_79_SHIFT_R, CFRAME_LAST_BOT_ADDR, and CFRAME_ROW_OFFSET.

Referenced by main().

XStatus XSem_CmdCfrInit ( XIpiPsu *  IpiInst,
XSemIpiResp Resp 
)

This function is used to initialize CRAM scan from user application.

    Primarily this function sends an IPI request to PLM to start CRAM
    Scan Initialization, waits for PLM to process the request and reads
     the response message.
Parameters
[in]IpiInstPointer to IPI driver instance
[out]RespStructure Pointer of IPI response
  • Resp->RespMsg1: Acknowledgment ID of CRAM Initialization(0x10301)
  • Resp->RespMsg2: Status of CRAM Initialization 0x01000000U - ECC/CRC error detected during calibration in case of SWECC 0X00000080U - Calibration timeout 0X00002000U - Internal error
Returns
This API returns the success or failure.
  • XST_FAILURE: On CRAM Initialization failure
  • XST_SUCCESS: On CRAM Initialization success

References CMD_ID_CFR_INIT, XSemIpiResp::RespMsg1, and XSemIpiResp::RespMsg2.

XStatus XSem_CmdCfrNjctErr ( XIpiPsu *  IpiInst,
XSemCfrErrInjData ErrDetail,
XSemIpiResp Resp 
)

This function is used to inject an error at a valid location in CRAM from user application.

    Primarily this function sends an IPI request to PLM to perform
    error injection in CRAM with user provided arguments in
    *ErrDetail, waits for PLM to process the request and reads
    the response message.
Parameters
[in]IpiInstPointer to IPI driver instance
[in]ErrDetailStructure Pointer with Error Injection details
  • ErrDetail->Row : Row Number (Min: 0 , Max: (value at CFU_ROW_RANGE)-1)
  • ErrDetail->Efar : Frame Address
    • Frame Number [0:19] (Refer note)
    • Block Type [20:22]
  • ErrDetail->Qword : Quad Word(Min: 0, Max: 24)
  • ErrDetail->Bit : Bit Position(Min: 0, Max: 127)
[out]RespStructure Pointer of IPI response
  • Resp->RespMsg1: Acknowledgment ID of CRAM error injection(0x10304)
  • Resp->RespMsg2: Status of CRAM error injection 0x00002000 – Null pointer error 0x00500000 – CRAM init not done 0x00800000 – Invalid row 0x00900000 – Invalid qword 0x00A00000 – Invalid bit 0x00B00000 – Invalid frame address 0x00C00000 – Unexpected bits flipped 0x00D00000 – Masked bit 0x00E00000 – Invalid block type 0x00F00000 – Active crc/uncor ecc error in CRAM
Returns
This API returns the success or failure.
  • XST_FAILURE: On CRAM error injection failure
  • XST_SUCCESS: On CRAM error injection success
Note
  • Total number of frames in a row is not same for all rows.
  • XSem_CmdCfrGetTotalFrames API is provided to know the total number of frames in a row for each block. Output param (FrameCntPtr) of XSem_CmdCfrGetTotalFrames API is updated with total number of frames of each block type for the input row. If a particular block in a row has 0 frames, then error injection shall not be performed. Range of Frame number: 0 to (FrameCntPtr[n] - 1) where n is block type with range 0 to 6.
     - The safe location to perform error injection is QWORD 12 which has
    
    ECC bits. The error injection will not change the design behaviour.

References XSemCfrErrInjData::Bit, CMD_ID_CFR_NJCT_ERR, XSemCfrErrInjData::Efar, XSemCfrErrInjData::Qword, XSemIpiResp::RespMsg1, XSemIpiResp::RespMsg2, and XSemCfrErrInjData::Row.

XStatus XSem_CmdCfrReadFrameEcc ( XIpiPsu *  IpiInst,
u32  CframeAddr,
u32  RowLoc,
XSemIpiResp Resp 
)

This function is used to Read frame ECC of a particular Frame.

    Primarily this function sends an IPI request to PLM to invoke SEM
    CRAM SendFrameEcc, waits for PLM to process the request and reads
    the response message.
Parameters
[in]IpiInstPointer to IPI driver instance
[in]CframeAddrFrame Address
  • Frame Number [0:19] (Refer note)
  • Block Type [20:22]
[in]RowLocRow index(Min: 0 , Max: CFU_ROW_RANGE -1)
[out]RespStructure Pointer of IPI response
  • Resp->RespMsg1: Acknowledgment ID of CRAM Send Frame ECC(0x3030A)
  • Resp->RespMsg2: Segment 0 ECC value
  • Resp->RespMsg3: Segment 1 ECC value
  • Resp->RespMsg4: Status of CRAM stop scan
Returns
This API returns the success or failure.
  • XST_FAILURE: On CRAM Read Frame ECC failure
  • XST_SUCCESS: On CRAM Read Frame ECC success
Note
  • Total number of frames in a row is not same for all rows.
  • XSem_CmdCfrGetTotalFrames API is provided to know the total number of frames in a row for each block. Output param (FrameCntPtr) of XSem_CmdCfrGetTotalFrames API is updated with total number of frames of each block type for the input row. If a particular block in a row has 0 frames, then error injection shall not be performed. Range of Frame number: 0 to (FrameCntPtr[n] - 1) where n is block type with range 0 to 6.
     - The safe location to perform error injection is QWORD 12 which has
    
    ECC bits. The error injection will not change the design behaviour.

References CMD_ID_CFR_RDFRAME_ECC, XSemIpiResp::RespMsg1, XSemIpiResp::RespMsg2, XSemIpiResp::RespMsg3, and XSemIpiResp::RespMsg4.

Referenced by main().

XStatus XSem_CmdCfrStartScan ( XIpiPsu *  IpiInst,
XSemIpiResp Resp 
)

This function is used to start CRAM scan from user application.

    Primarily this function sends an IPI request to PLM to invoke SEM
    CRAM StartScan, waits for PLM to process the request and reads
    the response message.
Parameters
[in]IpiInstPointer to IPI driver instance
[out]RespStructure Pointer of IPI response
  • Resp->RespMsg1: Acknowledgment ID of CRAM start scan(0x10302)
  • Resp->RespMsg2: Status of CRAM start scan 0x2000 – Null pointer error 0x00F00000 – Active crc/uncor error 0x00500000 – CRAM init not done 0x00600000 – Start scan failed
Returns
This API returns the success or failure.
  • XST_FAILURE: On CRAM start scan failure
  • XST_SUCCESS: On CRAM start scan success

References CMD_ID_CFR_START_SCAN, XSemIpiResp::RespMsg1, and XSemIpiResp::RespMsg2.

XStatus XSem_CmdCfrStopScan ( XIpiPsu *  IpiInst,
XSemIpiResp Resp 
)

This function is used to stop CRAM scan from user application.

    Primarily this function sends an IPI request to PLM to invoke SEM
    CRAM StopScan, waits for PLM to process the request and reads
    the response message.
Parameters
[in]IpiInstPointer to IPI driver instance
[out]RespStructure Pointer of IPI response
  • Resp->RespMsg1: Acknowledgment ID of CRAM stop scan(0x10303)
  • Resp->RespMsg2: Status of CRAM stop scan 0x00500000 – CRAM init not done 0x00700000 – Stop scan failed
Returns
This API returns the success or failure.
  • XST_FAILURE: On CRAM stop scan failure
  • XST_SUCCESS: On CRAM stop scan success

References CMD_ID_CFR_STOP_SCAN, XSemIpiResp::RespMsg1, and XSemIpiResp::RespMsg2.

XStatus XSem_CmdGetConfig ( XIpiPsu *  IpiInst,
XSemIpiResp Resp 
)

This function is used to read CRAM & NPI configuration.

    Primarily this function sends an IPI request to PLM to invoke SEM
    Get configuration command, waits for PLM to process the request and
    reads the response message.
Parameters
[in]IpiInstPointer to IPI driver instance
[out]RespStructure Pointer of IPI response
  • Resp->RespMsg1: Acknowledgment ID of Get Configuration(0x30309)
  • Resp->RespMsg2: CRAM Attribute register details
    • Bit [31:16]: Not Implemented
    • Bit [15:9]: Reserved
    • Bit [8]: Reserved
    • Bit [7]: Reserved
    • Bit [6:5]: Indicates when to start CRAM scan
      • 00: Do not automatically start scan
      • 01: Enable scan automatically after device configuration.
      • 10: Reserved
      • 11: Reserved
    • Bit [4]: Reserved
    • Bit [3]: Indicates HwECC/SwECC
      • 0: Uses hardware calculated ECC.
      • 1: Uses software calculated ECC that comes from tools and part of CDO
    • Bit [2]: Indicates Correctable error is to be corrected/not
      • 0: Disables error correction capability
      • 1: Enables error correction capability
    • Bit [1:0]: Define the mode of the scan (Enable/Disable scan)
      • 00: Disable Configuration RAM scan
      • 01: RESERVED
      • 10: Enable Configuration RAM scan
      • 11: RESERVED
  • Resp->RespMsg3: NPI Attribute register details
    • Bit [31:24]: Not implemented
    • Bit [23:18]: Reserved
    • Bit [17:8]: The scheduled time in milliseconds that the NPI scan will be periodically performed. Default Setting: 0x064 = 100ms
    • Bit [7:6]: Reserved
    • Bit [5:4]: Indicates when to start NPI scan
      • 00: Do not automatically start scan
      • 01: Enable scan automatically after device configuration.
      • 10: Reserved
      • 11: Reserved
    • Bit [3]: Reserved
    • Bit [2]: Indicates HwSHA/SwSHA 0: Use hardware calculated SHA. 1: Use software calculated SHA.
    • Bit [1:0]: Reserved
  • Resp->RespMsg4: Status of Get Configuration command
Returns
This API returns the success or failure.
  • XST_FAILURE: On Get Configuration failure
  • XST_SUCCESS: On Get Configuration success

References CMD_ID_SEM_GET_CONFIG, XSemIpiResp::RespMsg1, XSemIpiResp::RespMsg2, XSemIpiResp::RespMsg3, and XSemIpiResp::RespMsg4.

Referenced by main().

XStatus XSem_CmdNpiGetGldnSha ( XIpiPsu *  IpiInst,
XSemIpiResp Resp,
XSem_DescriptorData DescData 
)

This function is used to get golden SHA.

Parameters
[in]IpiInstPointer to IPI driver instance
[out]RespStructure Pointer of IPI response
  • Resp->RespMsg1: Acknowledgment ID of NPI get golden SHA(0x10310)
  • Resp->RespMsg2: Status of NPI get golden SHA
[out]DescDataStructure pointer to hold total descriptor count, golden SHA and information related to descriptors
Returns
This API returns the success or failure.
  • XST_FAILURE: On NPI golden SHA retrieve failure
  • XST_SUCCESS: On NPI golden SHA retrieve success

References CMD_NPI_GET_GLDN_SHA, XSemIpiResp::RespMsg1, and XSemIpiResp::RespMsg2.

Referenced by main().

XStatus XSem_CmdNpiGetStatus ( XSemNpiStatus NpiStatusInfo)

This function is used to read all NPI Status registers from PMC RAM and send to user application.

Parameters
[out]NpiStatusInfoStructure Pointer with NPI Status details
  • NpiStatusInfo->Status: Provides details about NPI scan
    • Bit [31]: 0 - No error, SHA-3 engine is present 1 - Cryptographic acceleration blocks are disabled for export compliance. No support for NPI scan, an event will be sent to R5
    • Bit [30]: 0 - NPI scan is running for scheduled interval 1 - Indicates NPI scan failed to run on scheduled interval. If NPI scan is not executed as per the configured periodicity, the error will notified to R5 user. The scan will continue to run
    • Bit [29]: 0- No descriptor missed during scanning 1- Indicates NPI scan failed to scan all descriptors completely (excluding arbitration failures). This will be notified to R5 user and the scan will continue to run.
    • Bit [28]: 0 - NPI scan executing within budget time 1 - Indicates NPI scan has exceeded maximum budget execution time of 20ms. This will be notified to R5 user and the scan will continue to run.
    • Bit [27]: 0 - No error in SLR to SLR communication 1 - Indicates failure in SSIT internal communication channel This bit is applicable for SSIT devices.
    • Bit [26]: Reserved
    • Bit [25]: 0 - No error in PMC_PL_GPO 1 - Indicates GPO Initialization or write failed. This is HW failure. In this condition, the scan will be stopped, and notification will be sent to R5
    • Bit [24]: 0 - No error SHA-3 engine 1 - Indicates SHA engine failed to function during initialization or start or DMA transfer. This is HW failure. In this condition, the scan will be stopped, and notification will be sent to R5
    • Bit [23]: 0 - No error in register writes 1 - Indicates the register write and read back failure occurred during the scan. This is HW failure. In this condition, the scan will be stopped, and notification will be sent to R5
    • Bit [22]: Reserved
    • Bit [21]: 0 - No error in DDR calibration 1 - Indicates NPI DDRMC Main Slave Arbitration Timeout occurred during the scan. If the DDRMC calibration is not done, the descriptor will be skipped and scan will continue to run for next descriptor
    • Bit [20]: 0 - No error in descriptor format 1 - Indicates NPI Descriptor has invalid format. This failure indicates that there is some corruption in the XilSEM NPI descriptor data. The scan will be stopped, and notification will be sent to R5
    • Bit [19]: 0 - No error in NPI Descriptor SHA header 1 - Indicates NPI Descriptor SHA Header mismatch occurred during the scan. This failure indicates that there is some corruption in the XilSEM NPI descriptor data. The scan will be stopped, and notification will be sent to R5
    • Bit [18]: 0 - NPI descriptors are present in the memory 1 - Indicates the absence of NPI Descriptor (Zero descriptors) This failure indicates that there is some corruption in the XilSEM NPI descriptor data. The scan will be stopped, and notification will be sent to R5
    • Bit [17]: 0 - No error in SHA comparison during run time 1- Indicates SHA comparison failure occurred during run time. This failure indicates that there is some bit flip in the NPI registers. The scan will be stopped and an event will be sent to R5
    • Bit [16]: 0 - No error in SHA comparison during first scan 1- Indicates SHA comparison failure occurred during initialization. This failure indicates that there is some bit flip in the NPI registers. The scan will be stopped and an event will be sent to R5
    • Bit [15-12]: Reserved
    • Bit [11]: 0 - NPI scan task is not added to PLM Scheduler to run periodically 1 - NPI scan task is added to PLM Scheduler to run periodically This bit is for NPI scan state information.
    • Bit [10]: NPI scan is suspended 0 - NPI scan is not suspended 1 - NPI scan is suspended due to errors This bit is for NPI scan state information.
    • Bit [09]: 0 - NPI scan initialization is not done 1 - NPI scan initialization is done This bit is for NPI scan state information.
    • Bit [08]: 0 - NPI scan is present in the design 1 - NPI scan disabled in the design This bit is for NPI scan state information.
    • Bit [07-06]: Reserved
    • Bit [05]: 0 - No internal error 1 - NPI scan is in error state (due to timeouts, invalid descriptors) This bit is for NPI scan state information.
    • Bit [04]: 0 - No error in NPI Scan 1 - NPI scan in SHA comparison mismatch error state. This bit is for NPI scan state information.
    • Bit [03]: 0 - NPI scan is not in SHA error inject state 1 - NPI scan is in SHA error inject state. This bit is for NPI scan state information.
    • Bit [02]: 0 - NPI scan is not in scan state 1 - NPI scan is in scan state. This bit is for NPI scan state information.
    • Bit [01]: 0 - NPI scan is not in initialization state 1 - NPI scan is in initialization state This bit is for NPI scan state information.
    • Bit [00]: 0 - NPI scan is not in idle state 1 - NPI scan is in idle state This bit is for NPI scan state information.
  • NpiStatusInfo->SlvSkipCnt: Provides NPI descriptor slave skip counter value if arbitration failure. This is 8 words result to accommodate 32 1-Byte skip counters for individual slaves arbitration failures. Slaves can be DDRMC Main, GT for which arbitration is required before performing scanning.
  • NpiStatusInfo->ScanCnt: NPI scan counter value. This counter represents number of periodic scan cycle completion.
  • NpiStatusInfo->HbCnt: NPI heartbeat counter value. This counter represents number of scanned descriptor slaves.
  • NpiStatusInfo->ErrInfo: NPI scan error information if SHA mismatch is detected. This is 2 word information.
    • Word 0: Node ID of descriptor for which SHA mismatch is detected
    • Word 1 Bit [15-8]: NPI descriptor index number
    • Word 1 Bit [7-0]: NPI Slave Skip count Index
Returns
This API returns the success or failure.
  • XST_FAILURE: If NULL pointer reference of NpiStatusInfo
  • XST_SUCCESS: On successful read from PMC RAM

References XSemNpiStatus::ErrInfo, XSemNpiStatus::HbCnt, MAX_NPI_ERR_INFO_CNT, MAX_NPI_SLV_SKIP_CNT, PMC_RAM_SEM_NPI_HEARTBEAT_CNT, PMC_RAM_SEM_NPI_SCAN_CNT, PMC_RAM_SEM_NPI_SLVSKIP_CNT0, PMC_RAM_SEM_NPI_STATUS, PMC_RAM_SEM_NPIERR_INFO0, XSemNpiStatus::ScanCnt, XSemNpiStatus::SlvSkipCnt, and XSemNpiStatus::Status.

Referenced by main(), XSem_ApiCheckHbtCount(), and XSem_ApiCheckScanCount().

XStatus XSem_CmdNpiInjectError ( XIpiPsu *  IpiInst,
XSemIpiResp Resp 
)

This function is used to inject SHA error in NPI descriptor list (in the first NPI descriptor) from user application.

    Primarily this function sends an IPI request to PLM to invoke
    SEM NPI ErrorInject, waits for PLM to process the request and
    reads the response message.
Parameters
[in]IpiInstPointer to IPI driver instance
[out]RespStructure Pointer of IPI response
  • Resp->RespMsg1: Acknowledgment ID of NPI error injection(0x10307)
  • Resp->RespMsg2: Status of NPI error injection (0: Success, 1: Failure)
Returns
This API returns the success or failure.
  • XST_FAILURE: On NPI error injection failure
  • XST_SUCCESS: On NPI error injection success
Note
The caller shall invoke this XSem_CmdNpiInjectError function again to correct the injected error in NPI descriptor.

References CMD_NPI_ERRINJECT, XSemIpiResp::RespMsg1, and XSemIpiResp::RespMsg2.

Referenced by main().

XStatus XSem_CmdNpiStartScan ( XIpiPsu *  IpiInst,
XSemIpiResp Resp 
)

This function is used to start NPI scan from user application.

    Primarily this function sends an IPI request to PLM to invoke
    SEM NPI StartScan, waits for PLM to process the request and
    reads the response message.
Parameters
[in]IpiInstPointer to IPI driver instance
[out]RespStructure Pointer of IPI response
  • Resp->RespMsg1: Acknowledgment ID of NPI start scan(0x10305)
  • Resp->RespMsg2: Status of NPI start scan (0: Success, 1: Failure)
Returns
This API returns the success or failure.
  • XST_FAILURE: On NPI start scan failure
  • XST_SUCCESS: On NPI start scan success

References CMD_NPI_STARTSCAN, XSemIpiResp::RespMsg1, and XSemIpiResp::RespMsg2.

Referenced by main().

XStatus XSem_CmdNpiStopScan ( XIpiPsu *  IpiInst,
XSemIpiResp Resp 
)

This function is used to stop NPI scan from user application.

    Primarily this function sends an IPI request to PLM to invoke
    SEM NPI StopScan, waits for PLM to process the request and
    reads the response message.
Parameters
[in]IpiInstPointer to IPI driver instance
[out]RespStructure Pointer of IPI response
  • Resp->RespMsg1: Acknowledgment ID of NPI stop scan(0x10306)
  • Resp->RespMsg2: Status of NPI stop scan (0: Success, 1: Failure)
Returns
This API returns the success or failure.
  • XST_FAILURE: On NPI stop scan failure
  • XST_SUCCESS: On NPI stop scan success

References CMD_NPI_STOPSCAN, XSemIpiResp::RespMsg1, and XSemIpiResp::RespMsg2.

Referenced by main().

XStatus XSem_RegisterEvent ( XIpiPsu *  IpiInst,
XSem_Notifier Notifier 
)

This function is used to register/un-register event notification with XilSEM Server.

    Primarily this function sends an IPI request to PLM to invoke
    SEM Event Notifier registration, waits for PLM to process the
    request and check the status. Since SLR slave devices do not support
    IPI, registering events to mater registers events on all slave SLRs
Parameters
[in]IpiInstPointer to IPI driver instance
[in]NotifierPointer of the notifier object to be associated with the requested notification
  • Notifier->Module: The SEM module from which notification is required
  • Notifier->Event: Event(s) belonging to the Module for which notifications are required
  • Notifier->Flag: Flags to enable or disable notifications
Returns
This API returns the success or failure.
  • XST_FAILURE: On event registration/un-registration failure
  • XST_SUCCESS: On event registration/un-registration success
Note
The caller shall initialize the notifier object before invoking the XSem_RegisterEvent function.

References CMD_EM_EVENT_REGISTER, XSem_Notifier::Event, XSem_Notifier::Flag, and XSem_Notifier::Module.

Referenced by XSem_NpiEventRegisterNotifier().