计算机与现代化 ›› 2021, Vol. 0 ›› Issue (08): 77-84.

• 人工智能 • 上一篇    下一篇

TEC-XP16教学机浮点运算指令快速设计方法

  

  1. (1.常熟理工学院计算机科学与工程学院,江苏常熟215500;2.江苏科技大学数理学院,江苏镇江212003)
  • 出版日期:2021-08-19 发布日期:2021-08-19
  • 作者简介:宗德才(1979—),男,江苏常熟人,副教授,硕士,研究方向:人工智能,嵌入式系统,信息论, E-mail: zongdecaixhl@126.com; 王康康,副教授,博士。
  • 基金资助:
    国家自然科学基金面上项目(61773012)

A General Fast Design Method for Floating Point Arithmetic Instruction Based on TEC-XP16 Teaching Machine

  1. (1. College of Computer Science and Engineering, Changshu Institute of Technology, Changshu 215500, China; 
     2. School of Mathematics and Physics, Jiangsu University of Science and Technology, Zhenjiang 212003, China)
  • Online:2021-08-19 Published:2021-08-19

摘要: 为解决TEC-XP16教学机缺少浮点运算指令的问题,设计32 bit浮点加法、32 bit浮点减法、32 bit浮点乘法、32 bit浮点除法指令以及实现浮点运算的算法。为解决人工方式设计微程序和修改微程序控制器源程序效率低且容易出错等问题,提出一种能够由汇编语言程序自动生成微程序以及能够由微程序自动修改控制器ABEL语言源程序的方法。实验结果表明,所设计的32 bit浮点运算指令的功能是正确的,平均5 s之内就能根据汇编语言源程序自动生成微程序,平均2 s之内就能根据微程序等自动修改并生成控制器ABEL语言源程序。该方法也可推广到其他复杂指令的设计。

关键词: TEC-XP16教学机, 微程序控制器, 32位浮点运算指令, Python语言

Abstract: To solve the problem that TEC-XP 16 teaching machine does not have floating point arithmetic instruction, a general design and implementation method for 32-bit floating point arithmetic instruction is emphatically studied on TEC-XP16 microprogram controller. To solve the problem that manually designing microprogram and modifying the source program of microprogram controller is  inefficient and  error prone, a fast method which can automatically produce microprogram according to assembly program is put forward. And some database tables are designed and a program is written in Python language which can automatically modify the source program of the controller and generate a new source program file of ABEL language according to the contents of the database tables. The experimental results show that the design of 32-bit floating point arithmetic instruction is correct. The program written in Python language can automatically produce microprogram in less than five seconds and modify the source program of the controller in less than two seconds on average, which greatly improves the efficiency for designing floating point arithmetic instruction. The method can also be extended to the design of other complex instructions.

Key words: TEC-XP16 teaching machine, microprogram controller, 32-bit floating point arithmetic instruction, Python language