AmesimKnowledge

Getting started with Simcenter Amesim Real-Time Simulation > Generate the code for real-time in Simcenter Amesim

Concurrent SIMulation Workbench

Concurrent SIMulation Workbench

Compilation configuration

The target configuration panel must be filled in according the following parameters:

System target file simwb_grt.tlc
Make command make_rtw (default value when the tlc is chosen)
Template makefile simwb_rt.tmf (default value when the tlc is chosen)

Set custom Simcenter Amesim code references

In the same directory as the Simulink model, create the three following directories:

  • ameinc

  • amesrc

  • amelib

Populate the ameinc directory by copying the following files (set absolute path):

  • %AME%\lib*.h, %AME%\lib\amenum*.h, %AME%\lib\eigenvalues*.h, %AME%\lib\splines*.h

  • %AME%\interfaces\ame_interfaces.h

  • <model name>_.h

  • %AME%\ interfaces\simulink\ame_simulink_cosim.h

  • %AME%\ interfaces\simulink\ame_simulink_me.h

Populate the amesrc directory by copying the c code file of user submodels.

Populate the amelib directory by copying the following file according to the corresponding Linux architecture (64 bit):

  • For SimWB based on 64bits Linux: %AME%\ misc\realtime\lnxrt_x64
    libAMESim_RT_rUVWXYZ_LNXRT_X64.a

Note

Here the six digits UVWXYZ refer to the Simcenter Amesim release, for example 202010 for Simcenter Amesim 2020.1.

Fill in the custom code panel according the following parameters:

Include directories ameinc (relative path) $AME/lib/ame3d, $AME/lib/amertable
Source files C code of user submodels in "amesrc" dir (relative path)
Libraries amelib\libAMESim_RT_rWXYZ_lnxrt_X64.a)

Generation of real-time code

Using the SimWB toolkit accessible from the Simulink model window, create the RT data base and generate the C code. As the process now will follow the standard SimWB workflow, please see the SimWB documentation for more details.

Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Real_Time/xid1013063 · retrieved 2026-07-17