Method and device for establishing global sequence, electronic equipment and storage medium

By judging the dependency of access transactions in a heterogeneous computer system, and establishing a global order for access transactions that exist in the dependency relationship, solving the problem of unnecessary global order establishment in the prior art, improving the processing performance of access transactions and bus bandwidth utilization efficiency.

CN119536967APending Publication Date: 2025-02-28T-HEAD (SHANGHAI) SEMICON CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311106863.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-29
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In heterogeneous computer systems, the prior art establishes a global order strictly in the order of time when the observation points arrive, resulting in access transactions that do not need to establish a global order to be processed serially, increasing processing time and bus bandwidth consumption.

Method used

By judging the dependency between the access transaction and the latest access transaction, a global order is established only for access transactions with dependencies, avoid unnecessary global order establishment, and allow undependency access transactions to be processed in parallel.

Benefits of technology

It reduces unnecessary global order establishment, shortens the processing time of access transactions, improves the processing performance of access transactions, and reduces bus bandwidth consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119536967A_ABST
    Figure CN119536967A_ABST
Patent Text Reader

Abstract

The invention provides a global sequence establishing method and device, electronic equipment and a storage medium, and belongs to the technical field of computers. The method comprises the following steps: acquiring a first access transaction of a first access object for a target accessed object; determining a relationship between the first access transaction and a second access transaction according to first transaction information of the first access transaction, an object type of the target accessed object and second transaction information of the second access transaction of the target accessed object; and when the first access transaction and the second access transaction do not have the dependency relationship, not establishing a global order of the target accessed object for the first access transaction. According to the method and the device, a global sequence is not established for all the obtained access transactions, but based on the relationship between the access transaction and the latest access transaction, the global sequence is not established for the access transaction without a dependency relationship, so that the establishment of unnecessary global sequences is reduced, and the processing time of the access transaction is shortened.
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 a method, device, electronic device and storage medium for establishing a global order. Background Art

[0002] With the emergence of new computing scenarios such as machine learning and high-performance computing, new computing architectures have also emerged. In a heterogeneous architecture system, high-bandwidth, low-latency data communication is carried out between the CPU and various IO devices / accelerators (such as GPUs) through a highly scalable Internet network. For applications with different computing characteristics and requirements, they can be run on the computing unit that best suits the performance efficiency of a given workload. In a heterogeneous computer system, each computing unit (such as CPU and GPU) has its own computing characteristics. For different computing characteristics, a better computing unit can be selected in a heterogeneous architecture computer system to complete the task, and the selected multiple computing units jointly complete the entire computing task. The memory of a heterogeneous computer system is unified, and each computing unit shares memory. In the entire computing task, different computing units can efficiently access the shared memory. This requires establishing a global order for access transactions of different computing units to the same accessed object (such as a memory unit).

[0003] In the related technology, an observation point obtains access timestamp values ​​of multiple access transactions for an accessed object, and the access timestamp value is the timestamp value when the access transaction arrives at the observation point. A global order is established for the multiple access transactions in order from first to last, so that the accessed object can process each access transaction serially in the order indicated by the global order.

[0004] Although the above method ensures that access transactions are processed in a predetermined order, the global order is established strictly in the order of arrival at the observation point, and the access transactions in the global order are processed serially. For some access transactions that do not require the establishment of a global order, a global order is established due to the arrival at the observation point, resulting in a longer processing time for the access transactions. Summary of the invention

[0005] The embodiment of the present application provides a method, device, electronic device and storage medium for establishing a global order, which can reduce the establishment of unnecessary global orders and reduce the processing time of access transactions. The technical solution is as follows:

[0006] In a first aspect, a method for establishing a global order is provided, the method comprising:

[0007] Obtaining a first access transaction of a first access object to a target accessed object;

[0008] determining, according to first transaction information of the first access transaction, the object type of the target accessed object, and second transaction information of a second access transaction of the target accessed object, a relationship between the first access transaction and the second access transaction, the second access transaction being the latest access transaction that has established or is to establish a global sequence at the target accessed object at the current moment, the global sequence being used to indicate a serial processing order of each access transaction for the target accessed object;

[0009] When there is no dependency relationship between the first access transaction and the second access transaction, a global order on the target accessed object is not established for the first access transaction.

[0010] In a second aspect, a method for establishing a global order is provided, the method comprising:

[0011] Obtaining a first access transaction of a first access object to a target accessed object;

[0012] determining, according to first transaction information of the first access transaction, the object type of the target accessed object, and second transaction information of a second access transaction of the target accessed object, a relationship between the first access transaction and the second access transaction, the second access transaction being the latest access transaction that has established or is to establish a global sequence at the target accessed object at the current moment, the global sequence being used to indicate a serial processing order of each access transaction for the target accessed object;

[0013] When the first access transaction has a dependency relationship with the second access transaction, a global sequence is established for the first access transaction on the target accessed object.

[0014] In a third aspect, a device for establishing a global order is provided, the device comprising:

[0015] An acquisition module, used for acquiring a first access transaction of a first access object to a target accessed object;

[0016] a determination module, configured to determine a relationship between the first access transaction and the second access transaction according to first transaction information of the first access transaction, an object type of the target accessed object, and second transaction information of a second access transaction of the target accessed object, wherein the second access transaction is the latest access transaction with a global sequence established or to be established at the target accessed object at the current moment, and the global sequence is used to indicate a serial processing order of each access transaction for the target accessed object;

[0017] An establishing module is used for not establishing a global sequence of the target accessed object for the first access transaction when there is no dependency relationship between the first access transaction and the second access transaction.

[0018] In a fourth aspect, a device for establishing a global order is provided, the device comprising:

[0019] An acquisition module, used for acquiring a first access transaction of a first access object to a target accessed object;

[0020] a determination module, configured to determine a relationship between the first access transaction and the second access transaction according to first transaction information of the first access transaction, an object type of the target accessed object, and second transaction information of a second access transaction of the target accessed object, wherein the second access transaction is the latest access transaction with a global sequence established or to be established at the target accessed object at the current moment, and the global sequence is used to indicate a serial processing order of each access transaction for the target accessed object;

[0021] An establishing module is used to establish a global sequence of the target accessed object for the first access transaction when there is a dependency relationship between the first access transaction and the second access transaction.

[0022] In a fifth aspect, an electronic device is provided, comprising a processor, a memory, an access controller and an interconnection bus, wherein the processor, the memory and the access controller are connected via the interconnection bus;

[0023] The access controller is a device for establishing a global order as described in the third aspect or the fourth aspect;

[0024] The memory stores at least one program code, and the at least one program code is used to be called by the processor to process access transactions according to the global order established by the access controller.

[0025] In a sixth aspect, a computer-readable storage medium is provided, wherein at least one computer program is stored in the computer-readable storage medium, and when the at least one computer program is executed by a processor, access transactions can be processed in a global order established according to the global order establishment method described in the first aspect or the second aspect.

[0026] In a seventh aspect, a computer program product is provided, the computer program product comprising a computer program, which, when executed by a processor, can process access transactions according to the global order established by the method for establishing a global order described in the first aspect or the second aspect.

[0027] The beneficial effects of the technical solution provided by the embodiment of the present application are:

[0028] When the first access transaction of the first access object to the target accessed object is obtained, the global order of the target accessed object is not directly established for the first access transaction based on the acquisition time of the first access transaction, but the relationship between the first access transaction and the second access transaction is determined based on the first transaction information of the first access transaction, the object type of the target accessed object and the second transaction information of the second access transaction of the target accessed object. In the case where there is a dependency relationship between the first access transaction and the second access transaction, that is, the processing of the first access transaction depends on the second access transaction, a global order is established for the first access transaction and added to the global order of the target accessed object, so that the target accessed object can serially process each access transaction in the order supported by the global order, thereby ensuring that each access transaction is executed in a predetermined order. In the case where there is no dependency relationship between the first access transaction and the second access transaction, that is, the processing of the first access transaction is independent of the processing of the second access transaction, a global order will not be established for the first access transaction, but the first access transaction will be directly sent to the target accessed object for processing. The adoption of this method reduces the establishment of unnecessary global order, enables the target accessed object to process the first access transaction and the second access transaction in parallel, shortens the processing time of the first access transaction, and improves the processing performance of the access transaction.

[0029] In addition, the establishment of a global order will cause a large number of serial transactions to be blocked, reducing the concurrency of transactions, thereby increasing the idle time of the bus bandwidth and the bus bandwidth overhead required to complete the entire transaction. The method of the embodiment of the present application can reduce the establishment of unnecessary global orders, thereby reducing the bandwidth consumption of the bus and further shortening the processing time of access transactions. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0031] Figure 1 is a flow chart of a method for establishing a global order in the related art;

[0032] Figure 2 A structural block diagram of an electronic device provided by an exemplary embodiment of the present application is shown;

[0033] Figure 3 This is a flow chart of a method for establishing a global order provided in an embodiment of the present application;

[0034] Figure 4It is a schematic diagram of a principle for establishing a global sequence of peripheral port addresses provided by an embodiment of the present application;

[0035] Figure 5 is a schematic diagram of a time axis provided in an embodiment of the present application;

[0036] Figure 6 This is a flow chart of a method for establishing a global order provided in an embodiment of the present application;

[0037] Figure 7 It is a schematic diagram of a process of establishing a global order of main memory addresses provided by an embodiment of the present application;

[0038] Figure 8 It is a schematic diagram of another process of establishing a global order of main memory addresses provided by an embodiment of the present application;

[0039] Fig. 9 It is a schematic diagram of another process of establishing a global order of main memory addresses provided by an embodiment of the present application;

[0040] Fig.10 It is a schematic diagram of another process of establishing a global order of main memory addresses provided by an embodiment of the present application;

[0041] Fig.11 It is a flowchart of a process of establishing a global sequence of peripheral port addresses provided by an embodiment of the present application;

[0042] Fig.12 It is a schematic diagram of a process of establishing a global sequence of peripheral port addresses provided by an embodiment of the present application;

[0043] Fig.13 It is a schematic diagram of the structure of a global sequence establishment device provided in an embodiment of the present application;

[0044] Fig.14 It is a schematic diagram of the structure of a global sequence establishment device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0046] It can be understood that the terms "each", "multiple", and "any" used in the embodiments of the present application include two or more, each refers to each of the corresponding multiple, and any refers to any one of the corresponding multiple. For example, the multiple words include 10 words, and each word refers to each of the 10 words, and any word refers to any one of the 10 words.

[0047] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0048] Before executing the embodiments of the present application, the terms involved in the embodiments of the present application are first explained.

[0049] Global order generally means that the order in which a program is executed is the same for all cores of the processor. This program can be executed partially or entirely in different cores.

[0050] MMIO (Memory Mapped Input / Output) is part of the PCI specification. I / O devices are placed in memory space instead of I / O space. From the processor's perspective, after memory-mapped I / O, system devices are accessed in the same way as memory, so they can be completed using the same assembly instructions as reading and writing memory, simplifying the difficulty of program design and the complexity of the interface. I / O, as a channel for communication between the processor and peripherals, is mainly divided into two types: Port I / O and MMIO.

[0051] NoC (Network-on-Chip) is a new communication method for SoC (system-on-chip) and a major component of multi-core technology. NoC brings a new on-chip communication method that significantly outperforms the performance of traditional bus systems. NoC-based systems can better adapt to the global asynchronous and local synchronous clock mechanism used in future complex multi-core SoC designs.

[0052] PCIe (Peripheral Component Interconnect express) is a high-speed serial computer expansion bus standard. It is a high-speed serial point-to-point dual-channel high-bandwidth transmission. The connected devices are allocated exclusive channel bandwidth and do not share the bus bandwidth.

[0053] CXL (Compute Express Link) is a high-speed serial protocol that allows fast and reliable data transfer between different components inside a computer system. It is designed to address bottlenecks in high-performance computing, including memory capacity, memory bandwidth, and I / O latency. CXL can also enable memory expansion and memory sharing, and can communicate with peripherals such as computing accelerators (such as GPUs and FPGAs), providing faster and more flexible data exchange and processing methods.

[0054] RC (Root Complex) is a component defined by the PCIe bus protocol. The main function of RC is to convert the storage domain address space to the PCIe domain address space, and also to complete the conversion between the processor-side FSB (Front Side Bus) bus protocol and the PCIe protocol.

[0055] In the field of computer technology, whether the processor accesses the main memory address (the physical location of the main memory can be on the CPU side or on the IO device / accelerator side (such as CXL device)) or accesses the MMIO space, it is necessary to establish a global order to ensure that the memory access order seen by each access object is consistent. For the access transactions on the entire path from the access object to the accessed object, the related technology strictly establishes a global order according to the physical time order of reaching the observation point. After the global order is established, the handshake feedback is used to notify the access object so as to achieve the global unification of the order of memory access by the access objects on different paths. It should be noted here that after the global order is established, the number of access objects that need to be notified through the handshake feedback mechanism can be set by the software. If the software implementation requires two access objects to access the same accessed object, when one of the access objects establishes a global order on the accessed object, the other access object that needs to access the accessed object is notified, and the other access objects can be notified or not; if the software implementation requires more than two or even all access objects to access the same accessed object, when one of the access objects establishes a global order on the accessed object, the remaining access objects that need to access the accessed object are notified.

[0056] Figure 1 A flow chart of a method for establishing a global order in the related art is shown, see Figure 1 The processor includes multiple processor cores, namely Core0, ..., CoreX (X is greater than or equal to 1), where Core0 and CoreX are Cores set by software that need to access the same RP (Root Port) and the same main memory address. Specifically, the global sequence establishment process of Core0 and CoreX is as follows:

[0057] ①Core0 sends the first access request to RP0 to access the MMIO space of RP0;

[0058] ② RP0 establishes a global order for the first access request according to the access timestamp values ​​from first to last, and then sends a first confirmation response (Com) to Core0 to notify Core0 that a global order has been established at RP0 for the access transaction corresponding to the first access request;

[0059] ③ After receiving the first confirmation response, Core0 sends a notification message to CoreX to notify CoreX that a global sequence has been established for the access transaction corresponding to the first access request;

[0060] ④CoreX sends a second access request to RP0 to access the MMIO space of RP0;

[0061] ⑤RP0 establishes a global order for the second access request in the order of the access timestamp values ​​from first to last. The processing order of the access transaction corresponding to the second access request is after the processing order of the access transaction corresponding to the first access request, and then sends a second confirmation response (Com) to CoreX to notify CoreX that a global order has been established for the access transaction corresponding to the second access request in RP0. After receiving the second confirmation response, CoreX sends a notification message to Core0 to notify Core0 that a global order has been established for the access transaction corresponding to the second access request;

[0062] ⑥CoreX sends a third access request to a main memory address;

[0063] ⑦ Establish a global sequence of the main memory address for the access transaction corresponding to the third access request, and then send a third confirmation response to CoreX to notify CoreX that a global sequence has been established for the access transaction corresponding to the third access request at the main memory address. After receiving the third confirmation response, CoreX sends a notification message to Core0 to notify Core0 that a global sequence has been established for the access transaction corresponding to the third access request;

[0064] ⑧Core0 sends a fourth access request to the same main memory address;

[0065] ⑨ Establish a global order for the access transaction corresponding to the fourth access request at the main memory address, the processing order of the access transaction corresponding to the fourth access request is located after the processing order of the access transaction corresponding to the third access request, and then send a fourth confirmation response to Core0 to notify Core0 that a global order has been established for the access transaction corresponding to the fourth access request at the main memory address. After receiving the fourth confirmation response, Core0 sends a notification message to CoreX to notify CoreX that a global order has been established for the access transaction corresponding to the fourth access request.

[0066] The above ① to ⑤ are for access to MMIO space, and ⑥ to ⑨ are for access to main memory addresses. It can be seen from the above examples that no matter it is access to MMIO space or access to main memory addresses, the global order is established strictly according to the physical order of the accessed objects. This causes many access transactions that do not require the establishment of a global order to be established due to reaching the accessed objects, thereby bringing a large amount of serial blocking transaction access and handshake transaction overhead, resulting in a relatively large delay in establishing the global order, affecting the access performance of the access transaction, and increasing the bus bandwidth overhead.

[0067] In the computer field, the so-called order preservation is based on the observer and the observation point. It is a relative processing order, not the actual physical time order. All orders must pass through the observation point and establish the observation reference before the order can be observed by the observer. Therefore, the order between all things before the observation reference is established at the observation point is uncertain and may be in any order. During this period of time, there is no guarantee (or no need) for the establishment of a global order for the transactions.

[0068] In order to establish a reference for observation, each access object in the embodiment of the present application has a local timer (Timer) to record the time of the access transaction issued by the access object, and an access controller is provided. The access controller may be multiple and distributed in physical implementation, but logically one. In the cache coherency system, this access control module can be a home agent. A unified time distributor is configured in the access controller, which can be a TAC (Timestamp Allocator Center). Based on the unified time distributor, the access transaction observed at the observation point can be marked with a timestamp value, and then a global order is established based on the timestamp value. The clock accuracy of the unified time distributor is configurable and can be distributed, so that the distribution of timestamp values ​​can be implemented in a distributed manner without the need to concentrate on a certain point for distribution, so that the distribution of timestamp values ​​can be flexibly implemented to avoid possible hot spots. The timestamp value issued by the unified time distributor can be a logical timestamp value or a physical timestamp value. Therefore, the global order established based on the timestamp value can be a logical time order or a physical time order. That is, the global order can reflect the logical time order or the physical order of occurrence, and is not completely equal to the physical order of occurrence.

[0069] Based on the above access controller, the embodiment of the present application provides a method for establishing a global order. When the method obtains an access transaction for a certain accessed object, it does not directly establish a global order for the access transaction on the accessed object, but judges the relationship between the access transaction and the latest access transaction for which a global order has been established or is to be established for the accessed object. When there is a dependency relationship between the access transaction and the latest access transaction, a global order is established for the access transaction. When there is no dependency relationship between the access transaction and the latest access transaction, a global order is not established for the access transaction. The method provided by the embodiment of the present application can reduce the establishment of unnecessary orders while ensuring the global logical order of access transactions, thereby reducing the delay overhead of order preservation and improving the concurrency rate of access transactions.

[0070] Figure 2 A block diagram of an electronic device 200 provided by an exemplary embodiment of the present application is shown. Typically, the electronic device 200 includes: a processor 201, a memory 202, an access controller 203 and an interconnect bus 204, and the processor 201, the memory 202, and the access controller 203 are connected through the interconnect bus 204, for example, a network on chip (NoC), PCIe or CXL, etc. A unified time distributor is configured in the access controller for executing a method for establishing a global sequence. The access controller can be a PCIe root complex (RC) in a host, or it can be other system modules, or it can be a logical concept, not limited to a specific module.

[0071] In modern computer architecture, processor 201 is a CPU or a GPU, or other DSA (Designed Specific Architecture) accelerators, or some modern intelligent devices (such as smart network cards, etc.). Processor 201 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state; the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, processor 201 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content that needs to be displayed on the display screen. In some embodiments, processor 201 may also include an artificial intelligence processor, which is used to process computing operations related to machine learning.

[0072] The memory 202 may be a CXL device, a PCIe device, an SSD (Solid State Disk), a DDR (Double Data Rate), etc. The memory 202 may include one or more computer-readable storage media, which may be non-temporary computer-readable storage media, for example, the non-temporary computer-readable storage media may be a CD-ROM (Compact Disc Read-Only Memory), ROM, RAM (Random Access Memory), a magnetic tape, a floppy disk, and an optical data storage device, etc. The computer-readable storage medium stores at least one computer program, which, when executed, can process access transactions according to the global order established by the method for establishing the global order of the present application.

[0073] Of course, the above electronic device may also include other components, such as input / output interface, communication component, etc. The input / output interface provides an interface between the processor and the peripheral interface module, and the above peripheral interface module may be an output device, an input device, etc. The communication component is configured to facilitate wired or wireless communication between the electronic device and other devices.

[0074] Those skilled in the art will understand that Figure 2 The structure shown in the figure does not constitute a limitation on the electronic device 200, and may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

[0075] The present application embodiment provides a method for establishing a global order. Figure 2 The access controller in the embodiment of the present application is used as an example, see Figure 3 , the method flow provided in the embodiment of the present application includes:

[0076] 301. Obtain a first access transaction of a first access object to a target accessed object.

[0077] The first access object may be a processor core or an accelerator, etc., and the target accessed object may be a main memory address, a peripheral port address, etc. When the first access object needs to access the target accessed object, the first access object generates an access request, and then sends the access request to the access controller through the interconnection bus. The access controller receives the access request and obtains the first access transaction of the first access object to the target accessed object.

[0078] In the embodiment of the present application, the first transaction information of the first access transaction corresponding to the access request generated by the first object is different according to the different object types of the target accessed object.

[0079] When the object type of the target accessed object is a main memory address, the first transaction information includes a transaction type and a third timestamp value, etc. The transaction type includes a read transaction and a write transaction, etc. The third timestamp value is the logical time added by the second timer local to the first access object for the first access transaction, and the third timestamp value is determined according to the transaction type of the first access transaction and the logical time recorded by the second timer at the current moment. Specifically, when the transaction type is a read transaction, the third timestamp value is equal to the logical time recorded by the second timer at the current moment; when the transaction type is a write transaction, the third timestamp value is equal to the logical time updated by the second timer at the current moment, and the updated logical time is the sum of the logical time recorded by the second timer and a preset value, which can be set by software or is the exact maximum synchronization time value of the entire computing system (guaranteed by the system design), which can be 1, 2, and so on. For example, assuming that the logical time recorded by the second timer at the current moment is 1 and the preset value is 1, if the transaction type of the first access transaction is a read transaction, the third timestamp value is equal to the logical time recorded by the second timer at the current moment, which is 1; if the transaction type of the first access transaction is a write transaction, the sum of the logical time recorded by the second timer at the current moment and the preset value is calculated to obtain the logical time 2, and then the logical time recorded by the second timer at the current moment is updated to 2, then the third timestamp value is equal to the logical time updated by the second timer at the current moment, which is 2.

[0080] When the object type of the target accessed object is a peripheral port address, the first transaction information includes a first timestamp value, etc. The first timestamp value is the physical time recorded by the first timer of the access controller when the first access transaction is acquired. For example, when the access controller receives the access request sent by the first object, the physical time of the first timer is 10 seconds, and the first timestamp value is 10 seconds.

[0081] It should be noted that the time recorded by the timer in the embodiment of the present application can be physical time, logical time, or both physical time and logical time. The type of time recorded by the timer can be determined according to specific needs. Among them, physical time is the time in the real world, which is automatically updated as time passes; logical time is different from physical time and cannot represent the time in the physical world. It is only used to represent the logical processing order. The smaller the value of the logical time, the earlier the processing order, and the larger the value of the logical time, the later the processing order. For example, if the logical times of two access transactions are 1 and 2 respectively, the access transaction with a logical time of 1 will be executed first, and the access transaction with a logical time of 2 will be executed later.

[0082] Furthermore, when the object type of the target accessed object is a main memory address, after acquiring the first access transaction, the access controller will also store the first transaction information of the first access transaction, thereby facilitating the management of various access transactions of the target accessed object.

[0083] 302. Determine a relationship between the first access transaction and the second access transaction according to first transaction information of the first access transaction, the object type of the target accessed object, and second transaction information of the second access transaction of the target accessed object.

[0084] Among them, the second access transaction is the latest access transaction in the global order that has been established or is to be established for the target access object at the current moment, that is, the access transaction with the last processing order in the global order determined at the current moment. The global order is used to indicate the serial processing order of each access transaction for the target access object. Generally speaking, access transactions in the global order are processed serially, and access transactions with earlier processing orders will be executed first, and access transactions with later processing orders will be executed later. With the continuous access to the target access object, the second access transaction and the global order will also be continuously updated.

[0085] The second transaction information of the second access transaction is different according to the object type of the target accessed object. When the object type of the target accessed object is a memory address, the second transaction information includes the transaction type of the second access transaction and a fourth timestamp value, etc. The fourth timestamp value is the logical time recorded by the first timer of the access controller at the current moment. The second transaction information can be updated according to the access transaction that has a dependency relationship with the latest access transaction. The specific update process can refer to the subsequent steps.

[0086] In an embodiment of the present application, the object type of the target accessed object includes a main memory address and a peripheral port address. The object type of the target accessed object is different, and the method of determining the relationship between the first access transaction and the second access transaction is also different, which will be introduced below.

[0087] The first scenario: the object type of the target accessed object is the main memory address

[0088] When the object type of the target accessed object is a main memory address, the relationship between the first access transaction and the second access transaction can be determined based on the transaction type in the first transaction information and the transaction type in the second transaction information. The relationship between the two transactions defined in this application includes having a dependency relationship and not having a dependency relationship. Generally speaking, two transactions with a dependency relationship include: read first and write later, write first and read later, and write first and write later, etc., and two transaction types that do not have a dependency relationship include read first and read later. Therefore, this application determines the relationship between the first access transaction and the second access transaction based on the transaction type in the first transaction information and the transaction type in the second transaction information, specifically including:

[0089] When the transaction type of the second access transaction is a read transaction and the transaction type of the first access transaction is a read transaction, it is determined that there is no dependency relationship between the first access transaction and the second access transaction;

[0090] When the transaction type of the second access transaction is a read transaction and the transaction type of the first access transaction is a write transaction, determining that there is a dependency relationship between the first access transaction and the second access transaction;

[0091] When the transaction type of the second access transaction is a write transaction and the transaction type of the first access transaction is a read transaction, determining that there is a dependency relationship between the first access transaction and the second access transaction;

[0092] When the transaction type of the second access transaction is a write transaction and the transaction type of the first access transaction is a write transaction, it is determined that there is a dependency relationship between the first access transaction and the second access transaction.

[0093] The second scenario: the object type of the target accessed object is the peripheral port address

[0094] When the object type of the target accessed object is a peripheral port address, before determining the relationship between the first access transaction and the second access transaction, first combine Figure 4 and Figure 5 The need for establishing a global order in this case is briefly described, so that the relationship between the first access transaction and the second access transaction is determined based on the need for establishing a global order in the access scenario of the peripheral port address, and a global order is established for the access transaction that requires establishing a global order.

[0095] See also Figure 4 , access object 1 (e.g. Core) sends access request Req1 to the observation point (e.g. access controller) to access accessed object 1. After observing Req1, the observation point returns a confirmation response (Comp) to access object 1. After receiving Comp, access object 1 considers that the access transaction corresponding to Req1 is in the first position in the global order. After the global order of the access transaction corresponding to Req1 is established, access object 1 sends access request Req2 to access accessed object 2. After accessed object 2 receives Req2, it sends access request Req3 through the observation point to access accessed object 1. At this time, accessed object 2 is another access object relative to accessed object 1. For the above two access requests, the global order that the program expects to see is: after the global order of the access transaction corresponding to Req1 is established, the global order of the access transaction corresponding to Req3 is established.

[0096] Assume that the exact maximum synchronization time value of the entire computing system is a preset duration, which is represented by dly_t and is dynamically configured according to the system state, and can be 300 nanoseconds (ns), 400 nanoseconds, etc. Figure 5 It can be seen from the time axis shown that the preset duration is the maximum delay of communication between all points in the entire system, that is, at least after dly_t time, communication between two corresponding points in the system can be completed once, for example Figure 4 The communication between visitor 1 and visited object 2 must be completed after dly_t time. Based on the preset duration, in order to achieve the establishment of the above global order, it is required that: the observation point receives Req3 after the preset time after returning Comp to the visited object 1. Since the access transaction corresponding to Req1 has a dependency relationship with the access transaction corresponding to Req3, it can be inferred that: if the time interval between the acquisition time of any access transaction and the acquisition time of the access transaction corresponding to Req1 is greater than the preset duration, then the access transaction has a dependency relationship with the access transaction corresponding to Req1 and needs to be sequenced; if the time interval between the acquisition time of any access transaction and the acquisition time of the access transaction corresponding to Req1 is less than the preset duration, then the access transaction has no dependency relationship with the access transaction corresponding to Req1 and does not need to be sequenced. Through the above analysis, it can be concluded that the preset duration is actually the shortest duration of two dependent access transactions that any access object can initiate to the same visited object.

[0097] Based on the above principle, when the object type of the target accessed object is a peripheral port address, the relationship between the first access transaction and the second access transaction is determined according to the first timestamp value in the first transaction information, the second timestamp value in the second transaction information, and the preset duration, specifically including: taking the sum of the second timestamp value and the preset duration as the parameter value of the dependency parameter at the current moment, if the first timestamp value is less than the parameter value, determining that there is a dependency relationship between the first access transaction and the second access transaction; if the first timestamp value is greater than the parameter value, determining that there is no dependency relationship between the first access transaction and the second access transaction. Among them, the dependency parameter is used to determine whether at least two transactions have a dependency relationship, and is represented as Tgap in this application.

[0098] 303. When there is no dependency relationship between the first access transaction and the second access transaction, a global order of the target accessed object is not established for the first access transaction.

[0099] When there is no dependency between the first access transaction and the second access transaction, there is no need to establish a global order for the first access transaction, thereby reducing the establishment of unnecessary orders, reducing the bandwidth consumption of the interconnect bus, and shortening the processing time of the access transaction. Further, when it is determined that there is no need to establish a global order for the first access transaction in the target accessed object, the first access transaction can be directly sent to the accessed object for processing, thereby shortening the processing time of the first access transaction.

[0100] In the embodiment of the present application, for the case where the target accessed object is the main memory address, after obtaining the third timestamp value, the access controller will also obtain the fourth timestamp value, which is the logical time recorded by the first timer at the current moment, and then compare the third timestamp value with the fourth timestamp value. In the case where there is no dependency between the first access transaction and the second access transaction, since the third timestamp value is the same as the fourth timestamp value, the access controller does not update the logical time recorded by the first timer at the current moment, that is, the logical time of the first timer at the current moment is maintained unchanged as the fourth time. At the same time, the access controller will also send a second synchronization message to the first access object, the second synchronization message includes the fourth timestamp value, and the second synchronization message is used to instruct the first access object to update the third timestamp value to the fourth timestamp value. When receiving the second synchronization message, the first access object compares the third timestamp value with the fourth timestamp value. Since the third timestamp value is the same as the fourth timestamp value, the first object does not update the third timestamp value recorded by the second timer.

[0101] In another embodiment of the present application, if it is determined that there is a dependency relationship between the first access transaction and the second access transaction, a global order needs to be established for the first access transaction. Since the target accessed object has different object types, the method for the access controller to establish a global order is different for different object types of the target accessed object, which will be introduced separately below.

[0102] In the first case, the object type of the target accessed object is a memory address

[0103] In this case, when there is a dependency relationship between the first access transaction and the second access transaction, the access controller will further perform the following steps:

[0104] The first step is to calculate a fifth timestamp value according to the third timestamp value and the fourth timestamp value.

[0105] Compare the third timestamp value with the fourth timestamp value, obtain the maximum timestamp value, and then add the maximum timestamp value to the preset value to obtain the fifth timestamp value. Set the third timestamp value to OP_Ts, the fourth timestamp value to Cur_T, and the preset value to 1, then the fifth timestamp value is: max(OP_Ts, Cur_T)+1 (here max means taking the maximum value of the variables in the brackets). For example, the first timestamp value is 2, the fourth timestamp value is 1, then the fifth timestamp value = max(1,2)+1 = 3.

[0106] The second step is to update the logical time of the first timer to the fifth timestamp value.

[0107] The third step is to send a first synchronization message to the second access object.

[0108] The second access object is the object that sends the second access transaction, and the first synchronization message is used to instruct the second access object to update the logical time recorded by the local third timer to the fifth timestamp value and invalidate the access content of the locally stored target accessed object.

[0109] The fourth step is to establish a global order on the target accessed object for the first access transaction.

[0110] Since the first access transaction depends on the second access transaction, the second access transaction needs to be processed first, and the first access transaction is processed after the second access transaction. Therefore, the processing order of the first access transaction is after the second access transaction in the global order.

[0111] In another embodiment of the present application, after establishing a global order for the first access object, the access controller needs to ensure that the second access object has received the first synchronization message and completed the synchronization operation before returning the first notification message to the first access object. When the access controller ensures that the second access object has received the first synchronization message and completed the synchronization operation, the following three methods can be used:

[0112] In the first method, after the second access object completes the synchronization operation in response to the first synchronization message, the second access object returns a response message to the access controller. In response to receiving the response message sent by the second access object to the first synchronization message, the access controller determines that the second access object has received the first synchronization message and completed the synchronization operation, and then sends a first notification message to the first access object. The first notification message is used to indicate that the first access object has established a global sequence in the target accessed object for the first access transaction. It should be noted here that the recipient of the above-mentioned first synchronization message is not limited to the second access object. In fact, each access object of the target accessed object will receive the above-mentioned first synchronization message.

[0113] In the first method, the access controller needs to collect all the response messages corresponding to the first synchronization messages it has sent before sending the first notification message to the first access object. This method may slow down the access controller's processing of access transactions from different access objects. The embodiment of the present application improves the first method to obtain the second method.

[0114] The second method: the access object no longer waits for all response messages corresponding to the first synchronization messages it has sent out to be collected before sending the first notification message to the first access object. Instead, the first notification message is sent to the first access object synchronously when the first synchronization message is sent. The first notification message is used to indicate that when the first access object receives the second notification message sent by the second access object, it determines that the global sequence of the target accessed object has been established for the first access transaction. The first synchronization message is also used to indicate that the second access object sends the second notification message to the first access object after performing the synchronization operation.

[0115] The third method is to send a first notification message to the first access object when it is detected that the sending time of the first synchronization message reaches the preset time. Since the preset time is the maximum delay for communication between two points in the system, when the sending time of the first synchronization message reaches the preset time, it can be guaranteed that the first synchronization message is received by the first access object, so there is no need to receive the response message returned by the first object, and the first notification message can be directly sent to the first access object.

[0116] In the above embodiment, after the access controller updates the logical time of the first timer to the fifth timestamp value, it sends a first synchronization message to the second access object to notify the second access object to invalidate the invalid access content stored locally. Of course, in addition to sending the first synchronization message, the system expiration time (Expire_T) can also be set. The expiration time can be a physical time. When the expiration time is reached, the second access object automatically invalidates the access content of the target accessed object recorded locally, and then actively sends an expired invalidation message to the access controller to notify the access controller that the data has been invalidated locally. The invalidation expiration message carries the identity information of the second access object, the identity information of the corresponding expired accessed object, etc.

[0117] In the second case, the object type of the target accessed object is the peripheral port address

[0118] In the case where there is a dependency relationship between the first access transaction and the second access transaction, the access controller can determine whether the global order of the second access transaction has been established. If the global order of the second access transaction has not been established, the first access transaction will not be sent to the target accessed object temporarily to avoid errors in the global order. When the global order of the second access transaction is established, that is, the processing order of the second access transaction is globally observable, the sum of the preset duration and the sixth timestamp value is calculated to obtain the seventh timestamp value. The sixth timestamp value is the physical time of the first timer when the fourth access transaction is obtained. The fourth access transaction is an access transaction whose acquisition time is after the second access transaction and before the first access transaction. In the embodiment of the present application, the fourth access transaction is the access transaction whose acquisition time is closest to the acquisition time of the second access transaction, that is, the access transaction first acquired by the access controller after the second access transaction. The access controller then updates the parameter value of the dependency parameter to the seventh timestamp value, and then compares the first timestamp value with the seventh timestamp value. If the first timestamp value is less than the seventh timestamp value, a global order of the target accessed object is established for the first access transaction, and the processing order of the first access transaction in the global order is located after the second access transaction; if the first timestamp value is greater than the seventh timestamp value, continue to wait until the first timestamp value is less than the updated parameter value of the dependency parameter, and then establish a global order of the target accessed object for the first access transaction.

[0119] On the one hand, the method provided in the embodiment of the present application updates the logical clock by establishing a set of transaction dependencies, which not only reduces the overhead of timer flipping and synchronization of accessed object status caused by the establishment of a global order, but also reduces the system communication delay and bandwidth overhead, improves the transaction completion efficiency, and extends the life cycle of the timestamp value timer.

[0120] On the other hand, the method provided in the embodiment of the present application utilizes the necessary delay value of transactions that establish dependencies to establish transactions that actually need to establish sequences in the program, thereby avoiding excessive sequence establishment caused by observation even though there is no logical dependency, thereby shortening the completion time of long transactions.

[0121] On the other hand, the use of a distributed unified time distributor allows the distribution of timestamp values ​​to be implemented in a distributed manner without the need to concentrate on a certain point for distribution, thereby flexibly implementing the distribution of timestamp values ​​and avoiding possible hot spots.

[0122] Finally, the method provided in the embodiment of the present application can accelerate the process of establishing the global order through the expiration time (Expire_T) designed by the software or system. After the expiration time, it is necessary to re-initiate a transaction to obtain the global order of accessing the memory.

[0123] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0124] The present application embodiment provides a method for establishing a global order. Figure 2 The access controller in the embodiment of the present application is used as an example, see Figure 6 , the method flow provided in the embodiment of the present application includes:

[0125] 601. Obtain a first access transaction of a first access object to a target accessed object.

[0126] The implementation method of this step is the same as the implementation method of the above step 301. Please refer to the above step 301 for details and will not be repeated here.

[0127] 602. Determine a relationship between the first access transaction and the second access transaction according to first transaction information of the first access transaction, the object type of the target accessed object, and second transaction information of the second access transaction of the target accessed object.

[0128] The implementation method of this step is the same as the implementation method of the above step 302. Please refer to the above step 302 for details, which will not be repeated here.

[0129] 603. When there is a dependency relationship between the first access transaction and the second access transaction, a global sequence of the target accessed object is established for the first access transaction.

[0130] When the first access transaction has a dependency relationship with the second access transaction, a global order needs to be established for the first access transaction. Since the target accessed objects have different object types, the access controller has different methods for establishing a global order for different object types of the target accessed objects, which will be introduced below.

[0131] In the first case, the object type of the target accessed object is a memory address

[0132] In this case, the access controller will also perform the following steps:

[0133] The first step is to calculate a fifth timestamp value according to the third timestamp value and the fourth timestamp value.

[0134] The second step is to update the logical time of the first timer to the fifth timestamp value.

[0135] The third step is to send a first synchronization message to the second access object.

[0136] The fourth step is to establish a global order on the target accessed object for the first access transaction.

[0137] Since the first access transaction depends on the second access transaction, the second access transaction needs to be processed first, and the first access transaction is processed after the second access transaction. Therefore, the processing order of the first access transaction is after the second access transaction in the global order.

[0138] In another embodiment of the present application, after establishing a global order for the first access object, the access controller needs to ensure that the second access object has received the first synchronization message and completed the synchronization operation before returning the first notification message to the first access object. When the access controller ensures that the second access object has received the first synchronization message and completed the synchronization operation, the method provided in the above embodiment can be used, which will not be repeated here.

[0139] In the second case, the object type of the target accessed object is the peripheral port address

[0140] In this case, before the access controller establishes the global order of the target accessed object for the first access transaction, it needs to determine whether the global order of the second access transaction has been established. If the global order of the second access transaction has not been established, the first access transaction will not be sent to the target accessed object temporarily to avoid errors in the global order. When the global order of the second access transaction is established, that is, the processing order of the second access transaction is globally observable, the sum of the preset duration and the sixth timestamp value is calculated to obtain the seventh timestamp value, and then the access controller updates the parameter value of the dependency parameter to the seventh timestamp value, and then compares the first timestamp value and the seventh timestamp value. If the first timestamp value is less than the seventh timestamp value, the global order of the target accessed object is established for the first access transaction, and the processing order of the first access transaction in the global order is located after the second access transaction; if the first timestamp value is greater than the seventh timestamp value, then continue to wait until the first timestamp value is less than the updated parameter value of the dependency parameter, and then establish the global order of the target accessed object for the first access transaction.

[0141] The method provided in the embodiment of the present application does not directly establish a global order of the target accessed object for the first access transaction based on the acquisition time of the first access transaction when acquiring the first access transaction of the first access object, but judges the relationship between the first access transaction and the second access transaction based on the first transaction information of the first access transaction, the object type of the target accessed object and the second transaction information of the second access transaction of the target accessed object. When there is a dependency relationship between the first access transaction and the second access transaction, that is, the processing of the first access transaction depends on the second access transaction, a global order is established for the first access transaction and added to the global order of the target accessed object, so that the target accessed object can serially process each access transaction in the order supported by the global order, thereby ensuring that each access transaction is executed in a predetermined order.

[0142] In the case where the target accessed object is a memory address, assuming that the latest access transaction of the currently accessed object is a read transaction, the process of establishing the global order of each access object of the memory address can be seen in Figure 7 , Figure 8 , Fig. 9 and Fig.10 .

[0143] in, Figure 7 The process of establishing the global order in is as follows:

[0144] 1. Access object 1 (e.g., core) sends access request A (ReqA), and its corresponding access transaction Trs1 is a read transaction. Since the timestamp value of the local timer of access object 1 is 1 at this time, the timestamp value carried by Trs1 is 1;

[0145] 2. The access object n (e.g., core) sends an access request B (ReqB), and its corresponding access transaction Trs2 is a read transaction. Since the timestamp value of the local timer of the access object n is 1 at this time, the timestamp value carried by Trs2 is 1;

[0146] 3. Access transaction Trs1 and access transaction Trs2 are routed to the access controller successively, and the access controller records the transaction information of access transaction Trs1: the transaction type is a read transaction, and the timestamp value Op_Ts=1 ( Figure 5 The result recorded in is: ReqA, Op = Rd, Cur_T = Op_Ts = 1), and the access controller records the transaction information of the access transaction Trs2: the transaction type is a read transaction, and the timestamp value Op_Ts = 1 ( Figure 5 The result is recorded as: ReqB, Op=Rd, Cur_T=Op_Ts=1). Since the read transaction corresponding to the access transaction Trs1 has no dependency relationship with the latest access transaction of the current accessed object, the access controller keeps the state and timestamp value Cur_T of the accessed object unchanged, and at the same time returns the latest timestamp value Cur_T of the accessed object to the access object 1. Similarly, for the access transaction Trs2, since the read transaction corresponding to the access transaction Trs2 has no dependency relationship with the latest access transaction of the current accessed object, the access controller keeps the state and timestamp value Cur_T of the accessed object unchanged, and at the same time returns the latest timestamp value Cur_T of the accessed object to the access object n.

[0147] 4. For observers (such as software programs) on access object 1 and access object n, the global order observed for the same accessed object is the same, which is the order of the accessed object under the timestamp value Cur_T = 1. Since the timestamp value Cur_T is the same as the timestamp value recorded by the local timer of access object 1 and access object n, the timestamp value recorded by the local timer will not be refreshed.

[0148] 5. Access object 2 (e.g., core) sends an access request C (ReqC), and its corresponding access transaction Trs3 is a write transaction. At this time, the timestamp value of the local timer of access object 2 is 1. Since the write transaction depends on other transactions, the timestamp value of the local timer needs to be increased by 1, so the timestamp value carried by Trs3 is 2.

[0149] 6. Access transaction Trs3 is routed to the access controller. The access controller finds that access transaction Trs3 is a write transaction and has a dependency relationship with the latest access transaction of the accessed object, which is a read-first-then-write dependency relationship. Therefore, the access controller refreshes the latest state and timestamp value of the accessed object to: Cur_T = max(Cur_T, Op_Ts) + 1 = 3. At the same time, it sends a synchronization message to access object 1 and access object n to synchronize the refreshed timestamp value Cur_T = 3 to access object 1 and access object n.

[0150] 7. Access object 1 receives the synchronization message sent by the access controller, compares the latest timestamp value Cur_T=3 of the access object with the latest timestamp value of the access object recorded locally, and finds that the latest timestamp value of the access object recorded locally is less than the synchronized Cur_T value. Therefore, access object 1 updates the timestamp value recorded by the refresh local timer to Cur_T=3, and at the same time, invalidates the access content observed locally, and returns a response to the access controller to indicate that access object 1 has invalidated the access content observed locally. Similarly, access object n receives the synchronization message sent by the access controller, compares the latest timestamp value Cur_T=3 of the access object with the latest timestamp value of the access object recorded locally, and finds that the latest timestamp value of the access object recorded locally is less than the synchronized Cur_T value. Therefore, access object n updates the timestamp value recorded by the refresh local timer to Cur_T=3, and at the same time, invalidates the access content observed locally, and returns a response to the access controller to indicate that access object n has invalidated the access content observed locally.

[0151] 8. After the access controller has collected all responses to all requests it has synchronized, it sends a notification message carrying the latest timestamp value of the accessed object to access object 2, indicating that the access transaction Trs3 it has issued has been globally established. After receiving the notification message returned by the access controller, access object 2 observes that the global order of the accessed object is: ReqA and ReqB are access transactions at the same time, and ReqC is the access transaction after ReqA and ReqB.

[0152] in, Figure 8 The process of establishing the global order in is as follows:

[0153] 1. Access object 1 (e.g., core) sends access request A (ReqA), and its corresponding access transaction Trs1 is a read transaction. Since the timestamp value of the local timer of access object 1 is 1 at this time, the timestamp value carried by Trs1 is 1;

[0154] 2. The access object n (e.g., core) sends an access request B (ReqB), and its corresponding access transaction Trs2 is a read transaction. Since the timestamp value of the local timer of the access object n is 1 at this time, the timestamp value carried by Trs2 is 1;

[0155] 3. Access transaction Trs1 and access transaction Trs2 are routed to the access controller in turn, and the access controller records the transaction information of access transaction Trs1: the transaction type is a read transaction, and the timestamp value Op_Ts = 1. Since the read transaction corresponding to access transaction Trs1 has no dependency relationship with the latest access transaction of the current accessed object, the access controller keeps the state and timestamp value Cur_T of the accessed object unchanged, and at the same time returns the latest timestamp value Cur_T of the accessed object to access object 1. Similarly, for access transaction Trs2, since the read transaction corresponding to access transaction Trs2 has no dependency relationship with the latest access transaction of the current accessed object, the access controller keeps the state and timestamp value Cur_T of the accessed object unchanged, and at the same time returns the latest timestamp value Cur_T of the accessed object to access object n.

[0156] 4. For observers (such as software programs) on access object 1 and access object n, the global order observed for the same accessed object is the same, which is the order of the accessed object under the timestamp value Cur_T = 1. Since the timestamp value Cur_T is the same as the timestamp value recorded by the local timer of access object 1 and access object n, the timestamp value recorded by the local timer will not be refreshed.

[0157] 5. Access object 2 (e.g., core) sends an access request C (ReqC), and its corresponding access transaction Trs3 is a write transaction. At this time, the timestamp value of the local timer of access object 2 is 1. Since the write transaction depends on other transactions, the timestamp value of the local timer needs to be increased by 1, so the timestamp value carried by Trs3 is 2.

[0158] 6. Access transaction Trs3 is routed to the access controller. The access controller finds that access transaction Trs3 is a write transaction and has a dependency relationship with the latest access transaction of the accessed object, which is a read-first-then-write dependency relationship. Therefore, the access controller refreshes the latest state and timestamp value of the accessed object to: Cur_T=max(Cur_T,Op_Ts)+1=3. At the same time, a synchronization message is sent to access object 1 and access object n to synchronize the refreshed timestamp value Cur_T=3 to access object 1 and access object n. The synchronization message indicates that access object 1 and access object n send a notification message to access object 2 after performing the synchronization operation. At the same time, the access controller will also send a notification message carrying the latest timestamp value of the accessed object to access object 2 to indicate that access object 2 determines that the access transaction Trs3 it has issued has completed the global establishment after receiving the notification message sent by access object 1 and access object n.

[0159] 7. Access object 1 receives the synchronization message sent by the access controller, compares the latest timestamp value Cur_T=3 of the access object with the latest timestamp value of the access object recorded locally, and finds that the latest timestamp value of the access object recorded locally is less than the synchronized Cur_T value. Therefore, access object 1 updates the timestamp value recorded by the refresh local timer to Cur_T=3, and at the same time, invalidates the access content observed locally, and sends a notification message to access object 2 to indicate that access object 1 has invalidated the access content observed locally. Similarly, access object n receives the synchronization message sent by the access controller, compares the latest timestamp value Cur_T=3 of the access object with the latest timestamp value of the access object recorded locally, and finds that the latest timestamp value of the access object recorded locally is less than the synchronized Cur_T value. Therefore, access object n updates the timestamp value recorded by the refresh local timer to Cur_T=3, and at the same time, invalidates the access content observed locally, and sends a notification message to access object 2 to indicate that access object n has invalidated the access content observed locally.

[0160] 8. Upon receiving the notification messages sent by access object 1 and access object n, access object 2 determines that the access transaction Trs3 issued has completed the global establishment. At this time, access object 2 observes that the global sequence of the accessed objects is: ReqA and ReqB are access transactions at the same time, and ReqC is the access transaction after ReqA and ReqB.

[0161] in, Fig. 9 The process of establishing the global order in is as follows:

[0162] 1. Access object 1 (e.g., core) sends access request A (ReqA), and its corresponding access transaction Trs1 is a read transaction. Since the timestamp value of the local timer of access object 1 is 1 at this time, the timestamp value carried by Trs1 is 1;

[0163] 2. The access object n (e.g., core) sends an access request B (ReqB), and its corresponding access transaction Trs2 is a read transaction. Since the timestamp value of the local timer of the access object n is 1 at this time, the timestamp value carried by Trs2 is 1;

[0164] 3. Access transaction Trs1 and access transaction Trs2 are routed to the access controller in turn, and the access controller records the transaction information of access transaction Trs1: the transaction type is a read transaction, and the timestamp value Op_Ts = 1. Since the read transaction corresponding to access transaction Trs1 has no dependency relationship with the latest access transaction of the current accessed object, the access controller keeps the state and timestamp value Cur_T of the accessed object unchanged, and at the same time returns the latest timestamp value Cur_T of the accessed object to access object 1. Similarly, for access transaction Trs2, since the read transaction corresponding to access transaction Trs2 has no dependency relationship with the latest access transaction of the current accessed object, the access controller keeps the state and timestamp value Cur_T of the accessed object unchanged, and at the same time returns the latest timestamp value Cur_T of the accessed object to access object n.

[0165] 4. For observers (such as software programs) on access object 1 and access object n, the global order observed for the same accessed object is the same, which is the order of the accessed object under the timestamp value Cur_T = 1. Since the timestamp value Cur_T is the same as the timestamp value recorded by the local timer of access object 1 and access object n, the timestamp value recorded by the local timer will not be refreshed.

[0166] 5. Access object 2 (e.g., core) sends an access request C (ReqC), and its corresponding access transaction Trs3 is a write transaction. At this time, the timestamp value of the local timer of access object 2 is 1. Since the write transaction depends on other transactions, the timestamp value of the local timer needs to be increased by 1, so the timestamp value carried by Trs3 is 2.

[0167] 6. Access transaction Trs3 is routed to the access controller. The access controller finds that access transaction Trs3 is a write transaction and has a dependency relationship with the latest access transaction of the accessed object, which is a read-first-then-write dependency relationship. Therefore, the access controller refreshes the latest state and timestamp value of the accessed object to: Cur_T = max(Cur_T, Op_Ts) + 1 = 3. At the same time, a synchronization message is sent to access object 1 and access object n to synchronize the refreshed timestamp value Cur_T = 3 to access object 1 and access object n.

[0168] 7. Access object 1 receives the synchronization message sent by the access controller, compares the latest timestamp value Cur_T=3 of the accessed object with the latest timestamp value of the accessed object recorded locally, and finds that the latest timestamp value of the accessed object recorded locally is less than the synchronized Cur_T value. Therefore, access object 1 refreshes the timestamp value recorded by the local timer to Cur_T=3, and at the same time, invalidates the access content observed locally. Similarly, access object n receives the synchronization message sent by the access controller, compares the latest timestamp value Cur_T=3 of the accessed object with the latest timestamp value of the accessed object recorded locally, and finds that the latest timestamp value of the accessed object recorded locally is less than the synchronized Cur_T value. Therefore, access object n refreshes the timestamp value recorded by the local timer to Cur_T=3, and at the same time, invalidates the access content observed locally.

[0169] 8. After sending all synchronization messages that need to synchronize timestamps, the access controller sends a notification message carrying the latest timestamp value of the accessed object to access object 2 after Dly_T time, to indicate to access object 2 that the access transaction Trs3 it issued has completed the global establishment. After receiving the notification message returned by the access controller, access object 2 observes that the global order of the accessed object is: ReqA and ReqB are access transactions at the same time, and ReqC is the access transaction after ReqA and ReqB.

[0170] in, Fig.10 The process of establishing the global order in is as follows:

[0171] 1. Access object 1 (e.g., core) sends access request A (ReqA), and its corresponding access transaction Trs1 is a read transaction. Since the timestamp value of the local timer of access object 1 is 1 at this time, the timestamp value carried by Trs1 is 1;

[0172] 2. The access object n (e.g., core) sends an access request B (ReqB), and its corresponding access transaction Trs2 is a read transaction. Since the timestamp value of the local timer of the access object n is 1 at this time, the timestamp value carried by Trs2 is 1;

[0173] 3. Access transaction Trs1 and access transaction Trs2 are routed to the access controller in turn, and the access controller records the transaction information of access transaction Trs1: the transaction type is a read transaction, and the timestamp value Op_Ts = 1. Since the read transaction corresponding to access transaction Trs1 has no dependency relationship with the latest access transaction of the current accessed object, the access controller keeps the state and timestamp value Cur_T of the accessed object unchanged, and at the same time returns the latest timestamp value Cur_T of the accessed object to access object 1. Similarly, for access transaction Trs2, since the read transaction corresponding to access transaction Trs2 has no dependency relationship with the latest access transaction of the current accessed object, the access controller keeps the state and timestamp value Cur_T of the accessed object unchanged, and at the same time returns the latest timestamp value Cur_T of the accessed object to access object n.

[0174] 4. For observers (such as software programs) on access object 1 and access object n, the global order observed for the same accessed object is the same, which is the order of the accessed object under the timestamp value Cur_T = 1. Since the timestamp value Cur_T is the same as the timestamp value recorded by the local timer of access object 1 and access object n, the timestamp value recorded by the local timer will not be refreshed.

[0175] 5. The expiration time (Expire_T) of the system is set to 2 at this time. Therefore, when the physical time is equal to 3, access object 1 and access object n automatically invalidate the data of the accessed object recorded locally, and actively send an expiration invalidation message to the access controller to inform that the data of the corresponding accessed object has been invalidated locally. The expiration invalidation message carries the identity information of access object 1 and access object n, the corresponding expired accessed object and other information.

[0176] 6. Access object 2 (e.g., core) sends an access request C (ReqC), and its corresponding access transaction Trs3 is a write transaction. At this time, the timestamp value of the local timer of access object 2 is 4. Since the write transaction depends on other transactions, the timestamp value of the local timer needs to be increased by 1, so the timestamp value carried by Trs3 is 5.

[0177] 7. Access transaction Trs3 is routed to the access controller. The access controller finds that access transaction Trs3 is a write transaction and has a dependency relationship with the latest access transaction of the accessed object, which is a read-first-then-write dependency. Therefore, the access controller refreshes the latest status and timestamp value of the accessed object to: Cur_T = max(Cur_T, Op_Ts) + 1 = 6. Since access object 1 and access object n have previously sent expiration messages to the access controller to inform the accessed object that it has expired, the access controller no longer sends synchronization messages to access object 1 and access object n at this time. The access controller directly returns a message to access object 2 indicating that the access transaction Trs3 it issued has completed the global establishment. After receiving the notification message returned by the access controller, access object 2 observes that the global order of the accessed object is: ReqA and ReqB are access transactions at the same time, and ReqC is the access transaction after ReqA and ReqB.

[0178] When the target accessed object is a peripheral port address, the process of establishing the global sequence of each access object of the peripheral port address can be found in Fig.11 and Fig.12 ,in, Fig.12 for Fig.11 System architecture diagram of the method shown.

[0179] in, Fig.11 The process of establishing the global order is as follows:

[0180] 1. Access object 1( Fig.11 Core1 in the Fig.11 The access controller in the access controller sends an access request Req1 to initiate access to the accessed object 1. When the access request Req1 arrives at the observation point, the observation point stamps the access request Req1 with a timestamp value T 1 = 10. At the same time, the observation point will change the local T gap Refresh to T gap =T 1 +dly_t=10+300=310.

[0181] 2. At time T2, the observation point receives the access request Req2 sent by access object 1 to access object 1, and stamps the access request Req2 with a timestamp value T 2 =250. Since T 2 Less than T gap , the access transaction corresponding to the access request Req2 has no dependency relationship with the access transaction corresponding to the access request Req1, so the request Req2 is directly sent to the accessed object 1 for processing.

[0182] 3. At time T2-1, the observation point receives the access request Req2-1 sent by the access object 1 to the accessed object 1, and stamps the access request Req2-1 with a timestamp value T 21 =290. Since T 21 Less than T gap The access transaction corresponding to the access request Req2-1 has no dependency relationship with the access transaction corresponding to the access request Req1, so the request Req2-1 is directly sent to the accessed object 1 for processing.

[0183] 4. At time T3, the observation point receives the access request Req3 sent by the accessed object 2 to the accessed object 1, and stamps the access request Req3 with a timestamp value T 3 =350. Since T 3 Greater than T gap , the access transaction corresponding to the access request Req3 has a dependency relationship with the access transaction corresponding to the access request Req1, so the observation point should ensure that the access request Req3 is seen by the accessed object 1 after the access request Req1. Since the access request Req1 has not yet been established in the global order of the accessed object 1, the access request Req3 is temporarily blocked by the observation point.

[0184] 5. When the access request Req1 has been established in the global order of the accessed object 1, the observation point will be T gap The value is refreshed, and the refreshed T gap The value is T gap =T 2 +dly_t=550. Since T 3 Greater than the refreshed T gap Therefore, the observation point no longer blocks the continued access of the access request Req3. At this time, the access request Req3 is routed to the accessed object 1 and a global order is established in it.

[0185] 6. At time T4, the observation point receives the access request Req4 sent by the accessed object 2 to the accessed object 1, and stamps the access request Req4 with a timestamp value T 3 =360. Since T 3 Greater than the refreshed T gap Therefore, the observation point does not block the forwarding / routing of the access request Req4, directly sends the access request Req4 to the accessed object 1, and establishes a global order.

[0186] Fig.11Based on physical time, the order of access transactions observed at the observation point is Req1 < Req2 < Req2-1 < Req3 < Req4 (here, "<" means "preceding", that is, it is observed (occurred) first in physical time. However, in fact, the logical order that the real program needs to ensure is only: Req1 < Req3 < Req4. The global order constructed by the method of the related technology is the global order constructed based on the physical time order above: Req1 < Req2 < Req2-1 < Req3 < Req4, while the global order constructed by the method provided in the embodiments of the present application is: Req1 < Req3 < Req4. Since the construction of unnecessary globals is reduced, the concurrency of access transactions is greatly improved, and the delay in the process of establishing the global order is reduced.

[0187] Please refer to Fig.13 , which shows a schematic structural diagram of an apparatus for establishing a global order provided in the embodiments of the present application. The apparatus can be implemented by software, hardware, or a combination of both, and becomes all or a part of an electronic device. The apparatus includes:

[0188] An obtaining module 1301, configured to obtain a first access transaction of a first access object for a target accessed object;

[0189] A determining module 1302, configured to determine the relationship between the first access transaction and a second access transaction according to the first transaction information of the first access transaction, the object type of the target accessed object, and the second transaction information of the second access transaction of the target accessed object. The second access transaction is the latest access transaction for which a global order has been established or is to be established at the target accessed object at the current moment, and the global order is used to indicate the serial processing order of each access transaction for the target accessed object;

[0190] A establishing module 1303, configured not to establish a global order for the first access transaction at the target accessed object when there is no dependency relationship between the first access transaction and the second access transaction.

[0191] In another embodiment of the present application, the object type of the target accessed object includes a main memory address and a peripheral port address, and the determination module 1302 is used to determine the relationship between the first access transaction and the second access transaction when the object type of the target accessed object is the main memory address according to the transaction type in the first transaction information and the transaction type in the second transaction information; when the object type of the target accessed object is the peripheral port address, the relationship between the first access transaction and the second access transaction is determined according to the first timestamp value in the first transaction information, the second timestamp value in the second transaction information, and a preset duration, the first timestamp value is the physical time recorded by the local first timer when the first access transaction is obtained, the second timestamp value is the physical time recorded by the first timer when the second access transaction is obtained, and the preset duration is the shortest duration of two access transactions with a dependency relationship that can be initiated by any access object to the same accessed object.

[0192] In another embodiment of the present application, the determination module 1302 is used to determine that there is no dependency between the first access transaction and the second access transaction when the transaction type of the second access transaction is a read transaction and the transaction type of the first access transaction is a read transaction; determine that there is a dependency between the first access transaction and the second access transaction when the transaction type of the second access transaction is a read transaction and the transaction type of the first access transaction is a write transaction; determine that there is a dependency between the first access transaction and the second access transaction when the transaction type of the second access transaction is a write transaction and the transaction type of the first access transaction is a read transaction; and determine that there is a dependency between the first access transaction and the second access transaction when the transaction type of the second access transaction is a write transaction and the transaction type of the first access transaction is a write transaction.

[0193] In another embodiment of the present application, the first transaction information also includes a third timestamp value, and the third timestamp value is the logical time added by the second timer local to the first access object to the first access transaction; when the transaction type is a read transaction, the third timestamp value is equal to the logical time recorded by the second timer at the current moment; when the transaction type is a write transaction, the third timestamp value is equal to the logical time updated by the second timer at the current moment, and the updated logical time is the sum of the logical time recorded by the second timer at the current moment and a preset value.

[0194] In another embodiment of the present application, the device further comprises:

[0195] A calculation module, configured to calculate a fifth timestamp value according to a third timestamp value and a fourth timestamp value when there is a dependency relationship between the first access transaction and the second access transaction, wherein the fourth timestamp value is a logic time recorded at a current moment by the first timer;

[0196] An updating module, configured to update the logic time of the first timer to a fifth timestamp value;

[0197] A sending module, used for sending a first synchronization message to a second access object, the second access object being the object sending the second access transaction, the first synchronization message being used for instructing the second access object to update the logic time recorded by the local third timer to a fifth timestamp value, and to invalidate the access content of the locally stored target accessed object;

[0198] The establishing module is further used to establish a global sequence of the target accessed object for the first access transaction, in which the processing sequence of the first access transaction is located after the second access transaction.

[0199] In another embodiment of the present application, the sending module is used to send a first notification message to the first access object in response to receiving a response message sent by the second access object to the first synchronization message, wherein the first notification message is used to indicate that the first access object has established a global sequence in the target accessed object for the first access transaction; or,

[0200] A sending module, configured to synchronously send a first notification message to a first access object when sending a first synchronization message, wherein the first notification message is used to indicate that the first access object determines that a global sequence has been established for the first access transaction in the target access object when receiving a second notification message sent by a second access object, and the first synchronization message is also used to indicate that the second access object sends a second notification message to the first access object after performing the synchronization operation; or,

[0201] The sending module is used to send a first notification message to the first access object when it is detected that the sending duration of the first synchronization message reaches a preset duration.

[0202] In another embodiment of the present application, when there is no dependency between the first access transaction and the second access transaction, the third timestamp value is the same as the fourth timestamp value, the fourth timestamp value is the logical time recorded at the current moment of the first timer, and the sending module is also used to send a second synchronization message to the first access object, the second synchronization message includes the fourth timestamp value, and the second synchronization message is used to instruct the first access object to update the third timestamp value to the fourth timestamp value.

[0203] In another embodiment of the present application, the determination module 1302 is used to use the sum of the second timestamp value and the preset duration as the parameter value of the dependency parameter at the current moment, and the dependency parameter is used to determine whether at least two transactions have a dependency relationship; if the first timestamp value is less than the parameter value, it is determined that there is a dependency relationship between the first access transaction and the second access transaction; if the first timestamp value is greater than the parameter value, it is determined that there is no dependency relationship between the first access transaction and the second access transaction.

[0204] In another embodiment of the present application, the device further comprises:

[0205] The sending module is further used for temporarily not sending the first access transaction to the target accessed object if the global order of the second access transaction is not established when there is a dependency relationship between the first access transaction and the second access transaction;

[0206] a calculation module, configured to calculate the sum of a preset duration and a sixth timestamp value to obtain a seventh timestamp value when the global sequence of the second access transaction is established, wherein the sixth timestamp value is the physical time of the first timer when the fourth access transaction is acquired, and the fourth access transaction is an access transaction acquired after the second access transaction and before the first access transaction;

[0207] An updating module, used for updating the parameter value to the seventh timestamp value;

[0208] The establishing module establishes a global sequence of the target accessed object for the first access transaction when the first timestamp value is less than the seventh timestamp value, wherein the processing order of the first access transaction in the global sequence is after the second access transaction.

[0209] Please refer to Fig.14 , which shows a schematic diagram of the structure of a global order establishment device provided in an embodiment of the present application. The device can be implemented by software, hardware, or a combination of both, and becomes the whole or part of an electronic device. The device includes:

[0210] An acquisition module 1401 is used to acquire a first access transaction of a first access object to a target accessed object;

[0211] A determination module 1402 is used to determine the relationship between the first access transaction and the second access transaction according to the first transaction information of the first access transaction, the object type of the target accessed object, and the second transaction information of the second access transaction of the target accessed object, wherein the second access transaction is the latest access transaction with a global sequence established or to be established at the target accessed object at the current moment, and the global sequence is used to indicate the serial processing order of each access transaction for the target accessed object;

[0212] The establishing module 1403 is used to establish a global sequence of the target accessed object for the first access transaction when there is a dependency relationship between the first access transaction and the second access transaction.

[0213] An embodiment of the present application provides a computer-readable storage medium, in which at least one computer program is stored. When the at least one computer program is executed by a processor, access transactions can be processed according to the global order established by the above-mentioned global order establishment method.

[0214] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it can process access transactions according to the global order established by the above-mentioned global order establishment method.

[0215] 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.

[0216] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for establishing a global order, characterized in that: The method comprises: Obtaining a first access transaction of a first access object to a target accessed object; determining, according to first transaction information of the first access transaction, the object type of the target accessed object, and second transaction information of a second access transaction of the target accessed object, a relationship between the first access transaction and the second access transaction, the second access transaction being the latest access transaction that has established or is to establish a global sequence at the target accessed object at the current moment, the global sequence being used to indicate a serial processing order of each access transaction for the target accessed object; When there is no dependency relationship between the first access transaction and the second access transaction, a global order on the target accessed object is not established for the first access transaction.

2. The method according to claim 1, characterized in that: The object type of the target accessed object includes a main memory address and a peripheral port address, and determining the relationship between the first access transaction and the second access transaction according to first transaction information of the first access transaction, the object type of the target accessed object, and second transaction information of a second access transaction of the target accessed object includes: When the object type of the target accessed object is a main memory address, determining a relationship between the first access transaction and the second access transaction according to the transaction type in the first transaction information and the transaction type in the second transaction information; When the object type of the target accessed object is a peripheral port address, the relationship between the first access transaction and the second access transaction is determined according to the first timestamp value in the first transaction information, the second timestamp value in the second transaction information, and a preset duration, the first timestamp value being the physical time recorded by a local first timer when the first access transaction is acquired, the second timestamp value being the physical time recorded by the first timer when the second access transaction is acquired, and the preset duration being the shortest duration of two access transactions with a dependency relationship that can be initiated by any access object to the same accessed object.

3. The method according to claim 2, characterized in that When the object type of the target accessed object is a main memory address, determining the relationship between the first access transaction and the second access transaction according to the transaction type in the first transaction information and the transaction type in the second transaction information includes: When the transaction type of the second access transaction is a read transaction and the transaction type of the first access transaction is a read transaction, determining that there is no dependency relationship between the first access transaction and the second access transaction; When the transaction type of the second access transaction is a read transaction and the transaction type of the first access transaction is a write transaction, determining that there is a dependency relationship between the first access transaction and the second access transaction; When the transaction type of the second access transaction is a write transaction and the transaction type of the first access transaction is a read transaction, determining that there is a dependency relationship between the first access transaction and the second access transaction; When the transaction type of the second access transaction is a write transaction and the transaction type of the first access transaction is a write transaction, it is determined that there is a dependency relationship between the first access transaction and the second access transaction.

4. The method according to claim 3, characterized in that The first transaction information further includes a third timestamp value, where the third timestamp value is the logical time added by the second timer local to the first access object for the first access transaction; when the transaction type is a read transaction, the third timestamp value is equal to the logical time recorded by the second timer at the current moment; When the transaction type is a write transaction, the third timestamp value is equal to the logical time updated by the second timer at the current moment, and the updated logical time is the sum of the logical time recorded by the second timer at the current moment and a preset value.

5. The method according to claim 4, characterized in that The method further comprises: When the first access transaction has a dependency relationship with the second access transaction, a fifth timestamp value is calculated according to the third timestamp value and the fourth timestamp value, where the fourth timestamp value is the logic time recorded by the first timer at the current moment; Updating the logical time of the first timer to the fifth timestamp value; Sending a first synchronization message to a second access object, where the second access object is the object sending the second access transaction, and the first synchronization message is used to instruct the second access object to update the logical time recorded by the local third timer to the fifth timestamp value, and to invalidate the access content of the target accessed object stored locally; A global sequence of the target accessed object is established for the first access transaction, wherein the processing order of the first access transaction in the global sequence is located after the second access transaction.

6. The method according to claim 5, characterized in that The method further comprises: In response to receiving a response message sent by the second access object to the first synchronization message, sending a first notification message to the first access object, wherein the first notification message is used to indicate that the first access object has established a global sequence in the target accessed object for the first access transaction; or, When sending the first synchronization message, synchronously sending a first notification message to the first access object, the first notification message is used to indicate that the first access object determines that a global sequence has been established for the first access transaction on the target accessed object when receiving the second notification message sent by the second access object, and the first synchronization message is also used to indicate that the second access object sends the second notification message to the first access object after performing the synchronization operation; or, When it is detected that the sending duration of the first synchronization message reaches the preset duration, the first notification message is sent to the first access object.

7. The method according to claim 4, characterized in that When the first access transaction and the second access transaction have no dependency relationship, the third timestamp value is the same as the fourth timestamp value, and the fourth timestamp value is the logical time recorded by the first timer at the current moment, and the method further includes: A second synchronization message is sent to the first access object, where the second synchronization message includes the fourth timestamp value, and the second synchronization message is used to instruct the first access object to update the third timestamp value to the fourth timestamp value.

8. The method according to claim 2, characterized in that: When the object type of the target accessed object is a peripheral port address, determining the relationship between the first access transaction and the second access transaction according to the first timestamp value in the first transaction information, the second timestamp value in the second transaction information, and a preset duration, includes: Taking the sum of the second timestamp value and the preset duration as the parameter value of the dependency parameter at the current moment, the dependency parameter is used to determine whether at least two transactions have a dependency relationship; If the first timestamp value is less than the parameter value, determining that the first access transaction has a dependency relationship with the second access transaction; If the first timestamp value is greater than the parameter value, it is determined that there is no dependency relationship between the first access transaction and the second access transaction.

9. The method according to claim 8, characterized in that The method further comprises: In the case where there is a dependency relationship between the first access transaction and the second access transaction, if the global order of the second access transaction is not established, the first access transaction is temporarily not sent to the target accessed object; When the global order of the second access transaction is established, the sum of the preset duration and the sixth timestamp value is calculated to obtain a seventh timestamp value, where the sixth timestamp value is the physical time of the first timer when the fourth access transaction is acquired, and the fourth access transaction is an access transaction acquired after the second access transaction and before the first access transaction; Updating the parameter value to the seventh timestamp value; When the first timestamp value is less than the seventh timestamp value, a global sequence is established for the first access transaction on the target accessed object, and the processing order of the first access transaction in the global sequence is located after the second access transaction.

10. A method for establishing a global order, characterized in that: The method comprises: Obtaining a first access transaction of a first access object to a target accessed object; determining, according to first transaction information of the first access transaction, the object type of the target accessed object, and second transaction information of a second access transaction of the target accessed object, a relationship between the first access transaction and the second access transaction, the second access transaction being the latest access transaction that has established or is to establish a global sequence at the target accessed object at the current moment, the global sequence being used to indicate a serial processing order of each access transaction for the target accessed object; When the first access transaction has a dependency relationship with the second access transaction, a global sequence is established for the first access transaction on the target accessed object.

11. A device for establishing a global order, characterized in that: The device comprises: An acquisition module, used for acquiring a first access transaction of a first access object to a target accessed object; a determination module, configured to determine a relationship between the first access transaction and the second access transaction according to first transaction information of the first access transaction, an object type of the target accessed object, and second transaction information of a second access transaction of the target accessed object, wherein the second access transaction is the latest access transaction with a global sequence established or to be established at the target accessed object at the current moment, and the global sequence is used to indicate a serial processing order of each access transaction for the target accessed object; An establishing module is used for not establishing a global sequence of the target accessed object for the first access transaction when there is no dependency relationship between the first access transaction and the second access transaction.

12. A device for establishing a global order, characterized in that: The device comprises: An acquisition module, used for acquiring a first access transaction of a first access object to a target accessed object; a determination module, configured to determine a relationship between the first access transaction and the second access transaction according to first transaction information of the first access transaction, an object type of the target accessed object, and second transaction information of a second access transaction of the target accessed object, wherein the second access transaction is the latest access transaction with a global sequence established or to be established at the target accessed object at the current moment, and the global sequence is used to indicate a serial processing order of each access transaction for the target accessed object; An establishing module is used to establish a global sequence of the target accessed object for the first access transaction when there is a dependency relationship between the first access transaction and the second access transaction.

13. An electronic device, characterized in that: It includes a processor, a memory, an access controller and an interconnection bus, wherein the processor, the memory and the access controller are connected via the interconnection bus; The access controller is the device for establishing a global order as claimed in claim 10, or the device for establishing a global order as claimed in claim 11; The memory stores at least one program code, and the at least one program code is used to be called by the processor to process access transactions according to the global order established by the access controller.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, which, when executed by a processor, can process access transactions according to a global order established by the method for establishing a global order as described in any one of claims 1 to 9, or process access transactions according to a global order established by the method for establishing a global order as described in claim 10.