提出一种基于组件的模型机虚拟实验平台(CPU_VLAB)的设计模型和实现方法。CPU_VLAB采用Java语言实现,具有良好的平台无关性;以Java Bean组件技术开发模型机的基本部件,提高软件的重用性;结合多线程技术的wait和notify机制以及锁的同步控制技术,提出一种组件分类触发调度机制,有效地解决具有复杂关系组件之间的调度运行问题,保证微命令的有序执行。与已有的模型机虚拟实验平台相比,该实验平台不仅在通用性、自主性和可重用性等方面有较大的提高,而且具有良好的可交互性,同时,CPU_VLAB的组件调度机制为开发计算机硬件类课程虚拟实验平台提供参考。实验结果表明:在此平台上,学生能够搭建和验证模型机实验,从而巩固对CPU工作原理的理解,大大提高学生的实践动手能力和创新能力。
A design model and implementing method of CPU_VLAB (model computer of virtual lab) was proposed based on component techniques. This system was implemented with Java language, which could make the virtual lab system independent of operating system. In the CPU_VLAB, virtual chip instruments were developed with JavaBean component techniques which make the software more reusable. Combined with wait-notify of Java multithreading schemes, and the Lock technique to control multithreading's synchronization, a trigger-dispatching mechanism based on classification of component was presented to effectively solve the problem of component-dispatch between components with complex relationship. This mechanism makes the microinstruction execute orderly. Compared with the other model computer of virtual lab, the universality, autonomy and reusability of CPU_VLAB increase, and CPU_VLAB is interactive. In addition, the trigger-dispatching mechanism of CPU_VLAB provides references for developing virtual lab of computer hardware courses. The result of practical application shows that CPU_VLAB can help students understand the principles of model computer, and improve their abilities of practice and design through making the model computer experiment.