An integrated powertrain control model is built in Simulink/Stateflow in this paper. This control model is transformed in Targetlink to conduct the model-in-the-loop(MIL) simulation and software-in-the-loop(SIL) simulation. By combining the C code generated after SIL with the underlying code of the single chip, the control procedure is finished. By downloading the code into the hardware, the hardware in the loop simulation(HIL) is conducted to validate the proposed progress.