1. A method of optimizing a configuration memory of a reconfigurable processor, the method comprising: analyzing parallelism of a loop of a program code based on an architecture of the reconfigurable processor and information regarding the configuration memory; scheduling groups of function units (FUs) to be activated in each cycle of the loop based on the analyzed parallelism; generating configuration data of each cycle; and determining a memory mapping to store the generated configuration data in the configuration memory.