Memory management method, device, electronic device and storage medium of bus module
Through linked list management and allocation of the memory space of the bus module, the low efficiency of SRAM space allocation and data order-keeping processing in GPU memory management is solved, and the operation efficiency and space utilization of the bus module are improved.
Patent Information
- Application Number
- CN202311667008.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-06
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2043-12-06
AI Technical Summary
In the prior art, in GPU memory management, SRAM space allocation and data order-keeping processing have large area and timing overhead, which can easily lead to bus module blockage and low working efficiency.
Through linked list management and allocation of the memory space of the bus module, data requests are allowed to allocate non-continuous space, reduce memory space fragmentation, and improve space utilization.
It achieves the maximization of space utilization at high load, improves the operation efficiency of bus modules, and avoids blockage caused by excessive fragmentation of memory space.
Smart Images

Figure CN117539636B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a memory management method, device, electronic device and storage medium of a bus module. Background Art
[0002] As a complex image processing unit, the GPU (Graphics Processing Unit) has many internal modules such as graphics calculation and rendering processing that need to calculate a large amount of image data. These modules themselves do not store fixed data. When working, they need to obtain the data required for calculation from the outside and output the calculation results to the lower-level modules for use. The last level cache in the GPU is usually called the system level cache (SLC). The bus interface (BIF) module needs to receive requests from many requesters and send a request to the system level cache every clock cycle through polling arbitration. The related technologies have large area and timing overheads in SRAM (Static Random Access Memomy) space allocation and data order preservation processing, and are prone to bus module blocking, resulting in low work efficiency. Summary of the invention
[0003] The present disclosure provides a technical solution for memory management of a bus module.
[0004] According to one aspect of the present disclosure, a memory management method for a bus module is provided, comprising:
[0005] In response to receiving a data request from any requester, and the number of spaces required by the data request is less than or equal to the number of remaining spaces in the memory of the bus module, determining b spaces allocated to the data request from the remaining spaces in the memory, wherein b represents the number of spaces required by the data request, and b is an integer greater than or equal to 1;
[0006] Record the connection relationship between the b spaces through a linked list, and record the address of the starting space in the b spaces;
[0007] The data request is sent to the cache, and the data corresponding to the data request returned by the cache is written into the b spaces according to the address of the starting space and the connection relationship.
[0008] In a possible implementation, data requests from different requesters reuse the same linked list.
[0009] In a possible implementation, after writing the data corresponding to the data request returned by the cache into the b spaces, the method further includes:
[0010] The data in the b spaces are returned to the requester in sequence.
[0011] In a possible implementation, the method further includes:
[0012] The remaining space of the memory is obtained through a counter.
[0013] In a possible implementation, the method further includes:
[0014] In response to allocating m spaces in the memory, decrementing the counter by m, where m is an integer greater than or equal to 1;
[0015] as well as,
[0016] In response to releasing any space in the memory, the counter is incremented by one.
[0017] In one possible implementation,
[0018] The method further includes: recording the available status of n spaces in the memory through a state vector corresponding to the memory; wherein n represents the number of spaces in the memory, and the state vector includes n state elements corresponding to the n spaces one by one; any state element in the state vector is a first preset value, indicating that the space corresponding to the state element is unavailable; any state element in the state vector is a second preset value, indicating that the space corresponding to the state element is available;
[0019] Determining b spaces allocated to the data request from the remaining space of the memory includes: allocating b spaces whose state elements are the second preset value to the data request.
[0020] In one possible implementation, the linked list includes n space nodes, and any space node includes a pointer field and a data field, wherein n represents the number of spaces in the memory, the pointer field is used to store the address of the next space node, and the data field is used to store data.
[0021] In a possible implementation, writing the data corresponding to the data request returned by the cache into the b spaces according to the address of the starting space and the connection relationship includes:
[0022] Receive data corresponding to the data request and an offset corresponding to the data returned by the cache;
[0023] According to the address of the starting space, the connection relationship and the offset, the data corresponding to the data request is written into the b spaces.
[0024] In one possible implementation,
[0025] The method further comprises: assigning an instruction number to the data request;
[0026] The sending the data request to the cache includes: sending the instruction number together with the data request to the cache, so that the cache returns the data corresponding to the data request based on the instruction number.
[0027] In a possible implementation, recording the address of the starting space in the b spaces includes:
[0028] The correspondence between the instruction number corresponding to the data request and the address of the starting space corresponding to the data request is recorded in a lookup table.
[0029] According to one aspect of the present disclosure, a memory management device of a bus module is provided, comprising:
[0030] a determination module, configured to, in response to receiving a data request from any requester, wherein the number of spaces required by the data request is less than or equal to the number of remaining spaces in the memory of the bus module, determine b spaces allocated to the data request from the remaining spaces in the memory, wherein b represents the number of spaces required by the data request, and b is an integer greater than or equal to 1;
[0031] A first recording module, used for recording the connection relationship between the b spaces through a linked list, and recording the address of the starting space in the b spaces;
[0032] The sending and writing module is used to send the data request to the cache, and write the data corresponding to the data request returned by the cache into the b spaces according to the address of the starting space and the connection relationship.
[0033] In a possible implementation, data requests from different requesters reuse the same linked list.
[0034] In a possible implementation manner, the device further includes:
[0035] The return module is used to return the data in the b spaces to the requester in sequence.
[0036] In a possible implementation manner, the device further includes:
[0037] The acquisition module is used to obtain the remaining space of the memory through a counter.
[0038] In a possible implementation manner, the device further includes a space counting module, and the space counting module is used to:
[0039] In response to allocating m spaces in the memory, decrementing the counter by m, where m is an integer greater than or equal to 1;
[0040] as well as,
[0041] In response to releasing any space in the memory, the counter is incremented by one.
[0042] In one possible implementation,
[0043] The device further includes: a second recording module, configured to record the available status of n spaces in the memory through a state vector corresponding to the memory; wherein n represents the number of spaces in the memory, and the state vector includes n state elements corresponding to the n spaces one by one; any state element in the state vector is a first preset value, indicating that the space corresponding to the state element is unavailable; any state element in the state vector is a second preset value, indicating that the space corresponding to the state element is available;
[0044] The determination module is used to allocate b spaces whose status elements are the second preset values to the data request.
[0045] In one possible implementation, the linked list includes n space nodes, and any space node includes a pointer field and a data field, wherein n represents the number of spaces in the memory, the pointer field is used to store the address of the next space node, and the data field is used to store data.
[0046] In a possible implementation, the sending and writing module is used to:
[0047] Receive data corresponding to the data request and an offset corresponding to the data returned by the cache;
[0048] According to the address of the starting space, the connection relationship and the offset, the data corresponding to the data request is written into the b spaces.
[0049] In one possible implementation,
[0050] The device further comprises: an allocating module, configured to allocate an instruction number to the data request;
[0051] The sending and writing module is used to send the instruction number together with the data request to the cache, so that the cache returns the data corresponding to the data request based on the instruction number.
[0052] In a possible implementation manner, the first recording module is used to:
[0053] The correspondence between the instruction number corresponding to the data request and the address of the starting space corresponding to the data request is recorded in a lookup table.
[0054] According to one aspect of the present disclosure, an electronic device is provided, comprising: one or more processors; a memory for storing executable instructions; wherein the one or more processors are configured to call the executable instructions stored in the memory to execute the above method.
[0055] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor.
[0056] According to one aspect of the present disclosure, a computer program product is provided, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in an electronic device, a processor in the electronic device executes the above method.
[0057] In the embodiment of the present disclosure, in response to receiving a data request from any requester, and the number of spaces b required by the data request is less than or equal to the number of remaining spaces in the memory of the bus module, b spaces allocated to the data request are determined from the remaining space of the memory, the connection relationship between the b spaces is recorded through a linked list, the address of the starting space in the b spaces is recorded, the data request is sent to the cache, and according to the address of the starting space and the connection relationship, the data corresponding to the data request returned by the cache is written into the b spaces, thereby managing and allocating the memory space of the bus module based on the linked list, the memory space of the bus module no longer needs to be allocated in a whole block, so that no fragmented space is generated when the memory space is allocated, and the probability of the bus module being blocked due to excessive fragmentation of the memory space can be reduced. In addition, the space utilization rate of the bus module in the embodiment of the present disclosure can reach the maximum when the load is high, so that the operation efficiency of the bus module can be improved.
[0058] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
[0059] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.
[0061] Figure 1A flow chart of a memory management method for a bus module provided by an embodiment of the present disclosure is shown.
[0062] Figure 2 A schematic diagram of a data processing flow before a bus module sends a data request to a system level cache (SLC) in an application scenario of the memory management method of the bus module provided by an embodiment of the present disclosure is shown.
[0063] Figure 3 The following is a processing flow of a system-level cache returning data to a requester via a bus module with order preservation in an application scenario of the memory management method of the bus module provided by an embodiment of the present disclosure.
[0064] Figure 4 A block diagram of a memory management device of a bus module provided by an embodiment of the present disclosure is shown.
[0065] Figure 5 A block diagram of an electronic device 1900 provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0066] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0067] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0068] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0069] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0070] As a complex image processing unit, the GPU (Graphics Processing Unit) has many graphics calculation, rendering processing and other related modules that need to calculate a large amount of image data. These modules do not store fixed data themselves. When working, they need to obtain the data required for calculation from the outside and output the calculation results to the lower-level modules for use. The internal modules of the GPU usually have huge data throughput, so multi-level caches are required to cache the data required by each level of functional modules. When the current cache hits, the module can directly take the required data; when the current cache misses, it needs to apply for new data from the lower-level cache. The last level of cache in the GPU is usually called the system level cache (System Level Cache, SLC). There are many modules in the GPU and the data access volume is large, and the data read from the system level cache is required to be returned in sequence. However, the operating bandwidth and efficiency of the system level cache are limited by objective physical conditions. Each clock cycle can only receive one request and return a fixed bit width of data. Among them, the fixed bit width can be called burst size or burst size, which indicates the number of bytes of each data transmission in the burst transmission. The order of data in one data transmission is preserved, while the order of data in different data transmissions is disordered, which obviously does not meet the requirements of the requester. The requester can represent any module that accesses the system-level cache.
[0071] In this context, the bus module (Bus InterFace, BIF) needs to receive requests from many requesters, and send a request to the system-level cache in each clock cycle through polling arbitration. The bus module receives a piece of data sent by the system-level cache in each clock cycle, and reorders the data returned to the same requester, and finally returns the sorted data to the requester cycle by cycle and piece by piece. In the related art, the bus module contains a shared memory space, a memory space allocation module and multiple instruction sequences, wherein the shared memory space uses SRAM (Static Random Access Memomy) with a width equal to the burst size and a limited depth.
[0072] Each time the bus module receives a read request, it will obtain the burst length contained in the request. Based on the burst length, the memory space allocation module will find a continuous space in the SRAM with a size equal to the burst length + 1 and allocate it to the request. The address of the allocated starting space is sent to the system-level cache as a sideband signal together with the original request, and the burst length and the address of the allocated starting space are stored in the instruction sequence exclusive to the request. The instruction sequence will strictly follow the first-in-first-out principle when it is output, so that the order can be maintained between multiple read requests from the same requester. The virtual address (vaddr) provided by the read request will be used by the system-level cache to determine the location of the first data in the page table, and the burst length is used to determine the offset from the virtual address. The data required for a read request includes the burst length + 1 data, which are the data from the virtual address to the virtual address + burst length, and the offsets are 0 to the burst length. The system-level cache will also attach a sideband signal to each piece of data returned. The content of the sideband signal is the address of the starting space sent by the bus module to the system-level cache plus the offset, which is used to determine which piece of data in which request. After the data returned by the system-level cache enters the bus module, the bus module will use the sideband signal returned by the system-level cache as the write address of the SRAM, put the returned data into the specified location, and reorder the data in the same request in this way.
[0073] Before returning data to the requester, the bus module needs to read the instruction sequence to determine whether the first data of the earliest received request is already in the SRAM. Before the first data is returned to the requester, the other data of this requester will not be returned. In this way, the bus module can maintain the order of all data requested by the same requester.
[0074] In the related art, when allocating SRAM space, a whole block of continuous space must be required, and when releasing space, only one space can be released in each clock cycle. Therefore, when the bus module is working under high load, the SRAM space is very likely to be very fragmented, and the response time to requests with a large burst length is long, thereby reducing the working efficiency of the system.
[0075] After the system-level cache returns the data, the order-keeping operation is controlled by the instruction sequence and is divided into two schemes: the first scheme is that each instruction sequence module is independent of each other, that is, each instruction sequence module uses a different RAM (Random Access Memomy); the second scheme is that each instruction sequence module reuses the FIFO (First In First Out) queue built by the same RAM, and determines the next data to be returned by each requester through pointer control logic. Among them, the timing performance of the first scheme is better, but the area overhead is larger. The area overhead of the second scheme is slightly smaller than that of the first scheme, but due to the complex logic in the pointer design, the area overhead caused by the logic is larger, and the timing performance is significantly reduced. Therefore, it can be considered that the related technology has large area and timing overheads in SRAM space allocation and data order-keeping processing, and it is easy to cause bus module blocking and low work efficiency.
[0076] The embodiment of the present disclosure provides a memory management method, device, electronic device and storage medium of a bus module, in response to receiving a data request from any requester, and the number of spaces b required by the data request is less than or equal to the number of remaining spaces in the memory of the bus module, from the remaining space of the memory, determine the b spaces allocated to the data request, record the connection relationship between the b spaces through a linked list, record the address of the starting space in the b spaces, send the data request to the cache, and write the data corresponding to the data request returned by the cache into the b spaces according to the address of the starting space and the connection relationship, thereby managing and allocating the memory space of the bus module based on the linked list, the memory space of the bus module no longer needs to be allocated in a whole block, so that no fragmented space is generated when the memory space is allocated, and the probability of the bus module being blocked due to excessive fragmentation of the memory space can be reduced. In addition, the space utilization rate of the bus module in the embodiment of the present disclosure can reach the maximum when the load is high, so that the operation efficiency of the bus module can be improved.
[0077] The memory management method of the bus module provided by the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.
[0078] Figure 1A flow chart of the memory management method of the bus module provided by an embodiment of the present disclosure is shown. In one possible implementation, the execution subject of the memory management method of the bus module may be a memory management device of the bus module. For example, the memory management method of the bus module may be executed by a terminal device or a server or other electronic device. The terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device or a wearable device, etc. In some possible implementations, the memory management method of the bus module may be implemented by a processor calling computer-readable instructions stored in a memory. As Figure 1 As shown, the memory management method of the bus module includes steps S11 to S13.
[0079] In step S11, in response to receiving a data request from any requester, and the number of spaces required by the data request is less than or equal to the number of remaining spaces in the memory of the bus module, b spaces allocated to the data request are determined from the remaining space of the memory, where b represents the number of spaces required by the data request, and b is an integer greater than or equal to 1.
[0080] In step S12, the connection relationship between the b spaces is recorded through a linked list, and the address of the starting space in the b spaces is recorded.
[0081] In step S13, the data request is sent to the cache, and the data corresponding to the data request returned by the cache is written into the b spaces according to the address of the starting space and the connection relationship.
[0082] The memory management method of the bus module provided in the embodiment of the present disclosure can be applied to a GPU (Graphics Processing Unit), a CPU (Central Processing Unit), etc., without limitation. In the following, the memory management method of the bus module is applied to a GPU as an example for explanation.
[0083] In the disclosed embodiment, a bus module (Bus InterFace, BIF) may receive a data request from a requestor. The requestor may be any module that needs to access the cache. For example, in a GPU, the requestor may be any module that performs graphics calculations, rendering processing, etc. in the GPU. For example, the requestor may be a pixel data master, a compute data master, a vertex data master, a 2D data master, a domain data master, etc., which are not limited here.
[0084] In the embodiments of the present disclosure, the cache accessed by the requester may be any level 1 cache, for example, the cache may be a system level cache (SLC); for example, the cache may be an L3 cache; for example, the cache may be an L2 cache; and so on.
[0085] In the disclosed embodiment, the data request may be a read request that needs to return data to the requester, which is not limited here. The data request may carry a target address and a burst length. The target address may be a virtual address or a physical address, which is not limited here. In a possible implementation, the data request may also carry identification information, wherein the identification information of the data request may be used to uniquely identify the data request.
[0086] After receiving a data request from any requester, the bus module can determine whether the bus module can currently process the data request (i.e., determine whether the bus module can currently allocate space in the bus module's memory to the data request) based on the amount of space required for the data request and the amount of remaining space in the bus module's memory. If the amount of space required for the data request is less than or equal to the amount of remaining space in the bus module's memory, the bus module can determine that the data request can currently be processed; if the amount of space required for the data request is greater than the amount of remaining space in the bus module's memory, the bus module can determine that the data request cannot currently be processed and needs to wait until the amount of remaining space in the bus module's memory reaches the amount of space required for the data request before processing the data request.
[0087] In the disclosed embodiment, the memory of the bus module may be SRAM (Static Random Access Memory) or other types of memory, which are not limited here.
[0088] In a possible implementation, the memory of the bus module may include n spaces, and the capacity of each space may be equal to the burst size. The burst size may also be referred to as burst dimension, etc., which is not limited here. The burst size may represent the number of bytes of each data transmission in the burst transmission. The burst size may be 32 bytes (i.e., 256 bits) or 64 bytes (i.e., 512 bits), etc., which is not limited here. n represents the number of spaces in the memory, and n may be 256, 512, 128, etc., which is not limited here.
[0089] In the disclosed embodiment, the bus module may determine the number of spaces required for the data request according to the burst length of the data request. The number of spaces required for the data request may be equal to the burst length plus 1. For example, if the burst length of the data request is L, the number of spaces required for the data request b=L+1.
[0090] In a possible implementation, the method further includes: obtaining the number of remaining spaces in the memory through a counter. In this implementation, a counter may be set in the bus module, so that the bus module can count the number of remaining spaces in the memory of the bus module through the counter. Wherein, since the last space (i.e., the last space) in the memory of the bus module is not used to store data, but only serves as the default value of the pointer in the linked list, the initial value of the counter may be the number of spaces in the memory of the bus module minus 1. For example, if the number of spaces in the memory of the bus module is n, the initial value of the counter may be n-1. Wherein, the number of spaces in the memory of the bus module refers to the total number of spaces in the memory of the bus module, and the number of remaining spaces in the memory refers to the number of available spaces in the memory.
[0091] In the related art, the calculation and management logic of the memory space allocation module of the bus module is complex, and there are large restrictions on the burst length, which is not conducive to the work of high-bandwidth requesters. In addition, the memory space allocation module in the related art has a large amount of calculation, and it is necessary to perform bit-by-bit XOR on the state vector of the bus module to obtain a space with continuous 1. Therefore, when the burst length is large, more logic gates and deeper logic levels are required, so the timing performance is poor.
[0092] The above implementation method only uses a counter to determine whether arbitration can be passed (i.e., whether the data request can be processed currently), which simplifies the logic of the bus module to find available space, that is, simplifies the logic of memory space allocation, thereby optimizing the timing of memory space allocation.
[0093] As an example of this implementation, the method further includes: in response to allocating m spaces in the memory, subtracting m from the counter, where m is an integer greater than or equal to 1; and, in response to releasing any space in the memory, adding one to the counter. In this example, for each m spaces allocated from the memory of the bus module, the bus module can subtract the corresponding number m from the counter; for each space released from the memory of the bus module, the bus module can add one to the counter. The number of spaces allocated from the memory of the bus module each time varies according to the burst length of the data request.
[0094] In this example, in response to allocating m spaces in the memory, the counter is decremented by m, and in response to releasing any space in the memory, the counter is incremented by one, thereby enabling the counter to accurately count the remaining space in the memory of the bus module.
[0095] In another possible implementation, in response to receiving a data request from any requester, the number of spaces in the state vector corresponding to the memory of the bus module whose state elements are the second preset value can be counted to obtain the remaining space in the memory of the bus module.
[0096] In the embodiment of the present disclosure, when the number of spaces b required by the data request is less than or equal to the number of remaining spaces in the memory of the bus module, the bus module can find b available spaces from the memory of the bus module to allocate to the data request.
[0097] In the related art, when a data request requires b spaces, it is necessary to find b continuous spaces from the memory of the bus module to allocate to the data request. However, in the embodiment of the present disclosure, the b spaces allocated to the data request do not need to be continuous.
[0098] In a possible implementation, the method further includes: recording the available status of n spaces in the memory through a state vector corresponding to the memory; wherein n represents the number of spaces in the memory, and the state vector includes n state elements corresponding one-to-one to the n spaces; any state element in the state vector is a first preset value, indicating that the space corresponding to the state element is unavailable; any state element in the state vector is a second preset value, indicating that the space corresponding to the state element is available; determining the b spaces allocated to the data request from the remaining space of the memory includes: allocating b spaces whose state elements are the second preset value to the data request.
[0099] In this implementation, the length of the state vector may be equal to the number of spaces in the memory of the bus module. For example, if the number of spaces in the memory of the bus module is n, the length of the state vector may also be n.
[0100] As an example of this implementation, the first preset value is 0, and the second preset value is 1.
[0101] As another example of this implementation, the first preset value is 1, and the second preset value is 0.
[0102] In this implementation, the bus module can set the status elements corresponding to the m spaces to a first preset value in response to allocating m spaces in the memory, where m is an integer greater than or equal to 1, and the bus module can set the status element corresponding to any space in the memory to a second preset value in response to releasing the space.
[0103] In this implementation, the bus module can obtain b available spaces to allocate to the data request by traversing bit by bit, and set the state elements corresponding to the b spaces to the first preset value. In this implementation, it is only necessary to traverse to obtain b available spaces, and it is not necessary to traverse to obtain b continuous available spaces.
[0104] In this implementation, the available status of n spaces in the memory is recorded through the state vector corresponding to the memory, wherein n represents the number of spaces in the memory, and the state vector includes n state elements corresponding to the n spaces one by one. Any state element in the state vector is a first preset value, indicating that the space corresponding to the state element is unavailable; any state element in the state vector is a second preset value, indicating that the space corresponding to the state element is available, and b spaces whose state elements are the second preset value are allocated to the data request, thereby accurately determining the availability of each space based on the state vector corresponding to the memory of the bus module.
[0105] In another possible implementation, the available status of the n spaces in the memory may be recorded by an array corresponding to the memory of the bus module.
[0106] In the embodiment of the present disclosure, after determining the b spaces allocated to the data request, the connection relationship between the b spaces is recorded through a link list, and the address of the starting space in the b spaces is recorded.
[0107] In a possible implementation, data requests from different requesters reuse the same linked list.
[0108] In this implementation, data requests from different requesters can reuse the same linked list. Compared with the solution in the related art that multiple instruction sequences are maintained for multiple requesters, and the multiple instruction sequences use different RAMs (Random Access Memomy), in this implementation, only one linked list is needed to update and maintain the spatial nodes corresponding to each requester, thereby saving area overhead. Compared with the solution in the related art that multiple instruction sequences reuse the same RAM to build a FIFO (First In First Out) queue, this implementation optimizes the pipeline structure, simplifies the overall logic of the bus module, and can implement the function of the bus module to return data in order with simpler logic.
[0109] In one possible implementation, the linked list includes n space nodes, and any space node includes a pointer field and a data field, wherein n represents the number of spaces in the memory, the pointer field is used to store the address of the next space node, and the data field is used to store data.
[0110] In this implementation, the n space nodes in the linked list correspond one-to-one to the n spaces in the memory of the bus module. The pointer field of any space node can be log2n bits. For example, if n=256, the pointer field of each space node can be 8 bits respectively.
[0111] For example, the bus module allocates 4 spaces in the memory of the bus module to a certain data request, namely space b0, space b1, space b2 and space b3. Among them, the pointer field of the space node b0 in the linked list stores the address of the space node b1, that is, the space node b0 in the linked list points to the space node b1; the pointer field of the space node b1 in the linked list stores the address of the space node b2, that is, the space node b1 in the linked list points to the space node b2; the pointer field of the space node b2 in the linked list stores the address of the space node b3, that is, the space node b2 in the linked list points to the space node b3; the pointer field of the space node b3 in the linked list stores the address of the last space in the memory, that is, the space node b3 in the linked list points to the last space in the memory.
[0112] In this implementation, the linked list includes n space nodes, and any space node includes a pointer field and a data field, wherein n represents the number of spaces in the memory, the pointer field is used to store the address of the next space node, and the data field is used to store data, so that each physical space in the memory of the bus module can be connected through a pointer, and the memory space of the bus module is no longer allocated in blocks, so that no fragmented space is generated when the memory space is allocated. In addition, data requests from different requesters can reuse the same linked list, thereby saving area overhead and optimizing timing. The more requesters there are, the more significant the advantages of this solution.
[0113] In one possible implementation, the method further includes: assigning an instruction number to the data request; and sending the data request to the cache includes: sending the instruction number together with the data request to the cache, so that the cache returns the data corresponding to the data request based on the instruction number.
[0114] In some application scenarios, the instruction number may also be called a control number (cmd number), etc., which is not limited here.
[0115] In this implementation, the instruction number may represent a number assigned by the bus module to the data request and used to uniquely identify the data request. That is, in the process of the bus module processing the data request, different data requests may be identified according to the instruction number.
[0116] In an implementation, each time a data request is passed through the bus module, a command number may be allocated thereto.
[0117] As an example of this implementation, the instruction number may range from 0 to n-1, where n represents the number of spaces in the memory of the bus module. Since the bus module will not allocate space to more than n data requests in the same period, it is possible to ensure that the instruction numbers corresponding to the data requests are different in the same period.
[0118] Of course, those skilled in the art can flexibly determine the setting method of the instruction number according to the actual application scenario requirements and / or personal preferences, and no limitation is made here.
[0119] In this implementation, after receiving the instruction number corresponding to the data request, the cache may not process the instruction number, but directly return the instruction number along with the data to the bus module.
[0120] In this implementation, an instruction number is assigned to the data request, and the instruction number is sent to the cache together with the data request, so that the cache returns the data corresponding to the data request based on the instruction number. The bus module can determine which data request the cache returns the data corresponding to based on the instruction number.
[0121] As an example of this implementation, recording the address of the starting space in the b spaces includes: recording the correspondence between the instruction number corresponding to the data request and the address of the starting space corresponding to the data request through a lookup table.
[0122] In this example, the bus module can record the correspondence between the instruction number corresponding to the data request and the address of the starting space corresponding to the data request through a lookup table. Therefore, after the cache returns the data, the bus module can determine the address of the starting space corresponding to the corresponding data request through the lookup table based on the instruction number carried by the data, so that the data can be written into the corresponding space.
[0123] In another possible implementation, the data request may carry identification information (ID), and the bus module may send the identification information together with the data request to the cache, so that the cache returns the data corresponding to the data request based on the identification information.
[0124] In one possible implementation, writing the data corresponding to the data request returned by the cache into the b spaces according to the address of the starting space and the connection relationship includes: receiving the data corresponding to the data request returned by the cache and the offset corresponding to the data; writing the data corresponding to the data request into the b spaces according to the address of the starting space, the connection relationship and the offset.
[0125] In this implementation, the bus module can obtain the address of the starting space corresponding to any data request returned by the cache in response to receiving any data corresponding to the data and the offset corresponding to the data, and traverse the linked list according to the address of the starting space corresponding to the data request and the offset corresponding to the data, and determine the write address of the data in the memory of the bus module to write the data to the write address. The offset corresponding to the data can represent the offset of the space to be written to the data relative to the starting space corresponding to the data request. The offset value range can be 0 to L, where L represents the burst length of the data request.
[0126] In this implementation, by receiving the data corresponding to the data request and the offset corresponding to the data returned by the cache, the data corresponding to the data request is written to the b spaces according to the address of the starting space, the connection relationship and the offset, thereby enabling data order preservation in the bus module.
[0127] In a possible implementation, after writing the data corresponding to the data request returned by the cache into the b spaces, the method further includes: returning the data in the b spaces to the requester in sequence.
[0128] In this implementation, the bus module can return the data in the b spaces to the requester in order. For example, the b spaces include space b0, space b1, space b2 and space b3 in sequence, then the data in space b0, space b1, space b2 and space b3 are returned to the requester in order. That is, before the data in space b0 is returned to the requester, the data in space b1, space b2 and space b3 are not returned to the requester; before the data in space b1 is returned to the requester, the data in space b2 and space b3 are not returned to the requester; before the data in space b2 is returned to the requester, the data in space b3 is not returned to the requester. In this implementation, the bus module can return a piece of data (i.e., the data of one space) in each clock cycle. If there is data in space b0 (i.e., the data corresponding to space b0 has been written into space b0), the data in space b0 can be returned to the requester and space b0 can be released; if there is data in space b1 (i.e., the data corresponding to space b1 has been written into space b1), the data in space b1 can be returned to the requester and space b1 can be released; if there is data in space b2 (i.e., the data corresponding to space b2 has been written into space b2), the data in space b2 can be returned to the requester and space b2 can be released; if there is data in space b3 (i.e., the data corresponding to space b3 has been written into space b3), the data in space b3 can be returned to the requester and space b3 can be released.
[0129] In this implementation, the data in the b spaces are returned to the requester in sequence, thereby enabling orderly return of data.
[0130] In a possible implementation, the bus module may set a read pointer for each requester, and the read pointer corresponding to any requester points to the space corresponding to the earliest unreturned data corresponding to the requester.
[0131] The memory management method of the bus module provided by the embodiment of the present disclosure is described below through a specific application scenario. In this application scenario, the memory management method of the bus module can be applied to a GPU.
[0132] Figure 2 The following is a schematic diagram showing a data processing flow before a bus module sends a data request to a system level cache (SLC) in an application scenario of the memory management method of the bus module provided by an embodiment of the present disclosure. Figure 2 As shown, the bus module can receive a data request from a requester and obtain a burst length b carried in the data request. The bus module can determine whether the counter is greater than or equal to b (see Figure 2If not, wait for processing; if so, find b available spaces in SRAM to allocate to the data request (see Figure 2 2 in step 2) and assigns an instruction number to the data request (see Figure 2 The bus module can record the connection relationship between b spaces through a linked list (see Figure 2 Step 4 in ), record the address of the starting space in b spaces (see Figure 2 Step 5) in the above step, and record the corresponding relationship between the instruction number and the address of the starting space. The bus module can send the data request and the instruction number to the system-level cache.
[0133] Figure 3 The following is a diagram showing the processing flow of returning data from the system-level cache to the requester via the bus module in an application scenario of the memory management method of the bus module provided by the embodiment of the present disclosure. Figure 3 As shown, the data returned by the system-level cache to the bus module may carry the instruction number and the offset. The bus module may obtain the address of the starting space according to the instruction number, and traverse the linked list to obtain the write address of the data according to the address and the offset of the starting space (see Figure 3 6 in step 1), and write the data to the write address in the SRAM (see Figure 3 The bus module can use the read pointer corresponding to the requester to point to the space corresponding to the earliest data that has not been returned to the requester, so as to maintain the order of the data returned to the requester (see Figure 3 8 in the previous step).
[0134] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.
[0135] In addition, the present disclosure also provides a memory management device, an electronic device, a computer-readable storage medium, and a computer program product for a bus module. The above can all be used to implement any memory management method for a bus module provided by the present disclosure. The corresponding technical solutions and technical effects can be found in the corresponding records in the method part and will not be repeated here.
[0136] Figure 4 FIG. 1 is a block diagram of a memory management device of a bus module provided by an embodiment of the present disclosure. Figure 4 As shown, the memory management device of the bus module includes:
[0137] The determination module 41 is used for, in response to receiving a data request from any requester, and the number of spaces required by the data request is less than or equal to the number of remaining spaces in the memory of the bus module, determining b spaces allocated to the data request from the remaining spaces in the memory, wherein b represents the number of spaces required by the data request, and b is an integer greater than or equal to 1;
[0138] A first recording module 42, configured to record the connection relationship between the b spaces through a linked list, and record the address of the starting space in the b spaces;
[0139] The sending and writing module 43 is used to send the data request to the cache, and write the data corresponding to the data request returned by the cache into the b spaces according to the address of the starting space and the connection relationship.
[0140] In a possible implementation, data requests from different requesters reuse the same linked list.
[0141] In a possible implementation manner, the device further includes:
[0142] The return module is used to return the data in the b spaces to the requester in sequence.
[0143] In a possible implementation manner, the device further includes:
[0144] The acquisition module is used to obtain the remaining space of the memory through a counter.
[0145] In a possible implementation manner, the device further includes a space counting module, and the space counting module is used to:
[0146] In response to allocating m spaces in the memory, decrementing the counter by m, where m is an integer greater than or equal to 1;
[0147] as well as,
[0148] In response to releasing any space in the memory, the counter is incremented by one.
[0149] In one possible implementation,
[0150] The device further includes: a second recording module, configured to record the available status of n spaces in the memory through a state vector corresponding to the memory; wherein n represents the number of spaces in the memory, and the state vector includes n state elements corresponding to the n spaces one by one; any state element in the state vector is a first preset value, indicating that the space corresponding to the state element is unavailable; any state element in the state vector is a second preset value, indicating that the space corresponding to the state element is available;
[0151] The determining module 41 is used to allocate b spaces whose status elements are the second preset values to the data request.
[0152] In one possible implementation, the linked list includes n space nodes, and any space node includes a pointer field and a data field, wherein n represents the number of spaces in the memory, the pointer field is used to store the address of the next space node, and the data field is used to store data.
[0153] In a possible implementation, the sending and writing module 43 is used to:
[0154] Receive data corresponding to the data request and an offset corresponding to the data returned by the cache;
[0155] According to the address of the starting space, the connection relationship and the offset, the data corresponding to the data request is written into the b spaces.
[0156] In one possible implementation,
[0157] The device further comprises: an allocating module, configured to allocate an instruction number to the data request;
[0158] The sending and writing module 43 is used to send the instruction number together with the data request to the cache, so that the cache returns the data corresponding to the data request based on the instruction number.
[0159] In a possible implementation, the first recording module 42 is used to:
[0160] The correspondence between the instruction number corresponding to the data request and the address of the starting space corresponding to the data request is recorded in a lookup table.
[0161] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. Its specific implementation and technical effects can refer to the description of the above method embodiments. For the sake of brevity, they will not be repeated here.
[0162] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium may be a non-volatile computer-readable storage medium, or may be a volatile computer-readable storage medium.
[0163] The embodiment of the present disclosure further provides a computer program, including a computer-readable code. When the computer-readable code is executed in an electronic device, a processor in the electronic device executes the above method.
[0164] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in an electronic device, a processor in the electronic device executes the above method.
[0165] An embodiment of the present disclosure also provides an electronic device, comprising: one or more processors; and a memory for storing executable instructions; wherein the one or more processors are configured to call the executable instructions stored in the memory to execute the above method.
[0166] The electronic device may be provided as a terminal, a server, or a device in other forms.
[0167] Figure 5 1 is a block diagram of an electronic device 1900 provided in an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a terminal or a server. Figure 5 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0168] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958 (I / O interface). The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as a Microsoft Server operating system (Windows Server 2003). TM ), a graphical user interface operating system launched by Apple (MacOS X TM ), a multi-user, multi-process computer operating system (Unix TM ), a free and open source Unix-like operating system (Linux TM ), an open source Unix-like operating system (FreeBSD TM ) or similar.
[0169] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0170] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0171] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0172] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0173] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0174] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0175] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0176] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0177] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0178] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK) and the like.
[0179] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0180] If the technical solution of the embodiments of the present disclosure involves personal information, the product using the technical solution of the embodiments of the present disclosure has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of the embodiments of the present disclosure involves sensitive personal information, the product using the technical solution of the embodiments of the present disclosure has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the requirement of "explicit consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to collect his or her personal information; or on the device for processing personal information, when the personal information processing rules are notified by obvious signs / information, the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
[0181] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A memory management method for a bus module, characterized in that: include: In response to receiving a data request from any requester, and the number of spaces required by the data request is less than or equal to the number of remaining spaces in the memory of the bus module, determining b spaces allocated to the data request from the remaining spaces in the memory, wherein b represents the number of spaces required by the data request, and b is an integer greater than or equal to 1; The connection relationship between the b spaces is recorded through a linked list, and the address of the starting space in the b spaces is recorded; wherein data requests from different requesters reuse the same linked list, the linked list includes n space nodes, the n space nodes correspond to the n spaces in the memory one by one, and any space node includes a pointer field, wherein n represents the number of spaces in the memory, and the pointer field is used to store the address of the next space node; Send the data request to the cache, receive the data corresponding to the data request and the offset corresponding to the data returned by the cache, determine the write address of the data in the memory according to the address of the starting space, the connection relationship and the offset, and write the data to the write address, wherein the offset represents the offset of the space to which the data is to be written relative to the starting space.
2. The method according to claim 1, characterized in that After writing the data corresponding to the data request returned by the cache into the b spaces, the method further includes: The data in the b spaces are returned to the requester in sequence.
3. The method according to claim 1, characterized in that The method further comprises: The remaining space of the memory is obtained through a counter.
4. The method according to claim 3, characterized in that The method further comprises: In response to allocating m spaces in the memory, decrementing the counter by m, where m is an integer greater than or equal to 1; as well as, In response to releasing any space in the memory, the counter is incremented by one.
5. The method according to claim 1, characterized in that The method further includes: recording the available status of n spaces in the memory through a state vector corresponding to the memory; wherein n represents the number of spaces in the memory, and the state vector includes n state elements corresponding to the n spaces one by one; any state element in the state vector is a first preset value, indicating that the space corresponding to the state element is unavailable; any state element in the state vector is a second preset value, indicating that the space corresponding to the state element is available; Determining the b spaces allocated to the data request from the remaining space of the memory includes: allocating the b spaces whose status elements are the second preset values to the data request.
6. The method according to claim 1, characterized in that Any spatial node also includes a data domain, and the data domain is used to store data.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: assigning an instruction number to the data request; The sending the data request to the cache includes: sending the instruction number together with the data request to the cache, so that the cache returns the data corresponding to the data request based on the instruction number.
8. The method according to claim 7, characterized in that The recording of the address of the starting space in the b spaces includes: The correspondence between the instruction number corresponding to the data request and the address of the starting space corresponding to the data request is recorded through a lookup table.
9. A memory management device for a bus module, characterized in that: include: a determination module, configured to, in response to receiving a data request from any requester, wherein the number of spaces required by the data request is less than or equal to the number of remaining spaces in the memory of the bus module, determine b spaces allocated to the data request from the remaining spaces in the memory, wherein b represents the number of spaces required by the data request, and b is an integer greater than or equal to 1; A first recording module is used to record the connection relationship between the b spaces through a linked list, and record the address of the starting space in the b spaces; wherein data requests from different requesters reuse the same linked list, the linked list includes n space nodes, the n space nodes correspond to the n spaces in the memory one by one, and any space node includes a pointer field, wherein n represents the number of spaces in the memory, and the pointer field is used to store the address of the next space node; A sending and writing module is used to send the data request to the cache, receive the data corresponding to the data request and the offset corresponding to the data returned by the cache, determine the write address of the data in the memory according to the address of the starting space, the connection relationship and the offset, and write the data to the write address, wherein the offset represents the offset of the space to which the data is to be written relative to the starting space.
10. An electronic device, characterized in that: include: one or more processors; a memory for storing executable instructions; The one or more processors are configured to call the executable instructions stored in the memory to execute the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
