5.3 Adding a SystemC subsystem to a SystemC system

How to add a generated SystemC subsystem to a SystemC virtual platform.


  1. Link the generated libraries to the existing SystemC virtual platform using the appropriate additional libraries.
  2. Include the generated header file of the generated SystemC components into main.cpp.
    #include "scx_evs_MySubsystem.h"
    #include "scx_evs_MySubsystem2.h"
  3. Initialize the MI simulation infrastructure for the virtual platform.
  4. Instantiate the generated SystemC component.
    scx_evs_MySubsystem mySubsystem("mySubsystem");
    scx_evs_MySubsystem2 mySubsystem2("mySubsystem2");
  5. Optionally, you might configure the simulation from the virtual platform executable command-line arguments for loading applications, setting arguments, for example.
     scx::scx_parse_and_configure(argc, argv);
  6. Load application files into them.
    scx::scx_load_application("mySubsystem.cpu0", "myApplication.elf");
    where cpu0 is the instance name of a core in the Fast Models subsystem mySubsystem. The DualDhrystone example in the SystemCExport directory uses this convention.
  7. If required, set parameters for the configurable components of the Fast Models system. To set parameter PAR of component instance cpu0 to value true:
    scx::scx_set_parameter("mySubsystem2.cpu0.PAR", true);
  8. Bind the master port and slave ports (exports) of the generated SystemC component to the other components in the SystemC virtual platform. The generated ports are native SystemC ports, so binding the ports works in the same way as between all other SystemC components.
Related reference
5.6.10 scx::scx_parse_and_configure
Libraries to build the virtual platform on Linux
Libraries to build the virtual platform on Microsoft Windows
Non-ConfidentialPDF file icon PDF versionARM DUI0370S
Copyright © 2007-2014 ARM. All rights reserved.