Life cycle management is an effective way to maintain software quality in safety-critical systems; however, it faces difficulties when applied on software of Programmable Logic Device (PLD). This is because: (1) traditional models on software development do not fit with design workflow of PLD; (2) adaptive models for PLD focus mainly on specific features during software implementation, ignoring high-level design and inspection; (3) no consideration is paid on developing and testing the PLD software based on a reference model (e.g. C/C++ model), which is often used for prototyping complex system, such as spacecraft. In this paper, we propose a novel C-W Model, aiming to complete and normalize the life cycle of software development and testing in programmable logic. We use the C-W Model in different kinds of projects to do debugging in Hardware Description Language (HDL). Experimental results suggest that testing based on the proposed model has high error detection rate and is more efficient compared with the traditional method.