上海大学学报(自然科学版) ›› 2018, Vol. 24 ›› Issue (2): 181-191.doi: 10.12066/j.issn.1007-2861.1979

• 三值光学计算机 • 上一篇    下一篇

三值光学计算机的初始 SZG 文件生成软件

李双, 金翊(), 刘跃军, 周时强   

  1. 上海大学 计算机工程与科学学院, 上海 200444
  • 收稿日期:2017-07-10 出版日期:2018-04-30 发布日期:2018-05-07
  • 通讯作者: 金翊 E-mail:yijin@shu.edu.cn
  • 基金资助:
    国家自然科学基金资助项目(61572305);上海市自然科学基金资助项目(13ZR1416000);上海市自然科学基金资助项目(15ZR1415400);上海市科研计划专项资助项目(15700500400)

Initial SZG file generation software for ternary optical computer

LI Shuang, JIN Yi(), LIU Yuejun, ZHOU Shiqiang   

  1. School of Computer Engineering and Science, Shanghai University, Shanghai 200444, China
  • Received:2017-07-10 Online:2018-04-30 Published:2018-05-07
  • Contact: JIN Yi E-mail:yijin@shu.edu.cn

摘要:

SZG 文件是用户在高级语言程序中使用三值光学计算机 (ternary optical computer, TOC) 的编程平台, 其功能相似于在 OpenACC 程序中使用的 GPU 和 MIC 等加速器, 但与 OpenACC 的编程思想和实现方法完全不同. 更重要的是, SZG文件是目前程序员表达对处理器位数资源分配要求和对处 理器硬件计算功能重构要求的唯一方法, 也很容易被程序员理解和使用. 给出了生成初始 SZG 文件的理论和算法, 介绍了相应的生成软件. 该软件实现了对初始 SZG 文件的暂存和对操作数的追加, 并通过设置一个操作数定时器, 实现了对已输入操作数的定时存储. 在使用这个软件的过程中, 用户不必了解文件格式及其被 TOC 处理的过程, 就能生成正确的 SZG 文件, 进而在应用程序中通过该 SZG 文件使用 TOC 对大批量原始数据进行快速的并行计算. 通过对该软件进行测试, 并以生成包含两种简单运算类型的初始 SZG 文件为例, 对使用该软件的具体过程进行了简要说明. 测试结果证实了该软件的有效性及正确性.

关键词: 三值光学计算机, SZG 文件生成软件, 算法设计, 新型编程方式

Abstract:

SZG file is a programming platform for using a ternary optical computer (TOC) with a high-level programming language. SZG file's functions are similar to those of OpenACC in using GPU and MIC, but both are completely different in programming idea and implementation. More importantly, an SZG file is the only way for programmers to present requirements of grouping the processor's bit number and reconfiguring the processor's hardware functions. The method based on SZG file is easy to be understood, and convenient to be used. This paper proposes an initial SZG file generation theory, an algorithm and a generation software. The proposed software can implement some functions such as storing initial SZG file and appending operands to a SZG file. Moreover, the system can store the operands every a few minutes via setting a timer. Therefore, in applying the software, there is no need to understand the SZG file format and the TOC's work process. Users can generate a correct SZG file. Furthermore, in application, TOC can process large amounts of raw data in parallel using the SZG file. Finally, a white box technique is used to test the software. As an example, the software is used by creating an initial SZG file containing two simple calculators. The results confirm validity and correctness of the software.

Key words: ternary optical computer (TOC), SZG file generation software, algorithm design, new programming method

中图分类号: