
Prerequisites: EICASLAB base
The Automatic Code Generation (ACG) is the EICASLAB feature that allows to generate both the Application Software (AS) and the Basic Software (BS) corresponding to the designed control strategy for performing the overall Rapid Control Prototyping tests and for being transferred in the final target.
AUTOMATIC CODE GENERATION
The final goal of EICASLAB consists in generating the real-time software code to be transferred in the final hardware network of targets that will pilot the plant to be controlled.
The generated software code is subdivided in two main components:
Application Software (AS), that represents the “target independent” part of the final code, implementing the control algorithm designed in EICASLAB;
Basic Software (BS), that represents the “target dependent” part of the final code: it schedules activities of each microprocessor, manages the microprocessor clock, the HW I/O interfaces, etc.
The EICASLAB ACG assists the control designer in generating the control software in all the control design phases, providing the following types of automatic code generation:
ACG for Application Software, that generates only the code (AS) that implements the control algorithm. The generated AS can be tested and debugged in a simulated environment by means of the SIM tool (Modelling and Like Real-time simulation phase);
ACG for Rapid Control Prototyping, that generates the code for performing the RCP activity (Rapid Control Prototyping phase);
ACG for HW Target, that generates the code for the final target (Target phase).
ACG for Application Software
The ACG for Application Software is the EICASLAB feature aiming at generating in ANSI-C language the AS of the designed control algorithm, optimised in order to be easily integrated with any Basic Software. This feature requires the ACG module.

ACG for AS
The ACG for Application Software provides two advanced features:
Link to AS, that gives the possibility to test the generated AS in a whole simulated environment – the SIM tool - before transferring it in the final target. The AS, running in the SIM tool, is the same one that will run in the final HW target;
Application Software Export, that allows to export the Application Software (AS) that can be easily integrated with the Basic Software.
ACG for Rapid Control Prototyping
The ACG for Rapid Control Prototyping (RCP) is the EICASLAB feature aiming at generating also the complementary source code, the BS, which together with the AS provides a standalone Multi-core and Multi-threading RT application, the RCP Manager tool, able to perform a complete RCP test.
This feature requires that both the ACG module and the RCP module are enabled in EICASLAB.
In order to configure the ACG for RCP, EICASLAB allows to provide a set of properties for correctly performing the overall RCP activity. A description of the RCP module is provided in the brochure “EICASLAB RCP MODULE”.

ACG for RCP
ACG for HW Target
The ACG for HW Target is the EICASLAB feature aiming at generating also the target-dependent source code which, together with the AS, provides the control software code for a set of pre-selected targets. This feature requires that both the ACG module and the Target module are enabled in EICASLAB.

ACG for Target