Journal of Shanghai University(Natural Science Edition) ›› 2013, Vol. 19 ›› Issue (3): 280-285.doi: 10.3969/j.issn.1007-2861.2013.03.012

• Computer Engineering and Science • Previous Articles     Next Articles

Extension of C Language in Ternary Optical Computer

GAO Huan1,2, JIN Yi1,2, SONG Kai1,2,3   

  1. 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:2012-11-13 Online:2013-06-30 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.

Key words: C language, ternary optical computer (TOC), user operation request editing software

CLC Number: