Architecture of Generated C Code : Main Task: Partition and Flow Control for C : Activating the generated modules (the “state machines”)

Activating the generated modules (the “state machines”)

lo_main is a generated procedure, that “glues” together all the specific modules as partitioned by the compilation-profile. It calls the top level procedures of these modules:

lo_main()
{
<module1>_EXEC_all();
<module2>_EXEC_all();
...........
<moduleN>_EXEC_all();
}

 

Note: The lo_main is actually the scheduler of the generated components. It applies a fair non-prioritized round-robin scheduling policy, similar to the interpretive simulator. However, it is possible to introduce priority scheduling by modifying lo_main.