DEENESPTFRRUARHIKOZHNL

Core Test (CorTst)

ModulCorTst (Core Test)
BSW-Modul-ID103
Standard-Header#include "CorTst.h"
SWS-SpezifikationAUTOSAR_CP_SWS_CoreTest.pdf, AUTOSAR_SWS_CoreTest.pdf
Umfang86 Records · 12 Snippets
ClusterMikrocontroller-Abstraktion (MCAL & I/O)

Core Test (CorTst)

AUTOSAR Classic Microcontroller Drivers-Modul Core Test (CorTst, Spezifikation: AUTOSAR_CP_SWS_CoreTest.pdf, AUTOSAR_SWS_CoreTest.pdf).

Funktionen — Übersicht

Typen — Übersicht

Anforderungen — Übersicht

Funktionen & Typen — Detailansicht

دالة CorTst_Init [SWS_CorTst_00040] 📄 PDF

void CorTst_Init(const CorTst_ConfigType* ConfigPtr);

Service for initialization and change of state of the Core Test

دالة CorTst_DeInit [SWS_CorTst_00045] 📄 PDF

void CorTst_DeInit(void);

Service to change from CORTST_ ABORT or CORTST_ INIT to CORTST_ UNINIT state

دالة CorTst_Abort [SWS_CorTst_00048] 📄 PDF

void CorTst_Abort(void);

Service to change from CORTST_ INIT to CORTST_ ABORT state

دالة CorTst_GetState [SWS_CorTst_00053] 📄 PDF

CorTst_StateType CorTst_GetState(void);

Service for Core Test to immediately return status on currently executed Core Test.

دالة CorTst_GetCurrentStatus [SWS_CorTst_00055] 📄 PDF

void CorTst_GetCurrentStatus(CorTst_ErrOkType* ErrOk);

Service for Core Test to get indicator of the last executed Core Test result

دالة CorTst_GetSignature [SWS_CorTst_00057] 📄 PDF

CorTst_CsumSignatureBgndType CorTst_GetSignature(void);

Service to get signature of the last executed Core Test in background mode.

دالة CorTst_GetFgndSignature [SWS_CorTst_00060] 📄 PDF

CorTst_CsumSignatureType CorTst_GetFgndSignature(void);

Service to get signature of the last executed Core Test in foreground mode.

دالة CorTst_MainFunction [SWS_CorTst_00067] 📄 PDF

void CorTst_MainFunction(void);

Cyclically called by scheduler to perform processing of Core Test.

دالة CorTst_TestCompletedNotification [SWS_CorTst_00076] 📄 PDF

void CorTst_TestCompletedNotification(CorTst_ErrOkType ResultOfLastCorTstRun);

The function Cor Tst_ Test Completed Notification shall be called every time when a complete test cycle has been executed.

نوع CorTst_CsumSignatureType [SWS_CorTst_00037] 📄 PDF

This is the type of the Core Test return value if a checksum/ signature is returned from API to the caller of the API.

نوع CorTst_ErrOkType [SWS_CorTst_00038] 📄 PDF

This is the type of the Core Test test retu rn if a status is retuned from API to the caller of the API.

نوع CorTst_TestIdFgndType [SWS_CorTst_00160] 📄 PDF

This is the type of the parameter (Id) used for a specific foreground test configuration to run. (The Id shall be used in the call to the API Cor Tst_ Start(Cor Tst_ Test Id Fgnd Type Test Id)).

نوع CorTst_ResultType [SWS_CorTst_01005] 📄 PDF

This is the type of the Core Test test return if a status is retuned from API to the caller of the API.

requirement SWS_CorTst_00002 [SWS_CorTst_00002] 📄 PDF

The Core Test module shall provide interrupt service routines for test purposes only.

requirement SWS_CorTst_00009 [SWS_CorTst_00009] 📄 PDF

The Core Test shall provide an Interrupt Controller and Exception detection test. Especially the detection of an interrupt itself and a branch to a valid interrupt service address shall be part of the test. It is regardless if the test is triggered by soft ware exceptions or by a dedicated hardware unit built in silicon.

requirement SWS_CorTst_00012 [SWS_CorTst_00012] 📄 PDF

The Core Test shall provide a core memory interface test. This explicitly excludes tests on memory locations themselves which are connected external to a core itself or reside internal in a core.

requirement SWS_CorTst_00013 [SWS_CorTst_00013] 📄 PDF

The Core Test shall provide a memory protection unit test (MPU). This is vali d even if a Memory Management Unit (MMU) executes MPU functionality.

requirement SWS_CorTst_00014 [SWS_CorTst_00014] 📄 PDF

The Core Test shall provide a Cache Controller Test. Especially the coherency and consistency between data or instructions located in memory out side the core and its appropriate cache entry representation shall be tested.

requirement SWS_CorTst_00016 [SWS_CorTst_00016] 📄 PDF

Type of error Related error code Error value A particular API is called in an unexpected state CORTST_ E_ STATUS_ FAILURE 0x01 API service called with wrong parameter range CORTST_ E_ PARAM_ 0x11 CorTst_MainFunction() t CorTst_MainFunction() Time needed to accomplish a partial test if CorTst _ MainFunction is not interrupted ( by a higher priority task ) Time needed to accomplish one atomic test sequence Example of time needed to complete a higher priority task INVALID API called without Core Test initialization CORTST_ E_ UNINIT 0x20 API service Cor Tst_ Init() called again without a Cor Tst_ De Init() inbetween CORTST_ E_ ALREADY_ INITIALIZED 0x23 API service called with a NULL pointer for Cor Tst_ Get Version Info() and Cor Tst_ Get Current Status() CORTST_ E_ PARAM_ POINTER 0x24

requirement SWS_CorTst_00021 [SWS_CorTst_00021] 📄 PDF

E xcept faults detected inside the CPU itself (e.g.ALU , MAC, etc…), which cannot be reliably reported by software. The errors that cannot be reliably reported by the Dem_SetEventStatus API shall be documented by the implementer .

requirement SWS_CorTst_00023 [SWS_CorTst_00023] 📄 PDF

Due to the fact that Core Test is a MCAL driver module with no knowledge about the hardware/software system architecture, the tested entities and resources (e.g. ALU] shall be exclusively available prior start of test execution during runtime.

requirement SWS_CorTst_00024 [SWS_CorTst_00024] 📄 PDF

The Core Test implementer shall give an indication on the fault coverage achievements of a Core Test implementation.

requirement SWS_CorTst_00026 [SWS_CorTst_00026] 📄 PDF

The Core Test shall be nondestructive to the tested entity. If Core Test modifies an entit y setup, values, settings or selections on its own, it has to restore previous entity status before returning to calling service.

requirement SWS_CorTst_00027 [SWS_CorTst_00027] 📄 PDF

Module Header File Imported Type Dem Rte_ Dem_ Type.h Dem _ Event Id Type Rte_ Dem_ Type.h Dem _ Event Status Type Std Std_ Types.h Std _ Return Type Std_ Types.h Std _ Version Info Type

requirement SWS_CorTst_00041 [SWS_CorTst_00041] 📄 PDF

The function CorTst_Init shall initialize all CorTst relevant data structures, global variables, registers and special test hardware (if existing) with appropriate values used for core test.

requirement SWS_CorTst_00042 [SWS_CorTst_00042] 📄 PDF

Execution state will be changed to CORTST_INIT if the driver is called while in state CORTST_UNINIT.

requirement SWS_CorTst_00044 [SWS_CorTst_00044] 📄 PDF

The function CorTst_Init shall be called first before calling any other CoreTest functions except the functions CorTst_GetState and CorTst_GetVersionInfo . If this sequence is not respected, the error code CORTST_E_UNINIT shall be reported to the Default Error Tracer (if development error detection is enabled).

requirement SWS_CorTst_00046 [SWS_CorTst_00046] 📄 PDF

The function API CorTst_DeInit shall initialize all data structures, global variables, registers and special test hardware (if existing) with the default values after running the startup software (variable/structures) or power - on (HW - default).

requirement SWS_CorTst_00047 [SWS_CorTst_00047] 📄 PDF

If in state CORTST_INIT: The state shall be changed from CORTST_INIT to CORTST_UNINIT state.

requirement SWS_CorTst_00049 [SWS_CorTst_00049] 📄 PDF

If the current state is CORTST_INIT the state shall be changed from CORTST_INIT to CORTST_ABORT state.

requirement SWS_CorTst_00050 [SWS_CorTst_00050] 📄 PDF

When the CorTst_Abort function is called, CorTst_MainFunction shall finish the current atomic sequence it is executing plus shall provide already finished atomic test sequence results, before changing from CORTST_RUNNING_BGND to CORTST_ABORT state.

requirement SWS_CorTst_00051 [SWS_CorTst_00051] 📄 PDF

After a call to CorTst_Abort , CorTst_MainFunction shall not begin testing again when called by the scheduler before a complete re - initialization of the Core test module takes place by calling CorTst_DeInit and CorTst_Init again.

requirement SWS_CorTst_00052 [SWS_CorTst_00052] 📄 PDF

A call to CorTst_Abort while already being in state CORTST_ABORT does not change the state.

requirement SWS_CorTst_00054 [SWS_CorTst_00054] 📄 PDF

The function CorTst_GetState shall return the current Core Test execution state regardless which state is currently executed. It is allowed to call this function in any execution state.

requirement SWS_CorTst_00056 [SWS_CorTst_00056] 📄 PDF

The function CorTst_GetCurrentStatus shall return the result of the last completed Core Test run plus it shall return the Test Interval Id of the last background test.

requirement SWS_CorTst_00058 [SWS_CorTst_00058] 📄 PDF

The function CorTst_GetSignature shall return currently pending Core Test result signature and Core Test Interval Id of the last completed test run in background mode.

requirement SWS_CorTst_00061 [SWS_CorTst_00061] 📄 PDF

The function CorTst_GetFgndSignature shall return Core Test result signature type as Core Test result of the last completed test run in foreground mode.

requirement SWS_CorTst_00065 [SWS_CorTst_00065] 📄 PDF

The function CorTst_Start is only applicable for Foreground mode Core Test operation.

requirement SWS_CorTst_00068 [SWS_CorTst_00068] 📄 PDF

The function CorTst_MainFunction shall set state to CORTST_INIT , if all work within a Core Test interval has been finished.

requirement SWS_CorTst_00069 [SWS_CorTst_00069] 📄 PDF

The function CorTst_MainFunction shall set state to CORTST_I NIT , if no work within a Core Test needs to be done.

requirement SWS_CorTst_00070 [SWS_CorTst_00070] 📄 PDF

If the CoreTest module is in the state CORTST_INIT, a call to the API CorTst_MainFunction shall change the state of the module to CORTST_RUNNING_BGND.

requirement SWS_CorTst_00071 [SWS_CorTst_00071] 📄 PDF

CorTst_MainFunction shall test all selected core hardware entities as configured in ECUC_CorTst_00087 .

requirement SWS_CorTst_00072 [SWS_CorTst_00072] 📄 PDF

The function CorTst_MainFunction shall set Core Test result status to CORTST_E_OKAY or CORTST_E_NOT_OK after each complete test cycle - which may consist itself of many different atomic test cycles - depending on the result of Core Test.

requirement SWS_CorTst_00073 [SWS_CorTst_00073] 📄 PDF

CORTST_E_OKAY shall be set as status from CorTst_MainFunction processing only in the case th at every selected atomic part of CorTst_MainFunction has been successfully executed without any kind of errors. In all other cases CORTST_E_NOT_OK is returned as current status. Status can be checked by calling CorTst_GetCurrentStatus.

requirement SWS_CorTst_00074 [SWS_CorTst_00074] 📄 PDF

CorTst_MainFunction shall set CORTST_E_NOT_OK status after first detected error in a sequence of atomic parts of Core Test module. Status can be checked by calling CorTst_GetCurrentStatus.

requirement SWS_CorTst_00077 [SWS_CorTst_00077] 📄 PDF

The Core Test module shall call the callback notification CorTst_TestCompletedNotification every time when it has executed a complete Core Test cycle based on a combination of atomic parts of Core Test in backgr ound mode.

requirement SWS_CorTst_00105 [SWS_CorTst_00105] 📄 PDF

If the current state is CORTST_RUNNING_BGND the state shall be changed from CORTST_RUNNING_BGND to CORTST_ABORT state.

requirement SWS_CorTst_00109 [SWS_CorTst_00109] 📄 PDF

If the execution state is CORTST_RUNNING_BGND while this function API is called, the function shall return without any action and the return value shall be E_OK.

requirement SWS_CorTst_00118 [SWS_CorTst_00118] 📄 PDF

If the function CorTst_GetVersionInfo is called with a NULL pointer as parameter, it shall return immediately without any further action. If DET is enabled, this function shall report the error value CORTST_E_PARAM_POINTER to the DET module, before returni ng without any further action .

requirement SWS_CorTst_00120 [SWS_CorTst_00120] 📄 PDF

The function CorTst_GetCurrentStatus shall return CORTST_E_NOT_TESTED per default if no result is available.

requirement SWS_CorTst_00121 [SWS_CorTst_00121] 📄 PDF

The function CorTst_GetSignature shall return value zero per default as sign ature until a first initial Core Test run has successfully been executed which will provide a first valid signature representation.

requirement SWS_CorTst_00122 [SWS_CorTst_00122] 📄 PDF

The function CorTst_GetFgndSignature shall return value zero per default as signature until a first initial Core Test run has successfully been executed which will provide first valid signature representation.

requirement SWS_CorTst_00136 [SWS_CorTst_00136] 📄 PDF

If in state CORTST_ABORT: The state shall be changed from CORTST_ABORT to CORTST_UNINIT state.

requirement SWS_CorTst_00137 [SWS_CorTst_00137] 📄 PDF

Each Core Test Interval shall have an Identifier, which shall be incremented by each start of a new test interval in background mode.

requirement SWS_CorTst_00138 [SWS_CorTst_00138] 📄 PDF

For the type CorTst_ErrOkType , the enumeration value CORTST_E_NOT_TESTED shall be the default value after a reset. CorTstTestIntervalId shall have value zero per default.

requirement SWS_CorTst_00139 [SWS_CorTst_00139] 📄 PDF

The function CorTst_MainFunction shall increment Test Interval Id before start of a new test interval. The first test interval shall always have the Test Interval Id = “0” (=zero). If Test Interval Id becomes greater than or equal to CorTstTestIntervalIdEndValue Test Interval Id shall st art again with value “0” (=zero) for the next test interval. The value shall be provided as part of the return values of CorTst_GetSignature and CorTst_GetCurrentStatus in background mode.

requirement SWS_CorTst_00140 [SWS_CorTst_00140] 📄 PDF

The call of function CorTst_TestCompletedNotification shall be pre compile time configurable by the configuration parameter CorTstNotificationSupported .

requirement SWS_CorTst_00144 [SWS_CorTst_00144] 📄 PDF

Core Test module shall provide test execution services in background and foreground mode.

requirement SWS_CorTst_00145 [SWS_CorTst_00145] 📄 PDF

Core Test is structured in partial tests (sets of hardware resource test) which can be interrupted by a higher priority task.

requirement SWS_CorTst_00149 [SWS_CorTst_00149] 📄 PDF

If the DET is en abled and the status of the CORE Test module is CORTST_RUNNING_BGND , the function CortTst_DeInit shall report the error value CORTST_E_STATUS_FAILURE to the DET, and then immediately return.

requirement SWS_CorTst_00152 [SWS_CorTst_00152] 📄 PDF

A call to CorTst_Abort shall set the result of function CorTst_GetCurrent Status to return CORTST_E_NOT_TESTED.

requirement SWS_CorTst_00154 [SWS_CorTst_00154] 📄 PDF

In case an error occurs during test, the CorTst_Start function shall report the extended production error CORTST_E_CORE_FAILURE (see ECUC_CorTst_00157 ) as DEM_EVENT_STATUS_PREFAILED to the DEM if the core can still report errors reliably by software.

requirement SWS_CorTst_00155 [SWS_CorTst_00155] 📄 PDF

In case an error occurs during test, the CorTest_MainFunction function shall report the extended production error CORTST_E_CORE_FAILURE (see ECUC_CorTst_00157 ) as DEM_EVENT_STATUS_PREFAILED to the DEM if the core can still report errors reliably by software.

requirement SWS_CorTst_00161 [SWS_CorTst_00161] 📄 PDF

If development error detection is enabled and the parameter TestId is out of the range, the DET error value CORTST_E_PARAM_INVALID shall be raised and the function shall return without any action with return value E_NOT_OK.

requirement SWS_CorTst_00177 [SWS_CorTst_00177] 📄 PDF

Dem _ Set - Event Status Dem.h Called by SW - Cs or BSW modules to report monitor status information to the Dem. BSW modules calling Dem_ Set Event Status can safely ignore the return value. This API will be available only if ({Dem/ Dem Config Set/ Dem Event Parameter/ Dem Event Reporting Type} == STANDARD_ REPORTING)

requirement SWS_CorTst_00178 [SWS_CorTst_00178] 📄 PDF

If CorTst_Init is called again while not in state CORTST_UNINIT a development error CORTST_E_ALREADY_INITIALIZED is reported. Execution state remains unchanged, the API call CorTst_Init() is ignore d.

requirement SWS_CorTst_00179 [SWS_CorTst_00179] 📄 PDF

The function CorTst_Init shall only initialize the configured resources and shall not touch resources that are not configured in the configuration file.

requirement SWS_CorTst_01000 [SWS_CorTst_01000] 📄 PDF

Error Name: CORTST_E_CORE_FAILURE Short Description: Core failure during tests Long Description: This error indicates that the CorTst module detected a failure in a core. Detection Criteria: Fail PREFAILED is reported when CorTst_Start or CorTst_MainFunction detect a core failure. See SWS_Co rTst_00154 , SWS_CorTst_00155 . Pass PREPASSED is reported when CorTst_Start or CorTst_MainFunction could complete a core test without detecting an error. See SWS_CorTst_01001 , and SWS_CorTst_01002 . Secondary Parameters: The PREPASSED and PREFAILED detection is always active. However PREFAILED status may not be reported if the core is not in a state where errors can reliably be reported by software. See SWS_CorTst_00154 and SWS_CorTst_00155 . Time Required: The time required to detect a failure depends on the frequency of the CorTst_Start or CorTst_MainFunction invocation and the number of foreground or background tests (see ECUC_CorTst_00125 ) The time required to recover from a failure may be longer as tran sient hardware failures from a core should be considered as failures. Monitor Frequency Continuous See SWS_CorTst_00154 , SWS_CorTst_00155 , SWS_CorTst_01001 , and SWS_CorTst_01002 .

requirement SWS_CorTst_01001 [SWS_CorTst_01001] 📄 PDF

In case no e rrors occured during test, the CorTst_Start function shall report the extended production error CORTST_E_CORE_FAILURE (see ECUC_CorTst_00157 ) as DEM_EVENT_STATUS_PREPASSED to the DEM.

requirement SWS_CorTst_01002 [SWS_CorTst_01002] 📄 PDF

In case a core test is completed during a CorTst_MainFunction invocation and no errors occured during this test, the CorTst_MainFunction function shall report the extended production error CORTST_E_CORE_FAILURE (see ECUC_CorTst_00157 ) as DEM_EVENT_STATUS_PREPASSED to the DEM.

requirement SWS_CorTst_01006 [SWS_CorTst_01006] 📄 PDF

The Core Test module shall reject configurations with partition mappings which are not supported by the implementation.

requirement SWS_CorTst_01007 [SWS_CorTst_01007] 📄 PDF

The module will operate as an independent instance in each of the partitions, means the called API will only target the partition it is called in.

requirement SWS_CorTst_01010 [SWS_CorTst_01010] 📄 PDF

If CorTstEcucPartitionRef references one or more ECUC partitions, CorTstBackgroundEcucPartitionRef shall have a multiplic ity of one and reference one of these ECUC partitions as well

requirement SWS_CorTst_NA_00999 [SWS_CorTst_NA_00999] 📄 PDF

[SWS_CorTst_NA_00999] Upstream requirements: SRS_BSW_00167, SRS_BSW_00168, SRS_BSW_00344, SRS_BSW_- 00375, SRS_BSW_00383, SRS_BSW_00398, SRS_BSW_00399, SRS_BSW_00404, SRS_BSW_00405, SRS_BSW_00416, SRS_BSW_- 00417, SRS_BSW_00423, SRS_BSW_00424, SRS_BSW_00425, SRS_BSW_00426, SRS_BSW_00428, SRS_BSW_00429, SRS_BSW_- 00432, SRS_BSW_00437, SRS_BSW_00438, SRS_BSW_00170, SRS_BSW_00171, SRS_CoreTst_14125, SRS_CoreTst_14124, SRS_CoreTst_14121, SRS_CoreTst_14127, SRS_CoreTst_14128 ⌈These requirements are not applicable to this specification.⌋

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/CP_MOD_CorTst
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_CorTst@rel:R20-11#f1f63cab
Content hash
f1f63cab
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_CoreTest.pdf#nameddest=SWS_CorTst_00040

خريطة المواضيع

التهيئة والحالة

3

عرض التفاصيل

اختر عنصرًا من المخطط.

التهيئة والحالة

CorTst_DeInit دالة

Service to change from CORTST_ ABORT or CORTST_ INIT to CORTST_ UNINIT state

void CorTst_DeInit(void);

Service returns the version information of this module.

void CorTst_GetVersionInfo(Std_VersionInfoType* versioninfo);
CorTst_Init دالة

Service for initialization and change of state of the Core Test

void CorTst_Init(const CorTst_ConfigType* ConfigPtr);

الخدمات

CorTst_Abort دالة

Service to change from CORTST_ INIT to CORTST_ ABORT state

void CorTst_Abort(void);

Service for Core Test to get indicator of the last executed Core Test result

void CorTst_GetCurrentStatus(CorTst_ErrOkType* ErrOk);
CorTst_Start دالة

Service for executing foreground Core Test.

Std_ReturnType CorTst_Start(CorTst_TestIdFgndType TestId);

The function Cor Tst_ Test Completed Notification shall be called every time when a complete test cycle has been executed.

void CorTst_TestCompletedNotification(CorTst_ErrOkType ResultOfLastCorTstRun);

Service to get signature of the last executed Core Test in background mode.

CorTst_CsumSignatureBgndType CorTst_GetSignature(void);

Service to get signature of the last executed Core Test in foreground mode.

CorTst_CsumSignatureType CorTst_GetFgndSignature(void);

Service for Core Test to immediately return status on currently executed Core Test.

CorTst_StateType CorTst_GetState(void);

دورية

Cyclically called by scheduler to perform processing of Core Test.

void CorTst_MainFunction(void);

الأنواع

Configuration data structure of the Cor Tst module.

Type for test signature in background mode

This is the type of the Core Test return value if a checksum/ signature is returned from API to the caller of the API.

This is the type of the Core Test test retu rn if a status is retuned from API to the caller of the API.

This is the type of the Core Test test return if a status is retuned from API to the caller of the API.

This is a status value returned by the API Cor Tst_ Get State().

This is the type of the parameter (Id) used for a specific foreground test configuration to run. (The Id shall be used in the call to the API Cor Tst_ Start(Cor Tst_ Test Id Fgnd Type Test Id)).

المتطلبات

SWS_CorTst_00002 requirement

The Core Test module shall provide interrupt service routines for test purposes only.

SWS_CorTst_00008 requirement

Core Test shall provide a procedure to test all CPU registers.

SWS_CorTst_00009 requirement

The Core Test shall provide an Interrupt Controller and Exception detection test. Especially the detection of an interrupt itself and a branch to a valid interrupt service address shall be part of the test. It is regardless if the test is triggered by soft ware exceptions or by a dedicated hardware unit built in silicon.

SWS_CorTst_00010 requirement

The Core Test shall provide an Arithmetic and Logical Unit (ALU) test.

SWS_CorTst_00011 requirement

The Core Test shall provide an address generation test.

SWS_CorTst_00012 requirement

The Core Test shall provide a core memory interface test. This explicitly excludes tests on memory locations themselves which are connected external to a core itself or reside internal in a core.

SWS_CorTst_00013 requirement

The Core Test shall provide a memory protection unit test (MPU). This is vali d even if a Memory Management Unit (MMU) executes MPU functionality.

SWS_CorTst_00014 requirement

The Core Test shall provide a Cache Controller Test. Especially the coherency and consistency between data or instructions located in memory out side the core and its appropriate cache entry representation shall be tested.

SWS_CorTst_00016 requirement

Type of error Related error code Error value A particular API is called in an unexpected state CORTST_ E_ STATUS_ FAILURE 0x01 API service called with wrong parameter range CORTST_ E_ PARAM_ 0x11 CorTst_MainFunction() t CorTst_MainFunction() Time needed to accomplish a partial test if CorTst _ MainFunction is not interrupted ( by a higher priority task ) Time needed to accomplish one atomic test sequence Example of time needed to complete a higher priority task INVALID API called without Core Test initialization CORTST_ E_ UNINIT 0x20 API service Cor Tst_ Init() called again without a Cor Tst_ De Init() inbetween CORTST_ E_ ALREADY_ INITIALIZED 0x23 API service called with a NULL pointer for Cor Tst_ Get Version Info() and Cor Tst_ Get Current Status() CORTST_ E_ PARAM_ POINTER 0x24

SWS_CorTst_00021 requirement

E xcept faults detected inside the CPU itself (e.g.ALU , MAC, etc…), which cannot be reliably reported by software. The errors that cannot be reliably reported by the Dem_SetEventStatus API shall be documented by the implementer .

SWS_CorTst_00023 requirement

Due to the fact that Core Test is a MCAL driver module with no knowledge about the hardware/software system architecture, the tested entities and resources (e.g. ALU] shall be exclusively available prior start of test execution during runtime.

SWS_CorTst_00024 requirement

The Core Test implementer shall give an indication on the fault coverage achievements of a Core Test implementation.

SWS_CorTst_00026 requirement

The Core Test shall be nondestructive to the tested entity. If Core Test modifies an entit y setup, values, settings or selections on its own, it has to restore previous entity status before returning to calling service.

SWS_CorTst_00027 requirement

Module Header File Imported Type Dem Rte_ Dem_ Type.h Dem _ Event Id Type Rte_ Dem_ Type.h Dem _ Event Status Type Std Std_ Types.h Std _ Return Type Std_ Types.h Std _ Version Info Type

SWS_CorTst_00041 requirement

The function CorTst_Init shall initialize all CorTst relevant data structures, global variables, registers and special test hardware (if existing) with appropriate values used for core test.

SWS_CorTst_00042 requirement

Execution state will be changed to CORTST_INIT if the driver is called while in state CORTST_UNINIT.

SWS_CorTst_00044 requirement

The function CorTst_Init shall be called first before calling any other CoreTest functions except the functions CorTst_GetState and CorTst_GetVersionInfo . If this sequence is not respected, the error code CORTST_E_UNINIT shall be reported to the Default Error Tracer (if development error detection is enabled).

SWS_CorTst_00046 requirement

The function API CorTst_DeInit shall initialize all data structures, global variables, registers and special test hardware (if existing) with the default values after running the startup software (variable/structures) or power - on (HW - default).

SWS_CorTst_00047 requirement

If in state CORTST_INIT: The state shall be changed from CORTST_INIT to CORTST_UNINIT state.

SWS_CorTst_00049 requirement

If the current state is CORTST_INIT the state shall be changed from CORTST_INIT to CORTST_ABORT state.

SWS_CorTst_00050 requirement

When the CorTst_Abort function is called, CorTst_MainFunction shall finish the current atomic sequence it is executing plus shall provide already finished atomic test sequence results, before changing from CORTST_RUNNING_BGND to CORTST_ABORT state.

SWS_CorTst_00051 requirement

After a call to CorTst_Abort , CorTst_MainFunction shall not begin testing again when called by the scheduler before a complete re - initialization of the Core test module takes place by calling CorTst_DeInit and CorTst_Init again.

SWS_CorTst_00052 requirement

A call to CorTst_Abort while already being in state CORTST_ABORT does not change the state.

SWS_CorTst_00054 requirement

The function CorTst_GetState shall return the current Core Test execution state regardless which state is currently executed. It is allowed to call this function in any execution state.

SWS_CorTst_00056 requirement

The function CorTst_GetCurrentStatus shall return the result of the last completed Core Test run plus it shall return the Test Interval Id of the last background test.

SWS_CorTst_00058 requirement

The function CorTst_GetSignature shall return currently pending Core Test result signature and Core Test Interval Id of the last completed test run in background mode.

SWS_CorTst_00061 requirement

The function CorTst_GetFgndSignature shall return Core Test result signature type as Core Test result of the last completed test run in foreground mode.

SWS_CorTst_00065 requirement

The function CorTst_Start is only applicable for Foreground mode Core Test operation.

SWS_CorTst_00068 requirement

The function CorTst_MainFunction shall set state to CORTST_INIT , if all work within a Core Test interval has been finished.

SWS_CorTst_00069 requirement

The function CorTst_MainFunction shall set state to CORTST_I NIT , if no work within a Core Test needs to be done.

SWS_CorTst_00070 requirement

If the CoreTest module is in the state CORTST_INIT, a call to the API CorTst_MainFunction shall change the state of the module to CORTST_RUNNING_BGND.

SWS_CorTst_00071 requirement

CorTst_MainFunction shall test all selected core hardware entities as configured in ECUC_CorTst_00087 .

SWS_CorTst_00072 requirement

The function CorTst_MainFunction shall set Core Test result status to CORTST_E_OKAY or CORTST_E_NOT_OK after each complete test cycle - which may consist itself of many different atomic test cycles - depending on the result of Core Test.

SWS_CorTst_00073 requirement

CORTST_E_OKAY shall be set as status from CorTst_MainFunction processing only in the case th at every selected atomic part of CorTst_MainFunction has been successfully executed without any kind of errors. In all other cases CORTST_E_NOT_OK is returned as current status. Status can be checked by calling CorTst_GetCurrentStatus.

SWS_CorTst_00074 requirement

CorTst_MainFunction shall set CORTST_E_NOT_OK status after first detected error in a sequence of atomic parts of Core Test module. Status can be checked by calling CorTst_GetCurrentStatus.

SWS_CorTst_00077 requirement

The Core Test module shall call the callback notification CorTst_TestCompletedNotification every time when it has executed a complete Core Test cycle based on a combination of atomic parts of Core Test in backgr ound mode.

SWS_CorTst_00105 requirement

If the current state is CORTST_RUNNING_BGND the state shall be changed from CORTST_RUNNING_BGND to CORTST_ABORT state.

SWS_CorTst_00109 requirement

If the execution state is CORTST_RUNNING_BGND while this function API is called, the function shall return without any action and the return value shall be E_OK.

SWS_CorTst_00118 requirement

If the function CorTst_GetVersionInfo is called with a NULL pointer as parameter, it shall return immediately without any further action. If DET is enabled, this function shall report the error value CORTST_E_PARAM_POINTER to the DET module, before returni ng without any further action .

SWS_CorTst_00120 requirement

The function CorTst_GetCurrentStatus shall return CORTST_E_NOT_TESTED per default if no result is available.

SWS_CorTst_00121 requirement

The function CorTst_GetSignature shall return value zero per default as sign ature until a first initial Core Test run has successfully been executed which will provide a first valid signature representation.

SWS_CorTst_00122 requirement

The function CorTst_GetFgndSignature shall return value zero per default as signature until a first initial Core Test run has successfully been executed which will provide first valid signature representation.

SWS_CorTst_00136 requirement

If in state CORTST_ABORT: The state shall be changed from CORTST_ABORT to CORTST_UNINIT state.

SWS_CorTst_00137 requirement

Each Core Test Interval shall have an Identifier, which shall be incremented by each start of a new test interval in background mode.

SWS_CorTst_00138 requirement

For the type CorTst_ErrOkType , the enumeration value CORTST_E_NOT_TESTED shall be the default value after a reset. CorTstTestIntervalId shall have value zero per default.

SWS_CorTst_00139 requirement

The function CorTst_MainFunction shall increment Test Interval Id before start of a new test interval. The first test interval shall always have the Test Interval Id = “0” (=zero). If Test Interval Id becomes greater than or equal to CorTstTestIntervalIdEndValue Test Interval Id shall st art again with value “0” (=zero) for the next test interval. The value shall be provided as part of the return values of CorTst_GetSignature and CorTst_GetCurrentStatus in background mode.

SWS_CorTst_00140 requirement

The call of function CorTst_TestCompletedNotification shall be pre compile time configurable by the configuration parameter CorTstNotificationSupported .

SWS_CorTst_00144 requirement

Core Test module shall provide test execution services in background and foreground mode.

SWS_CorTst_00145 requirement

Core Test is structured in partial tests (sets of hardware resource test) which can be interrupted by a higher priority task.

SWS_CorTst_00149 requirement

If the DET is en abled and the status of the CORE Test module is CORTST_RUNNING_BGND , the function CortTst_DeInit shall report the error value CORTST_E_STATUS_FAILURE to the DET, and then immediately return.

SWS_CorTst_00152 requirement

A call to CorTst_Abort shall set the result of function CorTst_GetCurrent Status to return CORTST_E_NOT_TESTED.

SWS_CorTst_00153 requirement

Figure 2 - State Diagram

SWS_CorTst_00154 requirement

In case an error occurs during test, the CorTst_Start function shall report the extended production error CORTST_E_CORE_FAILURE (see ECUC_CorTst_00157 ) as DEM_EVENT_STATUS_PREFAILED to the DEM if the core can still report errors reliably by software.

SWS_CorTst_00155 requirement

In case an error occurs during test, the CorTest_MainFunction function shall report the extended production error CORTST_E_CORE_FAILURE (see ECUC_CorTst_00157 ) as DEM_EVENT_STATUS_PREFAILED to the DEM if the core can still report errors reliably by software.

SWS_CorTst_00161 requirement

If development error detection is enabled and the parameter TestId is out of the range, the DET error value CORTST_E_PARAM_INVALID shall be raised and the function shall return without any action with return value E_NOT_OK.

SWS_CorTst_00177 requirement

Dem _ Set - Event Status Dem.h Called by SW - Cs or BSW modules to report monitor status information to the Dem. BSW modules calling Dem_ Set Event Status can safely ignore the return value. This API will be available only if ({Dem/ Dem Config Set/ Dem Event Parameter/ Dem Event Reporting Type} == STANDARD_ REPORTING)

SWS_CorTst_00178 requirement

If CorTst_Init is called again while not in state CORTST_UNINIT a development error CORTST_E_ALREADY_INITIALIZED is reported. Execution state remains unchanged, the API call CorTst_Init() is ignore d.

SWS_CorTst_00179 requirement

The function CorTst_Init shall only initialize the configured resources and shall not touch resources that are not configured in the configuration file.

SWS_CorTst_00183 requirement

Det _ Report Error Det.h Service to report development errors.

SWS_CorTst_00999 requirement

These requirements are not applicable to this specification.

SWS_CorTst_01000 requirement

Error Name: CORTST_E_CORE_FAILURE Short Description: Core failure during tests Long Description: This error indicates that the CorTst module detected a failure in a core. Detection Criteria: Fail PREFAILED is reported when CorTst_Start or CorTst_MainFunction detect a core failure. See SWS_Co rTst_00154 , SWS_CorTst_00155 . Pass PREPASSED is reported when CorTst_Start or CorTst_MainFunction could complete a core test without detecting an error. See SWS_CorTst_01001 , and SWS_CorTst_01002 . Secondary Parameters: The PREPASSED and PREFAILED detection is always active. However PREFAILED status may not be reported if the core is not in a state where errors can reliably be reported by software. See SWS_CorTst_00154 and SWS_CorTst_00155 . Time Required: The time required to detect a failure depends on the frequency of the CorTst_Start or CorTst_MainFunction invocation and the number of foreground or background tests (see ECUC_CorTst_00125 ) The time required to recover from a failure may be longer as tran sient hardware failures from a core should be considered as failures. Monitor Frequency Continuous See SWS_CorTst_00154 , SWS_CorTst_00155 , SWS_CorTst_01001 , and SWS_CorTst_01002 .

SWS_CorTst_01001 requirement

In case no e rrors occured during test, the CorTst_Start function shall report the extended production error CORTST_E_CORE_FAILURE (see ECUC_CorTst_00157 ) as DEM_EVENT_STATUS_PREPASSED to the DEM.

SWS_CorTst_01002 requirement

In case a core test is completed during a CorTst_MainFunction invocation and no errors occured during this test, the CorTst_MainFunction function shall report the extended production error CORTST_E_CORE_FAILURE (see ECUC_CorTst_00157 ) as DEM_EVENT_STATUS_PREPASSED to the DEM.

SWS_CorTst_01004 requirement

The configuration pointer ConfigPtr shall always have NULL_PTR value.

SWS_CorTst_01006 requirement

The Core Test module shall reject configurations with partition mappings which are not supported by the implementation.

SWS_CorTst_01007 requirement

The module will operate as an independent instance in each of the partitions, means the called API will only target the partition it is called in.

SWS_CorTst_01010 requirement

If CorTstEcucPartitionRef references one or more ECUC partitions, CorTstBackgroundEcucPartitionRef shall have a multiplic ity of one and reference one of these ECUC partitions as well

[SWS_CorTst_NA_00999] Upstream requirements: SRS_BSW_00167, SRS_BSW_00168, SRS_BSW_00344, SRS_BSW_- 00375, SRS_BSW_00383, SRS_BSW_00398, SRS_BSW_00399, SRS_BSW_00404, SRS_BSW_00405, SRS_BSW_00416, SRS_BSW_- 00417, SRS_BSW_00423, SRS_BSW_00424, SRS_BSW_00425, SRS_BSW_00426, SRS_BSW_00428, SRS_BSW_00429, SRS_BSW_- 00432, SRS_BSW_00437, SRS_BSW_00438, SRS_BSW_00170, SRS_BSW_00171, SRS_CoreTst_14125, SRS_CoreTst_14124, SRS_CoreTst_14121, SRS_CoreTst_14127, SRS_CoreTst_14128 ⌈These requirements are not applicable to this specification.⌋