This paper discusses the development of an integrated tool for the design, optimization, and real-time control of engines from a performance and emissions standpoint. Our objectives are threefold: (1) develop a tool that computes the engine performance and emissions on the order of a typical engine cycle (25-50 milliseconds); (2) enable the use of the tool for a wide variety of engine geometries, operating conditions, and fuels with minimal user changes; and (3) couple the engine module to an efficient optimization module to enable real-time control and optimization. The design tool consists of two coupled modules: an engine module and an optimization module. The engine module consists of three components: a two-zone quasi-dimensional engine model to compute the temporal variation of temperature and pressure during the compression and power stroke, a thermal model to compute the cyclic variation of the engine wall temperature, and a reaction-rate-controlled emission model to compute engine-out NO and CO. The optimization solver is an extension of the model-based, derivative-free POUNDER and is designed to limit the number of engine model evaluations. The outputs of the engine model, thermal model, and emissions model can be used for optimizations under various design constraints. By more thoroughly using the output from the simulations, our optimization scheme reduces the number of simulation evaluations by two orders of magnitude compared with parameter sweeps and one order of magnitude compared with the standard black-box optimizer in MATLAB. These results highlight the proposed tool's potential for use in design, optimization, and real-time control of engines.