CmdPFSD#

Fully qualified name: cupva::CmdPFSD

Defined in src/host/cpp_api/include/cupva_host.hpp

class CmdPFSD : public cupva::BaseCmd#

Command to submit a permanent fault software diagnostic to a VPU.

This object may be used to submit a pre-defined permanent fault software diagnostic application to the PVA engine. The PFSD obeys the same scheduling rules as CmdProgram, including respecting barriers, fence waits, fence signals, status buffers etc.

The PFSD application will execute a series of tasks on the hardware and record the result in a CRC checksum. If this checksum does not match the pre-defined expected value, the CheckCommandStatus() will return PFSDChecksumMismatch.

CheckCommandStatus() will return PFSDTimeout error if the execution of the PFSD task is not completed within the timeout duration. PFSD task execution timeout duration is set internally and different from the the command(s) execution timeout, cupva::Stream::submit() executionTimeout parameter. User may still set the executionTimeout value while submitting PFSD command(s) to a stream.

A platform may support multiple different PFSD applications. Each should be identified by an integer starting at zero. Refer to platform documentation for information about supported PFSD applications, including expected runtime of each.

Public Functions

CmdPFSD() noexcept#

Construct a default object of CmdPFSD.

Resulting object cannot be used but may be moved to.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: No

  • API group

    • Init: Yes

    • Runtime: No

    • De-Init: No

CmdPFSD(CmdPFSD &&obj) noexcept#

Move constructor.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: No

  • API group

    • Init: No

    • Runtime: Yes

    • De-Init: No

CmdPFSD &operator=(CmdPFSD &&obj) & noexcept#

Move assignment.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: No

  • API group

    • Init: No

    • Runtime: Yes

    • De-Init: No

CmdPFSD(CmdPFSD const&) = delete#
CmdPFSD &operator=(CmdPFSD const&) & = delete#
~CmdPFSD() noexcept#

Destroy the CmdPFSD object.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: No

  • API group

    • Init: No

    • Runtime: No

    • De-Init: Yes

void finalize()#

Destroy the resources created by a BaseCmd object.

This method is exposed to allow fine-grained control over error handling.

During destruction of the object, this method will be called but the destructor must not propagate exceptions. To handle exceptions, manually invoke this method prior to object destruction.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: No

  • API group

    • Init: No

    • Runtime: No

    • De-Init: Yes

Throws:
  • cupva::Exception(DriverAPIError) – if driver returns error during de-initialization of mapped/pinned memory

  • cupva::Exception(NotAllowedInOperationalState) – if called when NVIDIA DRIVE OS VM state is “Operational”

Public Static Functions

static uint32_t GetPFSDTestCount()#

Get the count of supported PFSD tests.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: Yes

  • API group

    • Init: Yes

    • Runtime: No

    • De-Init: No

Throws:

cupva::Exception(NotAllowedInOperationalState) – if current context is null and default context does not exist and NVIDIA DRIVE OS VM state is “Operational”

Returns:

Count of supported PFSD tests.

static CmdPFSD Create(uint32_t const pfsdTestId)#

Construct a new PFSD command.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: Yes

  • API group

    • Init: Yes

    • Runtime: No

    • De-Init: No

Parameters:

pfsdTestId – Zero-based integer specifying the PFSD index. Refer to platform documentation for supported PFSD indices and details.

Throws:
  • cupva::Exception(DriverAPIError) – if the PVA hardware does not support PFSD.

  • cupva::Exception(DriverAPIError) – if the operating system does not support PFSD.

  • cupva::Exception(InvalidArgument) – if the PFSD test index is not supported

  • std::bad_alloc – if memory cannot be allocated for this operation

  • cupva::Exception(NotAllowedInOperationalState) – if called when NVIDIA DRIVE OS VM state is “Operational”

Returns:

Allocated CmdPFSD object