Research on Key Technologies of Data Processing Mechanisms in Ternary Optical Computer
Abstract
:1. Introduction
1.1. Research Status of TOC
1.2. Relevant Issues in Data Processing
2. Characteristics Analysis of TOC
2.1. The Physical Form of TOP
2.2. TOC Computational Characteristics
2.3. MSD Number System
3. Computation-Data Files
3.1. Principles of Computation-Data File Construction
- File header: The file header. It includes all the information needed to reconfigure the processor, as well as the user’s priority, the number of computational units, and the total amount of data to be computed.
- Ease of parsing: Because the task management system for parsing computation-data files runs on a secondary PC that typically processes binary data in 32- or 64-bit units, the design of the computation-data file header must be compatible with the current processing requirements of the PC.
- Reserved expansion bits: As the TOC continues to evolve and the problems it can handle become increasingly complex, the parameters and functions contained in the computation-data file will also become more enriched and varied. To accommodate these changes, it is necessary to reserve some bits in the appropriate positions of the computation-data file header to facilitate future upgrades of the computation-data file version.
3.2. Computation-Data File Format
- Version Number: The version number allows the computation-data file parsing software to know the nature of the current version of the computation-data file and to be compatible with later versions. This field is 16 bits and specifies that the first byte represents the master version number and the second byte represents the revision number to the master version.
- File (Structure) Name: This field records the name of the computation-data file. Users may submit multiple computation-data files to the TOC, and each file may be renamed, split or merged according to the TOC’s computational rules during transmission and use. Therefore, to ensure that the computation result files returned by the TOC correctly correspond to the submitted files, this field has been established.
- IP address: This field records the IP address of the user, facilitating the return of the computation results file. Currently, this field is 48 bits to record an IPV4 address. In subsequent versions, if an IPV6 address is adopted, this field must be expanded to 128 bits. This field records the IP address of the user.
- Priority: Indicates the priority of the computation-data file. Support fields are reserved for users to prioritize tasks.
- Reserved 1: This bit is reserved to facilitate the addition of priority bits or data type bits in future versions. It is set to 1 bit to make the fields (3), (4), (5), and (6) form two bytes, which are the lowest two bytes in 32 bits or 64 bits.
- Data type: Indicates the type of data contained in the computation-data file. There are currently two types: structured data type and simple data type. Therefore, this field is currently 2 bits, with 00 representing simple data type, 01 representing structured data type, and 10 and 11 reserved for future use.
- Computation indicator count: The number of valid computation indicators contained in this computation-data file. This field enables the TOC’s task management software to correctly interpret all computation identifiers. This latest version of the computation-data file has 1280 computation identifiers. Hence, the field is set to 11 bits.
- Computation indicator (Item) 1 Name: This field facilitates the referencing of the original data and computation results corresponding to this computation indicator through instructions.
- Computation indicator (Item) 1 Character: Stores the values of the three English characters used in the ternary logic operation of computation identifier (item) 1. As a result, this field is 24 bits.
- Computation indicators 1-1280: This field provides the operational rules of each calculator to be reconstructed by the TOC and the characteristics of the corresponding original data. Each computation identifier is set to 128 bits.
- Reserved: Prepares for future expansion of calculation indicator information.
- Operation rule: This field records the computation rules specified by the user for the data contained in the calculation indicator i. It provides the basis for the lower computer to reconstruct the optical calculator. This field is set to 24 bits, with the highest 6 bits indicating the type of operation. Therefore, the operation-data file can represent up to 64 types of operations. The remaining 18 bits are used to represent the specific computation rules within each operation type. For example, when the highest 6 bits are 000000, it indicates that this operation type is a ternary (including binary) logic operation. In this case, the remaining 18 bits store, in sequence, three rows of ternary logic operation truth tables represented by internal codes, thus providing one of the 19,683 possible ternary logic operations. If the highest 6 bits are 000001, it indicates primary mathematical operations. In this case, the code with all 0s in the remaining 18 bits represents addition, and the code with the highest 17 bits of 0 and the last bit of 1 represents subtraction, and so on.
- Data bits: This field specifies the number of bits in the original data contained in calculation indicator , indicating that this set of data is of equal length. This field is set to 8 bits. For logical operations, each pair of data must have the same number of bits.
3.3. TOC Data Processing Method
- Users’ computational rules and large amounts of raw data are organized into the computation-data file, which is specifically formatted and constructed based on the operational characteristics of the ternary optical computer.
- Specialized software assists users in creating the computation-data file. As depicted in Figure 4, this software provides a straightforward interface, requiring users to input only their computational requirements and original operands. The software then generates the corresponding computation-data file in line with the users’ intentions, operating on an auxiliary PC.
- The computation-data file is transmitted to the TOC by extending high-level language instructions, allowing users to employ the TOC through applications written in high-level languages.
4. Efficacy Experiment of Data Processing in TOC
4.1. Experiment Environment
4.2. Experimental Cases
4.3. Experimental Procedure
- Generating computation-data file.To input operation rules and operands in the interface depicted in Figure 4 to generate a computation-data file, follow these steps:
- (a)
- Press the ‘simple SD’ button in the interface. The computation-data file generation software will then fill in the “(8) Data Type” field in Figure 2 with the identifier code “01” for simple structured data types.
- (b)
- Enter the operation rules and data bit size for each component of the simple structured quantity one by one, i.e., for (), (), (), and (), press the ‘Enter Comp’ button after each component, and after all components are entered, press the ‘Enter SSD’ button. When ‘Enter Comp’ is clicked for the first time, the software will fill in the “(21) Item 1 Operation Rule and (22) Item 1 Data Bit Size” fields in Figure 2 with the information just entered by the user. When ‘Enter Comp’ is clicked for the (i)-th time, the software will fill in the “Item (i) Operation Rule” and “Item (i) Data Bit Size” fields with the information just entered by the user.
- (c)
- Continuously enter the structured quantity data, separating each component with a comma and each structured quantity with a semicolon. Each piece of data entered is displayed on the right side of the interface and can be corrected.
- (d)
- After pressing the ‘Enter’ key, the computation-data file generation software will fill the original data entered into the data area in Figure 2, thus creating a TOC computation-data file in the format , where X is the storage disk specified by the user, j is the folder on disk X, * is the name of the file, and .szg is the dedicated suffix for TOC computation data files.
- Transferring computation-data files to ternary optical processors.After generating the *.szg file with the operation rules and raw data, it is only necessary to send the computation-data file to the TOC at the appropriate time in the program. This experiment extends the C programming language with a set of instructions for sending the computation-data file to the TOC and waiting for the operation result file. This set of extended instructions has the following functions: establish a communication connection with the TOC; send the *.szg file to the task management module of the TOC monitoring system; query whether the operation result file (*-r.szg) has been returned or suspend the program, wake up when waiting for the operation result file to return; continue executing the program after the *-r.szg file returns; mid-range communication with TOC. The extended statements for the C program in this experiment are as follows:
- (a)
- void SZG_Init(). The purpose of this instruction is to establish an expanded instruction environment for TOC. It must be placed in the first SZG class expansion instruction in the program and is run only once in the program.
- (b)
- int SZG(char *path). Sends the computation-data file pointed to by the address pointer path to the ternary optical processor.
- (c)
- int SZG_SearchResult(char *path). The function of this instruction is to query the operation status of the computation-data file pointed to by the address pointer on the TOP. If the return value is “0”, it means that the result file *-r.szg has been obtained; if the return value is “1”, it means that the result file has not been obtained; if the return value is “2”, it means that there was an error in the processing of the computation-data file on the TOP computer side, and no result is returned.
- (d)
- void SZG_Suspend(). This instruction suspends the program until a result file is returned.
- Ternary optical processor bit allocation.Upon receiving the computation-data file, the ternary optical processor reconstructs the calculator based on the number of operator positions specified in the file. The first 86 processor positions are reconstructed into an adder, 87–147 construct a subtractor, 148–166 form a “Logical AND” operator, and 167–186 form a “Logical OR” operator. The TOC employs MSD addition, which is realized through the transformations T, W, T’, W’, and T2. For a detailed introduction to MSD addition, please refer to reference [27]. The allocation of operator positions for these five transformations is depicted in Table 2, and the allocation for the two logical operations is depicted in Table 3.
4.4. Experimental Results and Analysis
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Jiang, J.; Shen, Y.; Chen, X.; Wang, Z.; Liu, Y.; Chen, L. Design and implementation of parallel SRT integer divider in Ternary Optical Computer. Sci. China Inf. Sci. 2021, 51, 750–763. [Google Scholar]
- Zhang, S.; Chen, J.; Liu, Z.; Wang, X.; Zhang, C.; Yang, J. Key theories and technologies and implementation mechanism of parallel computing for ternary optical computer. PLoS ONE 2023, 18, e0284700. [Google Scholar] [CrossRef] [PubMed]
- Wang, Z.; Li, S.; Jiang, J.; Wang, C.; Wang, X.; Zhu, T. Design of memory shifting_system based on dual-space storage architecture. IEEE Access 2022, 10, 91897–91905. [Google Scholar] [CrossRef]
- Wang, S.; Jiang, J.; Wang, Z. Research of Tri-State Optical Signal Detectors for Ternary Optical Computers. Appl. Sci. 2023, 13, 2800. [Google Scholar] [CrossRef]
- Wang, Z.; Shen, Y. Design and implementation of bitwise parallel MSD square rooting in ternary optical computer. Opt. Eng. 2021, 60, 085107. [Google Scholar] [CrossRef]
- Jiang, J.; Shen, Y.; Ouyang, S. The application of SJ-MSD adder to mean value filtering processing. Optik 2020, 164–271, 98. [Google Scholar]
- Jiang, J.; Zhang, X.; Shen, Y. Design and Implementation of SJ-MSD Adder in ternary optical computer. Acta Electron. Sin. 2021, 49, 275–285. [Google Scholar]
- Yi, J.; He, H.; Lv, Y. Ternary Optical Computer Architecture. Phys. Scr. 2005, 118, 98. [Google Scholar] [CrossRef]
- Bao, J.L.; Jin, Y.; Cai, C. An Experiment for Ternary Optical Computer Hundred-Bit Encoder. Comput. Technol. Dev. 2007, 17, 19–22. [Google Scholar]
- Ouyang, S.; Peng, J.; Jin, Y.; Shen, Y.; Liu, X.; Li, W.L. Structure and theory of dual-space storage for ternary optical computer. Sci. Sin. 2016, 46, 743–762. [Google Scholar]
- Wang, Z.; Shen, Y.; Li, S.; Zhang, H.; Jang, J.; Wang, C. Design and Implementation of a Ternary Optical Computer Simulator. Comput. Appl. Res. 2023, 40, 1137–1141. [Google Scholar]
- Li, S.; Jiang, J.; Wang, Z.; Zhang, H. Basic theory and key technology of programming platform of ternary optical computer. Optik 2019, 178, 327–336. [Google Scholar] [CrossRef]
- Li, S.; Li, W.; An, D. Research and Implementation of Parallel Artificial Fish Swarm Algorithm Based on Ternary Optical Computer. Mob. Netw. Appl. 2022, 27, 1397–1407. [Google Scholar] [CrossRef]
- Zhang, Q.; Jin, Y.; Song, K.; Gao, H. MPI programming based on ternary optical in supercomputer. J. Shanghai Univ. (Nat. Sci.) 2014, 20, 180–189. [Google Scholar]
- Li, S.; Wang, Z.; Wang, S.; An, D. Theoretical basis and implementation mechanism of the programming platform for ternary optical computer. IEEE Access 2022, 10, 5585–5594. [Google Scholar] [CrossRef]
- Jin, Y.; Li, S. Ternary logical naming convention and application in ternary optical computer. Turk. J. Electr. Eng. Comput. Sci. 2020, 28, 904–916. [Google Scholar] [CrossRef]
- Shen, Y.; Wang, Z.; Peng, J.; Ouyang, S. Characteristics of parallel carry-free three-step MSD additions. IEEE Access 2021, 9, 49601–49613. [Google Scholar]
- Hong-jian, W.; Yi, J.; Shan, O.; Yu, Z. Experimentation of a 1-pixel bit reconfigurable ternary optical. J. Shanghai Univ. (Engl. Ed.) 2011, 15, 430–436. [Google Scholar]
- Peng, J.; Shen, R.; Jin, Y.; Shen, Y.; Luo, S. Design and implementation of modified signed-digit adder. IEEE Trans. Comput. 2012, 63, 1134–1143. [Google Scholar] [CrossRef]
- Wang, X.; Peng, J.; Li, M.; Shen, Z.; Shan, O. Carry-free vector-matrix multiplication on a dynamically reconfigurable optical platform. Appl. Opt. 2010, 49, 2352–2362. [Google Scholar] [CrossRef]
- Yi, J.; Xu, Q.; Ouyang, S.; Han, Y.; Li, W. Structural Quantity Computer: Application Characteristics of Ternary Optical Computer. Sci. China Inf. Sci. 2016, 46, 311–324. [Google Scholar]
- Yi, J. Management strategy of data bits in ternary optical computer. J. Shanghai Univ. (Nat. Sci. Ed.) 2007, 13, 519–523. [Google Scholar]
- Peng, J.J.; Teng, L.; Jin, Y. Realization of a tri-valued programmable cellular automata with ternary optical computer. Int. J. Numer. Anal. Model 2012, 9, 304–311. [Google Scholar]
- Zhang, S.; Han, Y.; Shen, Y.; Jin, Y. Principle of a computing request file of ternary optical computers. In Proceedings of the High Performance Computing and Applications: Third International Conference, HPCA 2015, Shanghai, China, 26–30 July 2015; Revised Selected Papers 3. Springer: Berlin/Heidelberg, Germany, 2016; pp. 150–157. [Google Scholar]
- Li, S.; Yi, J. Simple structured data initial SZG file’s generation software design and implementation. In Proceedings of the 3rd International Conference on Wireless Communication and Sensor Networks (WCSN 2016), Wuhan, China, 10–11 December 2016; Atlantis Press: Amsterdam, The Netherlands, 2016; pp. 383–388. [Google Scholar]
- Gao, H.; Jin, Y.; Song, K. Extension of C language in ternary optical computer. J. Shanghai Univ. (Nat. Sci.) 2013, 19, 280–285. [Google Scholar]
- Shen, Y.; Zhang, S.; Wang, Z.; Li, W. Design and implementation of parallel radix-4 MSD iterative division of ternary optical computer. Opt. Commun. 2021, 501, 127360. [Google Scholar] [CrossRef]
- Zhang, S.; Peng, J.; Shen, Y.; Wang, X. Programming model and implementation mechanism for ternary optical computer. Opt. Commun. 2018, 428, 26–34. [Google Scholar] [CrossRef]
- Zhang, S.; Shen, Y.; Zhang, X. Design and Implementation of a Three-lane CA Traffic Flow Model on Ternary Optical Computer. Opt. Commun. 2020, 470, 125750. [Google Scholar] [CrossRef]
- Peng, J.; Fu, Y.; Zhang, X.; Kong, S.; Wei, X. Implementation of DFT application on ternary optical computer. Opt. Commun. 2018, 410, 424–430. [Google Scholar]
- Avizienis, A. Signed-Digit Number Representations for Fast Parallel Arithmetic. IRE Trans. Electron. Comput. 1961, EC-10, 389–400. [Google Scholar] [CrossRef]
- Bocker, R.P.; Drake, B.L.; Lasher, M.E.; Henderson, T.B. Modified signed-digit addition and subtraction using optical symbolic substitution. Appl. Opt. 1986, 25, 2456–2457. [Google Scholar] [CrossRef]
Item | ||||
---|---|---|---|---|
1 | ||||
2 | ||||
3 | ||||
4 | ||||
T | W | T’ | W’ | ||
---|---|---|---|---|---|
0–16 | 17–33 | 34–50 | 51–68 | 69–86 | |
87–98 | 99–110 | 111–122 | 123–134 | 135–147 |
(Logic AND) | (Logic OR) |
---|---|
148–166 | 167–186 |
Performance Index | 32-bit Electronic Processor | 64-bit Electronic Processor | A Structured Data Processor | 5 Structured Data Processors |
---|---|---|---|---|
0 | 0 | |||
Data bits (W) | 186 | 1024 | ||
2000 | ||||
1,024,000 | 2,048,000 |
Item | ||||
---|---|---|---|---|
1 | ||||
2 | ||||
3 | ||||
4 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Li, S.; Liao, S.; Li, W.; Li, L.; Li, D. Research on Key Technologies of Data Processing Mechanisms in Ternary Optical Computer. Appl. Sci. 2024, 14, 5598. https://doi.org/10.3390/app14135598
Li S, Liao S, Li W, Li L, Li D. Research on Key Technologies of Data Processing Mechanisms in Ternary Optical Computer. Applied Sciences. 2024; 14(13):5598. https://doi.org/10.3390/app14135598
Chicago/Turabian StyleLi, Shuang, Shanchuan Liao, Wenjing Li, Luqun Li, and Dazhi Li. 2024. "Research on Key Technologies of Data Processing Mechanisms in Ternary Optical Computer" Applied Sciences 14, no. 13: 5598. https://doi.org/10.3390/app14135598
APA StyleLi, S., Liao, S., Li, W., Li, L., & Li, D. (2024). Research on Key Technologies of Data Processing Mechanisms in Ternary Optical Computer. Applied Sciences, 14(13), 5598. https://doi.org/10.3390/app14135598