|
HFCC-01 Low-Level Software (LLSW) Rel_6802_HFCC-01-RP-CSAR-CB
|
Data Structures | |
| struct | interDrvMemoryRegionAddr |
| Memory Region Start and End Boundary Address Range Structure. More... | |
Macros | |
| #define | INTER_DRV_MEM_REG_SIZE (10U) |
| #define | INTER_DRV_U32_SIZE (4U) |
Functions | |
| static Bool | interDrv_isAddressValid (const Address addr, const UInt8 size) |
| interDrv_isAddressValid. | |
| static Bool | interDrv_registerAvailableRegion (const Address start, const Address end) |
| interDrv_registerAvailableRegion - Registers a new available memory region if it doesn't already exist or overlap. | |
| static Bool | interDrv_isRegionRegistered (const Address start, const Address end) |
| interDrv_isRegionRegistered. | |
| Error | interDrv_memoryRegion_getAddress (RegionInfo *region) |
| interDrv_memoryRegion_getAddress. | |
| Error | interDrv_setAvailableRegion (const void *memRegion) |
| interDrv_setAvailableRegion. | |
| InterStatus | interDrv_Read32 (const Address addr, UInt32 *data) |
| interDrv_Read32. | |
| InterStatus | interDrv_Write32 (const Address addr, const UInt32 data) |
| interDrv_Write32. | |
Variables | |
| static interDrvMemoryRegionAddr | availableAddr [(10U)] |
| static UInt8 | addrIndex = 0 |
Interface Driver File
| #define INTER_DRV_MEM_REG_SIZE (10U) |
| #define INTER_DRV_U32_SIZE (4U) |
|
static |
interDrv_isAddressValid.
Checks if the given address is within any available memory region for the specified data size.
| [in] | addr | The address to validate. |
| [in] | size | The size of the data to be read (1, 2, or 4 bytes). |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_INTERDRV_INTERDRV_ISADDRESSVALID_01 | HLR_IO_36773 | WHEN the target memory address addr along with access payload size falls entirely within the boundaries of any registered memory region in availableAddr, the interDrv_isAddressValid() function SHALL return TRUE. | interDrv.c:interDrv_isAddressValid() | Test | Closed |
| LLR_INTERDRV_INTERDRV_ISADDRESSVALID_02 | HLR_IO_36773 | WHEN the target memory address addr along with access payload size exceeds the bounds of all registered memory regions or no regions are registered, the interDrv_isAddressValid() function SHALL return FALSE. | interDrv.c:interDrv_isAddressValid() | Test | Closed |
|
static |
interDrv_isRegionRegistered.
Checks if a given region overlaps or is identical to any existing region.
| start | Start address of the region. |
| end | End address of the region. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_INTERDRV_INTERDRV_ISREGIONREGISTERED_01 | HLR_IO_36773 | WHEN the specified memory region boundaries [start, end] overlap or coincide with any previously registered region in availableAddr, the interDrv_isRegionRegistered() function SHALL return TRUE. | interDrv.c:interDrv_isRegionRegistered() | Test | Closed |
| LLR_INTERDRV_INTERDRV_ISREGIONREGISTERED_02 | HLR_IO_36773 | WHEN the specified memory region boundaries [start, end] do not overlap with any previously registered region, the interDrv_isRegionRegistered() function SHALL return FALSE. | interDrv.c:interDrv_isRegionRegistered() | Test | Closed |
| Error interDrv_memoryRegion_getAddress | ( | RegionInfo * | region | ) |
interDrv_memoryRegion_getAddress.
Retrieves the memory region address.
| [out] | region | Pointer to a RegionInfo structure to store the retrieved address. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_INTERDRV_INTERDRV_MEMORYREGION_GETADDRESS_01 | HLR_IO_36773 | WHEN retrieving the memory region addresses via GetMemoryRegionAddresses() for region->memoryRegion succeeds, the interDrv_memoryRegion_getAddress() function SHALL calculate and store the base address offset into region->baseAddr. | interDrv.c:interDrv_memoryRegion_getAddress() | Test | Closed |
| LLR_INTERDRV_INTERDRV_MEMORYREGION_GETADDRESS_02 | HLR_IO_36773 | WHEN retrieving the memory region addresses via GetMemoryRegionAddresses() fails, the interDrv_memoryRegion_getAddress() function SHALL abort processing and return that driver failure status. | interDrv.c:interDrv_memoryRegion_getAddress() | Test | Closed |
| LLR_INTERDRV_INTERDRV_MEMORYREGION_GETADDRESS_03 | HLR_IO_36773 | WHEN region->hasMRStatus is equal to TRUE, the interDrv_memoryRegion_getAddress() function SHALL retrieve the status memory region address via GetMemoryRegionAddresses(), storing the address on success or returning that driver failure status on failure. | interDrv.c:interDrv_memoryRegion_getAddress() | Test | Closed |
| LLR_INTERDRV_INTERDRV_MEMORYREGION_GETADDRESS_04 | HLR_IO_36773 | WHEN all operational memory address mapping completes successfully, the interDrv_memoryRegion_getAddress() function SHALL return Success. | interDrv.c:interDrv_memoryRegion_getAddress() | Test | Closed |
| InterStatus interDrv_Read32 | ( | const Address | address, |
| UInt32 * | data ) |
interDrv_Read32.
Reads 32-bit of data from the specified address.
| [in] | address | The address from which the data is to be read. |
| [out] | data | Pointer to store the read data. |
| INTF_SUCCESS | : Success. |
| ERR_MMAP_FAIL_TO_MAP | : Unable to read to a certain register. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_INTERDRV_INTERDRV_READ32_01 | HLR_IO_36773 | WHEN memory region validation fails (interDrv_isRegionRegistered() returns FALSE), the interDrv_Read32() function SHALL abort processing and return DRV_INVALID_PARAM. | interDrv.c:interDrv_Read32() | Test | Closed |
| LLR_INTERDRV_INTERDRV_READ32_02 | HLR_IO_36773 | WHEN address offset boundary validation fails (interDrv_isAddressValid() returns FALSE), the interDrv_Read32() function SHALL abort processing and return DRV_INVALID_PARAM. | interDrv.c:interDrv_Read32() | Test | Closed |
| LLR_INTERDRV_INTERDRV_READ32_03 | HLR_IO_36773 | WHEN memory region and offset validation pass, the interDrv_Read32() function SHALL read and return the 32-bit value at effective address (regionBaseAddress + offset) via memoryMap_Read32(). | interDrv.c:interDrv_Read32() | Test | Closed |
|
static |
interDrv_registerAvailableRegion - Registers a new available memory region if it doesn't already exist or overlap.
| [in] | start | Start address of the region. |
| [in] | end | End address of the region. |
| TRUE | : The memory region was successfully registered or is already registered. |
| FALSE | : Address table is full and no space remains to register the region. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_INTERDRV_INTERDRV_REGISTERAVAILABLEREGION_01 | HLR_IO_36773 | WHEN the target memory region identifier is invalid (regionIndex >= MAX_REGIONS), the interDrv_registerAvailableRegion() function SHALL abort processing and return DRV_INVALID_PARAM. | interDrv.c:interDrv_registerAvailableRegion() | Test | Closed |
| LLR_INTERDRV_INTERDRV_REGISTERAVAILABLEREGION_02 | HLR_IO_36773 | WHEN memory region regionIndex is valid, the interDrv_registerAvailableRegion() function SHALL record base address baseAddr and size size into the internal driver region registry table. | interDrv.c:interDrv_registerAvailableRegion() | Test | Closed |
| LLR_INTERDRV_INTERDRV_REGISTERAVAILABLEREGION_03 | HLR_IO_36773 | WHEN registration completes successfully, the interDrv_registerAvailableRegion() function SHALL mark region regionIndex as registered and return DRV_SUCCESS. | interDrv.c:interDrv_registerAvailableRegion() | Test | Closed |
| Error interDrv_setAvailableRegion | ( | const void * | memRegion | ) |
interDrv_setAvailableRegion.
Set the available memory region.
| [in] | memRegion | The memory region object. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_INTERDRV_INTERDRV_SETAVAILABLEREGION_01 | HLR_IO_36773 | WHEN registering the retrieved memory region address boundaries via interDrv_registerAvailableRegion() fails, the interDrv_setAvailableRegion() function SHALL abort processing and return Failure. | interDrv.c:interDrv_setAvailableRegion() | Test | Closed |
| LLR_INTERDRV_INTERDRV_SETAVAILABLEREGION_02 | HLR_IO_36773 | WHEN retrieving memory region addresses via GetMemoryRegionAddresses() fails, the interDrv_setAvailableRegion() function SHALL abort processing and return that driver failure status. | interDrv.c:interDrv_setAvailableRegion() | Test | Closed |
| LLR_INTERDRV_INTERDRV_SETAVAILABLEREGION_03 | HLR_IO_36773 | WHEN all operational address retrieval and memory region registration steps complete successfully, the interDrv_setAvailableRegion() function SHALL return Success. | interDrv.c:interDrv_setAvailableRegion() | Test | Closed |
| InterStatus interDrv_Write32 | ( | const Address | address, |
| const UInt32 | data ) |
interDrv_Write32.
Write 32-bit of data to the specified address.
| [in] | address | The address to which the data will be written. |
| [in] | data | The 32-bit data to write. |
| INTF_SUCCESS | : Success. |
| ERR_MMAP_FAIL_TO_MAP | : Unable to write to a certain register. |
| Requirement ID | Parent HLR ID | Detailed Low-Level Requirement Statement (EARS Format) | Software Unit Reference | Verification Method | Status |
|---|---|---|---|---|---|
| LLR_INTERDRV_INTERDRV_WRITE32_01 | HLR_IO_36773 | WHEN memory region validation fails (interDrv_isRegionRegistered() returns FALSE), the interDrv_Write32() function SHALL abort processing and return DRV_INVALID_PARAM. | interDrv.c:interDrv_Write32() | Test | Closed |
| LLR_INTERDRV_INTERDRV_WRITE32_02 | HLR_IO_36773 | WHEN address offset boundary validation fails (interDrv_isAddressValid() returns FALSE), the interDrv_Write32() function SHALL abort processing and return DRV_INVALID_PARAM. | interDrv.c:interDrv_Write32() | Test | Closed |
| LLR_INTERDRV_INTERDRV_WRITE32_03 | HLR_IO_36773 | WHEN memory region and offset validation pass, the interDrv_Write32() function SHALL write the 32-bit data data to effective address (regionBaseAddress + offset) via memoryMap_Write32() and return DRV_SUCCESS. | interDrv.c:interDrv_Write32() | Test | Closed |
|
static |
|
static |