Most distributed real-time embedded systems are specified combining state diagram and data flow languages. This leads to several real-time codes which together do not necessarily satisfy the global specification, and consequently increases the development cycle because more tests are needed. Then, we propose, in order to obtain a single real-time code, to translate state diagram specification into data flow specification because it best exhibits the potential parallelism necessary for efficient distributed implementation. We choose to translate SyncCharts, a state diagram language which is deterministic and then well adapted to real-time, into SynDEx, a data flow language which allows automatic distributed code generation. This approach optimizes the distributed real-time code, and reduces the development cycle of complex distributed real-time embedded systems.