A model-Based synthesis flow for automotive CPS