Getting started with Simcenter Amesim Real-Time Simulation > Generate the code for real-time in Simcenter Amesim
MathWorks Simulink Real-Time (Speedgoat)
Compilation configuration in Simulink
The target configuration panel must be filled in according the following parameters (see also Mathworks documentation):
| System target file | slrt.tlc |
|---|---|
| Make command | make_rtw |
| Template makefile | slrt_default_tmf |
Note
The exact tlc and tmf filenames may vary depending on the version of Simulink real-time used.
Set custom Simcenter Amesim code reference
Fill in the custom code panel according the following parameters:
| Include directories | "%AME%\lib" "%AME%\interfaces\simulink" "%AME%\interfaces" |
|---|---|
| Source files | C code of user submodels (use full file names with absolute paths, and double quotes [""] for each C file). |
| Libraries | For Simulink Real Time R2022a and higher: "%AME%\misc\realtime\ntox86_64\libAMESim_RT_rUVWXYZ_ntox86_64.a" |
| Note For each entry, replace %AME% with the underlying absolute path and make sure to use double quotes [""]. |
Note
Here the six digits UVWXYZ refer to the Simcenter Amesim release, for example 202010 for Simcenter Amesim 2020.1.
When these values have been filled in the procedure follows the standard Simulink real-time procedure (see Mathworks documentation).
Add user submodels code
The user written submodels/libraries must be compiled using the below commands:
- For Simulink Real Time R2022a and higher:
AMEcc_RELEASE -slrt name_of_submodel.c.
If this is done there is nothing to do in addition of configuring the make command as explained before.
Generation of real-time code
When the Simulink coder is configured, everything is ready for generating the code and compiling it for the target platform. This is done by pressing the Build model button in the system dialog box.
Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Real_Time/xid1013069 · retrieved 2026-07-17