  For low-frequency radio astronomy, software correlation and beamforming on
general purpose hardware is a viable alternative to custom designed hardware.
LOFAR, a new-generation radio telescope centered in the Netherlands with
international stations in Germany, France, Ireland, Latvia, Poland, Sweden and
the UK, has successfully used software real-time processors based on IBM Blue
Gene technology since 2004. Since then, developments in technology have allowed
us to build a system based on commercial off-the-shelf components that combines
the same capabilities with lower operational cost. In this paper we describe
the design and implementation of a GPU-based correlator and beamformer with the
same capabilities as the Blue Gene based systems. We focus on the design
approach taken, and show the challenges faced in selecting an appropriate
system. The design, implementation and verification of the software system
shows the value of a modern test-driven development approach. Operational
experience, based on three years of operations, demonstrates that a general
purpose system is a good alternative to the previous supercomputer-based system
or custom-designed hardware.
