Software simulation of embedded systems is an important method to support software testing.By using System Simulation methodology to simulate both the software and hardware of embedded micro-chips,the simulation platform can be used to test the embedded programmes and to assist the design of chips.Integrated into design tools or testing tools of micro-chips,simulation platform plays essential roles to ensure the stable and efficient performances of embedded programmes and embedded micro-chips themselves.The research on this field can be of great value both theoretically and practically.This thesis is a spirited and useful attempt based on the object above.Current embedded system simulation softwares mostly are capable of imitating a particular kind of micro-chip.An universal simulation platform which can imitate various micro-chips is introduced and implementd in this thesis.The simulation platform in the thesis is able to imitate two different types of micro-chips.The thesis mainly focuses on the simulatons of various interior hardwares in embedded micro-chips.By using MFC mode of programing in Visual C++,the universal simulation platform imitates the hardware parts of two micro-chips as follows:CPU core,memory,input/output ports, interruption system,A/D converter,D/A converter and serial access ports. Those hardware parts are common in embedded micro-chips.In order to achieve the expansibility,compatibility and universalism of the simulation platform,in the process of implementation,Design Patterns Methodology was referenced,and so was Object-oriented Program Methodology.The implementation test of the simulation platform shows that every part of the simulation platform can integrally imitate the mechanisms of real micro-chips,while working effectively together.The design and implementation of the this simulation platform can be widely used to imitate other embedded micro-chips,therefore,the thesis is expected to facilitate the future foundation of a comprehensive and universal software auto-testing system. |