This paper proposes a new theory and method of writing application program of ternary optical computer (TOC). The theory is to collect all of raw data and calculation rules into a special file which is called the computing-data file, or SZG file for short, and then send the file to the ternary optical computer by using an expansion command in application program. A multi-center onion diagram is used to show the programming platform’s architecture which involves two computing units, i.e., electronic processor and ternary optical processor. The important role of the SZG file of writing the application program is shown in the multi-center onion diagram. This paper also introduces the origin, history, format and generation method of the SZG file, and describes the main extended commands to programing language. Finally, a specific process of using the SZG file is introduced via a suitable example. The example is also tested in a TOC’s software simulation environment, and the correctness of this theory is proved by the test. The program technique proposed in this paper is an important reference for those computer systems which include various types of processors.
[1]XU J. Probe machine [J]. IEEE TRANSACTIONS Neural Network and Learning Systems, 2016, 27(7): 1405-1416.
[2]金翊, 何华灿, 吕养天. 三值光计算机基本原理 [J]. 中国科学: 技术科学, 2003, 33(2): 111-115.
JIN Yi, HE Huacan, LV Yangtian. Ternary optical computer principle [J]. Scientia Sinica (Technologica), 2003, 33(2): 111-115.
[3]JIN Y, HE H, LV Y. Ternary optical computer architecture [J]. Physica Scripta, 2005, 7 (T118): 98-101.
[4]王宏健, 金翊, 欧阳山.一位可重构三值光学处理器的设计和实现[J].计算机学报, 2014, 37(7): 1500-1507.
WANG Hongjian, JIN Yi, OUYANG Shan. Design and implementation of a 1-bit reconfigurable ternary optical processor [J]. Chinese Journal of Computers, 2014, 37(7): 1500-1507.
[5]JIN Y, WANG H, OUYANG S, et al. Principles, structures, and implementation of reconfigurable ternary optical processors [J]. Sci China Ser F-Inf Sci, 2011, 11, 54(11): 2236-2246.
[6]JIN Y, SHEN Y, PENG J, et al. Principles and construction of MSD adder in ternary optical computer [J]. Science China Information Sciences, 2010, 53(11): 2159-2168.
[7]PENG J, SHEN R, JIN Y, et al. Design and implementation of modified signed-digit adder [J]. IEEE Transactions on Computers, 2014, 63(5): 1134-1143.
[8]金翊, 徐群, 欧阳山, 等. 结构量计算机——三值光学计算机的应用特点[J]. 中国科学: 信息科学, 2016, 46(3): 311-324.
JIN Yi, XU Qun, OUYANG Shan, et al. Structured data computer—Application characteristics of ternary optical computer [J]. Scientia Sinica (Informationis), 2016, 46(3): 311-324.
[9]宋凯. 三值光学计算机任务管理软件的总体架构及其原型实现[D].上海: 上海大学, 2013.
SONG Kai. Overall architecture and prototype implementation of the task management software of the ternary optical computer [D]. Shanghai: Shanghai University, 2013.
[10]高桓, 金翊, 宋凯. 针对三值光学计算机的C 语言扩展 [J]. 上海大学学报(自然科学版), 2013, 19(3): 280-285.
GAO Huan, JIN Yi, SONG Kai. Extension of C language in ternary optical computer [J]. Journal of Shanghai University (Nature Science Edition), 2013, 19(3): 280-285.
[11]张茜, 金翊, 宋凯, 等. 在超算集群中使用三值光学计算机的MPI编程技术[J]. 上海大学学报(自然科学版), 2014, 20(2): 180-189.
ZHANG Qian, JIN Yi, SONG Kai, et al. MPI programming based on ternary optical in computer supercomputer[J]. Journal of Shanghai University (Natural Science Edition), 2014, 20(2): 180-189.
[12]胡晓俊, 金翊, 欧阳山, 等. 三值光学计算机的40位乘法例程[J]. 上海大学学报(自然科学版), 2014, 20(5): 645-657.
HU Xiaojun, JIN Yi, OUYANG Shan, et al. A 40-bit multiplication routine of ternary optical computer [J]. Journal of Shanghai University (Nature Science Edition), 2014, 20(5): 645-657.
[13]徐群, 金翊, 沈云付, 等.三值光学计算机的MSD迭代除法算法和实现技术[J]. 中国科学: 信息科学, 2016, 46(4): 539-550.
XU Qun, JIN Yi, SHEN Yunfun, et al. MSD iterative division algorithm and implementation techniques for ternary optical computer[J]. Scientia Sinica (Informationis), 2016, 46(4): 539-550.
[14]彭俊杰, 魏鑫燏, 张晓峰, 等. 基于三值光学计算机的并行快速Fourier 算法实现[J]. 中国科学: 信息科学, 2017, 47(7): 846-862.
PENG Junjie, Wei Xinyu, ZHANG Xiaofeng, et al. Implementation of parallel FFT algorithm on a ternary optical computer [J]. Scientia Sinica (Informationis), 2017, 47(7): 846-862.
[15]PENG J, FU Y, ZHANG X, et al. Implementation of DFT application on ternary optical computer [J]. Optics Communications, 2018, 410: 424-430.
[16]LI S, JIN Y. Simple structured data initial SZG file’s generation software design and implementation [J]. Advances in Computer Science Research, 2017, 44: 383-388.
[17]杨加龙, 金翊, 欧阳山, 等. 三值光学计算机解码器的通信系统[J]. 上海大学学报(自然科学版), 2018, 24 (2): 166-180.
YANG Jialong, JIN Yi, OUYANG Shan, et al. Communication system of ternary optical computer decoder [J]. Journal of Shanghai University (Nature Science Edition), 2018, 24 (2): 166-180.
[18]ZHANG S, JIN Y, SHEN Y, et al. Overview of the task management system of ternary optical computer [C]//Dependable, Autonomic & Secure Computing, Intl Conf on Pervasive Intelligence & Computing, Intl Conf on Big Data Intelligence & Computing & Cyber Science & Technology Congress. Auckland, New Zealand: IEEE, 2016: 132-135.