Order-preserving register, order-preserving method, medium, program product and terminal

By introducing a sequence-saving numbering module into the register, assigning tokens to each transaction request, and outputting data according to the token order, the problem that traditional registers cannot achieve data sequence-saving is solved, and the order and integrity of the data are realized.

CN119088336APending Publication Date: 2024-12-06CORE YUNSHENG (HANGZHOU) ELECTRONIC TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410966128.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Traditional register FIFO cannot realize the data order-keeping function and cannot reorganize the data according to the preset order, resulting in the possibility of sequential confusion during data transmission, affecting the integrity and correctness of the data.

Method used

A sequence-safe register is designed, including sequence-safe numbering module and register module. By assigning a unique token to each transaction request before the data enters the register, and sorting it according to the token order when the transaction result is output, the data output is ensured. The order is consistent with the preset order.

Benefits of technology

It realizes the output of data in preset order in registers, ensuring the order and integrity of data, solving the problem that traditional registers cannot achieve order preservation, and improving the reliability and efficiency of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088336A_ABST
    Figure CN119088336A_ABST
Patent Text Reader

Abstract

The invention provides an order-preserving register, an order-preserving method, a medium, a program product and a terminal. The order-preserving register comprises an order-preserving numbering module and a register module. According to the invention, the order-preserving numbering module is arranged in the order-preserving register, the order-preserving numbering module can apply for a token for the data entering the order-preserving register before a series of transactions, and the data entering the register module after the transactions are processed are all provided with the token, so that the data can be output in the register module according to the token in sequence; even if the sequences of the data written into the register module are different, the correct sequence can be kept during output, so that the sequence-preserving function is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an order-preserving register, an order-preserving method, a medium, a program product and a terminal. Background Art

[0002] In modern electronic systems, the efficiency of data transmission and processing is crucial. In order to achieve efficient data management, register FIFO (First In First Out) is widely used as a basic data cache structure. Register FIFO ensures that data is stored and retrieved in the order in which it enters through its simple data access mechanism, meeting the requirements for data order in most scenarios. Register FIFO can achieve the purpose of data caching by making the data entering it first in first out.

[0003] However, there is a scenario in the chip where the order of data entering the FIFO may be chaotic, but the output data needs to be guaranteed to have a certain order. This process is called order preservation. Order preservation specifically means that during the data transmission process, although the arrival order of the data may be inconsistent with the sending order, the system needs to be able to reorganize the data in a specific order to ensure the integrity and correctness of the data. However, in this case, the traditional register FIFO cannot meet the data sequentiality requirements because it only provides a simple first-in-first-out mechanism without the ability to reorder the data. The traditional register FIFO does not have an order preservation function and lacks dynamic sorting capabilities. Summary of the invention

[0004] In view of the above-mentioned shortcomings of the prior art, the present invention provides an order-preserving register, an order-preserving method, a medium, a program product and a terminal, which are used to solve the problem that the traditional register FIFO in the prior art cannot realize the order-preserving function.

[0005] To achieve the above-mentioned purpose and other related purposes, the first aspect of the present application provides an order-preserving register, including a sequence-preserving numbering module and a register module, wherein the sequence-preserving numbering module is connected to the register module; wherein the receiving end of the sequence-preserving numbering module receives transaction requests and numbers them according to preset order-preserving requirements, and the sending end of the sequence-preserving numbering module outputs corresponding numbered transaction requests; the receiving end of the register module receives the corresponding numbered transaction results after transaction processing of each numbered transaction request, and the sending end of the register module outputs each transaction result according to the order of the numbers, so that the output order of each transaction result meets the preset order-preserving requirements.

[0006] In some embodiments of the first aspect of the present application, the depth of the register module is consistent with the depth of the sequence numbering module.

[0007] In some embodiments of the first aspect of the present application, the receiving end of the sequence numbering module sends a numberable signal based on a credit mechanism, and in response to the numberable signal, the transaction request is sent to the sequence numbering module so that the sequence numbering module numbers the transaction request.

[0008] In some embodiments of the first aspect of the present application, if the identifiable signal is at a low level, sending the transaction request to the sequence numbering module in response to the identifiable signal is suspended.

[0009] In some embodiments of the first aspect of the present application, the sending end of the register module sends a read signal, generates a read operation instruction in response to the read signal and returns it to the sending end of the register module, so that the register module can perform a read operation on the transaction result based on the read operation instruction, and output the read transaction result through the sending end of the register module.

[0010] In some embodiments of the first aspect of the present application, after the read transaction result is output through the sending end of the register module, it also includes: after the read operation instruction is executed, the register module sends a number release instruction to the sequence number preservation module, and the sequence number preservation module releases the corresponding number after receiving the number release instruction.

[0011] To achieve the above-mentioned purpose and other related purposes, the second aspect of the present application provides an order preservation method, which is applied to the order preservation register as described above, wherein the order preservation register includes a sequence preservation numbering module and a register module, and the sequence preservation numbering module is connected to the register module; the method includes: receiving a transaction request through the receiving end of the sequence preservation numbering module and numbering it according to a preset order preservation requirement, and the sending end of the sequence preservation numbering module outputs a corresponding numbered transaction request; performing transaction post-processing based on the numbered transaction request to obtain a numbered transaction result; receiving the numbered transaction result corresponding to each numbered transaction request through the receiving end of the register module, and the sending end of the register module outputs each transaction result according to the order of the numbering, so that the output order of each transaction result meets the preset order preservation requirement.

[0012] To achieve the above-mentioned purpose and other related purposes, the third aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the order-preserving method when executed by a processor.

[0013] To achieve the above-mentioned purpose and other related purposes, the fourth aspect of the present application provides a computer program product, which includes a computer program code. When the computer program code runs on a computer, the computer implements the order preservation method.

[0014] To achieve the above-mentioned purpose and other related purposes, the fifth aspect of the present application provides an electronic terminal, including a memory, a processor and a computer program stored in the memory; the processor executes the computer program to implement the order preservation method.

[0015] As described above, the sequence preservation register, sequence preservation method, medium, program product and terminal provided by the present application have the following beneficial effects: the present invention sets a sequence preservation numbering module in the sequence preservation register, and the sequence preservation numbering module can apply for a token for the data entering the sequence preservation register before performing a series of transactions. After the transaction processing, the data entering the register module are all accompanied by a token, so that the data can be output in sequence in the register module according to the token. Even if the order of the data when it is written to the register module is different, the correct order can be maintained when it is output, thereby realizing the order preservation function. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 Shown is a schematic diagram of the structure of an order-preserving register in an embodiment of the present application.

[0017] Figure 2 The figure shows a specific embodiment of an order-preserving register in one embodiment of the present application.

[0018] Figure 3 Shown is a schematic diagram of the initial state of a register module in one embodiment of the present application.

[0019] Figure 4 Shown is a schematic diagram of writing data for the first time in an embodiment of the present application.

[0020] Figure 5 Shown is a schematic diagram of a second data writing in an embodiment of the present application.

[0021] Figure 6 Shown is a first pop schematic diagram of an embodiment of the present application.

[0022] Figure 7 Shown is a schematic diagram of a third data writing in an embodiment of the present application.

[0023] Figure 8 Shown is a second pop schematic diagram of an embodiment of the present application.

[0024] Fig. 9 Shown is a third pop schematic diagram of an embodiment of the present application.

[0025] Fig.10 Shown is a flowchart of an order-preserving method in one embodiment of the present application.

[0026] Fig.11 Shown is a schematic diagram of the structure of an electronic terminal in one embodiment of the present application. DETAILED DESCRIPTION

[0027] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0028] An embodiment of the present invention provides an order-preserving register. The present invention sets a sequence-preserving numbering module in the order-preserving register. The sequence-preserving numbering module can apply for a token for the data entering the order-preserving register before performing a series of transactions. After the transaction processing, the data entering the register module are all accompanied by a token, so that the data can be output in sequence in the register module according to the token. Even if the order of the data when writing to the register module is different, the correct order can be maintained when output, thereby realizing the order-preserving function.

[0029] To facilitate understanding of the embodiments of the present application, first Figure 1 Detailed description. Figure 1 The structure diagram of a reorder FIFO 100 in an embodiment of the present invention is shown. The structure of the reorder FIFO 100 in this embodiment includes: a sequence numbering module 110 and a register module 120, wherein the sequence numbering module 110 is connected to the register module 120;

[0030] The receiving end of the sequence numbering module 110 receives the transaction request and numbers it according to the preset sequence numbering requirement, and the sending end of the sequence numbering module 110 outputs the corresponding transaction request with a number;

[0031] The receiving end of the register module 120 receives the corresponding numbered transaction results after transaction processing of each numbered transaction request, and the sending end of the register module 120 outputs each transaction result according to the order of the numbers so that the output order of each transaction result meets the preset order preservation requirement.

[0032] It should be explained that when processing data, traditional registers follow the first-in-first-out principle, that is, the data that enters first is output first. However, in the actual processing process, due to the different complexity of each transaction request, the processing time required will also be different. Some transactions may be completed quickly, while others may take longer. In a parallel environment, different transaction requests may compete for the same resources, such as memory, processor time, etc. This competition may cause the execution of some transaction requests to be delayed. Therefore, the order in which the transaction results enter the register is different from the original order. For example, the transaction request issued first may return later due to longer processing time or resource competition, while the transaction request issued later may return earlier due to shorter processing time or less resource competition.

[0033] The embodiment of the present invention proposes an order preservation register 100 that can be used for order preservation. The order preservation register 100 is composed of two main parts: a sequence preservation numbering module 110 and a register module 120. Before data performs a transaction, the transaction request will first enter the sequence preservation numbering module 110, which is responsible for assigning a unique token to each transaction request, and the token is a number. The numbering starts from 0 and is assigned according to the preset order preservation requirements to ensure that each transaction request can obtain a number corresponding to the order in which it requests order preservation. Specifically, a transaction request req enters the sequence preservation numbering module 110, and then a token is assigned to the transaction request req, and a numbered transaction request req+token is output. The maximum value of the token is the maximum depth set by the sequence preservation numbering module 110, and the maximum depth is preferably 2. n .

[0034] When a transaction request obtains its corresponding token, it will carry this token throughout the entire processing process. In this way, even if the data is out of order when entering the register module 120, the register module 120 can correctly output the data according to the preset order preservation requirements based on the token carried by each transaction request, thereby maintaining the original order of the data. That is, by assigning tokens to transaction requests and sorting the transaction results according to the tokens when they are output, it is ensured that the order of data output is consistent with the original order of the transaction requests.

[0035] In one embodiment, the depth of the register module 120 is consistent with the depth of the sequence number preservation module 110 .

[0036] It should be noted that transaction requests are performed in the order of token numbers, such as table lookup, SRAM (Static Random Access Memory) reading, and other operations. After the transaction results are returned, the returned order may not be in the order of token numbers, but chaotic, which is equivalent to disorder. After the disordered transaction results enter the register module 120, the depth of the register module 120 and the depth of the sequence preservation numbering module 110 must be consistent. The register module 120 will output in sequence according to the token carried by the returned results, thereby achieving order preservation.

[0037] Among them, the depth of the register module 120 refers to the maximum number of data items it can store. The depth of the sequence-preserving module 110 refers to the maximum number of tokens that can be allocated to a transaction request. When the depths of the two are consistent, it can be ensured that each token has a corresponding storage location, thereby achieving synchronization of data and tokens. If the depth of the register module 120 is less than the depth of the sequence-preserving module 110, then in the case of too many transaction requests, the register module 120 may not be able to store all the returned results, resulting in data loss. On the contrary, if the depth of the register module 120 is greater than the depth of the sequence-preserving module 110, then some storage space may not be utilized, resulting in a waste of resources.

[0038] At the same time, when the depth of the register module 120 is consistent with the depth of the sequence numbering module 110, each returned transaction request can find the correct location for storage according to its token. In this way, even if the return of the transaction request is out of order, the register module 2 can reorder the data according to the numbering order of the token to ensure the order of the output. Keeping the depth consistent can avoid unnecessary data reordering or search operations, thereby improving the processing efficiency of the entire system. The return result of each transaction request can be quickly placed in the correct location, reducing processing time.

[0039] It should be emphasized that the depth of the keeping register module 120 is consistent with the depth of the sequence numbering module 110 to ensure that the sequence register reorder FIFO 100 in this embodiment can effectively process out-of-order returned results while improving the efficiency, reliability and manageability of the system.

[0040] In one embodiment, the receiving end of the serial numbering module 110 sends a numberable signal based on a credit mechanism, and in response to the numberable signal, the transaction request is sent to the serial numbering module 110 so that the serial numbering module 110 numbers the transaction request.

[0041] In some examples, if the identifiable signal is at a low level, sending the transaction request to the sequence number keeping module 110 in response to the identifiable signal is suspended.

[0042] Specifically, the receiving end of the security numbering module 110 sends a coded signal has_credit to the outside. After receiving the coded signal has_credit, the sender of the transaction request sends the transaction request to the security numbering module 110 in response to the coded signal has_credit. However, when the application number of the security numbering module 110 is full, the coded signal has_credit output by the security numbering module 110 will be pulled low, indicating that no more tokens can be applied for, that is, no new transaction requests can be received for numbering.

[0043] Among them, in digital circuits, signals usually have two states: high level (HIGH) and low level (LOW). High level usually represents logic 1, while low level represents logic 0. The numberable signal has_credit in this embodiment is an indication signal sent by the sequence numbering module 110, which is used to tell the sender of the transaction request whether the current sequence numbering module 110 has remaining numbering capacity. When the sequence numbering module 110 has sufficient capacity (that is, there are still available token numbers), the has_credit signal will be set to a high level, indicating that the transaction request can be numbered; when the application numbering capacity of the sequence numbering module 110 reaches the upper limit (that is, all token numbers have been allocated), the has_credit signal will be set to a low level, that is, the has_credit signal is pulled low, indicating that no new transaction requests can be received for numbering at present. The has_credit signal can be pulled low to remind the sender of the transaction request to suspend sending new transaction requests.

[0044] It should be explained that the core of the reorder fifo 100 in the embodiment of the present invention is still a register, so there is a back pressure mechanism. The back pressure mechanism of the traditional register is: when the register is full, the push operation cannot be performed. The reorder fifo 100 in the embodiment of the present invention cancels this mechanism and adopts a credit mechanism. The credit mechanism informs the sender in advance of the amount of data that it can receive (i.e., the credit limit) through the receiver, instead of simply blocking the writing of data when the register is full. The receiver dynamically updates and sends the credit limit to the sender according to the current state and processing capacity of its buffer. Although the credit mechanism and the back pressure mechanism have the same effect, the use of the credit mechanism allows more sophisticated data flow control to reduce unnecessary transmission pauses, which helps to improve the throughput and response speed of the system.

[0045] In one embodiment, the sending end of the register module 120 sends a read signal, generates a read operation instruction in response to the read signal and returns it to the sending end of the register module 120, so that the register module 120 can perform a read operation on the transaction result based on the read operation instruction, and output the read transaction result through the sending end of the register module 120.

[0046] Specifically, the specific process of the register module 120 executing the output of the transaction results in the order of numbers is as follows: the sending end of the register module 120 sends a read signal. When complete is set to 1, the flag read data is valid and can be read by the external system or component. When the external system or component detects that the complete flag is 1, a read operation instruction pop is generated. The generated read operation instruction pop is sent to the register module 120 to trigger the read operation, execute the read data operation, access and prepare to output the data. After the register module 120 completes the read operation, it outputs the read transaction result read_data.

[0047] It should be noted that the process of the register module 120 receiving the corresponding numbered transaction result after the transaction processing of each numbered transaction request is as follows: sending a push operation to the register module 120, and sending the numbered transaction result write_data at the same time, that is, the data returned by req contains the token and enters the register module 120. The clock signal clk enters both the sequence numbering module 110 and the register module 120. The purpose of the clock signal clk is to provide a common timing reference for each module, and synchronize the actions of each module according to the clock signal. In digital circuit design, synchronous operation is the key to avoiding timing problems and ensuring data consistency.

[0048] In one embodiment, after the read transaction result is output through the sending end of the register module 120, it also includes: after the read operation instruction is executed, the register module 120 sends a number release instruction to the sequence number preservation module 110, and the sequence number preservation module 110 releases the corresponding number after receiving the number release instruction.

[0049] It should be noted that when the read operation instruction pop is generated externally in response to the read signal complete and sent to the register module 120, it indicates that the register module 120 now needs to output data externally. This operation will cause a number to be released because the data has been read and output. Therefore, when the read operation instruction pop is sent to the register module 120, the number release instruction free_token is also sent to the sequence numbering module 110 at the same time. After receiving the number release instruction free_token, the sequence numbering module 110 will release the corresponding token number. This released token can now be used to number new transaction requests to ensure the order and integrity of the data.

[0050] Specifically, when popping data, when the corresponding token's complete is set to 1, the data can be popped out. The order of popping is based on the token number. After popping the data, complete is set to 0. In this cycle, order preservation is achieved through tokens.

[0051] It should be emphasized that the present invention discloses a reorder fifo register that can be used for order preservation. By adding a sequence preservation numbering module 110 in the sequence preservation register, the sequence preservation numbering module 110 can apply for a token for the data entering the sequence preservation register before performing a series of transactions. After the transaction processing, the data entering the register module 120 are all equipped with tokens, so that the data can be output in sequence in the register module 120 according to the token. Even if the order of the data when writing to the register module 120 is different, the correct order can be maintained when output, thereby realizing the order preservation function.

[0052] The above text has explained in detail the structure and implementation process of an order-preserving register provided in the embodiment of the present application. To facilitate understanding by those skilled in the art, the following specific embodiments are provided for description.

[0053] like Figure 2 As shown, it is a specific embodiment diagram of an order-preserving register in an embodiment of the present application, which mainly includes:

[0054] A transaction request req+addr enters the sequence numbering module 110 to apply for a token, outputs a numbered transaction request req+addr+token, and the numbered transaction request req+addr+token enters the SRAM to perform an SRAM read operation. In the SRAM, according to the corresponding transaction request result read, the numbered transaction result write_data+token is obtained, and the write_data+token is returned to the register module 120. Push represents the operation of writing the data write_data and token to the register module 120. In the register module 120, according to the pop instruction operation, the operation of reading data from it is performed, that is, in response to the pop instruction operation, the write_data+token in the register module 120 is read, and after reading the token, the read_data is output and the corresponding token is released. At the same time, the free_token instruction is sent to the sequence numbering module 110, and the sequence numbering module 110 releases the corresponding token number and returns the token to the available pool so that the token can be reallocated.

[0055] In order to facilitate the display of the processing logic of the register module in the order-preserving register of the present application, the following specific embodiments are provided for illustration. Figures 3 to 9 illustrate.

[0056] like Figure 3 As shown, the initial state of the register module is: the maximum depth of the index in the complete array is the depth of the token, that is, the index starts from 0 until the index is equal to the maximum value of the token, index = 0, index = 1, index = 1, ..., index = maximum value of the token; the maximum depth of the index in the data array is the depth of the token, that is, the index starts from 0 until the index is equal to the maximum value of the token, index = 0, index = 1, index = 1, ..., index = maximum value of the token; at this time, the read pointer is also 0; the read pointer starts from 0, and when popping data, when the compete of the read pointer corresponding to the token is set to 1, the data can be popped out.

[0057] like Figure 4As shown, assuming that the order of writing transaction results is out of order, the first write token=2, write_data=data2, at this time the value of index=2 in the complete array corresponds to 1, and the value of index=2 in the data array corresponds to data2. When the read pointer=0, the value of index=0 of complete is 0, and pop cannot be performed at this time.

[0058] like Figure 5 As shown, token=0 and write_data=data0 are written for the second time. At this time, the value of index=0 in completearray is 1, and the value of index=0 in data array is data0. At this time, when the read pointer=0 and the value of index=0 in complete is 1, the output complete=1 indicates that pop can be performed at this time.

[0059] like Figure 6 As shown, the first pop is performed, and after the first pop, the read pointer jumps to 1 (read pointer = 1), and the value of index = 0 in the complete array is cleared to 0.

[0060] like Figure 7 As shown, continue to write token=1 for the third time, write_data=data1, at this time the value of index=1 of completearray is 1, and the value of index=1 of data array is data1; at this time when the read pointer=1 and the value of index=1 of complete is 1, the output complete=1 indicates that pop can be performed at this time.

[0061] like Figure 8 As shown, the second pop is performed. After the second pop, the read pointer jumps to 2 (read pointer = 2), and the value of index = 1 of the complete array is cleared to 0. At this time, when the read pointer = 2 and the value of index = 2 of complete is 1, the output complete = 1, indicating that the third pop can be performed at this time.

[0062] like Fig. 9 As shown, the third pop is performed, after which the read pointer jumps to 3 (read pointer = 3), and the value at index = 2 of completearray is cleared to 0.

[0063] The order of the above pops is based on the token number. After popping the data, complete is set to 0, and the above method is repeated to preserve the order through tokens.

[0064] In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects, and do not limit their order. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0065] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" represent examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0066] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent: a, b, c, ab, ac, bc or abc, where a, b, c can be single or multiple.

[0067] Fig.10 is a flow chart of the sequence preservation method provided in an embodiment of the present application, the sequence preservation method is applied to the sequence preservation register as described above, the sequence preservation register includes a sequence preservation numbering module and a register module, the sequence preservation numbering module is connected to the register module; Fig.10 As shown, the sequence preservation method includes the following steps:

[0068] Step S1001: receiving a transaction request through the receiving end of the sequence preservation numbering module and numbering it according to a preset sequence preservation requirement, and the sending end of the sequence preservation numbering module outputs a corresponding transaction request with a number;

[0069] Step S1002: performing transaction post-processing based on the numbered transaction request to obtain a numbered transaction result;

[0070] Step S1003: receiving the numbered transaction results corresponding to the numbered transaction requests through the receiving end of the register module, and the sending end of the register module outputs the transaction results according to the order of the numbers, so that the output order of the transaction results meets the preset order preservation requirement.

[0071] It should be understood that the specific process of the above corresponding steps has been described in detail in the embodiment of the above sequence preservation register, and for the sake of brevity, it will not be repeated here.

[0072] It should also be understood that the division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present application may be integrated into a processor, or may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0073] Fig.11 is a schematic block diagram of an electronic terminal provided in an embodiment of the present application. Fig.11 As shown in FIG. 1 , the computer device includes: at least one processor 1101, a memory 1102, at least one network interface 1103, and a user interface 1105. The various components in the device are coupled together via a bus system 1104. It can be understood that the bus system 1104 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 1104 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 1104 is not described in detail. Fig.11 In the specification, various buses are labeled as bus systems.

[0074] The user interface 1105 may include a display, a keyboard, a mouse, a trackball, a click gun, keys, buttons, a touch pad or a touch screen.

[0075] It is understood that the memory 1102 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM). The memory described in the embodiments of the present invention is intended to include but is not limited to these and any other suitable categories of memory.

[0076] The memory 1102 in the embodiment of the present invention is used to store various categories of data to support the operation of the electronic terminal 1100. Examples of these data include: any executable program used to operate on the electronic terminal 1100, such as an operating system 11021 and an application 11022; the operating system 11021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application 11022 may include various applications, such as a media player (Media Player), a browser (Browser), etc., for implementing various application services. The order preservation method provided by the embodiment of the present invention may be included in the application 11022.

[0077] The method disclosed in the above embodiment of the present invention can be applied to the processor 1101, or implemented by the processor 1101. The processor 1101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 1101 or the instruction in the form of software. The above processor 1101 may be a general processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 1101 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment of the present invention. The general processor 1101 can be a microprocessor or any conventional processor, etc. In combination with the steps of the accessory optimization method provided in the embodiment of the present invention, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0078] In an exemplary embodiment, the electronic terminal 1100 may be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), or complex programmable logic device (CPLD) to execute the aforementioned method.

[0079] According to the method provided in the embodiments of the present application, the present application also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes the order preservation method of any embodiment of the illustrated embodiments.

[0080] According to the method provided in the embodiments of the present application, the present application also provides a computer-readable storage medium, which stores a program code. When the program code runs on a computer, the computer executes the order preservation method of any one of the illustrated embodiments.

[0081] The terms "component", "module", "system", etc. used in this specification are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program and / or a computer. By way of illustration, both applications running on a computing device and a computing device can be components. One or more components may reside in a process and / or an execution thread, and a component may be located on a computer and / or distributed between two or more computers. In addition, these components may be executed from various computer-readable media having various data structures stored thereon. Components may, for example, communicate through local and / or remote processes according to signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system and / or a network, such as the Internet interacting with other systems through signals).

[0082] Those of ordinary skill in the art will appreciate that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may 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.

[0083] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0084] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0085] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0086] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0087] In the above embodiments, the functions of each functional unit can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When loading and executing computer program instructions (programs) on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integrations. Available media may be magnetic media (e.g., floppy disks, hard disks, tapes), optical media (e.g., high-density digital video discs (DVDs), or semiconductor media (e.g., solid state disks (SSDs), etc.).

[0088] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0089] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0090] In summary, the present application provides an order-preserving register, an order-preserving method, a medium, a program product and a terminal, wherein the order-preserving register includes a sequence-preserving numbering module and a register module; wherein the receiving end of the sequence-preserving numbering module receives transaction requests and numbers them according to preset order-preserving requirements, and the sending end of the sequence-preserving numbering module outputs corresponding numbered transaction requests; the receiving end of the register module receives the corresponding numbered transaction results after transaction processing of each numbered transaction request, and the sending end of the register module outputs each transaction result according to the order of the numbers, so that the output order of each transaction result meets the preset order-preserving requirements.

[0091] The present invention sets a sequence numbering module in the sequence-preserving register, and the sequence numbering module can apply for a token for the data entering the sequence-preserving register before a series of transactions are performed. After the transaction processing, the data entering the register module are all with tokens, so that the data can be output in sequence according to the token in the register module. Even if the order of the data is different when it is written into the register module, the correct order can be maintained when it is output, thereby realizing the sequence-preserving function. Therefore, the present application effectively overcomes various shortcomings in the prior art and has a high industrial utilization value.

[0092] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.

Claims

1. An order-preserving register, characterized in that: It includes a sequence numbering module and a register module, wherein the sequence numbering module is connected to the register module; The receiving end of the sequence preservation numbering module receives the transaction request and numbers it according to the preset sequence preservation requirements, and the sending end of the sequence preservation numbering module outputs the corresponding transaction request with a number; The receiving end of the register module receives the corresponding numbered transaction results after transaction processing of each numbered transaction request, and the sending end of the register module outputs each transaction result according to the order of the numbers so that the output order of each transaction result meets the preset order preservation requirement.

2. The order-preserving register according to claim 1, characterized in that: The depth of the register module is consistent with the depth of the sequence number preservation module.

3. The order-preserving register according to claim 1, characterized in that: include: The receiving end of the sequence numbering module sends a numberable signal based on a credit mechanism, and in response to the numberable signal, the transaction request is sent to the sequence numbering module so that the sequence numbering module numbers the transaction request.

4. The order-preserving register according to claim 3, characterized in that: include: If the identifiable signal is at a low level, sending the transaction request to the sequence number keeping module in response to the identifiable signal is suspended.

5. The order-preserving register according to claim 1, characterized in that: include: The sending end of the register module sends a read signal, generates a read operation instruction in response to the read signal and returns it to the sending end of the register module, so that the register module can perform a read operation on the transaction result based on the read operation instruction, and output the read transaction result through the sending end of the register module.

6. The order-preserving register according to claim 5, characterized in that: After the read transaction result is outputted through the sending end of the register module, the method further includes: After the read operation instruction is executed, the register module sends a number release instruction to the sequence number preservation module, and the sequence number preservation module releases the corresponding number after receiving the number release instruction.

7. A method for preserving order, characterized in that: Applicable to the sequence preservation register according to any one of claims 1 to 6, the sequence preservation register comprising a sequence preservation number module and a register module, the sequence preservation number module being connected to the register module; The method comprises: The receiving end of the sequence preservation numbering module receives the transaction request and numbers it according to the preset sequence preservation requirements, and the sending end of the sequence preservation numbering module outputs the corresponding transaction request with a number; Performing transaction post-processing based on the numbered transaction request to obtain a numbered transaction result; The receiving end of the register module receives the numbered transaction results corresponding to each numbered transaction request, and the sending end of the register module outputs each transaction result according to the order of the numbers, so that the output order of each transaction result meets the preset order preservation requirement.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the order-preserving method according to any one of claims 1 to 6 is implemented.

9. A computer program product, characterized in that The computer program product includes computer program codes, and when the computer program codes are executed on a computer, the computer is enabled to implement the order preservation method according to any one of claims 1 to 6.

10. An electronic terminal comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the order-preserving method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Physical register allocation method and device

    CN121233167A