|
HFCC-01 Low-Level Software (LLSW) Rel_6802_HFCC-01-RP-CSAR-CB
|
#include "core.h"#include "gpioIODevice.h"#include "gpioIODeviceDrv.h"#include "nvsram.h"#include "coreNvsramMap.h"#include "utilHelper.h"#include "mmapCore.h"#include <string.h>Macros | |
| #define | CORE_PLAT_GPIO_2 (11U) |
| #define | CORE_PLAT_GPIO_3 (12U) |
| #define | CORE_PLAT_GPIO_5 (14U) |
| #define | CORE_PLAT_GPIO_6 (17U) |
| #define | CORE_PLAT_GPIO_11 (15U) |
| #define | CORE_MFB1_READY_IO (CORE_PLAT_GPIO_2) |
| #define | CORE_MFB2_READY_IO (CORE_PLAT_GPIO_3) |
| #define | CORE_LED_RED (CORE_PLAT_GPIO_5) |
| #define | CORE_LED_GREEN (CORE_PLAT_GPIO_6) |
| #define | CORE_POWER_FAIL (CORE_PLAT_GPIO_11) |
Functions | |
| static DriverStatus | readCoreReg (const UInt32 baseAddress, const UInt32 offset, UInt32 *data) |
| readCoreReg - Core PCIe read function. | |
| static DriverStatus | writeCoreReg (const UInt32 baseAddress, const UInt32 offset, const UInt32 data) |
| writeCoreReg - Core PCIe write function. | |
| DriverStatus | core_register (const void *gpIODev4, const void *nvsramMR) |
| core_register. | |
| DriverStatus | core_mfbIoInit (void) |
| core_mfbIoInit. | |
| DriverStatus | core_getMfbReadyStatus (const UInt8 mfbIndex, MfbReadyStatus *mfbStatusPtr) |
| core_getMfbReadyStatus. | |
| DriverStatus | core_statusLEDInit (void) |
| core_statusLEDInit. | |
| DriverStatus | core_statusLEDSet (const UInt32 color) |
| core_statusLEDSet. | |
| DriverStatus | core_statusPwrFailInit (void) |
| core_statusPwrFailInit. | |
| DriverStatus | core_statusPwrFailGet (PowerFailState *pwrFailStatusPtr) |
| core_statusPwrFailGet. | |
| DriverStatus | core_cardInfo (const UInt32 baseAddr, CardDetails *cardDetailsPtr) |
| core_cardInfo. | |
| DriverStatus | core_cardStatus (const UInt32 baseAddr, CardStatus *cardStatusPtr) |
| core_cardStatus. | |
| DriverStatus | core_nvsramRead32 (void *const buff, const UInt32 offset) |
| core_nvsramRead32. | |
| DriverStatus | core_nvsramWrite32 (void const *buff, const UInt32 offset) |
| core_nvsramWrite32. | |
| DriverStatus | core_getMemoryRegion (RegionInfo *region) |
| core_getMemoryRegion. | |
| DriverStatus | core_enableDisableHeartbeat (const UInt32 baseAddress, const Bool state) |
| core_enableDisableHeartbeat. | |
| DriverStatus | core_getHeartbeatResolution (const UInt32 baseAddress, UInt32 *resolution) |
| core_getHeartbeatResolution. | |
| DriverStatus | core_setHeartbeatTimeoutCount (const UInt32 baseAddress, const UInt32 count) |
| core_setHeartbeatTimeoutCount. | |
| DriverStatus | core_getHeartbeatElapsedCount (const UInt32 baseAddress, UInt32 *count) |
| core_getHeartbeatElapsedCount. | |
| DriverStatus | core_feedHeartbeat (const UInt32 baseAddress, const UInt32 feedingValue) |
| core_feedHeartbeat. | |
Variables | |
| static RegionInfo | pciDeviceNvsram = { 0 } |
| static void * | ioDevSBCGpioDev4 = 0 |
| static UInt32 | nvsramID = (0xFFU) |
| static Bool | coreInit = FALSE |
| static Bool | mfbIoInit = FALSE |
| static Bool | gpioLEDInit = FALSE |
| static Bool | gpioPwrFailInit = FALSE |
Core File
| #define CORE_LED_GREEN (CORE_PLAT_GPIO_6) |
| #define CORE_LED_RED (CORE_PLAT_GPIO_5) |
| #define CORE_MFB1_READY_IO (CORE_PLAT_GPIO_2) |
| #define CORE_MFB2_READY_IO (CORE_PLAT_GPIO_3) |
| #define CORE_PLAT_GPIO_11 (15U) |
| #define CORE_PLAT_GPIO_2 (11U) |
| #define CORE_PLAT_GPIO_3 (12U) |
| #define CORE_PLAT_GPIO_5 (14U) |
| #define CORE_PLAT_GPIO_6 (17U) |
| #define CORE_POWER_FAIL (CORE_PLAT_GPIO_11) |
| DriverStatus core_cardInfo | ( | const UInt32 | baseAddr, |
| CardDetails * | cardDetailsPtr ) |
core_cardInfo.
Retrieves information about a specific card.
| [in] | baseAddr | The base address of the card to query. |
| [out] | cardDetailsPtr | Pointer to a CardDetails structure to store the retrieved card information. |
| DRV_SUCCESS | : Success. |
| DRV_INVALID_PARAM | : The provided address pointer is invalid. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_CORE_CARDINFO_01 | HLR_IO_31356 | WHEN the pointer cardDetailsPtr is NULL (invalid), the core_cardInfo() function SHALL abort processing and return DRV_INVALID_PARAM. | core.c:core_cardInfo() | Test | Closed |
| LLR_CORE_CORE_CARDINFO_02 | HLR_IO_31356 | WHEN reading any card information register via interDrv_Read32() fails with a status other than INTF_SUCCESS, the core_cardInfo() function SHALL abort processing and return DRV_READ_FAILED. | core.c:core_cardInfo() | Test | Closed |
| LLR_CORE_CORE_CARDINFO_03 | HLR_IO_31356 | WHEN preconditions are satisfied, the core_cardInfo() function SHALL invoke routine interDrv_Read32() to execute target subsystem hardware operation. | core.c:core_cardInfo() | Test | Closed |
| LLR_CORE_CORE_CARDINFO_04 | HLR_IO_31356 | WHEN preconditions are satisfied, the core_cardInfo() function SHALL invoke routine memcpy() to execute target subsystem hardware operation. | core.c:core_cardInfo() | Test | Closed |
| LLR_CORE_CORE_CARDINFO_05 | HLR_IO_31356 | WHEN all operational processing completes successfully, the core_cardInfo() function SHALL return DRV_SUCCESS. | core.c:core_cardInfo() | Test | Closed |
| DriverStatus core_cardStatus | ( | const UInt32 | baseAddr, |
| CardStatus * | cardStatusPtr ) |
core_cardStatus.
Retrieves the status of a specific card.
| [in] | baseAddr | The base address of the card to query. |
| [out] | cardStatusPtr | Pointer to a CardStatus structure to store the retrieved card status. |
| DRV_SUCCESS | : Success. |
| DRV_INVALID_PARAM | : The provided address pointer is invalid. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_CORE_CARDSTATUS_01 | HLR_IO_38196 | WHEN the destination card status pointer is NULL, the core_cardStatus() function SHALL abort processing and return DRV_INVALID_PARAM. | core.c:core_cardStatus() | Test | Closed |
| LLR_CORE_CORE_CARDSTATUS_02 | HLR_IO_38196 | WHEN an internal register 32-bit read transaction fails with a status other than INTF_SUCCESS, the core_cardStatus() function SHALL abort processing and return DRV_READ_FAILED. | core.c:core_cardStatus() | Test | Closed |
| LLR_CORE_CORE_CARDSTATUS_03 | HLR_IO_38196 | WHEN preconditions are satisfied, the core_cardStatus() function SHALL read the FPGA status register (MMAP_CORE_FPGA_STATUS) and populate both the PBIT and CBIT status fields (pbitStatus, cbitStatus). | core.c:core_cardStatus() | Test | Closed |
| LLR_CORE_CORE_CARDSTATUS_04 | HLR_IO_38196 | WHEN the sign bit (bit 11, MMAP_CORE_BRD_TEMP_12_BIT - 1) of the 12-bit board temperature reading is set (1), the core_cardStatus() function SHALL sign-extend the reading by bitwise OR-ing with 0xF000 before assigning to coreTemp. | core.c:core_cardStatus() | Test | Closed |
| LLR_CORE_CORE_CARDSTATUS_05 | HLR_IO_38196 | WHEN preconditions are satisfied, the core_cardStatus() function SHALL read and convert DRAM, FPGA, eFuse, and DC-DC temperatures by scaling each 16-bit masked word with MMAP_CORE_TEMP_LSB. | core.c:core_cardStatus() | Test | Closed |
| LLR_CORE_CORE_CARDSTATUS_06 | HLR_IO_38196 | WHEN all telemetry acquisition completes successfully, the core_cardStatus() function SHALL return DRV_SUCCESS. | core.c:core_cardStatus() | Test | Closed |
| DriverStatus core_enableDisableHeartbeat | ( | const UInt32 | baseAddress, |
| const Bool | state ) |
core_enableDisableHeartbeat.
Enable or disable the heartbeat.
| [in] | baseAddress | The base address of the card to query. |
| [in] | state | The state to set for the heartbeat (TRUE to enable, FALSE to disable). |
| DRV_SUCCESS | : Success. |
| DRV_WRITE_FAILED | : Failed to write to the device or module. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_CORE_ENABLEDISABLEHEARTBEAT_01 | HLR_HBT_43820 | WHEN the enablement state parameter is equal to TRUE, the core_enableDisableHeartbeat() function SHALL write enable command word MMAP_CORE_HBT_ENABLE (0xEEEEEEEE) to the heartbeat enable/disable register (MMAP_CORE_HBT_EN_DIS, offset 0x01B0) using writeCoreReg(). | core.c:core_enableDisableHeartbeat() | Test | Closed |
| LLR_CORE_CORE_ENABLEDISABLEHEARTBEAT_02 | HLR_HBT_43820 | WHEN the enablement state parameter is equal to FALSE, the core_enableDisableHeartbeat() function SHALL write the heartbeat control command word to the heartbeat enable/disable register (MMAP_CORE_HBT_EN_DIS, offset 0x01B0) using writeCoreReg(). | core.c:core_enableDisableHeartbeat() | Test | Closed |
| LLR_CORE_CORE_ENABLEDISABLEHEARTBEAT_03 | HLR_HBT_43820 | WHEN the register write transaction reports a failure status other than DRV_SUCCESS, the core_enableDisableHeartbeat() function SHALL abort processing and return that driver failure status. | core.c:core_enableDisableHeartbeat() | Test | Closed |
| LLR_CORE_CORE_ENABLEDISABLEHEARTBEAT_04 | HLR_HBT_43820 | WHEN the heartbeat register configuration write completes successfully, the core_enableDisableHeartbeat() function SHALL return DRV_SUCCESS. | core.c:core_enableDisableHeartbeat() | Test | Closed |
| DriverStatus core_feedHeartbeat | ( | const UInt32 | baseAddress, |
| const UInt32 | feedingValue ) |
core_feedHeartbeat.
Feed the heartbeat to prevent timeout.
| [in] | baseAddress | The base address of the card to query. |
| [in] | feedingValue | The value to feed to the heartbeat. |
| DRV_SUCCESS | : Success. |
| DRV_WRITE_FAILED | : Failed to write to the device or module. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_CORE_FEEDHEARTBEAT_01 | HLR_HBT_43823 | WHEN a driver operation reports a failure status other than DRV_SUCCESS, the core_feedHeartbeat() function SHALL abort processing and return that driver failure status. | core.c:core_feedHeartbeat() | Test | Closed |
| LLR_CORE_CORE_FEEDHEARTBEAT_02 | HLR_HBT_43823 | WHEN preconditions are satisfied, the core_feedHeartbeat() function SHALL write the Heartbeat Mechanism Based Address (CORE_HBT_FEEDING) at physical offset 0x01C0 (MMAP_CORE_HBT_FEEDING) using writeCoreReg(). | core.c:core_feedHeartbeat() | Test | Closed |
| LLR_CORE_CORE_FEEDHEARTBEAT_03 | HLR_HBT_43823 | WHEN all operational processing completes successfully, the core_feedHeartbeat() function SHALL return DRV_SUCCESS. | core.c:core_feedHeartbeat() | Test | Closed |
| DriverStatus core_getHeartbeatElapsedCount | ( | const UInt32 | baseAddress, |
| UInt32 * | count ) |
core_getHeartbeatElapsedCount.
Get the elapsed heartbeat count.
| [in] | baseAddress | The base address of the card to query. |
| [out] | count | Pointer to a variable to store the retrieved heartbeat elapsed count. |
| DRV_SUCCESS | : Success. |
| DRV_READ_FAILED | : Failed to read from the device or module. |
| DRV_INVALID_PARAM | : The provided address pointer is invalid. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_CORE_GETHEARTBEATELAPSEDCOUNT_01 | HLR_HBT_43822 | WHEN the pointer count is NULL (invalid), the core_getHeartbeatElapsedCount() function SHALL abort processing and return DRV_INVALID_PARAM. | core.c:core_getHeartbeatElapsedCount() | Test | Closed |
| LLR_CORE_CORE_GETHEARTBEATELAPSEDCOUNT_02 | HLR_HBT_43822 | WHEN a driver operation reports a failure status other than DRV_SUCCESS, the core_getHeartbeatElapsedCount() function SHALL abort processing and return that driver failure status. | core.c:core_getHeartbeatElapsedCount() | Test | Closed |
| LLR_CORE_CORE_GETHEARTBEATELAPSEDCOUNT_03 | HLR_HBT_43822 | WHEN preconditions are satisfied, the core_getHeartbeatElapsedCount() function SHALL read the Heartbeat Mechanism Based Address (CORE_HBT_ELAPSED_COUNT) at physical offset 0x01BC (MMAP_CORE_HBT_ELAPSED_COUNT) using readCoreReg(). | core.c:core_getHeartbeatElapsedCount() | Test | Closed |
| LLR_CORE_CORE_GETHEARTBEATELAPSEDCOUNT_04 | HLR_HBT_43822 | WHEN all operational processing completes successfully, the core_getHeartbeatElapsedCount() function SHALL return DRV_SUCCESS. | core.c:core_getHeartbeatElapsedCount() | Test | Closed |
| DriverStatus core_getHeartbeatResolution | ( | const UInt32 | baseAddress, |
| UInt32 * | resolution ) |
core_getHeartbeatResolution.
Get the heartbeat resolution.
| [in] | baseAddress | The base address of the card to query. |
| [out] | resolution | Pointer to a variable to store the retrieved heartbeat resolution. (Resolution is in nanoseconds (ns)) |
| DRV_SUCCESS | : Success. |
| DRV_READ_FAILED | : Failed to read from the device or module. |
| DRV_INVALID_PARAM | : The provided address pointer is invalid. |
| DRV_INVALID_VALUE | : The resolution value is invalid. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_CORE_GETHEARTBEATRESOLUTION_01 | HLR_HBT_43819 | WHEN the pointer resolution is NULL (invalid), the core_getHeartbeatResolution() function SHALL abort processing and return DRV_INVALID_PARAM. | core.c:core_getHeartbeatResolution() | Test | Closed |
| LLR_CORE_CORE_GETHEARTBEATRESOLUTION_02 | HLR_HBT_43819 | WHEN a driver operation reports a failure status other than DRV_SUCCESS, the core_getHeartbeatResolution() function SHALL abort processing and return that driver failure status. | core.c:core_getHeartbeatResolution() | Test | Closed |
| LLR_CORE_CORE_GETHEARTBEATRESOLUTION_03 | HLR_HBT_43819 | WHEN 0 is equal to resolution, the core_getHeartbeatResolution() function SHALL abort processing and return DRV_INVALID_VALUE. | core.c:core_getHeartbeatResolution() | Test | Closed |
| LLR_CORE_CORE_GETHEARTBEATRESOLUTION_04 | HLR_HBT_43819 | WHEN preconditions are satisfied, the core_getHeartbeatResolution() function SHALL read the Heartbeat Mechanism Based Address (CORE_HBT_RESOLUTION) at physical offset 0x01B4 (MMAP_CORE_HBT_RESOLUTION) using readCoreReg(). | core.c:core_getHeartbeatResolution() | Test | Closed |
| LLR_CORE_CORE_GETHEARTBEATRESOLUTION_05 | HLR_HBT_43819 | WHEN all operational processing completes successfully, the core_getHeartbeatResolution() function SHALL return DRV_SUCCESS. | core.c:core_getHeartbeatResolution() | Test | Closed |
| DriverStatus core_getMemoryRegion | ( | RegionInfo * | region | ) |
core_getMemoryRegion.
Get memory region of MFB cards.
| [in] | region | The region of the card. |
| DRV_SUCCESS | : Success. |
| DRV_INVALID_PARAM | : The provided address pointer is invalid. |
| DRV_OPEN_FAILED | : The module is unable to open. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_CORE_GETMEMORYREGION_01 | HLR_MFB_38198 | WHEN the pointer region is NULL (invalid), the core_getMemoryRegion() function SHALL abort processing and return DRV_INVALID_PARAM. | core.c:core_getMemoryRegion() | Test | Closed |
| LLR_CORE_CORE_GETMEMORYREGION_02 | HLR_MFB_38198 | WHEN retrieving memory region addresses or registering the available status memory region via interDrv_setAvailableRegion() fails (reporting a status other than Success), the core_getMemoryRegion() function SHALL abort processing and return DRV_OPEN_FAILED. | core.c:core_getMemoryRegion() | Test | Closed |
| LLR_CORE_CORE_GETMEMORYREGION_03 | HLR_MFB_38198 | WHEN reading the 32-bit memory region status via interDrv_Read32() fails with a status other than INTF_SUCCESS, the core_getMemoryRegion() function SHALL abort processing and return DRV_OPEN_FAILED. | core.c:core_getMemoryRegion() | Test | Closed |
| LLR_CORE_CORE_GETMEMORYREGION_04 | HLR_MFB_38198 | WHEN the endian-converted 32-bit memory region status word is not equal to 0x01 (status not ready), or configuring the available data memory region fails, the core_getMemoryRegion() function SHALL abort processing and return DRV_OPEN_FAILED. | core.c:core_getMemoryRegion() | Test | Closed |
| LLR_CORE_CORE_GETMEMORYREGION_05 | HLR_MFB_38198 | WHEN preconditions are satisfied, the core_getMemoryRegion() function SHALL invoke routine interDrv_memoryRegion_getAddress() to execute target subsystem hardware operation. | core.c:core_getMemoryRegion() | Test | Closed |
| LLR_CORE_CORE_GETMEMORYREGION_06 | HLR_MFB_38198 | WHEN preconditions are satisfied, the core_getMemoryRegion() function SHALL invoke routine interDrv_Read32() to execute target subsystem hardware operation. | core.c:core_getMemoryRegion() | Test | Closed |
| LLR_CORE_CORE_GETMEMORYREGION_07 | HLR_MFB_38198 | WHEN preconditions are satisfied, the core_getMemoryRegion() function SHALL invoke routine interDrv_setAvailableRegion() to execute target subsystem hardware operation. | core.c:core_getMemoryRegion() | Test | Closed |
| LLR_CORE_CORE_GETMEMORYREGION_08 | HLR_MFB_38198 | WHEN all operational processing completes successfully, the core_getMemoryRegion() function SHALL return DRV_SUCCESS. | core.c:core_getMemoryRegion() | Test | Closed |
| DriverStatus core_getMfbReadyStatus | ( | const UInt8 | mfbIndex, |
| MfbReadyStatus * | mfbStatusPtr ) |
core_getMfbReadyStatus.
Get the MFB ready status.
| [in] | mfbIndex | The MFB index. |
| [out] | mfbStatusPtr | Pointer to a MfbReadyStatus structure to store the retrieved |
| DRV_SUCCESS | : Success. |
| DRV_READ_FAILED | : Failed to read from the device or module. |
| DRV_INVALID_PARAM | : The mfbStatusPtr memory region is invalid. |
| DRV_INVALID_DEVICE | : The GPIO device is invalid. |
| DRV_NOT_INITIALIZED | : The GPIO is not initialized. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_CORE_GETMFBREADYSTATUS_01 | HLR_MFB_31353 | WHEN the MFB GPIO subsystem is not initialized, the core_getMfbReadyStatus() function SHALL abort processing and return DRV_NOT_INITIALIZED. | core.c:core_getMfbReadyStatus() | Test | Closed |
| LLR_CORE_CORE_GETMFBREADYSTATUS_02 | HLR_MFB_31353 | WHEN the pointer mfbStatusPtr is NULL (invalid), the core_getMfbReadyStatus() function SHALL abort processing and return DRV_INVALID_PARAM. | core.c:core_getMfbReadyStatus() | Test | Closed |
| LLR_CORE_CORE_GETMFBREADYSTATUS_03 | HLR_MFB_31353 | WHEN mfbIndex is equal to CORE_MFB1_INDEX, the core_getMfbReadyStatus() function SHALL read the MFB1 hardware ready line using gpioIODeviceDrv_read() at pin CORE_MFB1_READY_IO. | core.c:core_getMfbReadyStatus() | Test | Closed |
| LLR_CORE_CORE_GETMFBREADYSTATUS_04 | HLR_MFB_31353 | WHEN mfbIndex is equal to CORE_MFB2_INDEX, the core_getMfbReadyStatus() function SHALL read the MFB2 hardware ready line using gpioIODeviceDrv_read() at pin CORE_MFB2_READY_IO. | core.c:core_getMfbReadyStatus() | Test | Closed |
| LLR_CORE_CORE_GETMFBREADYSTATUS_05 | HLR_MFB_31353 | WHEN mfbIndex is neither CORE_MFB1_INDEX nor CORE_MFB2_INDEX, the core_getMfbReadyStatus() function SHALL abort processing and return DRV_INVALID_DEVICE. | core.c:core_getMfbReadyStatus() | Test | Closed |
| LLR_CORE_CORE_GETMFBREADYSTATUS_06 | HLR_MFB_31353 | WHEN the sampled GPIO pin state is NXPGPIO_HIGH, the core_getMfbReadyStatus() function SHALL record *mfbStatusPtr as MFB_READY. | core.c:core_getMfbReadyStatus() | Test | Closed |
| LLR_CORE_CORE_GETMFBREADYSTATUS_07 | HLR_MFB_31353 | WHEN the sampled GPIO pin state is not NXPGPIO_HIGH, the core_getMfbReadyStatus() function SHALL record *mfbStatusPtr as MFB_NOT_READY. | core.c:core_getMfbReadyStatus() | Test | Closed |
| LLR_CORE_CORE_GETMFBREADYSTATUS_08 | HLR_MFB_31353 | WHEN all operational processing completes successfully, the core_getMfbReadyStatus() function SHALL return DRV_SUCCESS. | core.c:core_getMfbReadyStatus() | Test | Closed |
| DriverStatus core_mfbIoInit | ( | void | ) |
core_mfbIoInit.
Initializes the GPIO device.
| DRV_SUCCESS | : Success. |
| DRV_WRITE_FAILED | : Failed to write to the device or module. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_CORE_MFBIOINIT_01 | HLR_MFB_38198 | WHEN the driver status is not equal to DRIVER_SUCCESS, the core_mfbIoInit() function SHALL abort processing and return DRV_WRITE_FAILED. | core.c:core_mfbIoInit() | Test | Closed |
| LLR_CORE_CORE_MFBIOINIT_02 | HLR_MFB_38198 | WHEN preconditions are satisfied, the core_mfbIoInit() function SHALL invoke routine gpioIODeviceDrv_setDirection() to execute target subsystem hardware operation. | core.c:core_mfbIoInit() | Test | Closed |
| LLR_CORE_CORE_MFBIOINIT_03 | HLR_MFB_38198 | WHEN all operational processing completes successfully, the core_mfbIoInit() function SHALL return DRV_SUCCESS. | core.c:core_mfbIoInit() | Test | Closed |
| DriverStatus core_nvsramRead32 | ( | void *const | buff, |
| const UInt32 | offset ) |
core_nvsramRead32.
Reads a 32-bit value from the specified address offset in NVSRAM.
| [in] | offset | The offset address of the card to query. |
| [out] | buff | Pointer to a variable to store the retrieved 32-bit data. |
| DRV_SUCCESS | : Success. |
| DRV_OPEN_FAILED | The module is unable to open. |
| DRV_READ_FAILED | : Failed to read from the device or module. |
| DRV_INVALID_PARAM | : The provided address pointer is invalid. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_CORE_NVSRAMREAD32_01 | HLR_MFB_31353 | WHEN the buffer pointer buff is NULL (invalid), the core_nvsramRead32() function SHALL abort processing and return DRV_INVALID_PARAM. | core.c:core_nvsramRead32() | Test | Closed |
| LLR_CORE_CORE_NVSRAMREAD32_02 | HLR_MFB_31353 | WHEN the NVSRAM device is not open (invalid device handle), the core_nvsramRead32() function SHALL abort processing and return DRV_OPEN_FAILED. | core.c:core_nvsramRead32() | Test | Closed |
| LLR_CORE_CORE_NVSRAMREAD32_03 | HLR_MFB_31353 | WHEN reading from NVSRAM via nvsram_read() fails (status not equal to DRIVER_SUCCESS), the core_nvsramRead32() function SHALL abort processing and return DRV_READ_FAILED. | core.c:core_nvsramRead32() | Test | Closed |
| LLR_CORE_CORE_NVSRAMREAD32_04 | HLR_MFB_31353 | WHEN preconditions are satisfied, the core_nvsramRead32() function SHALL read a 32-bit word from NVSRAM offset offset into destination buffer buff using nvsram_read(). | core.c:core_nvsramRead32() | Test | Closed |
| LLR_CORE_CORE_NVSRAMREAD32_05 | HLR_MFB_31353 | WHEN all operational processing completes successfully, the core_nvsramRead32() function SHALL return DRV_SUCCESS. | core.c:core_nvsramRead32() | Test | Closed |
| DriverStatus core_nvsramWrite32 | ( | void const * | buff, |
| const UInt32 | offset ) |
core_nvsramWrite32.
Write a 32-bit value to the specified address offset in NVSRAM.
| [in] | offset | The offset address of the card to query. |
| [in] | buff | Pointer to the 32-bit data to be written to NVSRAM. |
| DRV_SUCCESS | : Success. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_CORE_NVSRAMWRITE32_01 | HLR_MFB_31353 | WHEN the buffer pointer buff is NULL (invalid), the core_nvsramWrite32() function SHALL abort processing and return DRV_INVALID_PARAM. | core.c:core_nvsramWrite32() | Test | Closed |
| LLR_CORE_CORE_NVSRAMWRITE32_02 | HLR_MFB_31353 | WHEN the NVSRAM device is not open (invalid device handle), the core_nvsramWrite32() function SHALL abort processing and return DRV_OPEN_FAILED. | core.c:core_nvsramWrite32() | Test | Closed |
| LLR_CORE_CORE_NVSRAMWRITE32_03 | HLR_MFB_31353 | WHEN writing to NVSRAM via nvsram_write() fails (status not equal to DRIVER_SUCCESS), the core_nvsramWrite32() function SHALL abort processing and return DRV_WRITE_FAILED. | core.c:core_nvsramWrite32() | Test | Closed |
| LLR_CORE_CORE_NVSRAMWRITE32_04 | HLR_MFB_31353 | WHEN preconditions are satisfied, the core_nvsramWrite32() function SHALL write a 32-bit word from source buffer buff to NVSRAM offset offset using nvsram_write(). | core.c:core_nvsramWrite32() | Test | Closed |
| LLR_CORE_CORE_NVSRAMWRITE32_05 | HLR_MFB_31353 | WHEN all operational processing completes successfully, the core_nvsramWrite32() function SHALL return DRV_SUCCESS. | core.c:core_nvsramWrite32() | Test | Closed |
| DriverStatus core_register | ( | const void * | gpIODev4, |
| const void * | nvsramMR ) |
core_register.
Initializes the GPIO device and NVSRAM memory region.
| [in] | gpIODev4 | The GPIO device number to initialize. |
| [in] | nvsramMR | The NVSRAM memory region to initialize. |
| DRV_SUCCESS | : Success. |
| DRV_INVALID_DEVICE | : The gpIODev4 device is invalid. |
| DRV_INVALID_PARAM | : The nvsramMR memory region is invalid. |
| DRV_OPEN_FAILED | : Failed to initialize NVSRAM. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_CORE_REGISTER_01 | HLR_MFB_38198 | WHEN the pointer gpIODev4 is NULL (invalid), the core_register() function SHALL abort processing and return DRV_INVALID_DEVICE. | core.c:core_register() | Test | Closed |
| LLR_CORE_CORE_REGISTER_02 | HLR_MFB_38198 | WHEN the pointer nvsramMR is NULL (invalid), the core_register() function SHALL abort processing and return DRV_INVALID_PARAM. | core.c:core_register() | Test | Closed |
| LLR_CORE_CORE_REGISTER_03 | HLR_MFB_38198 | WHEN interDrv_memoryRegion_getAddress(&pciDeviceNvsram) == Success, the core_register() function SHALL abort processing and return DRV_OPEN_FAILED. | core.c:core_register() | Test | Closed |
| LLR_CORE_CORE_REGISTER_04 | HLR_MFB_38198 | WHEN preconditions are satisfied, the core_register() function SHALL invoke routine nvsram_init() to execute target subsystem hardware operation. | core.c:core_register() | Test | Closed |
| LLR_CORE_CORE_REGISTER_05 | HLR_MFB_38198 | WHEN all operational processing completes successfully, the core_register() function SHALL return DRV_SUCCESS. | core.c:core_register() | Test | Closed |
| DriverStatus core_setHeartbeatTimeoutCount | ( | const UInt32 | baseAddress, |
| const UInt32 | count ) |
core_setHeartbeatTimeoutCount.
Set the heartbeat timeout count.
| [in] | baseAddress | The base address of the card to query. |
| [in] | count | The heartbeat timeout count to set. |
| DRV_SUCCESS | : Success. |
| DRV_WRITE_FAILED | : Failed to write to the device or module. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_CORE_SETHEARTBEATTIMEOUTCOUNT_01 | HLR_HBT_43819 | WHEN a driver operation reports a failure status other than DRV_SUCCESS, the core_setHeartbeatTimeoutCount() function SHALL abort processing and return that driver failure status. | core.c:core_setHeartbeatTimeoutCount() | Test | Closed |
| LLR_CORE_CORE_SETHEARTBEATTIMEOUTCOUNT_02 | HLR_HBT_43819 | WHEN preconditions are satisfied, the core_setHeartbeatTimeoutCount() function SHALL write the Heartbeat Mechanism Based Address (CORE_HBT_TIMEOUT_COUNT) at physical offset 0x01B8 (MMAP_CORE_HBT_TIMEOUT_COUNT) using writeCoreReg(). | core.c:core_setHeartbeatTimeoutCount() | Test | Closed |
| LLR_CORE_CORE_SETHEARTBEATTIMEOUTCOUNT_03 | HLR_HBT_43819 | WHEN all operational processing completes successfully, the core_setHeartbeatTimeoutCount() function SHALL return DRV_SUCCESS. | core.c:core_setHeartbeatTimeoutCount() | Test | Closed |
| DriverStatus core_statusLEDInit | ( | void | ) |
core_statusLEDInit.
Initializes the status LED functionality. core_register() must be configured before calling this function.
| DRV_SUCCESS | : Success. |
| DRV_NOT_INITIALIZED | : The GPIO is not initialized. |
| DRV_WRITE_FAILED | : Failed to write to the device or module. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_CORE_STATUSLEDINIT_01 | HLR_IO_31289 | WHEN the core driver subsystem is not initialized, the core_statusLEDInit() function SHALL abort processing and return DRV_NOT_INITIALIZED. | core.c:core_statusLEDInit() | Test | Closed |
| LLR_CORE_CORE_STATUSLEDINIT_02 | HLR_IO_31289 | WHEN the core driver subsystem is initialized, the core_statusLEDInit() function SHALL configure GPIO pins CORE_STATUS_LED_RED and CORE_STATUS_LED_GREEN as outputs using gpioIODeviceDrv_setDirection(). | core.c:core_statusLEDInit() | Test | Closed |
| LLR_CORE_CORE_STATUSLEDINIT_03 | HLR_IO_31289 | WHEN writing the initial logic low state to the red status LED (CORE_STATUS_LED_RED) fails (driver write status not equal to DRIVER_SUCCESS), the core_statusLEDInit() function SHALL abort processing and return DRV_WRITE_FAILED. | core.c:core_statusLEDInit() | Test | Closed |
| LLR_CORE_CORE_STATUSLEDINIT_04 | HLR_IO_31289 | WHEN writing the initial logic low state to the green status LED (CORE_STATUS_LED_GREEN) fails (driver write status not equal to DRIVER_SUCCESS), the core_statusLEDInit() function SHALL abort processing and return DRV_WRITE_FAILED. | core.c:core_statusLEDInit() | Test | Closed |
| LLR_CORE_CORE_STATUSLEDINIT_05 | HLR_IO_31289 | WHEN both status LEDs are configured and initialized successfully, the core_statusLEDInit() function SHALL return DRV_SUCCESS. | core.c:core_statusLEDInit() | Test | Closed |
| DriverStatus core_statusLEDSet | ( | const UInt32 | color | ) |
core_statusLEDSet.
Configures the status LED to display the specified color. core_statusLEDInit() must be called before calling this function.
| [in] | color | The color to set for the status LED. |
| DRV_SUCCESS | : Success. |
| DRV_NOT_INITIALIZED | : The LED GPIO is not initialized. |
| DRV_WRITE_FAILED | : Failed to write to the device or module. |
| DRV_INVALID_CONFIG | : Invalid color configuration. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_CORE_STATUSLEDSET_01 | HLR_IO_31289 | WHEN gpioLEDInit is equal to FALSE, the core_statusLEDSet() function SHALL abort processing and return DRV_NOT_INITIALIZED. | core.c:core_statusLEDSet() | Test | Closed |
| LLR_CORE_CORE_STATUSLEDSET_02 | HLR_IO_31289 | WHEN CORE_LED_COLOR_RED is equal to color, the core_statusLEDSet() function SHALL abort processing and return DRV_WRITE_FAILED. | core.c:core_statusLEDSet() | Test | Closed |
| LLR_CORE_CORE_STATUSLEDSET_03 | HLR_IO_31289 | WHEN CORE_LED_COLOR_GREEN is equal to color, the core_statusLEDSet() function SHALL abort processing and return DRV_WRITE_FAILED. | core.c:core_statusLEDSet() | Test | Closed |
| LLR_CORE_CORE_STATUSLEDSET_04 | HLR_IO_31289 | WHEN CORE_LED_COLOR_YELLOW is equal to color, the core_statusLEDSet() function SHALL abort processing and return DRV_WRITE_FAILED. | core.c:core_statusLEDSet() | Test | Closed |
| LLR_CORE_CORE_STATUSLEDSET_05 | HLR_IO_31289 | WHEN CORE_LED_COLOR_OFF is equal to color, the core_statusLEDSet() function SHALL abort processing and return DRV_WRITE_FAILED. | core.c:core_statusLEDSet() | Test | Closed |
| LLR_CORE_CORE_STATUSLEDSET_06 | HLR_IO_31289 | WHEN preconditions are satisfied, the core_statusLEDSet() function SHALL invoke routine gpioIODeviceDrv_write() to execute target subsystem hardware operation. | core.c:core_statusLEDSet() | Test | Closed |
| LLR_CORE_CORE_STATUSLEDSET_07 | HLR_IO_31289 | WHEN all operational processing completes successfully, the core_statusLEDSet() function SHALL return DRV_SUCCESS. | core.c:core_statusLEDSet() | Test | Closed |
| DriverStatus core_statusPwrFailGet | ( | PowerFailState * | pwrFailStatusPtr | ) |
core_statusPwrFailGet.
Get the Power Fail status from the PSU interrupt signal. core_statusPwrFailInit() must be called before calling this function.
| [out] | pwrFailStatusPtr | Pointer for power fail status. |
| DRV_SUCCESS | : Success. |
| DRV_READ_FAILED | : Failed to read from the device or module. |
| DRV_INVALID_PARAM | : The provided address pointer is invalid. |
| DRV_INVALID_CONFIG | : The GPIO is not initialized. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_CORE_STATUSPWRFAILGET_01 | HLR_MFB_38198 | WHEN the pointer pwrFailStatusPtr is NULL (invalid), the core_statusPwrFailGet() function SHALL abort processing and return DRV_INVALID_PARAM. | core.c:core_statusPwrFailGet() | Test | Closed |
| LLR_CORE_CORE_STATUSPWRFAILGET_02 | HLR_MFB_38198 | WHEN gpioPwrFailInit is equal to FALSE, the core_statusPwrFailGet() function SHALL abort processing and return DRV_INVALID_CONFIG. | core.c:core_statusPwrFailGet() | Test | Closed |
| LLR_CORE_CORE_STATUSPWRFAILGET_03 | HLR_MFB_38198 | WHEN reading the GPIO power-fail status via gpioIODeviceDrv_read() reports a status other than DRIVER_SUCCESS, the core_statusPwrFailGet() function SHALL abort processing and return DRV_READ_FAILED. | core.c:core_statusPwrFailGet() | Test | Closed |
| LLR_CORE_CORE_STATUSPWRFAILGET_04 | HLR_MFB_38198 | WHEN preconditions are satisfied, the core_statusPwrFailGet() function SHALL invoke routine gpioIODeviceDrv_read() to execute target subsystem hardware operation. | core.c:core_statusPwrFailGet() | Test | Closed |
| LLR_CORE_CORE_STATUSPWRFAILGET_05 | HLR_MFB_38198 | WHEN all operational processing completes successfully, the core_statusPwrFailGet() function SHALL return DRV_SUCCESS. | core.c:core_statusPwrFailGet() | Test | Closed |
| DriverStatus core_statusPwrFailInit | ( | void | ) |
core_statusPwrFailInit.
Initialize the power fail monitor. core_register() must be configured before calling this function.
| DRV_SUCCESS | : Success. |
| DRV_NOT_INITIALIZED | : The GPIO is not initialized. |
| DRV_OPEN_FAILED | : The module is unable to open. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_CORE_STATUSPWRFAILINIT_01 | HLR_MFB_38198 | WHEN coreInit is equal to FALSE, the core_statusPwrFailInit() function SHALL abort processing and return DRV_NOT_INITIALIZED. | core.c:core_statusPwrFailInit() | Test | Closed |
| LLR_CORE_CORE_STATUSPWRFAILINIT_02 | HLR_MFB_38198 | WHEN configuring the GPIO power-fail direction via gpioIODeviceDrv_setDirection() reports a status other than DRIVER_SUCCESS, the core_statusPwrFailInit() function SHALL abort processing and return DRV_OPEN_FAILED. | core.c:core_statusPwrFailInit() | Test | Closed |
| LLR_CORE_CORE_STATUSPWRFAILINIT_03 | HLR_MFB_38198 | WHEN preconditions are satisfied, the core_statusPwrFailInit() function SHALL invoke routine gpioIODeviceDrv_setDirection() to execute target subsystem hardware operation. | core.c:core_statusPwrFailInit() | Test | Closed |
| LLR_CORE_CORE_STATUSPWRFAILINIT_04 | HLR_MFB_38198 | WHEN all operational processing completes successfully, the core_statusPwrFailInit() function SHALL return DRV_SUCCESS. | core.c:core_statusPwrFailInit() | Test | Closed |
|
static |
readCoreReg - Core PCIe read function.
| [in] | baseAddress | The base address of the module and device. |
| [in] | offset | The offset address from module base address. |
| [out] | data | 32bit data to read from PCIe. |
| DRV_SUCCESS | : Success. |
| DRV_READ_FAILED | : PCIe failed to read value. |
| DRV_INVALID_PARAM | : The provided address pointer is invalid. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_READCOREREG_01 | HLR_IO_31289 | WHEN the pointer data is NULL (invalid), the readCoreReg() function SHALL abort processing and return DRV_INVALID_PARAM. | core.c:readCoreReg() | Test | Closed |
| LLR_CORE_READCOREREG_02 | HLR_IO_31289 | WHEN the pointer data is valid, the readCoreReg() function SHALL read a 32-bit register value from physical memory address (baseAddress + addrOffset) into *data using PCIe primitive interDrv_Read32(). | core.c:readCoreReg() | Test | Closed |
| LLR_CORE_READCOREREG_03 | HLR_IO_31289 | WHEN memory access via interDrv_Read32() fails (status not equal to INTF_SUCCESS), the readCoreReg() function SHALL abort processing and return DRV_READ_FAILED. | core.c:readCoreReg() | Test | Closed |
| LLR_CORE_READCOREREG_04 | HLR_IO_31289 | WHEN all operational processing completes successfully, the readCoreReg() function SHALL return DRV_SUCCESS. | core.c:readCoreReg() | Test | Closed |
|
static |
writeCoreReg - Core PCIe write function.
| [in] | baseAddress | The base address of the module and device. |
| [in] | offset | The offset address from module base address. |
| [in] | data | 32bit data to write to PCIe. |
| DRV_SUCCESS | : Success. |
| DRV_WRITE_FAILED | : PCIe failed to write value. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_CORE_WRITECOREREG_01 | HLR_IO_31289 | WHEN invoked, the writeCoreReg() function SHALL write the 32-bit word data to physical memory address (baseAddress + addrOffset) using PCIe primitive interDrv_Write32(). | core.c:writeCoreReg() | Test | Closed |
| LLR_CORE_WRITECOREREG_02 | HLR_IO_31289 | WHEN memory access via interDrv_Write32() fails (status not equal to INTF_SUCCESS), the writeCoreReg() function SHALL abort processing and return DRV_WRITE_FAILED. | core.c:writeCoreReg() | Test | Closed |
| LLR_CORE_WRITECOREREG_03 | HLR_IO_31289 | WHEN all operational processing completes successfully, the writeCoreReg() function SHALL return DRV_SUCCESS. | core.c:writeCoreReg() | Test | Closed |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |