We present CoCoSim, a framework to support the design, code generation and analysis of discrete dataflow model expressed in Simulink. In this work, we specifically focus on the analysis and code generation of multi-periodic systems. For that CoCoSim provides two complementary approaches: the first amounts to encode the multiperiodic semantics in a pure-synchronous one la Lustre, enabling the use of model checker for verifying properties. The second provides a faithful code generation into multiple communicating (mono)synchronous components la Prelude that can be then simulated or embedded in the final platform with any real-time scheduler. These approaches have been experimented in various settings