A real-time pulse height analysis (PHA) X-ray diagnostic for the TCV tokamak has been developed using CFN multi-DSP-based VME acquisition, processing and control board. The hardware is composed by: (i) a detection system based on a Si SDD detector; (ii) a VME host running Linux; (iii) a on-site developed VME module having 4 acquisition, processing and control (APC) channels. The software system was designed in order to allow a native integration with MDSplus. A complete software development cycle is presented. A support library to the VME module has been developed. A shareable application level library was also developed. A set of MDSplus Tree Data Interface (TDI) scripts was developed on top of the application shareable library. The scripts are used to build a software daemon. The daemon programmes the module with the chosen diagnostic parameters. It also performs data collecting and board monitoring functions. Data is stored in an MDSplus tree. (c) 2006 Elsevier B.V. All rights reserved.