APP4MC.sim is a simulation framework for effective and early analysis of the runtime behavior of AMALTHEA models. It allows the consideration of software aspects and also the investigation of effects caused by concurrent accesses to shared hardware resources, especially memory in multi-core architectures. At its core, APP4MC.sim is based on the SystemC library with TLM extensions, which provides a solid foundation due to its widespread use and large user community.
This page provides an overview and step-by-step guide for the timing simulation of AMALTHEA models using APP4MC.sim.
The image below provides an overview on the procedure for timing simulation of an AMALTHEA model using APP4MC.sim. This procedure consists of two steps, namely, transformation and simulation, which are summarized in the following.
The (model-to-text) transformation step takes as input an AMALTHEA model and generates APP4MC.sim-specific code based on that model. The generated code, also called simulation model, consists of (i) C++ source files that describe the model and the timing simulation setup using APP4MC.sim and SystemC APIs and (ii) a set of scripts (e.g., CMake and batch) that are required for configuring, building, and running the simulation.
The simulation step is carried out by the APP4MC.sim simulator. For that, first, the simulation model generated in the transformation step and the source code of APP4MC.sim are used to build the simulation project. After that, the simulation can be performed which generates one or multiple trace files (in .vcd and .btf formats).
This part provides a step-by-step guide on the tool setup and the transformation procedure to generate an APP4MC.sim simulation model for a given AMALTHEA model.
Add the required P2 Update sites
Install the transformation framework
Install the AMALTHEA-to-SystemC transformation framework
Clone the APP4MC.sim repository (recursively with the submodules) from the APP4MC.sim Eclipse Repository. Then, update the repository and switch to the version compatible with APP4MC 2.0.0 as follows
git fetch --all --tags
git checkout tags/APP4MC_v2.0.0
The following describes the procedure of transforming an AMALTHEA model to generate its corresponding simulation model for timing simulation using APP4MC.sim.
Note: The page Getting Started with APP4MC provides details on the structure, contents, and the creation of an AMLTHEA model.
Open AMALTHEA model in the standard AMALTHEA tree editor and validate it for APP4MC.sim using the APP4MC.sim Validations as shown in the following image.
In the Project Explorer, under the context menu of the model, select Amalthea > Transformation
Note: The transformation option will not be available if your model is at an older version of AMALTHEA compared to the APP4MC platform. To solve the issue, migrate the model to the platform’s version as follows:
In the opened AMALTHEA transformation dialog, provide the information required for the transformation
Once the transformation is complete, the generated simulation model files will be available at the output folder specified in the previous step. The generated sub-directory “APP4MCSIM” contains the transformation outputs required for timing simulation using APP4MC.sim.
This part provides a step-by-step guide on the tool setup and the procedure to perform (in Windows) the timing simulation using APP4MC.sim for simulation models generated through the transformation procedure detailed above.
Build the simulation project (in Developer Command Prompt for VS 2019)
Run the simulation
-t(simulation duration in ms) and
-o(output trace directory)