A method for executing programs in an electronic system for applications with functional safety that comprises a single-processor or multiprocessor processing system (10) and a further independent control module (15), including:
- carrying out a decomposition of a program (P) that includes a safety function (SF) to be executed via said system (10) into a plurality of parallel subprograms (P1, . . . , Pn);
- assigning execution of the parallel subprograms (P1, . . . , Pn) to respective processing modules (11) of the system, which include processors (C1, . . . , Cm) of said system (10) or virtual machines (V1, . . . , Vn) correspondingly associated with said processors (C1, . . . , Cm);
- carrying out in the system (10), periodically according to a cycle frequency (fcyc) of the program (P) during normal operation of said system (10), in the context of said safety function (SF), self-test operations (Ast1, Asys, Achk) corresponding to said subprograms (P1, . . . , Pn) correspondingly executed by the processing modules (11),
- said method being characterized in that said self-test operations (Ast1, Asys, Achk) include:
- diagnostic-self-test operations (Ast1), which carry out diagnostic self-tests;
- operations (Asys) of self-testing of measured system values;
- applicational self-test operations (Achk), which include operations of checking execution of conditions of use (Acou) and/or execution of LBISTs (Logic Built-in Self-Tests) (Abst), and
- said self-test operations (Ast1, Asys, Achk) include:
- generating respective self-test data (Dst1, Dsys, Dchk) corresponding to the self-test operations (Ast1, Asys, Achk) and carrying out checking operations (51, 61) on said self-test data (Dst1, Dsys, Dchk);
- exchanging said self-test data (Dst1, Dsys, Dchk) continuously via a protocol (PL) of messages (MC) with the further independent control module (15);
- carrying out at least part of said checking operations (51, 61) in said further independent control module (15);
- and
- executing said operation of decomposition of the program (P) into a plurality of parallel subprograms to achieve a coverage target (kst1, ksys, kchk) for each of said self-test operations (Ast1, Asys, Achk) that is associated to a respective subprogram (P1, . . . , Pn) or a processing module (11) in such a way that it respects a given failure-probability target (g12;
- g).