Abstract:In this paper, a novel specification driven and constraints solving based method to automatically generate test programs from simple to complex ones for advanced microprocessors is presented, and its prototype sytem——MA2TG (microprocessor architectural automatic test program generator) is introduced. It can generate not only random test programs but also a sequence of instructions target to specific constraints. The proposed methodology makes three important contributions. First, it simplifies the microprocessor architecture modeling and eases adoption of architecture modification via Architecture Description Language (ADL) specification. Second, it generates test programs for specific constraints utilizing the power of state-of-art constraints solving techniques. Finally, the size of the test program for microprocessor verification and the verification time are dramatically reduced. MA2TG has been applied on DLX processor and the embedded microprocessor EStar to illustrate the usefulness of the approach.