Computer Engineering and Science

Extension of C Language in Ternary Optical Computer

Expand
  • 1. School of Computer Engineering and Science, Shanghai University, Shanghai 200072, China; 2. High Performance Computing Center, Shanghai University, Shanghai 200072, China; 3. School of Information Engineering, East China Jiaotong University, Nanchang 330013, China

Received date: 2012-11-13

  Online published: 2013-06-30

Abstract

To make use of the two characteristics of ternary optical computer (TOC) in C programs, hardware re-configurability and the excessive bit numbers, a new technique is developed, which can be divided into two parts. The user visible part includes some extension commands of C language and software of creating a user’s operation request file. These extension commands have the same form with C function and a specialized prefix of SZG_ . The operation request file is automatically produced from the input data and corresponding operation that are entered by user through an especial interface. A suffix .SZG is added to the file, called a SZG file. The SZG file format corresponds to the TOC file protocol. The operation results returning from TOC are also saved in the same path of the user submitted SZG file and named“submitted file name _R.SZG”. The user invisible part includes an extension commands compiling processor, a generation mechanism of SZG file, a state of operation request recording processor, and a result receiving processor and serving processor on the TOC. Using this technique, the user can use the TOC in C programs without changing their programming habits. Experiments have been done on a TOC simulation system consisting of a PC and an embedded system, and the feasibility of the technique is shown.

Cite this article

GAO Huan1,2, JIN Yi1,2, SONG Kai1,2,3 . Extension of C Language in Ternary Optical Computer[J]. Journal of Shanghai University, 2013 , 19(3) : 280 -285 . DOI: 10.3969/j.issn.1007-2861.2013.03.012

References

[1] Sun N H, Xing J, Huo Z G, et al. Dawning nebulae: a PetaFLOPS supercomputer with a heterogeneous structure [J]. Journal of Computer Science and Technology, 2011, 26(3): 352-362.

[2] Benedict R. Gaster heterogeneous computing with OpenCL [M]. 北京: 清华大学出版社, 2012: 5-9.

[3] 仇德元. GPGPU 编程技术: 从GLSL、CUDA 到OpenCL [M]. 北京: 机械工业出版社, 2011: 7-12.

[4] 金翊. 三值光计算机原理和结构[D]. 西安: 西北工业大学, 2003: 29-30.

[5] 金翊. 走近光学计算机[J]. 上海大学学报: 自然科学版, 2011, 17(4): 401-402.

[6] Jin Y, Wang H J, Ouyang S, et al. Principles, structures, and implementation of reconfigurable ternary optical processors [J]. Sci China Ser F, 2011, 54: 2236-2246.

[7] 詹小奇, 彭俊杰, 金翊, 等. 三值光学计算机数据位资源的静态分配策略[J]. 上海大学学报: 自然科学版, 2009, 15(5): 529-531.

[8] 王先超. 三值光学计算机接收系统及其理论研究[D]. 上海: 上海大学, 2009: 38-41.

[9] 克尼汉·里奇. C 程序设计语言[M]. 徐宝文, 李志, 译. 2版. 北京: 机械工业出版社, 2004: 77-82.

[10] 谭浩强. C 程序设计[M]. 4 版. 北京: 清华大学出版社, 2012: 56-60.

[11] 金翊. 三值光计算机高数据宽度的管理策略[J]. 上海大学学报: 自然科学版, 2007, 13(5): 519-523.
Outlines

/