针对三值光学计算机的C语言扩展  被引量:6

Extension of C Language in Ternary Optical Computer

在线阅读下载全文

作  者:高桓[1,2] 金翊[1,2] 宋凯[1,2,3] 

机构地区:[1]上海大学计算机工程与科学学院,上海200072 [2]上海大学高性能计算中心,上海200072 [3]华东交通大学信息工程学院,南昌330013

出  处:《上海大学学报(自然科学版)》2013年第3期280-285,共6页Journal of Shanghai University:Natural Science Edition

基  金:国家自然科学基金资助项目(61073049);国家自然科学基金青年基金资助项目(61103054);上海市教委科研创新资助项目(13ZZ074;13YZ005)

摘  要:为了将三值光学计算机(ternary optical computer,TOC)数据位众多和光学处理器硬件可重构性这两个特点应用于高级语言程序中,提出并实现了针对三值光学计算机的C语言扩充技术.该技术中的用户可见部分包括一组C语言扩充语句和一个用户运算请求文件自动生成软件模块,其中扩充语句采用C语言函数的书写方式,并采用专用字头SZG_;运算请求文件自动生成软件模块将用户在给定界面中送入的运算方式和输入数据自动转换成预先制定的数据文件格式,生成SZG文件.三值光学计算机返回的运算结果会自动保存在与运算请求文件相同的目录下,且文件名由对应的运算请求文件名加后缀R.SZG组成.用户不可见部分包括:对扩充指令的编译进程、SZG文件生成机制、运算请求状况记录进程、运算结果接收进程和三值光学计算机端服务进程.使用该技术,用户不必改变编程习惯,可直接在C语言程序中使用三值光学计算机.该技术已在由PC机和嵌入式系统组成的三值光学计算机模拟环境中进行了实验,实验结果表明,该技术行之有效.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.

关 键 词:三值光学计算机 C语言 用户运算请求编辑软件 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象