7.3 Adding a SystemC subsystem to a SystemC system

This section describes 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 a suitable C++ file.
    #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.
    Example: 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.
Non-ConfidentialPDF file icon PDF version100965_1105_00_en
Copyright © 2014–2018 Arm Limited or its affiliates. All rights reserved.