• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2008, Vol. 30 ›› Issue (7): 133-135.

• 论文 • 上一篇    下一篇

提高单片机软件仿真器代码重用性的类群设计

王馨梅 张翔 邢楠   

  • 出版日期:2008-07-01 发布日期:2010-05-22

  • Online:2008-07-01 Published:2010-05-22

摘要:

本文充分提取多种系列单片机的共性与差异性,抽象出针对单片机软件仿真的四元组数学模型。在此四元组模型的基础上,应用面向对象设计的思想,结合跳跃表、动态空间管理、编译预处理等技术方法,构造出一个单片机软件仿真器类群。该类群可实例化出不同结构参数及指令集的单片机仿真器对象,与传统的结构化程序设计相比,极大地提 提高了代码的重用性。

关键词: 面向对象 类群 单片机

Abstract:

A quad model of single-chip microcomputer simulation is abstracted in this paper, based on the commonness and difference among a series of single-chip microcomputers. With the theory of object-oriented design, lump table, dynamic memory management and code pre-processing, the class group of software s    imulators for single-chip microcomputers are designed. This class group can be instanced to various objects of the single-chip microcomputer with differ ent architectures and instruction sets, therefore the method can greatly improve reusability.

Key words: object-oriented, class group, single-chip microcomputer