CN101976229A - Data reading method, system and device for peripheral equipment of system - Google Patents
Data reading method, system and device for peripheral equipment of system Download PDFInfo
- Publication number
- CN101976229A CN101976229A CN 201010537171 CN201010537171A CN101976229A CN 101976229 A CN101976229 A CN 101976229A CN 201010537171 CN201010537171 CN 201010537171 CN 201010537171 A CN201010537171 A CN 201010537171A CN 101976229 A CN101976229 A CN 101976229A
- Authority
- CN
- China
- Prior art keywords
- information
- external unit
- data
- sent
- memory
- 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.)
- Pending
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a data reading method, a data reading system and a data reading device for peripheral equipment of a system, which are used for solving the problem that the data reading efficiency and speed of the peripheral equipment are influenced by longer delay of reading operation in the prior art. The method comprises that: the system determines peripheral equipment for sending data to be transmitted and the BD information of the data to be transmitted, adds the BD information into a locally corresponding BD table, and writes the data to be transmitted and the BD information added into the BD table into a corresponding position of the local peripheral equipment through a direct memory access (DMA) so as to ensure that the peripheral equipment can directly transmit the data stored in the local BD table during data reading operation. In the process, the peripheral equipment does not need requesting data from an internal memory of the system or waiting for the response information of the internal memory of the system during reading operation of data transmission, so the delay of the reading operation is effectively shortened, and the efficiency and speed of the reading operation of the peripheral equipment are improved further.
Description
Technical field
The present invention relates to network communications technology field, relate in particular to method for reading data, system and the device of external unit in a kind of system.
Background technology
(Direct memory access DMA) is a kind of technology that internal system is carried out memory access that is applied in the direct memory visit.Wherein, comprise in the system CPU (central processing unit) (Central Processing Unit, CPU), internal memory and a plurality of external unit.Each external unit is connected by bus with CPU, and carries out the transmission of data by bus.Bus commonly used at present comprises Peripheral Component Interconnect (Peripheral Component Interconnect, PCI) bus, Peripheral Component Interconnect expansion interface (Peripheral Component Interconnect Express, PCIE) bus and HT (Hyper Transport) bus or the like.
When adopting DMA to realize the transmission of data between different external units, (Buffer Descriptor BD) realizes by DMA buffer memory descriptor usually.CPU receives the length information of filling in data source address information waiting for transmission, destination address information and these data waiting for transmission after the data in BD, starts the transmission that DMA carries out data afterwards.When CPU in BD, corresponding information filled in finish after, intervene with regard to transmission course not data.Owing to adopt DMA can realize the transmission of data between each different external unit of internal system, and in the process of data transmission, need not the intervention of CPU, therefore can effectively improve the processing power and the treatment effeciency of system.
Fig. 1 in the prior art when external unit has data to send, initiate to read to conclude the business by DMA, obtain the process of the data in the Installed System Memory, this process may further comprise the steps:
S101: external unit initiates to read transaction by bus to Installed System Memory.
Wherein this is read to conclude the business and need BD be read in the storer of external unit this locality from Installed System Memory.
S102: Installed System Memory receive this read the transaction after, return response message to external unit, wherein carry the BD information of these data to be read in this response message.
S103: after external unit received this response message, DMA crossed bus by the information among the BD, and data message corresponding among this BD is read from internal memory in the storer of self.
S104: the data of storing in external unit transmission self storer.
At present, externally equipment carries out in the operation of data read, after external unit initiates to read transaction, the response message that needs the waiting system internal memory, after only receiving response message, relevant position reading of data that could be from internal memory, and when carrying out write operation, internal memory can directly initiate to write transaction, by bus data to be written is directly write in the storer of external unit.By as can be known above-mentioned, the time delay that external unit carries out read operation by bus is more than the twice of write operation time delay, especially when having bridge device on the bus, read operation than write operation the time postpone a meeting or conference bigger.
Therefore because the time delay of read operation is longer, read data will be lower to the efficient in self storer from Installed System Memory for external unit, and speed also can be very slow.
Summary of the invention
In view of this, the embodiment of the invention provides method for reading data, system and the device of external unit in a kind of system, and is longer in order to solve in the prior art read operation time delay, influences the efficient that external device data reads and the problem of speed.
The method for reading data of external unit in a kind of system that the embodiment of the invention provides comprises:
The definite external unit that these data to be sent are sent of system, and the buffer memory descriptor BD information of definite data to be sent;
With the BD information of determining add to self preserve in should the BD table of external unit; And
By the direct memory visit these data to be sent are write in the storer of external unit this locality, and this BD information is write the relevant position in the BD table of preserving this external unit this locality;
When described external unit carries out read operation, read the BD information of preserving in the local BD table and send these data to be sent by the direct memory visit.
The data fetch device of external unit in a kind of system that the embodiment of the invention provides comprises:
Determination module is used for definite external unit that these data to be sent are sent, and determines the buffer memory descriptor BD information of data to be sent;
Add module, be used for the BD information of determining add to self preserve to BD table that should external unit;
Writing module is used for visiting the storer that these data to be sent is write external unit this locality by direct memory, and this BD information is write the relevant position in the BD table of preserving this external unit this locality.
The embodiment of the invention provides a kind of external unit, and this external unit comprises:
Receive memory module, be used for receiving the data to be sent that are written to local storage by direct memory access, and be received in the BD information of these data to be sent that write in the local cache descriptor BD table;
Sending module is used for when carrying out read operation, reads the BD information of preserving in the local BD table by direct memory visit, obtains corresponding data to be sent and sends according to this BD information.
The data reading system of external unit in a kind of system that the embodiment of the invention provides, described system comprises device as described above, and at least one above-mentioned described external unit.
The embodiment of the invention provides the method for reading data of external unit in a kind of system, system and device, this method is when there are data to be sent in system, definite external unit that these data to be sent are sent, and the BD information of definite these data, with the BD information of determining add to self preserve in should the BD table of external unit, and these data to be sent are write in the storer of external unit this locality by DMA, and this BD information write relevant position in the local BD table of preserving of external unit, so that external unit is when carrying out data read operation, the BD information of can be directly preserving according to local BD table is obtained the data to be sent of preserving in self storer and is sent.Because in said process, external unit need not to the Installed System Memory request msg when carrying out read operation again, and the response message of waiting system internal memory, has therefore effectively shortened the time delay of read operation, thereby has improved the efficient and the speed of external unit read operation.
Description of drawings
Fig. 1 in the prior art when external unit has data to send, initiate to read to conclude the business by DMA, obtain the process of the data in the Installed System Memory;
The data read process of external unit in the system that Fig. 2 A provides for the embodiment of the invention;
Fig. 2 B is CPU carries out unified address administration to the storer of Installed System Memory and external unit a synoptic diagram;
Fig. 3 A for the embodiment of the invention provide under system and external unit original state, when CPU adds the BD information of data to be sent BD table to and preserves the synoptic diagram of data to be sent;
The system that Fig. 3 B provides for the embodiment of the invention with the data to be sent of preserving in self storage area to data to be sent that should external unit, writes the synoptic diagram in the storer of external unit BD this locality by DMA;
The synoptic diagram that the BD that this BD information is write external unit this locality that Fig. 3 C provides for the embodiment of the invention shows;
The synoptic diagram that extracts the BD information of preserving in the local storage BD table successively that Fig. 3 D provides for the embodiment of the invention;
The synoptic diagram that Fig. 3 E reads this BD information and the information of the data of this BD information correspondence is sent for passing through of providing of the embodiment of the invention;
The data read process of external unit in the concrete system that Fig. 3 F provides for the embodiment of the invention;
The structural representation of the data fetch device of external unit in a kind of system that Fig. 4 provides for the embodiment of the invention;
The structural representation of a kind of external unit that Fig. 5 provides for the embodiment of the invention.
Embodiment
The embodiment of the invention is in order effectively to shorten the time delay of external unit when carrying out read operation, efficient when the raising external unit carries out read operation and the speed that reads, method for reading data, system and the device of external unit in a kind of system are provided, this method is preserved BD table that should external unit at each external unit in Installed System Memory, wherein preserves BD information in this BD table.And in the storer of each external unit this locality, also preserve the BD table of a correspondence.
Below in conjunction with Figure of description, the embodiment of the invention is elaborated.
The data read process of external unit in the system that Fig. 2 A provides for the embodiment of the invention, this process may further comprise the steps:
S201: when system determines to exist data to be sent, determine external unit that these data to be sent are sent, and determine the BD information of these data to be sent.
System CPU is according to the ruuning situation of self, when the data to be sent of external unit are mail in definite existence, according to definite external units that these data to be sent are sent such as routing iinformations, and according to unappropriated address information in the data buffer area of the storer of this external unit of preserving, determine the source address in the BD information of this data correspondence to be sent, thereby determine the BD information of these data to be sent, wherein comprise the length information of information and these data to be sent of source address in this BD information.
S202: with the BD information of determining add to self preserve in should the BD table of external unit.
In embodiments of the present invention owing to be provided with corresponding BD table at each external unit, for the ease of system each BD table is distinguished, can give each BD table unique identification information, and preserve the identification information of each BD table and the corresponding relation of external unit in this locality.Therefore after having determined the external unit that data to be sent send to this, can be according to the above-mentioned corresponding relation of preserving, determine the identification information of the BD table of this external unit correspondence, in Installed System Memory, search the BD table of this identification information, and the BD information of determining is added in the BD table that finds.
S203: DMA writes data to be sent in the storer of external unit this locality by the direct memory visit.
S204: the relevant position that this BD information is write the local BD table of preserving of this external unit.
The relevant position that in embodiments of the present invention BD information is write the local BD table of preserving of external unit comprises: according to the identification information that adds the storage subregion of BD information in the Installed System Memory BD table, externally search the storage subregion of this identification information in the BD of the equipment table, this BD information is write in the local BD table of external unit in this storage subregion that finds.
S205: when described external unit carries out read operation, read the BD information of preserving in the local BD table successively by the direct memory visit and send these data to be sent.
When system determines that the needs of these data to be sent send by a certain external unit, because CPU can carry out unified address administration to the storer of Installed System Memory and external unit, thereby can determine which address space is not store data in the data buffer area of this external unit storer, therefore when definite BD information, can determine the source address in this BD information accurately, the length information of these data also is confirmable in addition, determined the length of source address and data when system after, BD information can be filled in and finish.When system this BD information is filled in finish after, the data of this BD information correspondence need send in the storer of this external unit, therefore system's address space of not storing data in need the data buffer area to this external unit storer upgrades, so that follow-up when having the data to be sent that send by this external unit again, can determine the BD information of these data to be sent accurately.
After determining BD information, add the BD information of these data to be sent to Installed System Memory in the BD table that should external unit be provided with.In order effectively to shorten the time-delay that external unit reads these data, system adopts the form of write operation, and the BD information of interpolation is written in this external unit local storage in this data to be sent that self EMS memory is preserved and the BD table.When this external unit carries out read operation, from the BD table that local storage is preserved, obtain the BD information of preservation, obtain corresponding data to be sent and send according to this BD information.
In Installed System Memory, stored one to BD table that should external unit in the embodiment of the invention at each external unit, simultaneously in Installed System Memory, memory capacity at each external unit storer, in this Installed System Memory, divide the storage space of respective volume, be used to store to BD table that should external unit, and the data to be sent that send by this external unit.
After system CPU determines to exist a certain data to be sent, according to the storage space that distributes for this external unit in the Installed System Memory, determine the BD information of these data to be sent, concrete is the source address information of determining in this data BD information to be sent.The storage space that distributes for external unit in Installed System Memory can be continuous, also can be discontinuous, as long as equal the memory capacity of external unit storer on the capacity of storage space.
Owing in Installed System Memory, divided the respective stored space in the embodiment of the invention at each external unit, in this storage space stored to BD table that should external unit and the data to be sent that send by this external unit.After having stored corresponding BD information and data to be sent, system by DMA according to these data to be sent are write in the storer of external unit correspondence.
In addition, owing to have mapping relations between the storage space of the storer of Installed System Memory and each external unit, therefore when the definite BD information of system's basis, with this BD information stores in self EMS memory, and when from self EMS memory, extracting corresponding data to be sent by DMA, system can extract and store the information of BD information in the self EMS memory and data according to the mapping relations between the storage space of the storer of self EMS memory and each external unit.
Concrete CPU can carry out unified address administration to the storer of Installed System Memory and external unit.Fig. 2 B is CPU carries out unified address administration to the storer of Installed System Memory and external unit a synoptic diagram, for example Installed System Memory is 64M, the memory span of first external unit is 2M, when the memory span of second external unit is 2M, 0 to 64M is Installed System Memory, 64M~66M is the storer corresponding address space of first external unit, and 66M~68M is the storer corresponding address space of second external unit.
In Installed System Memory 0 to 64M, divided corresponding storage space, be used to store at the BD table of each external unit and the data to be sent that send by this external unit at first external unit and second external unit.Because the capacity of the storer of first external unit is 2M, therefore in Installed System Memory, can be 2M~4M to the storage space of should first external unit dividing, also can be 10M~12M.
Determined external unit that these data to be sent are sent as CPU in embodiments of the present invention, and after the BD information, according to the identification information of each BD table and the corresponding relation of external unit in the Installed System Memory of preserving, determine the identification information of the BD table of this external unit correspondence, in Installed System Memory, search the BD table of this identification information.Determine after this BD shows the BD information of determining to be added in the BD table of self EMS memory when searching.And when each BD information being added in the BD table of self corresponding external unit in system, it is order according to the identification information of the storage subregion of the interpolation BD information of preserving, in not adding the storage subregion of BD information, this BD information of determining is added in the corresponding BD information stores subregion.
The structural representation of dividing at a certain external unit in the Installed System Memory that table 1 provides for the embodiment of the invention to storage space that should the external unit memory span.In this storage space, comprise the storage area of BD table and the storage area of data to be sent.Wherein in this following table 1, the zone that writes " BD " printed words is the storage area of BD information, and the zone that writes " data message " printed words is the storage area of data to be sent.
Table 1
When system CPU determines to exist data to be sent, determine the external unit that these data to be sent are sent and the BD information of these data to be sent.With the BD information stores of these data to be sent at Installed System Memory in should the BD table of external unit.And when the embodiment of the invention is added BD in the BD table, it is order according to the identification information of the storage subregion of the interpolation BD information of preserving, in not adding the storage subregion of BD information, this BD information of determining is added in the corresponding BD information stores subregion.
Can store the BD information and the corresponding data to be sent thereof of each data according to the time sequencing of the data to be sent that receive successively for the ease of system CPU, and because the byte number that each BD information comprises is determined, therefore can be with the storage area of BD information in the BD table, the byte number that comprises according to BD information, be divided into the storage subregion of a plurality of BD information, each storage subregion is used to store a BD information.The storage subregion of each the BD information after will dividing simultaneously identifies, and determines the identification information of the storage subregion of each BD information successively, and this identification information is used for the storage subregion of this BD information of index.
Behind the identification information of the storage subregion of having determined each BD information, the identification information of the storage subregion of each BD information is sorted in a certain order and preserve clooating sequence, with the order of this clooating sequence as the identification information of the storage subregion that adds BD information.After the BD information of having determined each data to be sent, order according to the identification information of the storage subregion of the interpolation BD information of this preservation, in not adding the storage subregion of BD information, this BD information of determining is added in the corresponding BD information stores subregion.
When having a plurality of external unit in the system, can be in Installed System Memory at the corresponding with it BD table of each external unit setting.For example when having external unit A in the system, at external unit A the BD table is set in Installed System Memory, the identification information of this BD table for example is a Table A, and the structure of this Table A is shown in above-mentioned table 1.The storage subregion that comprises 8 BD information in this Table A, the identification information of each BD information stores subregion is respectively 0~7.Preserve in CPU simultaneously when carrying out the interpolation of BD information, the order of the identification information of the storage subregion of interpolation BD information is 0~7.
System CPU determines that according to the data to be sent that exist the external unit that these data to be sent are sent is external unit A, after the BD information of determining these data to be sent, determines that in Installed System Memory the BD table corresponding with this external unit A is Table A.When some storage subregion stores BD information in the BD of this Table A information stores subregion, then definite identification information that does not add the storage subregion of BD information, order according to the identification information of the storage subregion of the interpolation BD information of preserving, in this does not add the storage subregion of BD information, this BD information of determining is added in the corresponding BD information stores subregion.
Identification information is that 0~3 storage subregion internal memory contains BD information in for example current this BD information stores subregion, the identification information that does not then add the storage subregion of BD information is 4~7, order 0~7 according to the identification information of the storage subregion of the interpolation BD information of preserving, then determine to add in identification information is 4 storage subregion BD information that this is determined, therefore adding this BD information of determining to identification information this moment is in 4 the BD information stores subregion.When each storage subregion in this BD information stores zone does not all add BD information, the storage subregion that then can determine not add in this storage subregion BD information is that identification information is 0~7 storage subregion, then this BD information of determining is added to identification information this moment and be the storage subregion of 0 BD information.When all having added BD information in each the storage subregion in the BD of the Table A information stores zone, then canned data in the Table A in the Installed System Memory is emptied, so that store the follow-up data to be sent that receive.After emptying, the identification information that does not add the storage subregion of BD information in this Table A is 0~7, then according to the order of the identification information of the storage subregion of the interpolation BD information of preserving, adding this BD information of determining to identification information is in 0 the BD information stores subregion.
System CPU is determining to exist data to be sent, definite external unit that these data to be sent are sent, and after having determined the BD information of these data to be sent, this BD information is added in the BD table corresponding of Installed System Memory preservation with this external unit, and after in Installed System Memory, having preserved these data to be sent, in order effectively to improve efficient and the speed that external unit carries out read operation, shorten the time-delay that external unit carries out read operation, system writes the data to be sent of preserving in the Installed System Memory in the storer of this external unit this locality by DMA, and the BD information of adding in the BD table is write the relevant position of the local BD table of preserving of this external unit, so that external unit is when carrying out read operation, directly the BD information of preserving according to this locality is carried out the transmission of data to be sent.
To in the self EMS memory BD information of adding in the BD table that should external unit be write in the storer of corresponding external unit this locality for the ease of system, also preserve a BD table in embodiments of the present invention in each external unit in this locality, what wherein BD showed in the size of this BD table and the Installed System Memory is big or small identical.
When the BD information to adding in should the BD table of external unit of preserving in Installed System Memory by DMA writes external unit, the time sequencing of the data to be sent that can receive according to system CPU for the ease of external unit sends to sent data successively, when system CPU receives data to be sent, owing to be the order of identification information of the storage subregion of the interpolation BD information of preserving according to self, the BD information of determining is added in the Installed System Memory in should the BD table of external unit, when therefore the BD information of adding in this BD is shown writes in the local BD table of preserving of this external unit, the data to be sent that receive earlier also need to carry out in a certain order, so that can be sent out earlier.
In the embodiment of the invention in order to guarantee that external unit is when carrying out the operation of data read, can be according to the time sequencing of the definite data to be sent of CPU, send corresponding data to be sent successively, need CPU when the information in the BD table that should external unit being write self in the local BD table of preserving of this external unit, the BD information that also self can be preserved to preserving in should the BD table of external unit, according to the order of the identification information of the storage subregion of the interpolation BD information of preserving, successively each BD information is added in the BD information stores subregion of this external unit BD table.
The concrete efficient of carrying out data read in embodiments of the present invention for effective raising external unit, when system is written to the BD information in the self EMS memory BD table relevant position of BD table of external unit this locality, can be according to the identification information that adds the storage subregion of this BD information in the Installed System Memory BD table, externally search the storage subregion of this identification information in the BD information stores subregion of equipment, this BD information is write in the local BD table of external unit in this storage subregion that finds.
Concrete, when system writes the BD information of self adding in to BD table that should external unit in the BD table of this external unit this locality, because the BD information that the storage subregion to each BD information in should the BD table of external unit that system self preserves adds, be to add according to the order of the identification information of the storage subregion of the interpolation BD information of preserving, therefore in order to guarantee the sending order of data to be sent, the order of the identification information of the storage subregion of the interpolation BD information that need preserve according to system, extract each BD information of adding in the BD table successively, when carrying out the data transmission according to external unit, the identification information order from big to small of the storage subregion of BD information writes each BD information the relevant position of external unit this locality.
For example, in system in the Table A of corresponding external unit A,, successively each BD information of determining is added in the corresponding BD information stores subregion according to the order of the identification information 0~7 of the storage subregion of the interpolation BD information of preserving.When the BD information of adding in system's Table A writes in the local BD table of preserving of external unit, be that the BD information of adding in 0~7 the BD information stores subregion extracts successively with identification information, the order 0~7 of the storage subregion of the BD information that writes in self the BD table that extracts when sending data according to external unit writes each BD information successively.Concrete for example this moment of this system is that the BD information of adding in 0 the BD information stores subregion extracts with self identification information, when this BD information is write relevant position in the local BD table of preserving of external unit, if this moment, external unit carried out the data transmission, send according to the order of the identification information 0~7 of the BD information stores subregion of preserving in self BD table, and in the BD of this external unit this locality table identification information be in 0~6 the BD information stores subregion the system of preserving write BD information the time, this moment, system write this BD information in the storage subregion that identification information is a BD information in 7 the local BD table of external unit.
Further, for the raising system BD information of adding in self BD table is written to the speed of external unit this locality in the embodiment of the invention, if also preserve in the external unit one with this Installed System Memory in to identical BD table that should external unit, the local BD table of preserving of external unit and Installed System Memory are shown corresponding one by one to BD that should external unit.It is identical to the memory capacity that BD that should external unit shows with Installed System Memory to be the local BD table of preserving of external unit, and the number of the BD information stores subregion that comprises is identical, and the identification information correspondence of each the BD information stores subregion that comprises is identical.And external unit is in the order of the identification information of the storage subregion of the BD information of carrying out adopting when data send, when carrying out the BD information stores with system, according to the order of identification information of storage subregion of interpolation BD information identical.When the BD information that Installed System Memory is added in to BD table that should external unit writes in the BD table of this external unit this locality, according to the identification information of the storage subregion of this interpolation BD information this BD information is write in the storage subregion of BD information of same identification information in the external unit and get final product.
As shown in Figure 3A when the memory span of Installed System Memory at external unit, divide the storage space of respective volume at local internal memory, wherein this storage space is used to store to BD table that should external unit and the data to be sent that send by this external unit, the BD epiphase of preserving in this Installed System Memory of preserving at the BD table of external unit and external unit self with.For example among Fig. 3 A in the Installed System Memory to comprising the storage subregion of three BD information in the BD table that should external unit, determine the BD information of data to be sent when system after, in each BD information stores subregion, add BD information in accordance with the order from top to bottom successively.Equally, for external unit, it is when carrying out the data transmission, it also is storage subregion order from top to bottom according to BD information in the local BD table, extract the BD information that each BD information stores subregion writes successively, and according to this BD information extraction and send the data to be sent of preserving in self storer.
Under system and external unit original state, when CPU determines to have data to be sent, and when these data to be sent send by the external unit shown in Fig. 3 A, CPU is according to according to unappropriated address information in the data buffer area of the storer of this external unit of preserving, determine the source address in the BD information, length and source address according to these data to be sent, after determining the BD information of these data to be sent, the order of the identification information of the storage subregion of the interpolation BD information of preserving according to self is added the BD information of determining in the storage subregion that does not add BD information to.
As Fig. 3 B when system by DMA with the data to be sent of preserving in self storage area to data to be sent that should external unit, when writing in the storer of external unit BD this locality, DMA extracts these data to be sent from the Installed System Memory corresponding address, should data to be sent write in the external unit local storage appropriate address corresponding memory space.
Shown in Fig. 3 C, after system writes data to be sent by DMA in the storer of external unit this locality, also need this BD information is write in the BD table of external unit this locality, at this moment, because system is added in the storage subregion of a BD information topmost to this BD information in the BD table that should external unit, when BD information being write the BD table of external unit this locality, also this BD information is write in the storage subregion of the BD information in the top in this BD table by DMA.
Shown in Fig. 3 D, when external unit carries out read operation, pass through dma mode, order according to the identification information of the storage subregion of the BD information of carrying out adopting when data send, at first from local storage BD table, in the BD information stores subregion in the top, extract the BD information of preserving in this storage subregion.As Fig. 3 E after external unit has read in self BD table topmost the BD information that a BD information stores subregion preserves, the source address information that comprises according to this BD information, and data length information, extracting in the corresponding storage space in local storage by dma mode should data transmission to be sent.
Specifically for example, the storage space of dividing in internal memory at first external unit is 2M~4M, wherein 2M~2M+127 byte is used to deposit the BD table, 2M+128~4M is used to store the data to be sent that send by first external unit, 64M~66M is the storer corresponding address space of first external unit, wherein 64M~64M+127 byte is used to deposit the BD table, and 64M+128~66M is used to store data to be sent.When receive a data length be 1 byte pass through data to be sent that first external unit sends the time, system determines that this data source address to be sent of storage is the 2M+128 byte in the current Installed System Memory, when the memory address that is used to store data to be sent in the storer of first external unit was all unoccupied, the source address of this corresponding storage of data to be sent in the storer of first external unit was 128 bytes.When DMA will this copying data to be sent from Installed System Memory in the storer of first external unit time, the address in Installed System Memory of extracting these data is the 2M+128 byte, with these data write the 64M+128 byte in should the storer of first external unit.Be the address that first address that address that DMA writes these data is the first external unit memory mapped adds these data to be sent of storage in the first external unit storer, i.e. base address+skew.
In order to save the storage space of Installed System Memory, after the BD information of adding in system shows self EMS memory BD was written to corresponding external unit, system was with the BD information of interpolation in this BD table in this self EMS memory and the data deletion to be sent of this BD information correspondence.Because the current as can be known BD information of self the BD information stores subregion of which identification information in the BD table being added of system, and the data to be sent of this BD information correspondence write external unit, therefore when system receives data to be sent by this external unit route again, even system has removed the BD information that is written to external unit timely, system also is can be according to the identification information of the storage subregion that adds BD information, determines the BD information of these data to be sent is added in the storage subregion of the BD information of which identification information in self BD table.
The data read process of external unit in the concrete system that Fig. 3 F provides for the embodiment of the invention, this process may further comprise the steps:
S301: when system CPU determines to exist data to be sent, determine that the external unit that these data to be sent are sent is external unit A.
S302: according to unappropriated address information in the data buffer area of the storer of this external unit of preserving, determine the source address in the BD information of this data correspondence to be sent, determine the BD information of these data to be sent.
S303: the identification information and the corresponding relation of external unit of each BD table that system CPU is preserved according to self, determine the identification information that the BD of this external unit A correspondence shows.
S304: behind the identification information of having determined this BD table, in Installed System Memory, search the BD table of this identification information.
S305: in this BD table of searching, according to the order of the identification information of the storage subregion of the interpolation BD information of preserving, the information of in not adding the storage subregion of BD information, adding this BD that determines table.
S306: the data to be sent that will extract by DMA write in the appropriate address corresponding memory space of external unit this locality.
S307:, externally search the storage subregion of this identification information in the BD information stores subregion of equipment according to the identification information that adds the storage subregion of BD information in the Installed System Memory BD table.
S308: this BD information is write in the storage subregion of this identification information of external unit BD information stores zone by DMA.
Monitor this BD information when being written in the external unit, in Installed System Memory with this BD information deletion that adds in these data to be sent and the BD table.
S309: external unit reads the BD information of preserving in the local BD table successively by direct memory visit, obtains the data to be sent of preserving in self storer and sends according to this BD information.
Because system is when existing data to be sent in embodiments of the present invention, the information of the BD that determines and will this data to be sent is added on during self EMS memory shows BD that should external unit, and the mode by DMA will these data to be sent, and the BD information of adding in the BD table writes in the corresponding external unit local storage, therefore when external unit need carry out the transmission of data, can directly carry out the transmission of corresponding data according to the information of preserving in the local BD table.Because in said process, external unit need not to the Installed System Memory request msg when carrying out the read operation that data send again, and the response message of waiting system internal memory, therefore effectively shorten the time delay of read operation, thereby improved the efficient and the speed of external unit read operation.
The structural representation of the data fetch device of external unit in a kind of system that Fig. 4 provides for the embodiment of the invention, this device comprises:
Determination module 41 is used for definite external unit that these data to be sent are sent, and determines the buffer memory descriptor BD information of data to be sent;
Add module 42, be used for the BD information of determining add to self preserve to BD table that should external unit;
Writing module 43 is used for visiting the storer that these data to be sent is write external unit this locality by direct memory, and this BD information is write the relevant position in the BD table of preserving this external unit this locality.
Described determination module 41 specifically is used for, according to unappropriated address information in the data buffer area of the storer of this external unit of preserving, determine the source address in the BD information of this data correspondence to be sent, according to the length and the source address of described data to be sent, determine the BD information of these data to be sent.
Described interpolation module 42 specifically is used for, according to the identification information of each BD table of preserving and the corresponding relation of external unit, determine the identification information of the BD table of this external unit correspondence, according to this identification information of determining, in Installed System Memory, search the BD table of this identification information, the BD information of determining is added in this BD that finds table.
Described interpolation module 42 specifically is used for, described interpolation module specifically is used for, in this BD table of searching, order according to the identification information of the storage subregion of the interpolation BD information of preserving, in not adding the storage subregion of BD information, this BD information of determining is added in the corresponding BD information stores subregion.
Said write module 43 specifically is used for, according to the identification information that adds the storage subregion of BD information among the Installed System Memory BD, externally search the storage subregion of this identification information in the BD information stores subregion of equipment, this BD information is write in the local BD table of external unit in this storage subregion that finds.
Described device also comprises:
Removing module 44, when being used for monitoring BD information that Installed System Memory BD table adds and writing in the external unit, in Installed System Memory with this BD information deletion that adds in these data to be sent and the BD table.
Described device also comprises:
Divide module 45, be used for memory capacity according to described external unit storer, divide the storage space of respective volume in local internal memory, wherein this storage space is used to store to BD table that should external unit and the data to be sent that send by this external unit in the internal memory.
The structural representation of a kind of external unit that Fig. 5 also provides for the embodiment of the invention, this external unit comprises:
Receive memory module 51, be used for receiving system and be written to the data to be sent of local storer, and be received in the BD information of these data to be sent that write in the local cache descriptor BD table by direct memory access;
Sending module 52 is used for when carrying out read operation, reads the BD information of preserving in the local BD table successively by direct memory visit, obtains corresponding data to be sent and sends according to this BD information.
The embodiment of the invention also provides the data reading system of external unit in a kind of system, and described system comprises device as described in Figure 4, and at least one external unit as shown in Figure 5.
The embodiment of the invention provides the method for reading data of external unit in a kind of system, system and device, this method is when there are data to be sent in system, definite external unit that these data to be sent are sent, and the BD information of definite these data, with the BD information of determining add to self preserve in should the BD table of external unit, and these data to be sent are write in the storer of external unit this locality by DMA, and this BD information write relevant position in the local BD table of preserving of external unit, so that external unit is when carrying out data read operation, the BD information of can be directly preserving according to local BD table is obtained the data to be sent of preserving in self storer and is sent.Because in said process, external unit need not to the Installed System Memory request msg when carrying out read operation again, and the response message of waiting system internal memory, has therefore effectively shortened the time delay of read operation, thereby has improved the efficient and the speed of external unit read operation.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.
Claims (16)
1. the method for reading data of external unit in the system is characterized in that, comprising:
The definite external unit that these data to be sent are sent of system, and the buffer memory descriptor BD information of definite data to be sent;
With the BD information of determining add to self preserve in should the BD table of external unit; And
By the direct memory visit these data to be sent are write in the storer of external unit this locality, and described BD information is write the relevant position of the local BD table of preserving of this external unit;
When described external unit carries out read operation, read the BD information of preserving in the local BD table by the direct memory visit and send these data to be sent.
2. the method for claim 1 is characterized in that, the buffer memory descriptor BD information of described definite data to be sent comprises:
System's central processing unit CPU is according to unappropriated address information in the data buffer area of the storer of this external unit of preserving, determines the source address in the BD information of this data correspondence to be sent;
According to the length of described source address and data to be sent, determine the BD information of these data to be sent.
3. the method for claim 1 is characterized in that, described with the BD information of determining add to self preserve to comprising in the BD table of external unit:
System's central processing unit CPU is determined the identification information of the BD table of this external unit correspondence according to the identification information of each BD table of preserving and the corresponding relation of external unit;
According to this identification information of determining, in Installed System Memory, search the BD table of this identification information;
The BD information of determining is added in this BD that finds table.
4. as claim 1 or 3 described methods, it is characterized in that the described BD information of determining is added in this BD that finds table comprises:
In this BD table of searching,, in not adding the storage subregion of BD information, this BD information of determining is added in the corresponding BD information stores subregion according to the order of the identification information of the storage subregion of the interpolation BD information of preserving.
5. method as claimed in claim 4 is characterized in that, the described relevant position that this BD information is write the local BD table of preserving of this external unit comprises:
According to the identification information that adds the storage subregion of BD information in the Installed System Memory BD table, externally search the storage subregion of this identification information in the BD of the equipment this locality table;
This BD information is write in the local BD table of external unit in this storage subregion that finds.
6. the method for claim 1 is characterized in that, described method also comprises:
Monitor the BD information of adding in the Installed System Memory BD table when being written in the external unit, in Installed System Memory with this BD information deletion that adds in these data to be sent and the BD table.
7. the method for claim 1 is characterized in that, described method also comprises:
Described system is according to the memory capacity of described external unit storer, to should external unit dividing the storage space of respective volume, wherein this storage space is used to store to BD table that should external unit and the data to be sent that send by this external unit in the internal memory in local internal memory.
8. the data fetch device of external unit in the system is characterized in that described device comprises:
Determination module is used for definite external unit that these data to be sent are sent, and determines the buffer memory descriptor BD information of data to be sent;
Add module, be used for the BD information of determining add to self preserve to BD table that should external unit;
Writing module is used for visiting the storer that these data to be sent is write external unit this locality by direct memory, and this BD information is write the relevant position in the BD table of preserving this external unit this locality.
9. device as claimed in claim 8, it is characterized in that, described determination module specifically is used for, according to unappropriated address information in the data buffer area of the storer of this external unit of preserving, determine the source address in the BD information of this data correspondence to be sent, according to the length of described source address and data to be sent, determine the BD information of these data to be sent.
10. device as claimed in claim 8, it is characterized in that, adding module specifically is used for, according to the identification information of each BD table of preserving and the corresponding relation of external unit, determine the identification information of the BD table of this external unit correspondence, according to this identification information of determining, in Installed System Memory, search the BD table of this identification information, the BD information of determining is added in this BD that finds table.
11. as claim 8 or 10 described devices, it is characterized in that, described interpolation module specifically is used for, in this BD table of searching, order according to the identification information of the storage subregion of the interpolation BD information of preserving, in not adding the storage subregion of BD information, this BD information of determining is added in the corresponding BD information stores subregion.
12. device as claimed in claim 10, it is characterized in that, the said write module specifically is used for, according to the identification information that adds the storage subregion of BD information among the Installed System Memory BD, externally search the storage subregion of this identification information in the BD of the equipment this locality table, this BD information is write in the local BD table of external unit in this storage subregion that finds.
13. device as claimed in claim 8 is characterized in that, described device also comprises:
Removing module, when being used for monitoring BD information that Installed System Memory BD table adds and writing in the external unit, in Installed System Memory with this BD information deletion that adds in these data to be sent and the BD table.
14. device as claimed in claim 8 is characterized in that, described device also comprises:
Divide module, be used for memory capacity according to described external unit storer, to should external unit dividing the storage space of respective volume, wherein this storage space is used to store to BD table that should external unit and the data to be sent that send by this external unit in the internal memory in local internal memory.
15. an external unit is characterized in that, described external unit comprises:
Receive memory module, be used for receiving the data to be sent that are written to local storage by direct memory access, and be received in the BD information of these data to be sent that write in the local cache descriptor BD table;
Sending module is used for when carrying out read operation, reads the BD information of preserving in the local BD table by direct memory visit, obtains corresponding data to be sent and sends according to this BD information.
16. the data reading system of external unit is characterized in that in the system, described system comprises as the described arbitrary device of claim 8~14, and the described external unit of at least one claim 15.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010537171 CN101976229A (en) | 2010-11-09 | 2010-11-09 | Data reading method, system and device for peripheral equipment of system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010537171 CN101976229A (en) | 2010-11-09 | 2010-11-09 | Data reading method, system and device for peripheral equipment of system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101976229A true CN101976229A (en) | 2011-02-16 |
Family
ID=43576115
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201010537171 Pending CN101976229A (en) | 2010-11-09 | 2010-11-09 | Data reading method, system and device for peripheral equipment of system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101976229A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103389950A (en) * | 2013-07-15 | 2013-11-13 | 武汉中元华电科技股份有限公司 | Anti-jamming multichannel data transmission method based on capacity prediction |
CN104331374A (en) * | 2014-10-24 | 2015-02-04 | 东莞宇龙通信科技有限公司 | Data deleting method, data deleting device and terminal |
CN103885908B (en) * | 2014-03-04 | 2017-01-25 | 中国科学院计算技术研究所 | Data transmission system and method based on external device and accessible registers |
CN111338999A (en) * | 2020-02-20 | 2020-06-26 | 南京芯驰半导体科技有限公司 | DMA system and data transmission method |
CN112181887A (en) * | 2019-07-05 | 2021-01-05 | 迈普通信技术股份有限公司 | Data transmission method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6324595B1 (en) * | 1999-03-15 | 2001-11-27 | Advanced Micro Devices, Inc. | Dedication of space in descriptor for minimizing data processing during communications between a peripheral device and a host system |
US20060288129A1 (en) * | 2005-06-17 | 2006-12-21 | Level 5 Networks, Inc. | DMA descriptor queue read and cache write pointer arrangement |
CN100498748C (en) * | 2007-11-16 | 2009-06-10 | 威盛电子股份有限公司 | Computer system and direct RAM access transmission method |
-
2010
- 2010-11-09 CN CN 201010537171 patent/CN101976229A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6324595B1 (en) * | 1999-03-15 | 2001-11-27 | Advanced Micro Devices, Inc. | Dedication of space in descriptor for minimizing data processing during communications between a peripheral device and a host system |
US20060288129A1 (en) * | 2005-06-17 | 2006-12-21 | Level 5 Networks, Inc. | DMA descriptor queue read and cache write pointer arrangement |
US7496699B2 (en) * | 2005-06-17 | 2009-02-24 | Level 5 Networks, Inc. | DMA descriptor queue read and cache write pointer arrangement |
CN100498748C (en) * | 2007-11-16 | 2009-06-10 | 威盛电子股份有限公司 | Computer system and direct RAM access transmission method |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103389950A (en) * | 2013-07-15 | 2013-11-13 | 武汉中元华电科技股份有限公司 | Anti-jamming multichannel data transmission method based on capacity prediction |
CN103389950B (en) * | 2013-07-15 | 2015-03-04 | 武汉中元华电科技股份有限公司 | Anti-jamming multichannel data transmission method based on capacity prediction |
CN103885908B (en) * | 2014-03-04 | 2017-01-25 | 中国科学院计算技术研究所 | Data transmission system and method based on external device and accessible registers |
CN104331374A (en) * | 2014-10-24 | 2015-02-04 | 东莞宇龙通信科技有限公司 | Data deleting method, data deleting device and terminal |
CN112181887A (en) * | 2019-07-05 | 2021-01-05 | 迈普通信技术股份有限公司 | Data transmission method and device |
CN112181887B (en) * | 2019-07-05 | 2023-05-26 | 迈普通信技术股份有限公司 | Data transmission method and device |
CN111338999A (en) * | 2020-02-20 | 2020-06-26 | 南京芯驰半导体科技有限公司 | DMA system and data transmission method |
CN111338999B (en) * | 2020-02-20 | 2021-05-28 | 南京芯驰半导体科技有限公司 | DMA system and data transmission method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11929927B2 (en) | Network interface for data transport in heterogeneous computing environments | |
US20150127691A1 (en) | Efficient implementations for mapreduce systems | |
CN102906726B (en) | Association process accelerated method, Apparatus and system | |
CN110892387B (en) | Memory node controller | |
CN104462225B (en) | The method, apparatus and system of a kind of digital independent | |
US10042576B2 (en) | Method and apparatus for compressing addresses | |
US7275123B2 (en) | Method and apparatus for providing peer-to-peer data transfer within a computing environment | |
US20160147446A1 (en) | Solid state drive (ssd) memory cache occupancy prediction | |
CN105335309B (en) | A kind of data transmission method and computer | |
CN102195874A (en) | Pre-fetching of data packets | |
CN101976229A (en) | Data reading method, system and device for peripheral equipment of system | |
EP3077914B1 (en) | System and method for managing and supporting virtual host bus adaptor (vhba) over infiniband (ib) and for supporting efficient buffer usage with a single external memory interface | |
US20170048320A1 (en) | Distributed gather/scatter operations across a network of memory nodes | |
CN109478171B (en) | Improving throughput in openfabics environment | |
CN107924343B (en) | Low latency inter-node communication | |
CN102291298A (en) | Efficient computer network communication method oriented to long message | |
CN103116475A (en) | Method of automatic simplifying allocation expansion | |
CN104252423A (en) | Consistency processing method and device based on multi-core processor | |
US10289550B1 (en) | Method and system for dynamic write-back cache sizing in solid state memory storage | |
US9037805B2 (en) | Managing a region cache | |
CN114238156A (en) | Processing system and method of operating a processing system | |
CN104881441A (en) | File receiving and storing method based on local area network, checking method and system | |
US20240160366A1 (en) | Method of extending remote function and remote function extension device for performing the method | |
CN102439947B (en) | Method and device for processing address request | |
CN109997122B (en) | Information processing system, semiconductor integrated circuit, and information processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20110216 |