Reconfiguration system for multiple storage modes, access method, device, medium, and product

By designing the hardware of the counting unit, random access and sequential access storage modes can share a single storage space, solving the problem of multiple storage modes occupying space separately, saving storage resources and improving access efficiency and system reliability.

WO2026237130A1PCT designated stage Publication Date: 2026-11-19LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/103543
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-13
Filing Date
2025-06-25
Publication Date
2026-11-19

AI Technical Summary

Technical Problem

In existing technologies, multiple storage modes occupy different storage spaces, resulting in high storage overhead and wasted storage resources.

Method used

The storage module employing counting units includes comparators, inverters, and buffer groups. Through hardware design adjustments, random access storage modes and sequential access storage modes share a preset storage space. Flexible switching and access processing between different storage modes are achieved through the state switching of the buffer group.

Benefits of technology

It saves storage space, reduces storage resource consumption, improves the flexibility and efficiency of storage access, reduces transmission latency, and enhances system reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025103543_19112026_PF_FP_ABST
    Figure CN2025103543_19112026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of electronic information, and discloses a reconfiguration system for multiple storage modes, an access method, a device, a medium, and a product. Compared with conventional scenarios in which different storage modes correspond to different storage spaces, resulting in relatively high storage resource overhead, the present application allows multiple storage modes to share one preset storage space, thereby reducing storage resource overhead while saving storage space. By adopting a connection mode corresponding to a comparator, an inverter, and a buffer group, and by means of hardware design adjustment, the current data storage state of a preset storage space can be determined in real time, thereby improving determination accuracy while reducing transmission delay, and thus enhancing system reliability. Multiple storage modes enable selection of different access storage modes by means of a selection signal, and also support seamless switching between two access storage modes, thereby implementing storage approaches in different modes, and improving the flexibility of data storage access.
Need to check novelty before this filing date? Find Prior Art

Description

Reconstruction of systems, access methods, devices, media, and products for various storage modes

[0001] Cross-references to related applications

[0002] This application claims priority to Chinese Patent Application No. 202510608695.X, filed on May 13, 2025, entitled "Reconstruction System, Access Method, Apparatus, Media and Product of Multiple Storage Modes", the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of electronic information technology, and in particular to a reconfiguration system, access method, device, medium and product for multiple storage modes. Background Technology

[0004] In digital circuit design, various volatile memory units (such as Random Access Memory (RAM) and First In First Out (FIFO)) are used to store data in different storage modes. Simultaneously, storage space is allocated for multiple volatile memory units to meet the needs of different storage modes. This means that if data is stored in the corresponding storage space according to storage mode A at the same time, the storage space used for storage mode B will be idle and wasted, leading to significant storage overhead.

[0005] Therefore, how to reduce storage overhead to save storage space is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0006] This application provides a system, access method, device, medium, and product for reconstructing multiple storage modes, in order to at least solve the problem of large storage overhead caused by multiple storage modes occupying different storage spaces in related technologies.

[0007] This application provides a reconfiguration system for multiple storage modes, including a storage module with a counting unit, the counting unit including a comparator, an inverter and a buffer group; the multiple storage modes include at least random access storage mode and sequential access storage mode: the random access storage mode and the sequential access storage mode share the same preset storage space;

[0008] The input of the buffer group is connected to the comparator, and the enable terminal is connected to the inverter to output the data count flag of the current access operation; the comparator receives the storage quantity signal of the preset storage space and the threshold signal to determine the current access operation; the inverter receives the storage mode selection signal.

[0009] When the buffer group is in a blocked state, it corresponds to a random access memory mode; when it is in an open state, it corresponds to a sequential access memory mode, so that the access device can access and process the target data according to the current access operation and the data count flag.

[0010] This application provides a data access method with multiple storage modes, including:

[0011] Get the current access operation and target data;

[0012] In sequential access storage mode, the target data is accessed and processed according to the current access operation and the data count flag; the logic circuit function corresponding to the data count flag is implemented by the reconfiguration system of multiple storage modes.

[0013] This application also provides a true random number access method, including:

[0014] Get truly random numbers;

[0015] When data congestion is caused by truly random numbers, pause access to and processing of truly random numbers.

[0016] When the true random numbers are not continuous, a backup data source is obtained to replace the true random numbers, and the access processing is performed using the replaced true random numbers; the process of accessing and processing true random numbers is completed as in the data access methods of various storage modes.

[0017] This application also provides a method for accessing plaintext data, including:

[0018] Obtain plaintext data;

[0019] When the first data format of the encrypted plaintext data is different from the second data format of the plaintext data, the plaintext data is converted according to the second data format to obtain the target plaintext data.

[0020] The target plaintext data is accessed and processed to encrypt the plaintext data; the access processing process is completed in steps of data access methods for various storage modes.

[0021] This application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing, when executing the computer program, a data access method such as multiple storage modes, or, such as a true random number access method, or, such as a plaintext data access method.

[0022] This application also provides a computer non-volatile readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of a data access method such as multiple storage modes, or, such as a true random number access method, or, such as a plaintext data access method.

[0023] This application also provides a computer program product, including a computer program, which, when executed by a processor, implements steps such as a data access method with multiple storage modes, or a true random number access method, or a plaintext data access method.

[0024] This application addresses two main aspects of storage: First, since various storage modes are primarily categorized as random access and sequential access, all storage modes share a single pre-defined storage space for accessing and processing target data. This significantly reduces storage resource overhead compared to the conventional approach where different storage modes correspond to different storage spaces. Second, the application employs a connection method involving comparators, inverters, and buffer groups. Through hardware design adjustments, the current data storage status of the pre-defined storage space can be determined in real time, improving accuracy, reducing transmission latency, and enhancing system reliability. The buffer group corresponds to random access storage mode when blocked and sequential access storage mode when active; that is, the output is valid only when the storage mode is sequential access. The access process involves processing the target data in the pre-defined storage space based on the current access operation and the data count flag corresponding to the pre-defined storage space output by the buffer group. Considering the different storage characteristics of the two modes, during sequential access, the data storage status of the pre-defined storage space is checked based on the data count flag to facilitate subsequent access processing and improve access efficiency. Thirdly, multiple storage modes are selected via a selection signal to choose different access storage modes. Simultaneously, it allows for seamless switching between two access storage modes, enabling different storage methods. Compared to random access storage mode, sequential access storage mode, considering its overwrite and read characteristics, allows for normal reading and writing even when the preset storage space is full. In contrast, sequential access storage mode checks the data count flag before actual access to avoid write operations when the data storage is full or read operations when the data storage is empty. This application allows random access and sequential access storage modes to share a single preset storage space, improving the flexibility of data storage access.

[0025] Therefore, it can solve the problem of large storage overhead for different storage spaces corresponding to various conventional storage modes, and achieve sequential access processing of storage modes through the connection of various logic devices in the counting unit. At the same time, multiple storage modes share a preset storage space, reducing storage overhead and saving storage space. Attached Figure Description

[0026] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 is a structural diagram of a reconfiguration system with multiple storage modes provided in an embodiment of this application;

[0028] Figure 2 is a schematic diagram of a random access memory mode provided in an embodiment of this application;

[0029] Figure 3 is a schematic diagram of a sequential access storage mode provided in an embodiment of this application;

[0030] Figure 4 is a schematic diagram of an access operation between a control module and a client provided in an embodiment of this application;

[0031] Figure 5 is a schematic diagram of two access operations between a control module and a client provided in an embodiment of this application;

[0032] Figure 6 is a circuit diagram of the read and write operation logic circuit of the control module and the client respectively on the storage module according to an embodiment of this application;

[0033] Figure 7 is a flowchart of a data access method with multiple storage modes provided in an embodiment of this application;

[0034] Figure 8 is a storage diagram of another sequential access storage mode provided in an embodiment of this application;

[0035] Figure 9 is a flowchart of a data movement method provided in an embodiment of this application;

[0036] Figure 10 is a schematic diagram of the interface connection between modules in an FPGA provided in an embodiment of this application;

[0037] Figure 11 is a state transition diagram of a control module state machine provided in an embodiment of this application;

[0038] Figure 12 is a state transition diagram of a data receiving module state machine provided in an embodiment of this application;

[0039] Figure 13 is a flowchart of a true random number access method provided in an embodiment of this application;

[0040] Figure 14 is a schematic diagram of a true random number scenario provided in an embodiment of this application;

[0041] Figure 15 is a flowchart of a plaintext data access method provided in an embodiment of this application;

[0042] Figure 16 is a data conversion diagram of a cryptographic module provided in an embodiment of this application;

[0043] Figure 17 is a flowchart of a data format conversion process provided in an embodiment of this application;

[0044] Figure 18 is a structural diagram of a data access device with multiple storage modes provided in an embodiment of this application. Detailed Implementation

[0045] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0046] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0047] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0048] This paper describes the specific application environment architecture or hardware architecture upon which the execution of data access methods combining various storage modes depends. In the field of digital circuit design, multiple volatile memory cells are used as data storage areas. However, data stored in volatile memory cells is lost when the Field-Programmable Gate Array (FPGA) loses power; therefore, volatile memory cells only serve as temporary data buffers. Since each volatile memory cell has a different storage mode, and each has its own advantages and disadvantages, multiple volatile memory cell storage modes are often used simultaneously in the design process to meet usage requirements. However, the storage space corresponding to each of the multiple volatile memory cells is large, resulting in significant storage resource overhead. The multi-storage mode reconfiguration system provided in this application can solve the above-mentioned technical problems.

[0049] To reconfigure multiple storage modes in a system, the state machines of the control module, data receiving module, and storage module are designed to control the volatile storage units, enabling the storage modules to perform the functions of multiple storage modes according to user settings.

[0050] Figure 1 is a structural diagram of a reconfiguration system with multiple storage modes provided in an embodiment of this application. As shown in Figure 1, it includes a storage module with a counting unit, which includes a comparator 11, an inverter 12 and a buffer group 13. The multiple storage modes include at least random access storage mode and sequential access storage mode: the random access storage mode and the sequential access storage mode share the same preset storage space.

[0051] The input terminal of buffer group 13 is connected to comparator 11, and the enable terminal is connected to inverter 12, which is used to output the data count flag of the current access operation; comparator 11 receives the storage quantity signal of the preset storage space and the threshold signal to determine the current access operation; inverter 12 receives the storage mode selection signal.

[0052] When the buffer group 13 is in a blocked state, it corresponds to a random access memory mode; when it is in an open state, it corresponds to a sequential access memory mode, so that the access control device can access and process the target data according to the current access operation and the data count flag.

[0053] Specifically, the reconstruction system includes a storage module with a counting unit. This counting unit is primarily used to count the amount of data in the storage module. The counting process employs a combination of a comparator and an inverter, outputting a data count flag for the current access operation through the output of a buffer group. The input of the buffer group is connected to the comparator, and the enable input is connected to the inverter. The comparator receives a preset storage space quantity signal and a threshold signal to determine whether the current access operation corresponds to a read or write operation. The inverter receives a storage mode selection signal, such as CS=0 or 1. When CS=1, subsequent accesses are performed according to the random access storage mode; when CS=0, subsequent accesses are performed according to the sequential access storage mode. The storage mode selection signal can be set by a command from the host computer or by the control module. This application does not specifically limit the switching between the two storage modes; the selection of the storage mode can be based on conventional settings or the task at hand. This application mainly focuses on setting the access processing procedure under different storage modes. The current access operation can be either a read operation or a write operation. In this embodiment, considering the read and write operations between the control module, the storage module, and the data receiving module, it is possible to implement only one type of access operation between any two modules, or to implement two types of access operations between any two modules. There is no limitation here, and it can be set according to the actual situation.

[0054] The buffer group corresponds to random access memory mode when it is in a blocked state and sequential access memory mode when it is in an on state. The blocked state is caused by a low level input to the enable pin, and the on state is caused by a high level input to the enable pin. Considering the inverter settings, if the receiver is in random access memory mode, the inverter outputs a low level, which means random access memory mode is invalid. Conversely, sequential access memory mode is valid.

[0055] This application considers the conventional random access storage mode, which allows for overwriting. If the storage space is full during a write operation, an overwrite can be performed, thus eliminating the need for a counting unit. For sequential access storage mode, overwriting is not possible. When the storage space is full, writing must wait for available addresses. Therefore, the fullness or incompleteness of the storage space is determined by a counting unit, i.e., a data counting flag. Thus, the access control device only needs to process the target data based on the current access operation and the data counting flag during access control.

[0056] Multiple storage modes include at least random access storage mode and sequential access storage mode. Random access storage mode, here referring only to the same type, can specifically be Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), or Random Access Memory (RAM), allowing users to randomly access any location in the memory, quickly reading or writing data at any address without needing to access it sequentially. Figure 2 is a schematic diagram of a random access storage mode provided in an embodiment of this application. As shown in Figure 2, addressing is required before operation, and data is written / read from the storage unit according to the address. For example, data Data1 is written to the unit at address 0x0001, and data Data3 is read from the unit at address 0x0003. The advantage of RAM is its long data lifetime; after reading data from a certain address, the data still exists in that memory location until it is overwritten by new data. The disadvantage is that when the data volume is large, the data access speed is slow, and addressing is required before data operations can be performed. The address of each memory location to be written / read must be given before data can be written / read to the memory location.

[0057] Sequential access storage mode, primarily FIFO, is based on a data structure where data is read in the order it was written, meaning the earliest written data is read first. Figure 3 is a schematic diagram of a sequential access storage mode provided in an embodiment of this application. As shown in Figure 3, data can be processed continuously, written to the FIFO sequentially according to the direction of data entry. When reading data, data at the bottom of the FIFO is read sequentially, with the data that entered the FIFO first being read out first. For example, Data0 enters the FIFO first and is read out first. The advantage of FIFO is that it does not require complex address management and can continuously read and write data, thus achieving high data access efficiency and being suitable for high-speed data processing scenarios. The disadvantage is that data can only be processed sequentially, making it unsuitable for situations where certain specific data needs to be processed first.

[0058] To determine when to use the appropriate memory mode, the memory mode selection signal can be read. If CS=1, subsequent accesses will proceed in random access mode; if CS=0, subsequent accesses will proceed in sequential access mode. The specific values ​​of the flag bits can vary and are not limited here; they can be set according to the actual situation.

[0059] When the current storage mode is random access storage mode, the target data in the preset storage space is accessed according to the current access operation. This includes the access process of writing the target data to the preset storage space and the access process of reading the target data from the preset storage space. This is not limited here and can be the same as or different from the normal access process.

[0060] When the current storage mode is sequential access storage mode, the target data is accessed according to the current access operation and the data count flag. In addition to the same access type as the read and write operation in the above embodiment, a data count flag is added to take into account the characteristic that sequential access storage mode cannot achieve overwrite. The data count flag represents the data storage status of the preset storage space.

[0061] If the preset storage space is full, no further writing will be performed. Therefore, a data count flag is used to mark when writing is possible, so that the target data can be written to the preset storage space. If the storage space is empty, no further reading will be performed. A data count flag is used to mark when reading is possible, so that the target data can be read from the preset storage space.

[0062] The output of the data counting marker is achieved through the logic circuit of the counting unit corresponding to the preset storage space. The output value depends on the number of data in each storage unit of the preset storage space, that is, the counting unit records and accumulates the data.

[0063] Compared to conventional solutions that directly receive a flag bit to represent the data count, this embodiment employs a hardware design of logic circuits, enabling real-time response. This avoids the software-based accumulation and subsequent transmission delays that conventional solutions might use to reach the controller or data receiving module. Furthermore, the logic circuits in this embodiment are tightly integrated with other hardware components of the system, reducing external intervention and improving overall system performance.

[0064] In this application embodiment, since various storage modes are mainly divided into random access storage mode and sequential access storage mode, firstly, regardless of the storage mode, a single preset storage space is used for accessing and processing target data. Compared to the conventional situation where different storage modes correspond to different storage spaces, resulting in large storage resource overhead, this application uses a single preset storage space for multiple storage modes, saving storage space and reducing storage resource overhead. Secondly, this application uses a connection method of comparators, inverters, and buffer groups. Through hardware design adjustments, the current data storage status of the preset storage space can be determined in real time, improving the accuracy of judgment, reducing transmission latency, and improving system reliability. The buffer group corresponds to random access storage mode when it is in a blocked state and to sequential access storage mode when it is in a conducting state, that is, the output is valid when the storage mode is sequential access storage mode. The access process is to access and process the target data in the preset storage space according to the current access operation and the data count flag corresponding to the preset storage space output by the buffer group. Considering the different storage characteristics of the two storage modes, during the access process of sequential access storage mode, the data storage status of the preset storage space is checked based on the data count flag to facilitate subsequent access processing and improve access efficiency. Thirdly, multiple storage modes are selected via a selection signal to choose different access storage modes. Simultaneously, it allows for seamless switching between two access storage modes, enabling different storage methods. Compared to random access storage mode, sequential access storage mode, considering its overwrite and read characteristics, allows for normal reading and writing even when the preset storage space is full. In contrast, sequential access storage mode checks the data count flag before actual access to avoid write operations when the data storage is full or read operations when the data storage is empty. This application allows random access and sequential access storage modes to share a single preset storage space, improving the flexibility of data storage access.

[0065] Therefore, it can solve the problem of large storage overhead for different storage spaces corresponding to various conventional storage modes, and achieve sequential access processing of storage modes through the connection of various logic devices in the counting unit. At the same time, multiple storage modes share a preset storage space, reducing storage overhead and saving storage space.

[0066] In some embodiments, the buffer group includes a first buffer group, and the first buffer group includes a first buffer and a second buffer;

[0067] The input terminals of both the first and second buffers are connected to the comparator, and the enable terminals of both are connected to the inverter; the first buffer is used to output the write flag, and the second buffer is used to output the read flag.

[0068] Specifically, in this embodiment, considering that the access operation includes read and write operations, which correspond to different flags respectively, in random access memory mode, the write flag and read flag signals are in a high-impedance state. In sequential access memory mode, the write flag (Full) indicates writing (Full=0) or inhibiting writing (Full=1), and the read flag (Empty) indicates reading (Empty=0) or inhibiting reading (Empty=1).

[0069] The first buffer outputs a write flag, and the second buffer outputs a read flag, which are used as a reference when accessing target data in sequential access memory mode.

[0070] The connection relationship between the first buffer and the second buffer provided in this embodiment is specific to the sequential access storage mode. By setting write and read flags, the accuracy of writing and reading during the sequential access storage mode is ensured, preventing data congestion or data discontinuity.

[0071] In some embodiments, the comparator includes a first comparator and a second comparator, and the inverter includes a first inverter and a second inverter;

[0072] The first comparator and the second comparator each receive a storage quantity signal at their first terminals; the second terminal of the first comparator receives the total storage quantity signal of the threshold signal, and its output terminal is connected to the input terminal of the first buffer; the second terminal of the second comparator receives the numerical signal of the threshold signal, and its output terminal is connected to the input terminal of the second buffer.

[0073] The first inverter and the second inverter each receive a storage mode selection signal at their input terminals; the output terminal of the first inverter is connected to the enable terminal of the first buffer; the output terminal of the second inverter is connected to the enable terminal of the second buffer.

[0074] Specifically, as shown in Figure 1, the first buffer group (Tri_1~Tri2): when the enable terminal (en) of the buffer is high, the buffer is turned on and can output data; when the enable terminal is low, the buffer is blocked and data cannot be output, and the output terminal is in a high impedance state.

[0075] Regarding the storage quantity signal, it can be obtained directly or determined by an accumulator (ADD). When using an accumulator, the number of data items in each storage cell in the storage area is counted, and the count value cnt (0≤cnt≤M) is output.

[0076] The first comparator, also known as the jmp (judge), compares inputs 1 and 2. When input 1 equals the value of input 2, the jmp outputs a high level; when input 1 does not equal the value of input 2, the jmp outputs a low level.

[0077] The second comparator compares inputs 1 and 2. When the value of input 1 is less than the value of input 2, the comparator outputs a high level; when the value of input 1 is greater than or equal to the value of input 2, the comparator outputs a low level.

[0078] The first inverter (NOT_1) and the second inverter (NOT_2) are implemented using NOT gates, which invert the input value and output it.

[0079] The input of the accumulator (ADD) is connected to the output port of the storage cell in the preset storage space, and the output is connected to the first terminal of the first comparator and the second comparator respectively to output the storage quantity signal. The second terminal of the first comparator receives the total storage quantity signal (M) of the threshold signal, and its output is connected to the input of the first buffer. The second terminal of the second comparator receives the numerical signal "1" of the threshold signal, and its output is connected to the input of the second buffer.

[0080] The storage mode selection signal is input to the input terminals of the first inverter and the second inverter, respectively. The output terminal of the first inverter is connected to the enable terminal of the first buffer, and the output terminal of the second inverter is connected to the enable terminal of the second buffer. The output terminal of the first buffer outputs a write flag (Full), and the output terminal of the second buffer outputs a read flag (Empty).

[0081] This embodiment provides a method based on the connection relationship between various logic devices, which compares the number of counting units and responds in real time to the data storage status of the storage space, thereby improving the accuracy of the judgment.

[0082] In some embodiments, the state output process of the first buffer and the second buffer includes:

[0083] When the storage mode selection signal is set to random access storage mode, if both the first inverter and the second inverter output the second level, it is determined that the first buffer and the second buffer are in a blocked state.

[0084] When the storage mode selection signal is set to sequential access storage mode, the first level is output after passing through the first inverter and the second inverter, thus determining that the first buffer and the second buffer are in a conducting state.

[0085] Specifically, when the storage mode selection signal is in random access storage mode, the first inverter and the second inverter both output a second level, thus determining that the enable signals of the first buffer and the second buffer are at the second level, corresponding to the first buffer and the second buffer being in a blocked state.

[0086] When the storage mode selection signal is set to sequential access storage mode, the first inverter and the second inverter both output the first level, thus determining that the enable signals of the first buffer and the second buffer are at the first level, corresponding to the first buffer and the second buffer being in a conducting state.

[0087] In conjunction with the above embodiments, when using an accumulator, the count value cnt of the accumulator (ADD) is output to terminal 1 of the first comparator and terminal 1 of the second comparator, respectively; alternatively, the stored quantity signal can be directly acquired and input to the corresponding terminal 1 of the first and second comparators. The value at input terminal 2 of the first comparator is M, and the value at input terminal 2 of the second comparator is '1'; the output of the first comparator is connected to the input of the first buffer, and the output of the second comparator is connected to the input of the second buffer; the mode selection signal CS is connected to the inputs of the first inverter and the second inverter, respectively; the output of the first inverter is connected to the enable terminal en of the first buffer, and the output of the second inverter is connected to the en terminal of the second buffer; the output of the first buffer is a Full signal, and the output of the second buffer is an Empty signal.

[0088] When the mode selection signal is 1, the corresponding selection is random access memory mode. CS becomes '0' after passing through the first inverter and the second inverter. At this time, the en terminals of the first buffer and the second buffer are at a low level, the tri-state buffer is in a blocked state, and the Full and Empty signals are in a high impedance state.

[0089] When the mode selection signal is 0, the sequential access memory mode is selected. CS becomes '1' after passing through the first inverter and the second inverter. At this time, the en terminal of the first buffer and the second buffer is at a high level, and the tri-state buffer is in the on state. At this time, the output of the Full and Empty signals depends on the count value cnt of ADD.

[0090] The state output process of the first and second buffers provided in this embodiment combines random access storage mode and sequential access storage mode to achieve effectiveness of sequential access storage mode, improve the flexible switching between sequential access storage mode and random access storage mode and realize access processing of different storage modes when sharing the same preset storage space.

[0091] In some embodiments, the process of outputting data count tags includes:

[0092] When the storage quantity signal is 0, the first comparator outputs a second level, which, after passing through the first buffer, outputs a write flag indicating that the data has been written; the second comparator outputs a first level, which, after passing through the second buffer, outputs a read flag indicating that the data has been disabled.

[0093] Alternatively, when the storage quantity signal is greater than or equal to 1 and less than the total storage quantity signal, the first comparator outputs a second level, which, after passing through the first buffer, outputs a write flag indicating write; the second comparator outputs a second level, which, after passing through the second buffer, outputs a read flag indicating read.

[0094] Alternatively, when the number of stored items signal equals the total number of stored items signal, the first comparator outputs a first level, which, after passing through the first buffer, outputs a write flag to disable writing; the second comparator outputs a second level, which, after passing through the second buffer, outputs a read flag to enable reading.

[0095] Specifically, when cnt = 0: After comparing inputs 1 and 2 of the first comparator, since 0 ≠ M, the first comparator outputs a low level, which, after passing through the first buffer, makes the Full signal '0'; correspondingly, input 1 (value 0) of the second comparator < input 2 (value 1), the second comparator outputs a high level, which, after passing through the second buffer, makes the Empty signal '1'; at this time, it indicates that the input is not full and the output is empty;

[0096] Alternatively, when 1 ≤ cnt < M: the Full signal is '0', and since input 1 ≥ input 2, the second comparator outputs a low level, making the Empty signal '0'; this indicates that the input is not full and the output is not empty.

[0097] Alternatively, when cnt = M: Since input 1 = input 2, the first comparator outputs a high level, making the Full signal '1'; Since input 1 > input 2, the Empty signal of the second comparator remains '0'; This indicates that the input is full and the output is not empty.

[0098] The logical relationships between the various logic devices in the logic circuit provided in this embodiment can determine the current data storage status of the preset storage space in real time, improving the accuracy of judgment while reducing transmission delay and improving the reliability of the system.

[0099] In some embodiments, the access control device includes a control module and a data receiving module; wherein, each pair of modules, including the control module, the storage module, and the data receiving module, is provided with ports corresponding to write and read operations, so as to realize the access processing of read and write operations between the control module and the storage module, and between the storage module and the data receiving module.

[0100] It should be noted that the access control device includes a control module and a data receiving module. The basic operation involves the control module writing target data to the storage module, and the data receiving module reading data from the storage module. In this embodiment, the data receiving module of the access control device can be located within the refactoring system or correspond to the client; no limitation is made here, and it can be set according to the actual situation. That is, the access control device can be located within the refactoring system or not.

[0101] Figure 4 is a schematic diagram of an access operation between a control module and a client according to an embodiment of this application. As shown in Figure 4, the control module controls the storage module to reconstruct random access storage mode or sequential access storage mode. The control module receives data sent from an external data source (host computer) or uses data from within the control module and writes the data to the storage module. The data receiving module acts as a client, reading data from the storage module. The data receiving module can be located outside the FPGA, such as a separate chip or module; it can also be located inside the FPGA as a sub-module. In this example, two sets of ports are set. The control module writes data to the storage module through the write operation port, and the data receiving module reads data from the storage module through the read operation port. By setting two sets of ports, the control module and the data receiving module can operate on the storage module simultaneously. As soon as the control module writes data to the storage module, the data receiving module can read it, without having to wait for all the data to be written to the storage module before reading it, thereby improving the data processing speed.

[0102] Compared to conventional solutions that use either random access or sequential access storage modes with corresponding storage spaces, this application sets up two pathways between the control module and the client's storage modules. Specifically, it establishes two write operation ports between the control module and the storage modules: one connects to storage module 'a' (accessed in random access mode), and the other connects to storage module 'b' (accessed in sequential access mode). Similarly, it establishes two read operation ports between the storage modules and the client: one reads from storage module 'a' in random access mode, and the other reads from storage module 'b' in sequential access mode. Compared to the conventional approach of using two storage modules, this application uses only one storage module for reading, enabling the reuse of different storage modes within a single module, saving storage space. Furthermore, the two sets of ports allow for simultaneous access to the storage modules, improving data processing speed.

[0103] In addition, in this embodiment, Figure 5 is a schematic diagram of two access operations between the control module and the client provided in this application embodiment. As shown in Figure 5, this embodiment realizes independent write and read operations between the control module and the client on the storage module.

[0104] In this embodiment, port settings correspond to write and read operations between each pair of modules, enabling each module to independently perform write and read operations on the storage module, thereby improving data processing speed and flexibility.

[0105] In some embodiments, the buffer group further includes a second buffer group;

[0106] The output of the first buffer group is connected to the input of the second buffer group;

[0107] The enable pin of the second buffer group receives the register value;

[0108] The output terminal of the second buffer group outputs a data count flag. When the register value is 1, the second buffer group is in the on state, and when the register value is 0, the second buffer group is in the blocked state.

[0109] Specifically, Figure 6 is a circuit diagram of the read and write operation logic circuit of the control module and the client respectively to the storage module according to an embodiment of this application. As shown in Figure 6, by adding an additional second buffer group and additional register values, any access control device can realize the access processing of read and write operations in the sequential access storage mode.

[0110] In some embodiments, the second buffer group includes a third buffer, a fourth buffer, a fifth buffer, and a sixth buffer; the register value includes a first register value and a second register value;

[0111] The input terminals of the third and fourth buffers are each connected to the output terminal of the first buffer, and are used to control the corresponding write flag output of the control module and the data receiving module.

[0112] The input terminals of the fifth and sixth buffers are each connected to the output terminal of the second buffer, and are used to control the corresponding read flag output of the control module and the data receiving module.

[0113] The enable pins of the third and fifth buffers each receive the value of the first register; the enable pins of the fourth and sixth buffers each receive the value of the second register.

[0114] Specifically, as shown in Figure 6, a second buffer group (Tri_3~Tri_6) with a 1-bit margin is added. Simultaneously, the first and second register values ​​are also added. This ensures that when CS = '0', the Full and Empty signals are each divided into two groups: Full_A and Empty_A are provided to the control module, and Full_B and Empty_B are provided to the data receiving module. The data storage status in FIFO mode is queried by setting the register (Prio), avoiding conflicts between the control module and the data receiving module when reading and writing to the storage unit. After initialization, Prio has values ​​of A = '0' and B = '0'. At this time, Tri_3~Tri_6 are in a blocked state, outputting a high-impedance signal. It should be noted that in this embodiment, A and B correspond to the first and second register values, respectively.

[0115] The input terminals of the third and fourth buffers are each connected to the output terminal of the first buffer, corresponding to the write flag (Full_A) of the output control module and the write flag (Full_B) of the data receiving module. The input terminals of the fifth and sixth buffers are each connected to the output terminal of the second buffer, corresponding to the read flag (Empty_A) of the output control module and the read flag (Empty_B) of the data receiving module.

[0116] The enable terminals of the third and fifth buffers each receive the value of the first register. When the first register value is 1, a read flag or a write flag is output corresponding to the read or write operation performed by the control module. At this time, with the first register set to 1 and the second register set to 0, the data receiving module corresponding to the output terminals of the fourth and sixth buffers is invalid.

[0117] The enable terminals of the fourth and sixth buffers each receive the value of the second register. When the value of the second register is 1, it corresponds to a read / write operation performed by the data receiving module, and a read flag or a write flag is output accordingly. At this time, when the second register is set to 1, the value of the first register is set to 0, and the control modules corresponding to the output terminals of the third and fifth buffers are disabled.

[0118] The control module and data receiving module provided in this embodiment output data counting markers when performing read operations on the storage module, so as to improve data processing efficiency and increase the flexibility of access operations.

[0119] In some embodiments, the output process of the data count marker of the second buffer group includes:

[0120] When the control module performs a read or write operation, the first register value is set to 1 and the second register value is set to 0, which determines that the output terminals of the third and fifth buffers will output a read flag or a write flag respectively.

[0121] Alternatively, when the data receiving module performs a read or write operation, the first register value is set to 0 and the second register value is set to 1, which determines that the output terminals of the fourth and sixth buffers will output a read flag or a write flag respectively.

[0122] Specifically, based on the logic principle of the above logic circuit, when the control module needs to read / write to the memory area, it sets A='1' and B='0' to enable the third and fifth buffers to conduct, thereby acquiring the Full_A and Empty_A signals; when the control module finishes reading / writing to the memory area, it sets A='0' and B='0' to release control over the signals; that is, it resets the values ​​of the first and second registers.

[0123] When the data receiving module needs to read / write to the storage area, it sets A='0' and B='1' to enable the fourth and sixth buffers, thereby acquiring the Full_B and Empty_B signals; when the data receiving module finishes reading / writing to the storage area, it sets A='0' and B='0' to release control over the signals.

[0124] This embodiment releases control over the signal after the access is completed, so as to facilitate the access processing of subsequent access operations and further improve data processing efficiency.

[0125] In some embodiments, a seventh buffer is also included;

[0126] The input terminal of the seventh buffer is connected to the first data output port of the control module, the enable terminal is connected to the write enable port, and the output terminal is connected to the write data port of the storage module.

[0127] The seventh buffer is used to turn on when the write enable port outputs the first level and write the target data to the storage module.

[0128] As shown in Figure 6, the input of the seventh buffer is connected to the first data output port (DATA_A_out[7……0]) of the control module, the enable port is connected to the write enable port (A_wren), and the output port is connected to the write data port (D_in[7……0]) of the storage module. The write enable signal (wren) is connected to the en terminal. When wren = '1', data can be output from the first data output port (DATA_A_out[7……0]) to the storage area through the seventh buffer; when wren = '0', data is blocked from the first data output port (DATA_A_out[7……0]) by the seventh buffer and cannot be written to the storage area.

[0129] The seventh buffer provided in this embodiment, along with the port settings of the control module and storage module, enables the control module to successfully write the target data into the storage module, thereby ensuring the accuracy of data flow.

[0130] In some embodiments, an eighth buffer, a ninth buffer, and a tenth buffer are also included;

[0131] The output of the eighth buffer is connected to the first data input port of the control module, the enable terminal is connected to the read enable port, and the input terminal is connected to the read data port of the storage module.

[0132] The input terminal of the ninth buffer is connected to the second data output port of the data receiving module, the enable terminal is connected to the write enable port of the data receiving module, and the output terminal is connected to the write data port of the storage module.

[0133] The output of the tenth buffer is connected to the second data input port of the data receiving module, the enable terminal is connected to the read enable port of the data receiving module, and the input terminal is connected to the read data port of the storage module.

[0134] As shown in Figure 6, an 8-bit buffer (eighth buffer, ninth buffer, and tenth buffer) is added. A first data input port (DATA_A_in[7……0]) and a read enable port (A_rden) are added to the control module. Read operations on the memory unit can only be performed when A_rden = '1' in the control module; data cannot be read when A_rden = '0'. A second data output port (DATA_B_out[7……0]), a write enable port (B_wren), and a read enable port (B_rden) are added to the data receiving module.

[0135] The output of the eighth buffer is connected to the first data input port (DATA_A_in[7……0]) of the control module, the enable port is connected to the read enable port (A_rden), and the input port is connected to the read data port (A_D_out[7……0]) of the storage module;

[0136] The input terminal of the ninth buffer is connected to the second data output port (DATA_B_out[7……0]) of the data receiving module, the enable terminal is connected to the write enable port (B_wden) of the data receiving module, and the output terminal is connected to the write data port (B_D_in[7……0]) of the storage module;

[0137] The output of the tenth buffer is connected to the second data input port (DATA_B_in[7……0]) of the data receiving module, the enable port is connected to the read enable port (B_rden) of the data receiving module, and the input port is connected to the read data port (B_D_out[7……0]) of the storage module.

[0138] This embodiment provides a mechanism where, when the control module and the data receiving module operate on the storage module, they respectively set the corresponding buffers on their ports to determine when to enable and when to block, thereby ensuring smooth data reading operations and improving the orderliness of access operations.

[0139] Furthermore, this application also provides a data access method with multiple storage modes. Figure 7 is a flowchart of a data access method with multiple storage modes provided in an embodiment of this application. As shown in Figure 7, the method includes:

[0140] S11: Obtain the current access operation and target data;

[0141] S12: In sequential access memory mode, the target data is accessed and processed according to the current access operation and the data count mark; wherein, the logic circuit function corresponding to the data count mark is implemented by the reconfiguration system of multiple memory modes.

[0142] Specifically, in this embodiment, it should be noted that in random access storage mode, the process can be the same as or different from the conventional access process, as described in the above embodiments, and is not limited here. In sequential access storage mode, the target data is accessed based on the current access operation and the data count flag, and the implementation method is the same as the corresponding embodiment in the above embodiments, and will not be repeated here.

[0143] For a description of the features in the embodiments corresponding to the data access methods of multiple storage modes, please refer to the relevant descriptions of the embodiments corresponding to the reconstruction system of multiple storage modes, which will not be repeated here.

[0144] In some embodiments, during sequential access storage mode access processing, the storage address of the stored data in the storage unit of the preset storage space is set in advance to realize access processing according to the storage address.

[0145] Specifically, compared to the sequential access address information in the conventional random access storage mode, this embodiment adds a corresponding storage address to each storage unit so that when writing data, the address of a certain storage unit and the number of data to be written can be arbitrarily given. After each data is written, the address is automatically incremented to realize the writing of multiple consecutive data. For example, three data Data1 to Data3 can be written consecutively starting from address 0x0001, thereby improving the shortcomings of the existing technology that can only write sequentially from the top of the FIFO. In addition, it can realize the data overwrite writing mode, that is, when there is data in a certain storage unit, the old data can be overwritten with the new data.

[0146] In the sequential access storage mode access processing provided in this embodiment, the storage address of the storage data of the storage unit of the preset storage space is set in advance to realize access processing according to the storage address, thereby improving the flexibility and diversity of the addressing method of the sequential access storage mode to access the preset storage space, and also improving the efficiency of data reading and writing.

[0147] In some embodiments, when the current access operation is a read operation and the target data consists of multiple consecutive data items, access processing of the target data includes:

[0148] Obtain the first target sub-data of the storage unit and its corresponding data address;

[0149] The access control device reads the first target sub-data based on the data address;

[0150] The next second target sub-data of the first target sub-data is moved to the data address as the new first target sub-data for reading, until all target data is read.

[0151] Specifically, Figure 8 is a storage diagram of another sequential access storage mode provided by an embodiment of this application. As shown in Figure 8, taking FIFO as an example, during data reading, multiple data can be read continuously starting from any storage unit. After each data is read, the data in the subsequent units automatically moves forward, overcoming the deficiency of the prior art that can only read sequentially from the bottom of the FIFO. For example, after reading a data Data1 from address 0x0001, Data2 moves to address 0x0001, Data3 moves to address 0x0002, and so on.

[0152] State machine 3 of the storage module reads the specific address value of ADDR_B[n…….0] and the value len2 of register 2 sent by the data receiving module when CS='0'. After the data receiving module reads one piece of data, state machine 3 shifts the data after address Addr sequentially forward, thus realizing the data flow function of FIFO. For example, if Addr=0x0001 and len2=2, after the data receiving module reads data Data_1 in 0x0001, state machine 3 sequentially moves data Data_2 in 0x0002 to 0x0001, data Data_3 in 0x0003 to 0x0002, and so on; then, if the data receiving module continues to read data Data_2 in 0x0001, state machine 3 moves data Data_3 in 0x0002 to 0x0001, and so on.

[0153] The specific reading method is as follows: Obtain the first target sub-data and its corresponding data address from the storage unit. Control the access control device to read the first target sub-data according to the data address. This access control device can be either a data receiving module or a control module; no specific limitation is made here. If the target data of the storage module is read based on the data receiving module, control the data receiving module to read the first target sub-data from the data address through its read data port (D_out[7……0]) to receive it into the second data input port (DATA_B_in[7……0]) corresponding to the second port (ADDR_B[n……0]). Leave the address information of the first target sub-data empty, and migrate the next second target sub-data to the data address of the first target sub-data as the new first target sub-data. Return to the step of controlling the data receiving module to read the first target sub-data from the data address through the read data port, until all target data has been read.

[0154] Regarding the volatile storage area of ​​the storage module, the size of the storage area and the data width of each storage unit can be set by the administrator / user. For example, it can be set to 8bit × M, with each storage unit being 8 bits, corresponding to the width of the control module's data output interface; where M = 2. n+ 1. Related to the width of the address interface (ADDR_A[n……0]) of the control module: for example, when n=7 it is an 8-bit address [7……0], M=2 8 =256, therefore the storage area contains 256 storage units, and the storage area size is 256×8 bits. Storage units can also be set to 16 bits, 32 bits, etc., and this application does not impose specific limitations.

[0155] The implementation process of state machine 3 in the storage module:

[0156] (1) When the data receiving module provides the address of the storage unit through the ADDR_B[n……0] interface, it enters the start state and the state machine sets temporary variables ptr and len;

[0157] (2) len stores the value len2 read from register 2;

[0158] (3) ptr stores the address value Addr read from the ADDR_B[n……0] interface;

[0159] (4) The state machine delays for one clock cycle Clk, waiting for the data receiving module to read one piece of data from the address Addr storage unit;

[0160] (5) Then check if the address unit Addr+1 is empty. If it is empty, it means there is no data and the process ends. If it is not empty, it means there is data. Move the data in the address unit Addr+1 to the address unit Addr, that is, Data[ptr] = Data[ptr+1], and increment the value of ptr by 1 in order to process the next data. Move the data after the address Addr+1 forward in sequence until the last storage unit is processed or an empty storage unit is detected. At this point, the data receiving module has read one data from the address Addr, and state machine 3 has completed the forward movement of the data after the address Addr.

[0161] (6) Determine whether the data receiving module has read len data. If not, jump to step (3) and reassign the value Addr to ptr and repeat steps (4) and (5) until the data receiving module has read len data.

[0162] Figure 9 is a flowchart of a data movement method provided in an embodiment of this application. As shown in Figure 9, it includes:

[0163] S21: Read the register value of register 2 of the data receiving module;

[0164] S22: The temporary variable storage of state machine 3 of the storage module reads the address value from the second port;

[0165] S23: State machine 3 delays for one clock cycle, waiting for the data receiving module to read a piece of data from the address value storage unit;

[0166] S24: Determine if the address unit corresponding to the address value plus 1 is empty; if it is empty, end; if it is not empty, proceed to step S25.

[0167] S25: Move the data in the address unit corresponding to the address value plus 1 to the storage unit corresponding to the address value, so that the temporary variable is incremented by 1 and the register value of register 2 is decremented by 1 to process the next data, so that the data after the address unit corresponding to the address value plus 1 is moved forward, and return to step S24, until the register value is equal to 0, and end.

[0168] When the data receiving module provides the address of the memory unit through the ADDR_B[n……0] interface, it enters the start state. The state machine sets temporary variables ptr and len; len stores the value len2 read from register 2; ptr stores the address value Addr read from the ADDR_B[n……0] interface; state machine 3 delays for one clock cycle Clk, waiting for the data receiving module to read one data from the address Addr memory unit; then it checks whether the Addr+1 address unit is empty. If it is empty, it means there is no data, and the process ends; if it is not empty, it means there is data, and the Addr+1 address unit is set to empty. The data in the address unit is moved to the address unit Addr, i.e., Data[ptr] = Data[ptr+1], and the value of ptr is incremented by 1 so as to process the next data. The data after the address Addr+1 is moved forward in sequence until the last storage unit is processed or an empty storage unit is detected. At this point, the data receiving module has read one data from the address Addr, and state machine 3 has completed the forward movement of the data after the address Addr. It is determined whether the data receiving module has read len data. If it has not read all data, it jumps to step (3) to reassign the value of ptr to Addr and repeats the process.

[0169] In this embodiment, data movement involves automatically migrating subsequent data units after each data read. This automatic migration mechanism ensures that subsequent data immediately fills the gap after each data read, reducing data reading waiting time and thus improving data processing efficiency. It also ensures the continuity of the data stream and avoids processing delays caused by data interruptions. Automatic migration ensures that data can be read and processed in a timely manner, avoiding overflow problems caused by data accumulation in sequential access storage mode data structures, and also preventing the "starvation" phenomenon at the read end due to insufficient data.

[0170] In other embodiments, when the current access operation is a read operation and the target data consists of multiple consecutive data items, access processing of the target data is performed, including:

[0171] Retrieve multiple consecutive data sets and their corresponding data addresses;

[0172] The access control device reads multiple consecutive data entries based on the data address.

[0173] Correspondingly, after completing the reading and access of the target data, the process also includes:

[0174] The data at the next data address in the storage unit is moved to the next data address.

[0175] Specifically, the first target sub-data to the Nth target sub-data of the storage unit and their corresponding data addresses are obtained;

[0176] The control data receiving module reads the target data from the data address through the data reading port, and receives it to the second data input port corresponding to the second port;

[0177] Correspondingly, after completing the reading and access of the target data, the process also includes:

[0178] The address information from the first target sub-data to the Nth target sub-data is left empty, and the data of the next address information of the address information of the first target sub-data to the Nth target sub-data in the storage unit is migrated to the address information of the first target sub-data to the Nth target sub-data.

[0179] Specifically, compared to the above embodiments, this embodiment performs automatic migration after reading N data points each time. When the target data consists of multiple sub-target data, it reads multiple consecutive sub-target data points at once for reception by the data receiving module.

[0180] In this embodiment, data movement involves reading multiple data entries at a time, which reduces the number of read operations and improves data processing efficiency. Batch reading reduces the waiting time between each read operation, making the data stream more continuous. By reducing the frequency of read operations, the error rate that might be caused by frequent operations is lowered.

[0181] In some embodiments, when the current access operation is a write operation and the data is written to the storage module by the control module, the target data is accessed according to the current access operation and the data count flag, including:

[0182] When the write status information of the control module is a write operation and the data count flag is a write flag, the target data write data state is entered;

[0183] Write the target data from the first data output port corresponding to the first port of the control module to the write data port of the storage module;

[0184] Decrement the register flag value of the control module by 1 and increment the address information by 1 to enter the waiting state;

[0185] Write the next target data when the updated register flag value is greater than 0 and the data count flag is set to write, until the register flag value is 0, to complete the writing process of all target data.

[0186] Specifically, the process involves: acquiring the write status information and the first port corresponding to the control module; using the data stored in the first port as the target data; entering the target data write state when the write status information is a write operation and the data count is marked as a write flag; acquiring the write data port corresponding to the storage module; writing the target data from the first data output port corresponding to the first port to the write data port; decrementing the register flag value of the control module by 1 and incrementing the address information of the control module by 1, and entering the waiting state of the control module; and returning to the step of entering the target data write state when the updated register flag value is greater than 0 and the data count is marked as a write flag, to write the next target data until the register flag value is 0, thus completing the access processing of all target data of the control module to the preset storage space.

[0187] Figure 10 is a schematic diagram of the interface connections between modules in an FPGA provided in an embodiment of this application. As shown in Figure 10, there is a set of write operation ports between the control module and the storage module, including a mode selection signal interface (CS), a first port (ADDR_A[n……0]), a first data output port (DATA_A_out[7……0]), a write enable port (wren) corresponding to the write operation instruction, and a data count flag port (Full). The interfaces on the left side of the control module are the clock signal interface (Clk) and the reset signal interface (Reset). In the FPGA interface settings, subsequent normal access processing is performed through connections with the clock module, reset module, and power supply. Clock module: can be a clock source such as a crystal oscillator, providing the system clock signal CLK to the FPGA. Reset module: provides the system reset signal RST after the FPGA is powered on. Power supply: provides the operating voltage to the FPGA.

[0188] Clk: Clock signal, the system clock signal connected to the FPGA;

[0189] Reset: Reset signal, connected to the system reset signal of the FPGA;

[0190] CS: Mode selection signal for random access memory mode and sequential access memory mode. When the control module or host computer sets CS='1', the memory module implements the random access memory mode function; when CS='0', it implements the sequential access memory mode function.

[0191] ADDR_A[n……0]: Address output interface, used to address the memory unit of the memory module. For example, when n=7, it is an 8-bit address [7……0], and the addressing range is 2. 8 = 256 storage units;

[0192] DATA_A_out[7……0]: Data output interface, writes data to the storage unit of the storage module;

[0193] wren: Write enable signal, active high. Only after setting wren='1' can write operations be performed on the memory cell. When wren='0', data cannot be written to the memory cell.

[0194] Full: This signal is valid when CS='0' (sequential access memory mode), indicating whether the memory space in sequential access memory mode is full. Full='1' means that the data input to the memory area has been filled and no more data can be written to the memory unit; Full='0' means that the data has not been filled and data can continue to be written to the memory unit.

[0195] State machine 1: Write the acquired external data to the storage area;

[0196] Register 1: Stores the amount of data (len1) written to the storage module. The specific value is set and modified by the control module; it can also be set by external host computer software.

[0197] Figure 11 is a state transition diagram of a control module state machine provided in an embodiment of this application. As shown in Figure 11, it includes the state transitions of ...

[0198] In sequential access memory mode, during the process of the control module accessing the memory module to write data, it is necessary to obtain the write status information corresponding to the control module and the corresponding first port (ADDR_A[n……0]). In this application, the data in the address of the first port is used as the target data. When the write status is write operation and the data count flag is write flag, the write data state is entered, that is, when the write address state (WR_ADDR) is in the case of the data count flag being write flag (Full=0), the write data state (WR_DATA) is entered. At this time, the write data port (D_in[7……0]) corresponding to the memory module is obtained, and the target data is written from the first data output port (DATA_A_out[7……0]) corresponding to the first port to the memory address of the write data port. After writing one piece of data, the register flag value (len1) of register 1 of the control module is decremented by 1, and the address information of the control module is incremented by 1 (Addr+1), and the waiting state (WAIT) is entered.

[0199] In the waiting state, the state machine 1 of the control module jumps according to the register flag value. When the updated register flag value is greater than 0 and the data count flag is set to write, it jumps to the write data state again to execute until all the target data is written to the storage module. At this time, the register flag value is 0 and it enters the final state (FINAL).

[0200] In the FINAL state, state machine 1 ends the current data writing process and returns to IDLE, allowing the next data writing process to begin.

[0201] Before selecting between random access and sequential access memory modes, the FPGA enters the idle state (IDLE) upon power-on reset; after the reset, it enters the write length state (WR_LEN), writes the data quantity to register 1, and sets the value of CS to determine which memory mode to use for access processing.

[0202] Similarly, during a write operation in random access memory mode, setting CS='1' enters random access memory mode; it enters the write address state (WR_ADDR), and provides a specific address value through port ADDR_A[n……0] to address the corresponding memory cell in the memory area. Then it enters the write data state (WR_DATA); in the WR_DATA state, it writes data to the memory cell with address ADDR_A[n……0] in the memory area of ​​the write data port (D_in[7……0]) through the first data output port (DATA_A_out[7……0]), and decrements the len1 value in register 1 by 1. Then it enters the wait state WAIT; in the WAIT state, the state machine jumps according to the len1 value. When len1>0, it jumps back to the WR_ADDR state to execute, provides the address of the next memory cell, and then performs the write data operation until all data is written to the memory cell. At this time, len1 becomes 0, and the state machine enters the final state FINAL.

[0203] The write operation processing based on sequential access storage mode provided in this embodiment uses the combination of state machine and registers of the control module to enable data to be written in sequential access storage mode, thereby improving the flexibility and versatility of the write access processing process.

[0204] In some embodiments, when the current access operation is a read operation and the data receiving module reads the storage module, access processing of the target data is performed according to the current access operation and the data count flag, including:

[0205] When the read status information of the data receiving module is read operation and the data count flag is read flag, the target data read data state is entered;

[0206] The target data is read from the read data port of the storage module to the second data input port corresponding to the second port of the data receiving module;

[0207] Decrement the register flag value of the data receiving module by 1 and enter the waiting state;

[0208] The next target data is read when the updated register flag value is greater than 0 and the data count flag is set to read, until the register flag value is 0, thus completing the reading process of all target data.

[0209] Specifically, the process involves: acquiring the read status information and the second port corresponding to the data receiving module; entering the target data read state when the read status information indicates a read operation and the data count flag is set to read; acquiring the read data port corresponding to the storage module; using the data from the read data port as the target data; reading the target data from the read data port to the second data input port corresponding to the second port; decrementing the register flag value of the data receiving module by 1 and entering the waiting state of the data receiving module; and returning to the step of entering the target data read state when the updated register flag value is greater than 0 and the data count flag is set to read, to read the next target data until the register flag value is 0, thus completing the access processing of all target data of the data receiving module to the preset storage space.

[0210] As shown in Figure 10, there is a set of read operation ports between the storage module and the data receiving module, including clock signal interface (Clk), reset signal interface (Reset), mode selection signal interface (CS), second port (ADDR_B[n……0]), second data input port (DATA_B_in[7……0]), and data count flag port (Empty).

[0211] Clk: System clock signal connected to the FPGA;

[0212] Reset: The reset signal connected to the FPGA;

[0213] CS: The CS that connects to the control module;

[0214] ADDR_B[n……0]: Address output interface, used to address the memory units of the memory module; similarly, n corresponds to the number of memory units M, M=2 n+1 ;

[0215] DATA_B_in[7……0]: Data input interface, reads data from the storage unit of the storage module;

[0216] Empty: This signal is valid when CS='0' (sequential access memory mode), indicating whether the memory space in sequential access memory mode is empty. Empty='1' means there is no data in the memory area, which is an empty state and data cannot be read from the memory area; Empty='0' means there is data in the memory area, which is a non-empty state and data can be read.

[0217] State machine 2: Read data from the storage area;

[0218] Register 2: Stores the amount of data (len2) read from the storage area. The specific value is set and modified by the data receiving module.

[0219] Figure 12 is a state transition diagram of a data receiving module state machine provided in an embodiment of this application. As shown in Figure 12, it includes states such as IDLE, WR_LEN, RAM mode (read address RD_ADDR, read data RD_DATA, wait WAIT), FIFO mode (read address RD_ADDR, read data RD_DATA, wait WAIT), and FINAL.

[0220] In sequential access memory mode, during the data receiving module's access to the memory module for reading, it needs to obtain the read status information and the corresponding second port (ADDR_B[n……0]) of the data receiving module. When the read status information is a read operation and the data count flag is a read flag, it enters the read data state, that is, when it is in the read address state (RD_ADDR) and the data count flag is a read flag (Empty=0), it enters the read data state (RD_DATA). At this time, it obtains the read data port (D_out[7……0]) of the memory module, reads the target data from the read data port to the second data input port (DATA_B_in[7……0]) corresponding to the second port, that is, reads one target data from the memory unit at memory address Addr, decrements the register flag value (len2) of register 2 of the data receiving module by 1, and enters the wait state (WAIT).

[0221] In the waiting state, the state machine 2 of the data receiving module jumps according to the register flag value. When the updated register flag value is greater than 0 and the data count flag is set to read, it jumps back to the read data state to execute, that is, continues to read the next data from the Addr address until all the target data is written to the data receiving module. At this time, the register flag value is 0, and it enters the end state (FINAL).

[0222] In the FINAL state, state machine 2 ends the current data reading process and returns to IDLE, allowing the next data reading process to begin.

[0223] Before selecting between random access memory mode and sequential access memory mode, the FPGA enters the idle state (IDLE) upon power-on reset; after the reset, it enters the write length (WR_LEN) state, writes the number of data to be read to register 2, and reads the CS signal to determine whether it is random access memory mode or sequential access memory mode.

[0224] Similarly, during the read operation in random access memory mode, when reading CS='1', the system enters random access memory mode: it enters the read address state (RD_ADDR), and provides a specific address value through port ADDR_B[n……0] to address the corresponding memory cell in the memory area. Then it enters the read data state (RD_DATA). In the RD_DATA state, it reads one data cell from the memory cell at address ADDR_B[n……0] through the data port D_out[7…...0], and decrements the len2 value in register 2 by 1. Then it enters the wait state WAIT. In the WAIT state, the state machine jumps according to the len2 value. When len2>0, it jumps back to RD_ADDR to execute, that is, it provides the address of the next memory cell and performs the read data operation until len2 data cells are read. Then the len2 value becomes 0, and the system enters the final state FINAL.

[0225] The read operation access processing based on sequential access storage mode provided in this embodiment uses the combination of state machine and registers of the data receiving module to control the data to complete the read operation in sequential access storage mode, thereby improving the flexibility and versatility of the read access processing process.

[0226] Furthermore, this application also provides a true random number access method. Figure 13 is a flowchart of a true random number access method provided in an embodiment of this application. As shown in Figure 13, the method includes:

[0227] S31: Get a true random number;

[0228] S32: When a data congestion mechanism is caused by a true random number, pause the access to the true random number.

[0229] S33: When the true random numbers are not continuous, obtain a backup data source to replace the true random numbers, and use the replaced true random numbers for access processing;

[0230] The process of true random number access is completed in the same way as the steps of data access methods in various storage modes.

[0231] Specifically, Figure 14 is a schematic diagram of a true random number scenario provided by an embodiment of this application. As shown in Figure 14, random numbers are frequently used in cryptographic applications. When the true random number generation speed is fast, if the client reads the data slowly after the control module transmits it to the storage area, a mismatch between the data writing and reading speeds will occur, leading to problems such as data loss and thus causing a data blocking mechanism. If the external true random number module generates data slowly, or if a fault or reset occurs, and the client reads the data quickly, the data sender cannot provide data to the client normally. This results in the client reading empty data from the storage area, leading to data discontinuity and thus causing a data continuity mechanism.

[0232] When the aforementioned data blocking mechanism occurs, access to the true random number will be paused until a consistent read is obtained before data transmission resumes. In cases of data discontinuity, a backup data source must be used to replace the true random number for continued access processing.

[0233] It should be noted that when the true random number in this embodiment is accessed using the above data access method, the true random number simply corresponds to the target data.

[0234] The true random number access method provided in this embodiment, in addition to achieving the beneficial effects of the data access methods of the above-mentioned multiple storage modes, also realizes the interaction between the client and the random number generator, and the blocking and synchronization mechanism of random numbers.

[0235] In some embodiments, it also includes:

[0236] Pre-set the values ​​of the third and fourth registers;

[0237] When the true random number received by the control module causes data congestion, the value of the third register is set to 1, and the write enable signal of the corresponding control module is set to 0 to suspend access processing.

[0238] When the true random numbers received by the data receiving module are discontinuous, the value of the fourth register is set to 1, and a backup data source is used to replace the true random numbers. The access processing is then performed using the replaced true random numbers.

[0239] Specifically, when to pause data access and when to use a backup data source needs to be set through register settings, namely the values ​​of the third and fourth registers.

[0240] Data blocking mechanism: A register Busy is set in the storage module. The data receiving module sets Busy='1' to indicate that it is in a busy state. When the control module detects Busy='1', it sets the write enable signal A_wren='0' and suspends data transmission. Data transmission is resumed after Busy becomes '0'.

[0241] The improved data continuity mechanism involves setting a register Req in the storage module. When Empty_B = '1', the data receiving module sets Req = '1' to indicate that it has read empty data and has a need to continue reading data. At this time, after the control module detects Req = '1', it uses the backup data source module (a pseudo-random number generator in software) to continue the data transmission process; the data transmission is paused after Req becomes '0'.

[0242] The tagging settings based on the third and fourth register values ​​provided in this embodiment improve data recognition efficiency and also realize a data synchronization mechanism between the client and the random number generation module.

[0243] Furthermore, this application also provides a plaintext data access method. Figure 15 is a flowchart of a plaintext data access method provided in an embodiment of this application. As shown in Figure 15, the method includes:

[0244] S41: Obtain plaintext data;

[0245] S42: When the first data format of the encrypted plaintext data is different from the second data format of the plaintext data, the plaintext data is converted according to the second data format to obtain the target plaintext data;

[0246] S43: Access and process the target plaintext data to encrypt the plaintext data;

[0247] The access processing involves steps similar to those of data access methods for various storage modes.

[0248] Specifically, Figure 16 is a data conversion diagram of a cryptographic module provided in an embodiment of this application. As shown in Figure 16, the Data Encryption Standard (DES) algorithm cryptographic module is used as an example. DES encrypts data in 64-bit data blocks. The data organization method in the host computer can be big-endian (high byte stored at low address) or little-endian (low byte stored at low address). The DES module can also be big-endian or little-endian. If the data organization method used by the host computer is different from that of the cryptographic module, the DES module will have encryption errors and therefore cannot obtain the correct data.

[0249] When the first data format of the encrypted plaintext data is the same as the second data format of the plaintext data, the plaintext data can be directly read from the storage module and then encrypted without adjusting the data format.

[0250] When the first data format of the encrypted plaintext data differs from the second data format of the plaintext data, the format needs to be converted before being transmitted to the cryptographic module, i.e., the data receiving module. This transmission process is the same as the access processing process for the various storage modes described above, and will not be elaborated upon here.

[0251] The plaintext data access method provided in this embodiment, in addition to achieving the beneficial effects of the above-mentioned data access method, also realizes automatic big-endian matching between the host computer and the cryptographic module data, ensuring the correctness of the cryptographic data.

[0252] In some embodiments, the comparison process between the first data format and the second data format includes:

[0253] Preset the value of the fifth register;

[0254] The plaintext data that has already been transmitted to the encryption module is used as the first data.

[0255] Encrypt the first sub-data of the first data;

[0256] If an error occurs during encryption, the value of the fifth register is set to 1, and it is determined that the first data format of the encrypted plaintext data is different from the second data format of the plaintext data.

[0257] If the encryption process is successful, the value of the fifth register is set to 0, and the first data format of the encrypted plaintext data is determined to be the same as the second data format of the plaintext data.

[0258] Specifically, in this process, a fifth register value (i.e., the Error register value) is set within the storage module. When the cryptographic module (data receiving module) receives the first sub-data of the first data, encryption processing is performed. If an error occurs during the encryption process, the fifth register value is set to 1, indicating that the processing format is different. If the encryption process is correct, the fifth register value is set to 0, indicating that the processing format is the same.

[0259] When the cryptographic module processes data in Little-Endian format, and the data in the host computer is also in Little-Endian format, the data format of the cryptographic module and the host computer is consistent. In this case, the cryptographic module can obtain the correct result when encrypting the data, and there is no need to set the Error register. When the control module reads Error = '0', there is no need to adjust the data format.

[0260] When the cryptographic module processes data in Little-Endian format, but the data in the host computer is in Big-Endian format, an error will occur during the encryption process after the cryptographic module receives the first Big-Endian data from the host computer, failing to generate the expected result. At this point, the cryptographic module sets the Error register to '1'. The data format conversion module reads Error = '1' and, starting from the second data, reverses the order of each 64-bit data from the host computer, converting the received Big-Endian format to Little-Endian format. After the conversion, the data is then transmitted to the storage module. This ensures that from the second data onwards, the DES cryptographic module obtains the correct encrypted data.

[0261] Similarly, when the cryptographic module processes data in Big-Endian format, the data format conversion module processes the data in the same way as in the above embodiment. When it detects Error = '0', it does not need to reverse the byte order in the 64-bit data. For each 64-bit data received from the host computer, it outputs Data[7……0], Data[15……8], ..., Data[63……56] in sequence, which are then transmitted to the storage module address units 0x(k), 0x(k+1), ..., 0x(k+7) (k≥0). When it detects Error = '1', it needs to reverse the byte order in the 64-bit data. For each 64-bit data received from the host computer, it outputs Data[63……56], Data[55……48], ..., Data[7……0] in sequence, which are then transmitted to the storage module address units 0x(k), 0x(k+1), ..., 0x(k+7) (k≥0).

[0262] Figure 17 is a flowchart of a data format conversion process provided in an embodiment of this application. As shown in Figure 17, it includes:

[0263] S44: Determine if the value of the fifth register is 1; if yes, proceed to step S45; otherwise, proceed to step S48.

[0264] S45: Determine the data interval as 7;

[0265] S46: Reverse the current first data to obtain the processed first data;

[0266] S47: Decrease the data packet in reverse order by 1 to obtain the next second data, which is then used as the new current first data. Return to step S46; until the reversed data packet count is 0.

[0267] S48: Output the processed data packets one by one.

[0268] The comparison process of the processing formats provided in this embodiment simplifies the results presented in the comparison process and improves data processing efficiency.

[0269] Embodiments of this application also provide a data access device with multiple storage modes. Figure 18 is a structural diagram of a data access device with multiple storage modes provided in an embodiment of this application. As shown in Figure 18, the device includes:

[0270] Module 21 retrieves the current access operation and target data;

[0271] Access module 22, in sequential access storage mode, performs access processing on target data according to the current access operation and data count flag; wherein, the logic circuit function corresponding to the data count flag is implemented by a reconfiguration system for multiple storage modes.

[0272] For a description of the features of the data access device corresponding to the multiple storage modes in the embodiments, please refer to the relevant description of the data access method corresponding to the multiple storage modes in the embodiments, which will not be repeated here.

[0273] Furthermore, embodiments of this application also provide a true random number access device. For a description of the features in the embodiments corresponding to the true random number access device, please refer to the relevant descriptions of the embodiments corresponding to the true random number access method, which will not be repeated here.

[0274] Furthermore, embodiments of this application also provide a plaintext data access device. For a description of the features in the embodiments corresponding to the plaintext data access device, please refer to the relevant descriptions in the embodiments corresponding to the plaintext data access method, which will not be repeated here.

[0275] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps of any of the above-described multiple storage mode data access methods, such as a true random number access method, or a plaintext data access method.

[0276] Embodiments of this application also provide a computer non-volatile readable storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above-described multiple storage modes data access methods, such as a true random number access method, or a plaintext data access method when running.

[0277] In one exemplary embodiment, the aforementioned non-volatile readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0278] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps of any of the above-described multiple storage modes data access methods, such as a true random number access method, or a plaintext data access method.

[0279] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps of any of the above-described multiple storage modes data access methods, such as a true random number access method, or a plaintext data access method.

[0280] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0281] The data access method, electronic device, medium, and product provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.

Claims

1. A reconstruction system of multiple storage modes, characterized by, It includes a storage module with a counting unit, the counting unit including a comparator, an inverter and a buffer group; multiple storage modes include at least random access storage mode and sequential access storage mode: random access storage mode and sequential access storage mode share the same preset storage space; The input terminal of the buffer group is connected to the comparator, and the enable terminal is connected to the inverter. It is configured to output a data count flag for the current access operation. The comparator receives a storage quantity signal and a threshold signal from a preset storage space to determine the current access operation. The inverter receives a storage mode selection signal. The buffer group corresponds to the random access storage mode when it is in a blocked state and to the sequential access storage mode when it is in an open state, so that the access control device can access and process the target data according to the current access operation and the data count flag.

2. The system for reconstruction of multiple storage modes of claim 1, wherein, The buffer group includes a first buffer group, and the first buffer group includes a first buffer and a second buffer; The input terminals of both the first buffer and the second buffer are connected to the comparator, and the enable terminals of both buffers are connected to the inverter; the first buffer is configured to output a write flag, and the second buffer is configured to output a read flag.

3. The system for reconstruction of multiple storage modes of claim 2, wherein, The comparator includes a first comparator and a second comparator, and the inverter includes a first inverter and a second inverter; The first comparator and the second comparator each receive the storage quantity signal at their first terminals; the second terminal of the first comparator receives the total storage quantity signal of the threshold signal, and its output terminal is connected to the input terminal of the first buffer; the second terminal of the second comparator receives the numerical signal of the threshold signal, and its output terminal is connected to the input terminal of the second buffer. The first inverter and the second inverter each receive the storage mode selection signal at their respective input terminals; The output terminal of the first inverter is connected to the enable terminal of the first buffer; the output terminal of the second inverter is connected to the enable terminal of the second buffer.

4. The system for reconstruction of multiple storage modes of claim 3, wherein, The status output process for the first buffer and the second buffer includes: When the storage mode selection signal is in random access storage mode, if both the first inverter and the second inverter output the second level, it is determined that the first buffer and the second buffer are in a blocked state. When the storage mode selection signal is in sequential access storage mode, the first level is output after passing through the first inverter and the second inverter, thus determining that the first buffer and the second buffer are in a conducting state.

5. The system for reconstruction of multiple storage modes of claim 4, wherein, The output process of the data counting marker includes: When the storage quantity signal is 0, the first comparator outputs a second level, and after passing through the first buffer, outputs the write flag as write; the second comparator outputs a first level, and after passing through the second buffer, outputs the read flag as disable read. Alternatively, when the storage quantity signal is greater than or equal to 1 and less than the total storage quantity signal, the first comparator outputs a second level, which, after passing through the first buffer, outputs the write flag as write; the second comparator outputs a second level, which, after passing through the second buffer, outputs the read flag as read; Alternatively, when the number of stored items signal equals the total number of stored items signal, the first comparator outputs a first level, which, after passing through the first buffer, outputs the write flag as disabled; the second comparator outputs a second level, which, after passing through the second buffer, outputs the read flag as read.

6. The system for reconstruction of multiple storage modes of claim 3, wherein, The access control device includes a control module and a data receiving module; wherein, each pair of modules, including the control module, the storage module, and the data receiving module, is provided with ports corresponding to write and read operations, so as to realize the access processing of read and write operations between the control module and the storage module, and between the storage module and the data receiving module.

7. The system for reconstruction of multiple storage modes of claim 6, wherein, The buffer group also includes a second buffer group; The output of the first buffer group is connected to the input of the second buffer group; The enable pin of the second buffer group receives the register value; The output terminal of the second buffer group outputs the data count flag. When the register value is 1, the second buffer group is in an on state, and when the register value is 0, the second buffer group is in a blocked state.

8. The system for reconstruction of multiple storage modes of claim 7, wherein, The second buffer group includes a third buffer, a fourth buffer, a fifth buffer, and a sixth buffer; the register value includes a first register value and a second register value; The input terminals of the third buffer and the fourth buffer are each connected to the output terminal of the first buffer and are configured to output the write flags corresponding to the control module and the data receiving module. The input terminals of the fifth buffer and the sixth buffer are each connected to the output terminal of the second buffer, and are configured to output the corresponding read flags of the control module and the data receiving module. The third and fifth buffers each receive the first register value at their respective enable terminals; the fourth and sixth buffers each receive the second register value at their respective enable terminals.

9. The system for reconstruction of multiple storage modes of claim 8, wherein, The output process of the data count marker in the second buffer group includes: When the control module performs a read or write operation, the first register value is set to 1 and the second register value is set to 0, thus determining that the output terminals of the third buffer and the fifth buffer each output a read flag or a write flag. Alternatively, when the data receiving module performs a read or write operation, the first register value is set to 0 and the second register value is set to 1, thereby determining that the output terminals of the fourth buffer and the sixth buffer each output a read flag or a write flag.

10. The multi-storage mode reconstitution system of claim 5, wherein, It also includes a seventh buffer; The input terminal of the seventh buffer is connected to the first data output port of the control module, the enable terminal is connected to the write enable port, and the output terminal is connected to the write data port of the storage module. The seventh buffer is configured to be turned on when the write enable port outputs a first level, and to write the target data to the storage module.

11. The system for reconstruction of a plurality of storage modes according to claim 9, wherein, It also includes the eighth, ninth, and tenth buffers; The output terminal of the eighth buffer is connected to the first data input port of the control module, the enable terminal is connected to the read enable port, and the input terminal is connected to the read data port of the storage module. The input terminal of the ninth buffer is connected to the second data output port of the data receiving module, the enable terminal is connected to the write enable port of the data receiving module, and the output terminal is connected to the write data port of the storage module. The output terminal of the tenth buffer is connected to the second data input port of the data receiving module, the enable terminal is connected to the read enable port of the data receiving module, and the input terminal is connected to the read data port of the storage module.

12. A data access method of a plurality of storage modes, characterized by, include: Get the current access operation and target data; In sequential access storage mode, the target data is accessed and processed according to the current access operation and the data count flag; wherein, the logic circuit function corresponding to the data count flag is implemented by the reconfiguration system of multiple storage modes as described in any one of claims 1 to 11.

13. The data access method of multiple storage modes according to claim 12, wherein, During the sequential access storage mode access processing, the storage address of the stored data in the storage unit of the preset storage space is set in advance to realize access processing according to the storage address.

14. The data access method of multiple storage modes according to claim 13, wherein, When the current access operation is a read operation, and the target data consists of multiple consecutive data items, the access processing for the target data includes: Obtain the first target sub-data of the storage unit and its corresponding data address; The access control device reads the first target sub-data according to the data address; The next second target sub-data of the first target sub-data is migrated to the data address as the new first target sub-data for reading, until the target data is completely read.

15. The data access method of multiple storage modes according to claim 13, wherein, When the current access operation is a read operation, and the target data consists of multiple consecutive data items, the access processing for the target data includes: Retrieve multiple consecutive data sets and their corresponding data addresses; The access control device reads multiple consecutive data entries based on the data address. Correspondingly, after completing the reading and access of the target data, the process also includes: The data at the next data address in the storage unit that represents the target data is migrated to the data address.

16. The data access method of multiple storage modes according to claim 12, wherein, When the current access operation is a write operation and is written to the storage module by the control module, the target data is accessed according to the current access operation and the data count flag, including: When the write status information of the control module is a write operation and the data count flag is a write flag, the target data write data state is entered; The target data is written from the first data output port corresponding to the first port of the control module to the write data port of the storage module; Decrement the register flag value of the control module by 1 and increment the address information by 1 to enter the waiting state; Write the next target data when the updated register flag value is greater than 0 and the data count flag is set to write, until the register flag value is 0, to complete the writing process of all target data.

17. The data access method of multiple storage modes according to claim 12, wherein, When the current access operation is a read operation and the data receiving module reads the storage module, the target data is accessed according to the current access operation and the data count flag, including: When the read status information of the data receiving module is a read operation and the data count flag is a read flag, the target data read data state is entered; The target data is read from the read data port of the storage module to the second data input port corresponding to the second port of the data receiving module; Decrement the register flag value of the data receiving module by 1 and enter the waiting state; The next target data is read when the updated register flag value is greater than 0 and the data count flag is set to read, until the register flag value is 0, thus completing the reading process of all target data.

18. A true random number access method, characterized by, include: Get truly random numbers; When the true random number causes data congestion, the access processing of the true random number is suspended. When the true random numbers are discontinuous, an alternative data source is obtained to replace the true random numbers, and the replaced true random numbers are used for access processing; wherein, the process of accessing and processing the true random numbers is completed by the steps of the data access method for multiple storage modes as described in any one of claims 12 to 17.

19. The true random number access method of claim 18, wherein, Also includes: Pre-set the values ​​of the third and fourth registers; When the true random number received by the control module causes data congestion, the value of the third register is set to 1, and the write enable signal of the control module is set to 0 to suspend access processing. When the true random numbers received by the data receiving module are not continuous, the value of the fourth register is set to 1, a backup data source is used to replace the true random numbers, and the access processing is performed using the replaced true random numbers.

20. A method of accessing plaintext data, the method comprising: include: Obtain plaintext data; When the first data format for encrypting the plaintext data is different from the second data format for the plaintext data, the plaintext data is converted according to the second data format to obtain the target plaintext data. The target plaintext data is accessed and processed to encrypt the plaintext data; wherein the access processing is performed in accordance with the steps of the data access method of multiple storage modes as described in any one of claims 12 to 17.

21. The method of accessing plaintext data of claim 20, wherein, The comparison process between the first data format and the second data format includes: Preset the value of the fifth register; The plaintext data that has already been transmitted to the encryption module is used as the first data. The first sub-data of the first data is encrypted; If an error occurs during the encryption process, the value of the fifth register is set to 1, and it is determined that the first data format for encrypting the plaintext data is different from the second data format for the plaintext data. If the encryption process is successful, the value of the fifth register is set to 0, and it is determined that the first data format for encrypting the plaintext data is the same as the second data format for the plaintext data.

22. An electronic device, comprising: include: Memory, configured to store computer programs; A processor, configured to execute the computer program, implements the steps of the data access method with multiple storage modes as described in any one of claims 12 to 17, or the true random number access method as described in claim 18 or 19, or the plaintext data access method as described in claim 20 or 21.

23. A computer non-volatile readable storage medium characterized in that, The computer non-volatile readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of the data access method of the multiple storage modes as described in any one of claims 12 to 17, or the true random number access method as described in claim 18 or 19, or the plaintext data access method as described in claim 20 or 21.

24. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the data access method with multiple storage modes as described in any one of claims 12 to 17, or the true random number access method as described in claim 18 or 19, or the plaintext data access method as described in claim 20 or 21.