Designing cyber-physical systems (CPS) is challenging due to the tight interactions between software, network/platform, and physical components. A co-simulation method is valuable to enable early system evaluation. In this paper, a co-simulation framework that considers interacting CPS components for design of time-triggered (TT) CPS is proposed. Virtual prototyping of CPS is the core of the proposed framework. A network/platform model in SystemC forms the backbone of the virtual prototyping, which bridges control software and physical environment. The network/platform model consists of processing elements abstracted by realtime operating systems, communication systems, sensors, and actuators. The framework is also integrated with a model-based design tool to enable rapid prototyping. The framework is validated by comparing simulation results with the results from a hardware-in-the-loop automotive simulator.