Digital signal processors (DSPs) are being extensively used in various power electronic circuits and systems to handle the growing complexity of the controllers and the trigger signal generation schemes. In this paper we present a DSP library based on the Modelica language and a fixedpoint code generator that generates code for TI's C2000 DSPs for implementing power electronic circuits using a rapid prototyping approach. A novel real-time link has been incorporated into the automatic fixed-point code generator to go with the DSP, and which can be used for the real-time control of parameters such as duty ratio or firing angle of classical power electronic converters. The effectiveness of such a setup for power electronic education and research is demonstrated by the simulation and concurrent real-time implementation of a classical buck chopper circuit.