KisTA_logo
Kista infrastructure for SystemC simulation and Time Analysis

User Guidelines: Global Initialization
back
kth_logo



Using KisTA:

    The user cand perform any global initilization as a SystemC user would do, from the "sc_main" function, before calling "sc_start".

Using KisTA-XML:

It is also possible for the KisTA-XML user to hook global initializations, or any functionality which the user wants to be executed before the beginning of the simulation. For it, the user needs to write the following in the KisTA XML system description:

<application name="A1">
        ...
        <global_init name="global_init_fun" file="obj_lib.so" path="path_to_obj_lib" />
        ...
</application>

The "name" attribute specifies the name of the user provided function which will contain the code to be executed before the simulation start. The "file" attribute is mandatory and specifies the dynamic library containing the implementation of the user defined initialization function, "global_init_fun" in this case.
Notice that the "path" attribute is optional. If it is not provided, the "obj_lib.so" library will be searched in the local folder where "kista-xml" is launched.

Following, and example of how the user will write the initialization functionality:

extern "C"
void global_init_fun() {
    // user global initialization code
}