Ada Code Generation : Package Body : Module Initialization Procedure

Module Initialization Procedure

The module “init” procedure is called once the executable is started, before running through any execution cycle. It performs various initializations, as shown in the example:

procedure RAIL_CROSS_init is
begin
INIT_ACTIVITY(CHECK_TIME1’address,NONACTIVE,
FALSE,ZNIL,ZNIL,ZNIL);
 initialization of the data structure
 for an activity in the module
Inst_BARRIER2.g_GEN_BARRIER_init;
 hierarchical call for initialization
 of a generic instance in the module
. . .
end RAIL_CROSS;

 

The “init” procedure is exported to the module (TOP_LEVEL) where it is called by procedure LO_INIT that is responsible for initialization of the entire model.