Virtual system integration and testing using Hardware-in-the-Loop (HiL) simulations enables frontloading of development tasks, provides safer and reliable testing environment and reduces hardware costs. One of its main challenges is a high model accuracy under stringent real-time requirement with acceptable development efforts. Instead of being developed from scratch, this work shows that plant models suitable for HiL implementation can be derived directly from the detailed models available from the component layout phase. This is possible by using a seamless simulation tool chain and co-simulation methodologies along the development process. In this paper, a detailed 1D GT-Power model for a state-of-the-art turbocharged diesel engine with exhaust gas recirculation (EGR) is simplified and transformed to a HiL platform connected to an engine control unit (ECU). Although the air path is reduced to 0D volumes to fulfill the real-time requirement, the engine model remains semi-physical and crank-angle resolved. The major form of the pressure pulsation in system is well captured, which is mandatory for the volumetric efficiency, the turbocharger operation and the EGR distribution. A predictive combustion model with NOx estimation based on injection profiles are implemented for modeling of the indicated engine efficiency and the exhaust gas temperature. After detailed investigations on steady state and transient model performance in an offline environment, the model is integrated to the HiL testing platform. The coupling of the model to the ECU interface has been implemented using the co-simulation approach on the platform xMOD. The simulation results of the integrated HiL system, including the engine thermodynamics and the controller behaviors, are validated with measurement data from engine test bench. The real-time capability of the model has been proven. The work has demonstrated the capability and advantages of a seamless tool chain from component design to system integration and testing for the combustion engine.