An overview of our research results on the implementation of model predictive control (MPC) on-chip is presented, with central focus the development of small-size, energy efficient controllers suitable for drug delivery systems and devices. Profiling simulations coupled with codesign techniques are used in order to reveal algorithmic bottlenecks and to effectively customize implementation designs. Hardware in-the-loop simulations using a general purpose processor and a field programmable gate array, and emulations of an application specific processor are provided. The performance measurements and estimates illustrate that MPC is suitable for on-chip real-time optimal control of complex systems with fast dynamics.