CN114385089A - Cross addressing-based dynamic bank storage method and device and electronic equipment - Google Patents

Cross addressing-based dynamic bank storage method and device and electronic equipment Download PDF

Info

Publication number
CN114385089A
CN114385089A CN202210282416.1A CN202210282416A CN114385089A CN 114385089 A CN114385089 A CN 114385089A CN 202210282416 A CN202210282416 A CN 202210282416A CN 114385089 A CN114385089 A CN 114385089A
Authority
CN
China
Prior art keywords
bank
operation information
storage
group
bank group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210282416.1A
Other languages
Chinese (zh)
Other versions
CN114385089B (en
Inventor
欧阳鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qingwei Intelligent Information Technology Co ltd
Original Assignee
Beijing Qingwei Intelligent Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qingwei Intelligent Information Technology Co ltd filed Critical Beijing Qingwei Intelligent Information Technology Co ltd
Priority to CN202210282416.1A priority Critical patent/CN114385089B/en
Publication of CN114385089A publication Critical patent/CN114385089A/en
Application granted granted Critical
Publication of CN114385089B publication Critical patent/CN114385089B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a dynamic bank storage method, a device and electronic equipment based on cross addressing; the method comprises the following steps: determining operation information needing bank storage in a subgraph to be processed and storage capacity needed by the operation information; determining a target bank group for storing the operation information according to the bank storage allocation information and the storage capacity required by the operation information; under the condition that other operation information exists in the target bank group, determining a first bank to which storage start addresses of the other operation information in the target bank group belong, and determining an address of an idle basic storage unit of which the address in a second bank in the bank group is located after the storage end address of the operation information; and taking the determined address of the free basic storage unit as a storage starting address of the operation information, and finishing the storage of the operation information. The scheme provided by the embodiment of the invention can improve the bank utilization rate and the storage efficiency of the operation information.

Description

Cross addressing-based dynamic bank storage method and device and electronic equipment
Technical Field
The invention relates to the technical field of coarse-grained reconfigurable architecture, in particular to a dynamic bank storage method and device based on cross addressing and electronic equipment.
Background
A Field Programmable Gate Array (FPGA) is generally considered as hardware that gives consideration to flexibility and efficiency, and compared with a Graphics Processing Unit (GPU), the FPGA performs better on the bottom layer Processing efficiency, but due to the interconnection structure of the FPGA, the area and power consumption of the FPGA are much larger than those of a dedicated chip; based on this, a Coarse-Grained Reconfigurable architecture (CGRA) has come to be produced, and the CGRA is a set of programmable logic processing units supporting a higher-level programming model, which is considered as a mainstream technology of FPGA virtualization.
In the research of the CGRA technology, after a data flow graph is generated, before mapping operation information in each sub-graph in the data flow graph on hardware, the operation information in each sub-graph needs to be stored in a storage resource bank; due to the characteristics of the bank hardware, two or more operations cannot be simultaneously read and written, so that in order to avoid access conflicts, the existing storage scheme adopts the following steps: one operation information in the subgraph is stored on the bank, and the rest operation information in the subgraph cannot be stored on the same bank; for example, two pieces of operation information exist in one sub-graph and need to be stored on banks, wherein the storage capacity needed by one piece of operation information is far smaller than the storage capacity Bc of one bank, the storage capacity needed by the other piece of operation information is between 1Bc and 2Bc, the storage capacity needed by the two pieces of operation information is smaller than 2Bc, the two pieces of operation information need to be stored in 3 banks according to the existing allocation scheme, and the two banks cannot be used continuously although a part of the storage capacity remains, so that the utilization rate of the banks is low.
In practical application, although the operation information of two different subgraphs can be stored in the same bank to improve the utilization rate of the storage capacity of the bank, the bank cannot simultaneously read and write the two operation information, that is, the operation information in one subgraph can be read and written only after the operation information in the other subgraph is read and written, so that the storage efficiency of the operation information of the two different subgraphs is low.
Disclosure of Invention
In order to solve the above problems, embodiments of the present invention provide a dynamic bank storage method and apparatus based on cross addressing, and an electronic device.
In one aspect of implementation of the invention, a dynamic bank storage method based on cross addressing is provided, each bank is compiled into a bank group in parallel with two banks as a group, and addresses are compiled into basic storage units in the two parallel banks in the bank group in a left-right alternating sequence by using a cross addressing mode; the method comprises the following steps:
determining operation information needing bank storage in a subgraph to be processed and storage capacity needed by the operation information;
determining a target bank group for storing the operation information according to bank storage allocation information and storage capacity required by the operation information, wherein the bank storage allocation information records the residual storage capacity of each bank group, and the sub-graph numbers, storage start addresses and storage end addresses of other stored or currently stored operation information in each bank group;
under the condition that the other operation information exists in the target bank group, determining a first bank to which a storage start address of the other operation information in the target bank group belongs, and determining an address of an idle basic storage unit of which the address in a second bank in the bank group is located after a storage end address of the other operation information; determining the address of a certain free basic storage unit in a first bank or a second bank in the target bank group under the condition that the other operation information does not exist in the target bank group;
and taking the determined address of the free basic storage unit as a storage starting address of the operation information, and finishing the storage of the operation information.
Compared with the prior art, the invention has the beneficial effects that: two banks are logically organized into a bank group, two access interfaces are provided corresponding to the bank group, one access interface starts from one bank and the other access interface starts from the other bank, and therefore two pieces of operation information are stored in one bank group at the same time, and storage efficiency is improved; moreover, aiming at the situation of two pieces of operation information listed in the background technology, only two banks in one bank group are needed to finish storage, and the bank utilization rate is improved.
Optionally, the step of determining a target bank group for storing the operation information includes:
determining a first number of bank groups according to the storage capacity required by the operation information and the residual storage capacity of each bank group in the bank storage allocation information;
selecting a second number of bank groups from the first number of bank groups based on a rule that the same bank group stores at most two pieces of operation information in the same subgraph according to the sub-graph numbers of the other pieces of operation information in the bank storage allocation information;
and selecting one bank group from the second number of bank groups as the target bank group.
Optionally, the bank storage allocation information further includes: the access step length and the access frequency of other stored or currently stored operation information in each bank group; the step of selecting one bank group from the second number of bank groups as the target bank group includes:
selecting a third number of bank groups from the second number of bank groups according to the access step length and the access frequency of other stored or currently stored operation information in the bank storage allocation information and the access step length and the access frequency of the operation information, wherein the same bank in the third number of bank groups cannot be accessed simultaneously in the process of reading and writing the other operation information and the operation information in the third number of bank groups according to the respective access step length and the access frequency;
and selecting a bank group with the residual storage capacity closest to the storage capacity required by the operation information from the third number of bank groups as a target bank group.
Optionally, the bank storage allocation information further includes: the existence period of other stored or currently stored operation information in each bank group in the bank group; selecting one bank group from the second number of bank groups as the target bank group, wherein the step comprises the following steps:
determining the existence period of the operation information in a bank group according to the life cycle of the subgraph to be processed;
selecting a fourth number of bank groups from the second number of bank groups, wherein no intersection exists between the existence periods of the other operation information in the fourth number of bank groups and the existence periods of the operation information;
and selecting a bank group with the residual storage capacity closest to the storage capacity required by the operation information from the fourth number of bank groups as a target bank group.
Optionally, the method further includes: and updating the bank storage allocation information by using the residual storage capacity of the target bank group and the relevant information of the operation information.
Optionally, the step of completing the storage of the operation information includes:
determining a data pattern of the operation information, wherein the data pattern is used for representing that the operation information is 32-bit data or 64-bit data;
in the case where the operation information belongs to 64-bit data, dividing each word constituting the operation information into upper 32 bits and lower 32 bits;
and finishing the storage of the operation information according to a storage rule that the upper 32 bits are stored in the second number of bank groups and the lower 32 bits are sequentially stored in the first bank.
Optionally, the method further includes: and recording the data mode of the operation information in the bank storage allocation information.
Optionally, the bank storage allocation information further includes an identifier of other operation information already stored or being stored in each bank group; the step of determining the operation information required to be stored in the bank and the storage capacity required by the operation information in the subgraph to be processed comprises the following steps:
acquiring a storage request aiming at operation information needing bank storage in a subgraph to be processed;
inquiring whether other operation information with the same identification as the operation information is recorded in the bank storage allocation information;
if so, responding to the storage request by utilizing the relevant information of the other operation information recorded by the bank storage allocation information;
and if not, determining the storage capacity required by the operation information.
In another aspect of the implementation of the present invention, a dynamic bank storage device based on cross addressing is further provided, wherein each bank is combined in parallel into one bank group with two banks as one group, and addresses are compiled for basic storage units in two parallel banks in the bank group in a left-right alternating sequence by using a cross addressing mode; the device comprises:
the information determining module is used for determining operation information needing bank storage in the subgraph to be processed and the storage capacity needed by the operation information;
a bank group determining module, configured to determine a target bank group for storing the operation information according to bank storage allocation information and a storage capacity required by the operation information, where the bank storage allocation information records a remaining storage capacity of each bank group, and a sub-map number, a storage start address, and a storage end address of other operation information stored or being stored in each bank group;
an address determining module, configured to determine, when the other operation information exists in the target bank group, a first bank to which a storage start address of the other operation information in the target bank group belongs, and determine an address of an idle basic storage unit, which is located after a storage end address of the other operation information, in a second bank in the bank group; determining the address of a certain free basic storage unit in a first bank or a second bank in the target bank group under the condition that the other operation information does not exist in the target bank group;
and the information storage module is used for taking the determined address of the idle basic storage unit as the storage starting address of the operation information and finishing the storage of the operation information.
In another aspect of the present invention, an electronic device is further provided, which includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing processor-executable instructions;
and the processor is used for realizing the dynamic bank storage method based on the cross addressing when the instructions stored in the memory are executed.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principles of the invention. In the drawings:
fig. 1 is a schematic structural diagram of a bank group according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a cross addressing-based dynamic bank storage method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a dynamic bank memory device based on cross addressing according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the following embodiments and accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
The dynamic bank storage method based on the cross addressing provided by the embodiment of the invention is characterized in that each bank is compiled into a bank group in parallel by taking two banks as a group, addresses are compiled into basic storage units in the two parallel banks in the bank group in a cross addressing mode in a left-right alternating sequence, specifically, as shown in fig. 1, each bank is composed of a plurality of basic storage units, the size of each basic storage unit is 4B, the number Bn of the banks, the capacity Bc of the banks, the group number Bg of the banks, the capacity of each bank group after the grouping is twice of the original one bank, namely 2Bc, and the group number of the banks is half of the original bank number, namely Bn/2; when compiling the addresses, for two banks in each bank group, the current address and the next address are on different banks in the group, for example, an even address is on a bank on the left side in the group, and an odd address is on a bank on the right side in the group, so that the bank group can be accessed from the odd address and the even address respectively to complete reading and writing of the operation information; specifically, referring to fig. 2, the dynamic bank storage method includes:
and S100, determining the operation information needing bank storage in the subgraph to be processed and the storage capacity needed by the operation information.
In implementation, the subgraph to be processed can be understood as the subgraph which needs to be processed currently in the dataflow graph; in one implementation, for the cases of storage request alias access and repeated access occurring in practical applications, the identifiers of other operation information stored or being stored in each bank group may be recorded in the bank storage allocation information; based on the operation information, after a storage request for the operation information needing bank storage in the subgraph to be processed is obtained, whether other operation information with the same identification as the operation information is recorded in the bank storage allocation information or not can be inquired; if so, responding to the storage request by utilizing the relevant information of other operation information recorded by the bank storage allocation information; and if not, determining the storage capacity required by the operation information and performing a subsequent storage process.
And S110, determining a target bank group for storing the operation information according to the bank storage allocation information and the storage capacity required by the operation information.
In the implementation, the bank storage allocation information further records the remaining storage capacity of each bank group, and the sub-graph number, the storage start address and the storage end address of other operation information stored or being stored in each bank group.
Correspondingly, a first number of bank groups can be determined according to the storage capacity required by the operation information and the residual storage capacity of each bank group in the bank storage allocation information; selecting a second number of bank groups from the first number of bank groups according to the sub-graph numbers of other operation information in the bank storage allocation information, wherein the second number of bank groups needs to be selected from the first number of bank groups based on a rule that two operation information in the same sub-graph are stored at most in the same bank group to avoid access conflict; and then selecting one bank group from the second number of bank groups as a target bank group.
In implementation, the problem that access conflicts are possibly brought by the difference between the access step length and the access frequency of the operation information is considered, wherein the access step length represents the number of basic storage units in a preset one-time access bank group, and the access frequency represents the number of access times in one time step; for example, if the access step of one operation information is two basic storage units, that is, two adjacent basic storage units in two banks in a bank group need to be accessed simultaneously, and the access step of the other operation information is one basic storage unit, then an access conflict may occur if the two operation information are stored in the same bank group; in addition, the access step size of the two operation information is the same, and if the access frequency is different, access conflict may also be caused;
based on this, in one case, the bank storage allocation information may further include: the access step length and the access frequency of other stored or currently stored operation information in each bank group;
selecting a third number of bank groups from the second number of bank groups according to the access step length and the access frequency of other stored or currently stored operation information in the bank storage allocation information and the access step length and the access frequency of the operation information, wherein the same bank in the third number of bank groups cannot be accessed simultaneously in the process of reading and writing other operation information and operation information in the third number of bank groups according to the respective access step length and the access frequency; for example, the access step length of the operation information and other operation information is one basic storage unit and the access frequency is the same, so that the problem of access conflict does not exist when the initial storage addresses are respectively on different banks in the bank group;
and selecting a bank group with the residual storage capacity closest to the storage capacity required by the operation information from the third number of bank groups as a target bank group.
In the implementation, if there is no intersection between the existence periods of two operation information, for example, the existence period of one operation information is time step 4, 5, 6; the existence period of the other operation information is time steps 8, 9 and 10, and the existence periods of the two operation information do not have intersection, so that the problem of access conflict does not exist;
based on this, in another case, the bank storage allocation information may further include: the existence period of other stored or currently stored operation information in each bank group in the bank group; determining the existence period of the operation information in the bank group according to the life period of the subgraph to be processed, wherein the existence period of the operation information is the life period of the subgraph to be processed; selecting a fourth number of bank groups from the second number of bank groups, wherein intersection does not exist between the existence periods of other operation information in the fourth number of bank groups and the existence periods of the operation information; and selecting a bank group with the residual storage capacity closest to the storage capacity required by the operation information from the fourth number of bank groups as a target bank group.
Therefore, it is easy to understand that the access step length and the access frequency of two pieces of operation information stored in the same bank group are the same, and no matter whether the existence periods of the two pieces of operation information have an intersection or not, no access conflict is generated; when the existence periods of the two operation information do not have intersection, the access conflict is not generated.
S120, under the condition that other operation information exists in the target bank group, determining a first bank to which the storage start address of the other operation information in the target bank group belongs, and determining the address of an idle basic storage unit of which the address in a second bank in the bank group is positioned behind the storage end address of the other operation information; and under the condition that other operation information does not exist in the target bank group, determining the address of a certain free basic storage unit in a first bank or a second bank in the target bank group.
In implementation, other operation information does not exist in the target bank group, namely the target bank group is in an idle state, and the operation information can be directly stored in the target bank group; when other operation information exists in the target bank group, the initial storage addresses of the two operation information need to be distributed on different banks, and then access conflict is avoided through cross addressing, namely the two operation information prevent the same bank from being accessed simultaneously in the reading and writing process.
After the target bank group is selected and the initial storage address is allocated or the storage of the operation information is completed, the bank storage allocation information can be updated by using the remaining storage capacity of the target bank group and the relevant information of the operation information, wherein the relevant information comprises the number of the sub-graph, the storage initial address, the storage end address, the access step length, the access frequency and the existence period.
S130, taking the determined address of the idle basic storage unit as a storage starting address of the operation information, and finishing the storage of the operation information.
In implementation, as the size of one basic storage unit in the bank is 4B, 32-bit data can be directly stored, and therefore, the operation information of 32-bit data is stored after a target bank group is selected by a cross addressing mode;
two basic units are needed for storing 64-bit data, so that the 64-bit data can be stored by the basic storage units in two banks with continuous addresses in the bank group;
specifically, in the case where the operation information belongs to 64-bit data, each word constituting the operation information may be split into upper 32 bits and lower 32 bits; finishing the storage of the operation information according to a storage rule that the upper 32 bits are stored in the second number of bank groups and the lower 32 bits are sequentially stored in the first bank; for example, the even address stores the upper 32 bits, and the lower odd address of the even address stores the lower 32 bits to complete the storage of one word in the operation information of 64-bit data, i.e. the even addresses and the odd addresses of two banks in the bank group form a 64-bit data format.
The bank storage allocation information further records a data pattern of the operation information, and when the data pattern is used for reading 64-bit data, the upper 32 bits and the lower 32 bits need to be combined to realize correct reading of the data.
Referring to fig. 3, an embodiment of the present invention provides a cross addressing-based dynamic bank storage device, where each bank is combined in parallel into a bank group by taking two banks as a group, and addresses are compiled for basic storage units in two parallel banks in the bank group in a left-right alternating sequence by using a cross addressing mode; the device comprises:
the information determining module 200 is configured to determine operation information that needs to be stored in a bank in a sub-graph to be processed and a storage capacity needed by the operation information;
a bank group determining module 210, configured to determine a target bank group for storing the operation information according to bank storage allocation information and a storage capacity required by the operation information, where the bank storage allocation information records a remaining storage capacity of each bank group, and a sub-map number, a storage start address, and a storage end address of other operation information stored or being stored in each bank group;
an address determining module 220, configured to determine, when the other operation information exists in the target bank group, a first bank to which a storage start address of the other operation information in the target bank group belongs, and determine an address of an idle basic storage unit, which is located after a storage end address of the other operation information, in a second bank in the bank group; determining the address of a certain free basic storage unit in a first bank or a second bank in the target bank group under the condition that the other operation information does not exist in the target bank group;
and an information storage module 230, configured to use the determined address of the free basic storage unit as a storage start address of the operation information, and complete storage of the operation information.
In implementation, the bank group determining module 210 is specifically configured to determine a first number of bank groups according to the storage capacity required by the operation information and the remaining storage capacity of each bank group in the bank storage allocation information;
selecting a second number of bank groups from the first number of bank groups based on a rule that the same bank group stores at most two pieces of operation information in the same subgraph according to the sub-graph numbers of the other pieces of operation information in the bank storage allocation information;
and selecting one bank group from the second number of bank groups as the target bank group.
In an implementation, the bank storage allocation information further includes: the access step length and the access frequency of other stored or currently stored operation information in each bank group; a bank group determining module 210, configured to select a third bank group from the second bank group according to an access step and an access frequency of other stored or currently stored operation information in the bank storage allocation information, and the access step and the access frequency of the operation information, where the same bank in the third bank group cannot be accessed simultaneously in a process of reading and writing the other operation information and the operation information in the third bank group;
and selecting a bank group with the residual storage capacity closest to the storage capacity required by the operation information from the third number of bank groups as a target bank group.
In an implementation, the bank storage allocation information further includes: the existence period of other stored or currently stored operation information in each bank group in the bank group; the bank group determining module 210 is specifically configured to determine a existence period of the operation information in the bank group according to the life cycle of the to-be-processed subgraph;
selecting a fourth number of bank groups from the second number of bank groups, wherein no intersection exists between the existence periods of the other operation information in the fourth number of bank groups and the existence periods of the operation information;
and selecting a bank group with the residual storage capacity closest to the storage capacity required by the operation information from the fourth number of bank groups as a target bank group.
In an implementation, the system further includes an updating module, configured to update the bank storage allocation information by using the remaining storage capacity of the target bank group, the sub-graph number to which the operation information belongs, the storage start address, the storage end address, the access step size, the access frequency, and the existence period.
In an implementation, the information storage module 230 is specifically configured to determine a data pattern of the operation information, where the data pattern is used to indicate that the operation information is 32-bit data or 64-bit data;
in the case where the operation information belongs to 64-bit data, dividing each word constituting the operation information into upper 32 bits and lower 32 bits;
and finishing the storage of the operation information according to a storage rule that the upper 32 bits are stored in the second number of bank groups and the lower 32 bits are sequentially stored in the first bank.
In an implementation, the update module is further configured to record a data pattern of the operation information in the bank storage allocation information.
In implementation, the bank storage allocation information further includes an identifier of other operation information stored or being stored in each bank group; the information determining module 200 is specifically configured to acquire a storage request for operation information to be stored in a bank in a to-be-processed subgraph;
inquiring whether other operation information with the same identification as the operation information is recorded in the bank storage allocation information;
if so, responding to the storage request by utilizing the relevant information of the other operation information recorded by the bank storage allocation information;
and if not, determining the storage capacity required by the operation information.
According to the scheme provided by the embodiment of the invention, two banks are logically organized into one bank group, which is equivalent to that the bank group provides two access interfaces, one access from one bank and the other access from the other bank, so that two pieces of operation information are simultaneously stored in one bank group, and the storage efficiency is improved; moreover, aiming at the situation of two pieces of operation information listed in the background technology, only two banks in one bank group are needed to finish storage, and the bank utilization rate is improved.
An embodiment of the present invention further provides an electronic device, as shown in fig. 4, including a processor 001, a communication interface 002, a memory 003 and a communication bus 004, where the processor 001, the communication interface 002 and the memory 003 complete mutual communication through the communication bus 004,
a memory 003 for storing a computer program;
the processor 001 is configured to implement the above dynamic bank storage method based on cross addressing when executing a program stored in the memory 003, and the method includes:
determining operation information needing bank storage in a subgraph to be processed and storage capacity needed by the operation information;
determining a target bank group for storing the operation information according to bank storage allocation information and storage capacity required by the operation information, wherein the bank storage allocation information records the residual storage capacity of each bank group, and the sub-graph numbers, storage start addresses and storage end addresses of other stored or currently stored operation information in each bank group;
under the condition that the other operation information exists in the target bank group, determining a first bank to which a storage start address of the other operation information in the target bank group belongs, and determining an address of an idle basic storage unit of which the address in a second bank in the bank group is located after a storage end address of the other operation information; determining the address of a certain free basic storage unit in a first bank or a second bank in the target bank group under the condition that the other operation information does not exist in the target bank group;
and taking the determined address of the free basic storage unit as a storage starting address of the operation information, and finishing the storage of the operation information.
According to the scheme provided by the embodiment of the invention, two banks are logically organized into one bank group, which is equivalent to that the bank group provides two access interfaces, one access from one bank and the other access from the other bank, so that two pieces of operation information are simultaneously stored in one bank group, and the storage efficiency is improved; moreover, aiming at the situation of two pieces of operation information listed in the background technology, only two banks in one bank group are needed to finish storage, and the bank utilization rate is improved.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the embodiments of the apparatus and the electronic device, since they are substantially similar to the embodiments of the method, the description is simple, and the relevant points can be referred to only in the partial description of the embodiments of the method.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A dynamic bank storage method based on cross addressing is characterized in that each bank is compiled into a bank group in parallel by taking two banks as a group, and addresses are compiled for basic storage units in the two parallel banks in the bank group in a cross addressing mode in a left-right alternating sequence; the method comprises the following steps:
determining operation information needing bank storage in a subgraph to be processed and storage capacity needed by the operation information;
determining a target bank group for storing the operation information according to bank storage allocation information and storage capacity required by the operation information, wherein the bank storage allocation information records the residual storage capacity of each bank group, and the sub-graph numbers, storage start addresses and storage end addresses of other stored or currently stored operation information in each bank group;
under the condition that the other operation information exists in the target bank group, determining a first bank to which a storage start address of the other operation information in the target bank group belongs, and determining an address of an idle basic storage unit of which the address in a second bank in the bank group is located after a storage end address of the other operation information; determining the address of a certain free basic storage unit in a first bank or a second bank in the target bank group under the condition that the other operation information does not exist in the target bank group;
and taking the determined address of the free basic storage unit as a storage starting address of the operation information, and finishing the storage of the operation information.
2. The method of claim 1, wherein the step of determining a target bank group for storing the operational information comprises:
determining a first number of bank groups according to the storage capacity required by the operation information and the residual storage capacity of each bank group in the bank storage allocation information;
selecting a second number of bank groups from the first number of bank groups based on a rule that the same bank group stores at most two pieces of operation information in the same subgraph according to the sub-graph numbers of the other pieces of operation information in the bank storage allocation information;
and selecting one bank group from the second number of bank groups as the target bank group.
3. The method of claim 2, wherein the bank storage allocation information further comprises: the access step length and the access frequency of other stored or currently stored operation information in each bank group; the step of selecting one bank group from the second number of bank groups as the target bank group includes:
selecting a third number of bank groups from the second number of bank groups according to the access step length and the access frequency of other stored or currently stored operation information in the bank storage allocation information and the access step length and the access frequency of the operation information, wherein the same bank in the third number of bank groups cannot be accessed simultaneously in the process of reading and writing the other operation information and the operation information in the third number of bank groups according to the respective access step length and the access frequency;
and selecting a bank group with the residual storage capacity closest to the storage capacity required by the operation information from the third number of bank groups as a target bank group.
4. The method of claim 2, wherein the bank storage allocation information further comprises: the existence period of other stored or currently stored operation information in each bank group in the bank group; selecting one bank group from the second number of bank groups as the target bank group, wherein the step comprises the following steps:
determining the existence period of the operation information in a bank group according to the life cycle of the subgraph to be processed;
selecting a fourth number of bank groups from the second number of bank groups, wherein no intersection exists between the existence periods of the other operation information in the fourth number of bank groups and the existence periods of the operation information;
and selecting a bank group with the residual storage capacity closest to the storage capacity required by the operation information from the fourth number of bank groups as a target bank group.
5. The method of claim 3 or 4, further comprising: and updating the bank storage allocation information by using the residual storage capacity of the target bank group and the relevant information of the operation information.
6. The method of claim 1, wherein the step of completing the storing of the operational information comprises:
determining a data pattern of the operation information, wherein the data pattern is used for representing that the operation information is 32-bit data or 64-bit data;
in the case where the operation information belongs to 64-bit data, dividing each word constituting the operation information into upper 32 bits and lower 32 bits;
and finishing the storage of the operation information according to a storage rule that the upper 32 bits are stored in the second number of bank groups and the lower 32 bits are sequentially stored in the first bank.
7. The method of claim 6, wherein the method further comprises: and recording the data mode of the operation information in the bank storage allocation information.
8. The method of any of claims 1-4, wherein the bank storage allocation information further comprises an identification of other operational information already stored or being stored in the respective bank group; the step of determining the operation information required to be stored in the bank and the storage capacity required by the operation information in the subgraph to be processed comprises the following steps:
acquiring a storage request aiming at operation information needing bank storage in a subgraph to be processed;
inquiring whether other operation information with the same identification as the operation information is recorded in the bank storage allocation information;
if so, responding to the storage request by utilizing the relevant information of the other operation information recorded by the bank storage allocation information;
and if not, determining the storage capacity required by the operation information.
9. A dynamic bank storage device based on cross addressing is characterized in that each bank is combined in parallel into a bank group by taking two banks as a group, and addresses are compiled for basic storage units in the two parallel banks in the bank group in a cross addressing mode in a left-right alternating sequence; the device comprises:
the information determining module is used for determining operation information needing bank storage in the subgraph to be processed and the storage capacity needed by the operation information;
a bank group determining module, configured to determine a target bank group for storing the operation information according to bank storage allocation information and a storage capacity required by the operation information, where the bank storage allocation information records a remaining storage capacity of each bank group, and a sub-map number, a storage start address, and a storage end address of other operation information stored or being stored in each bank group;
an address determining module, configured to determine, when the other operation information exists in the target bank group, a first bank to which a storage start address of the other operation information in the target bank group belongs, and determine an address of an idle basic storage unit, which is located after a storage end address of the other operation information, in a second bank in the bank group; determining the address of a certain free basic storage unit in a first bank or a second bank in the target bank group under the condition that the other operation information does not exist in the target bank group;
and the information storage module is used for taking the determined address of the idle basic storage unit as the storage starting address of the operation information and finishing the storage of the operation information.
10. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing processor-executable instructions;
a processor adapted to perform the method steps of any of claims 1-8 when executing instructions stored in the memory.
CN202210282416.1A 2022-03-22 2022-03-22 Cross addressing-based dynamic bank storage method and device and electronic equipment Active CN114385089B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210282416.1A CN114385089B (en) 2022-03-22 2022-03-22 Cross addressing-based dynamic bank storage method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210282416.1A CN114385089B (en) 2022-03-22 2022-03-22 Cross addressing-based dynamic bank storage method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN114385089A true CN114385089A (en) 2022-04-22
CN114385089B CN114385089B (en) 2022-08-05

Family

ID=81204950

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210282416.1A Active CN114385089B (en) 2022-03-22 2022-03-22 Cross addressing-based dynamic bank storage method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114385089B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116467235A (en) * 2023-05-22 2023-07-21 太初(无锡)电子科技有限公司 DMA-based data processing method and device, electronic equipment and medium
CN117193669A (en) * 2023-11-06 2023-12-08 格创通信(浙江)有限公司 Discrete storage method, device and equipment for message descriptors and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1437728A (en) * 1999-12-27 2003-08-20 格里高里·V·朱德诺夫斯基 Multi-bank, fault-tolerant, high-performance memory addressing system and method
CN102662853A (en) * 2012-03-22 2012-09-12 北京北大众志微系统科技有限责任公司 Memory management method and device capable of realizing memory level parallelism
CN108604206A (en) * 2016-11-23 2018-09-28 华为技术有限公司 A kind of memory allocation method and equipment
US10275306B1 (en) * 2017-02-09 2019-04-30 Cadence Design Systems, Inc. System and method for memory control having adaptively split addressing of error-protected data words in memory transactions for inline storage configurations
CN110222818A (en) * 2019-05-13 2019-09-10 西安交通大学 A kind of more bank ranks intertexture reading/writing methods for the storage of convolutional neural networks data
CN111459408A (en) * 2020-03-20 2020-07-28 烽火通信科技股份有限公司 Method and system for improving data search rate in DRAM
CN111966607A (en) * 2020-09-07 2020-11-20 湖南国科微电子股份有限公司 Double-rate memory access method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1437728A (en) * 1999-12-27 2003-08-20 格里高里·V·朱德诺夫斯基 Multi-bank, fault-tolerant, high-performance memory addressing system and method
CN102662853A (en) * 2012-03-22 2012-09-12 北京北大众志微系统科技有限责任公司 Memory management method and device capable of realizing memory level parallelism
CN108604206A (en) * 2016-11-23 2018-09-28 华为技术有限公司 A kind of memory allocation method and equipment
US10275306B1 (en) * 2017-02-09 2019-04-30 Cadence Design Systems, Inc. System and method for memory control having adaptively split addressing of error-protected data words in memory transactions for inline storage configurations
CN110222818A (en) * 2019-05-13 2019-09-10 西安交通大学 A kind of more bank ranks intertexture reading/writing methods for the storage of convolutional neural networks data
CN111459408A (en) * 2020-03-20 2020-07-28 烽火通信科技股份有限公司 Method and system for improving data search rate in DRAM
CN111966607A (en) * 2020-09-07 2020-11-20 湖南国科微电子股份有限公司 Double-rate memory access method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHENYUE MENG等: "Efficient memory partitioning for parallel data access in multidimensional arrays", 《PROCEEDINGS OF THE 52ND ANNUAL DESIGN AUTOMATION CONFERENCE》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116467235A (en) * 2023-05-22 2023-07-21 太初(无锡)电子科技有限公司 DMA-based data processing method and device, electronic equipment and medium
CN116467235B (en) * 2023-05-22 2023-09-05 太初(无锡)电子科技有限公司 DMA-based data processing method and device, electronic equipment and medium
CN117193669A (en) * 2023-11-06 2023-12-08 格创通信(浙江)有限公司 Discrete storage method, device and equipment for message descriptors and storage medium
CN117193669B (en) * 2023-11-06 2024-02-06 格创通信(浙江)有限公司 Discrete storage method, device and equipment for message descriptors and storage medium

Also Published As

Publication number Publication date
CN114385089B (en) 2022-08-05

Similar Documents

Publication Publication Date Title
CN114385089B (en) Cross addressing-based dynamic bank storage method and device and electronic equipment
CN102929786B (en) The volatile memory of non-volatile memory device set represents
JP7133647B2 (en) DATA PROCESSING METHOD, APPARATUS AND COMPUTER-READABLE STORAGE MEDIUM
CN101154190A (en) Mapping information managing apparatus and method for non-volatile memory supporting different cell types
EP3657337B1 (en) Method, apparatus, device and storage medium for accessing static random access memory
CN111694770B (en) Method and device for processing IO (input/output) request
CN101187898A (en) Apparatus and method of managing nonvolatile memory
JP7088897B2 (en) Data access methods, data access devices, equipment and storage media
CN112181902B (en) Database storage method and device and electronic equipment
CN104050032A (en) System and method for hardware scheduling of conditional barriers and impatient barriers
EP2919120B1 (en) Memory monitoring method and related device
CN109960678B (en) Naming processing method and computer processing device
CN112445729B (en) Operation address determination method, PCIe system, electronic device and storage medium
CN113282249B (en) Data processing method, system, device and medium
CN104461400A (en) Method and device for processing fetch request conflict
CN104598161B (en) Digital independent, wiring method and device and data store organisation
CN102521163A (en) Method and device for replacing directory
CN113515474A (en) Data processing apparatus, method, computer device, and storage medium
CN111475099A (en) Data storage method, device and equipment
CN112860506B (en) Method, device, system and storage medium for processing monitoring data
CN115757260B (en) Data interaction method, graphics processor and graphics processing system
CN103870247A (en) Technique for saving and restoring thread group operating state
CN107102898B (en) Memory management and data structure construction method and device based on NUMA (non Uniform memory Access) architecture
CN116560577A (en) Identification processing method and device, electronic equipment and medium
CN115033500A (en) Cache system simulation method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant