CN104375950B - It is a kind of that method and device is determined to the physical address of communication based on queue - Google Patents

It is a kind of that method and device is determined to the physical address of communication based on queue Download PDF

Info

Publication number
CN104375950B
CN104375950B CN201310359497.1A CN201310359497A CN104375950B CN 104375950 B CN104375950 B CN 104375950B CN 201310359497 A CN201310359497 A CN 201310359497A CN 104375950 B CN104375950 B CN 104375950B
Authority
CN
China
Prior art keywords
page number
virtual page
virtual
bypass conversion
conversion buffered
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.)
Active
Application number
CN201310359497.1A
Other languages
Chinese (zh)
Other versions
CN104375950A (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.)
Huawei Technologies Co Ltd
Institute of Computing Technology of CAS
Original Assignee
Huawei Technologies Co Ltd
Institute of Computing Technology of CAS
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 Huawei Technologies Co Ltd, Institute of Computing Technology of CAS filed Critical Huawei Technologies Co Ltd
Priority to CN201310359497.1A priority Critical patent/CN104375950B/en
Publication of CN104375950A publication Critical patent/CN104375950A/en
Application granted granted Critical
Publication of CN104375950B publication Critical patent/CN104375950B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

It is provided in an embodiment of the present invention that method and device is determined to the physical address of communication based on queue, during virtual address is converted into physical address, if the virtual page number of virtual address to be converted is not present in bypass conversion buffered, then by the one-to-one virtual page number of n groups in main memory and physical page number store to it is described it is bypass conversion buffered in, the n is the quantity of the bypass conversion buffered middle memory cell, illustrate to preserve in main memory and it is bypass conversion buffered in the corresponding relation storage that does not have in bypass conversion buffered, and, data in will be bypass conversion buffered in all units are all updated;And, because n virtual page number includes the second virtual page number adjacent with first virtual page number and more than first virtual page number, so, when can at least ensure virtual address conversion next time, the second virtual page number can be inquired in bypass conversion buffered, hosted without inquiring about, therefore, it is possible to reduce the time delay of address conversion.

Description

It is a kind of that method and device is determined to the physical address of communication based on queue
Technical field
The present invention relates to the communications field, more particularly to a kind of method and dress are determined to the physical address of communication based on queue Put.
Background technology
, it is necessary to which virtual address is converted into physical address in the communication mechanism based on queue, this transfer process generally exists Carried out in address conversioning unit, in order to accelerate the conversion of actual situation address, address conversioning unit by commonly using virtual address and The corresponding relation of physical address be stored in it is bypass conversion buffered in, as shown in figure 1, the virtual address that is stored with bypass conversion buffered Virtual page number and physical address physical page number, virtual page number and physical page number correspond, and represents virtual address and physics Address is corresponded.
When address conversioning unit enters the actual situation conversion of row address, from the virtual address that bypass conversion buffered middle inquiry is to be converted Virtual page number, inquire(Hit)Afterwards, then the page number of physical address corresponding with the page number of virtual address to be converted is obtained, So as to which virtual address to be converted is converted into physical address, if do not inquired from bypass conversion buffered to be converted Virtual address virtual page number(It is not hit by), then need to inquire about the page number of virtual address to be converted and its correspondingly in main memory Physical address page number because with inquire about it is bypass conversion buffered compared with, inquiry host to expend more times, so, Under this mechanism, if be not hit by bypass conversion buffered middle continuous several times, continuous several times inquiry main memory is needed, this undoubtedly can Increase the time delay of address conversion.
The content of the invention
In view of this, the embodiments of the invention provide determine method and device, mesh to the physical address of communication based on queue Be solve it is existing based on queue to during the actual situation address conversion of communication, in bypass conversion buffered continuous several times not In the case of hit, the problem of increasing address conversion time delay.
To achieve these goals, the embodiment of the present invention provides following technical scheme:
The first aspect of the embodiment of the present invention determines method based on queue there is provided a kind of to the physical address of communication, wraps Include:
Determine it is bypass conversion buffered in whether there is the first virtual page number, first virtual page number is to be converted virtual The virtual page number of address;
It is described it is bypass conversion buffered in be not present first virtual page number in the case of, by a pair of n groups 1 in main memory The virtual page number answered and physical page number store to it is described it is bypass conversion buffered in, wherein, n virtual page number includes and described the One virtual page number it is adjacent and more than first virtual page number the second virtual page number, the n for it is described it is bypass conversion buffered in The quantity of memory cell, physical page number corresponding with first virtual page number is used to determine and the virtual address to be converted Corresponding physical address.
In the first implementation of the first aspect of the embodiment of the present invention, minimum void in the n virtual page number Plan page number is first virtual page number.
In second of implementation of the first aspect of the embodiment of the present invention, the n virtual page number is continuous.
In the third implementation of the first aspect of the embodiment of the present invention, it is described determine it is bypass conversion buffered in whether Include in the presence of the first virtual page number:
According to preset order, successively by each virtual page number of bypass conversion buffered middle storage and first virtual page Number it is compared, until a current virtual page number is identical with first virtual page number or travels through the bypass conversion and delays Each virtual page number stored in punching;
If it is described it is bypass conversion buffered in a virtual page number it is identical with first virtual page number, it is determined that it is described It is bypass conversion buffered it is middle exist the first virtual page number, if each virtual page number of the bypass conversion buffered middle storage with First virtual page number is different, it is determined that it is described it is bypass conversion buffered in the first virtual page number is not present.
It is described according to preset order in the 4th kind of implementation of the first aspect of the embodiment of the present invention, successively by side Each virtual page number of the conversion buffered middle storage in road and first virtual page number be compared including:
Compare the virtual page number and first virtual page number, the bypass stored in the bypass conversion buffered stem Conversion buffered is First Input First Output structure;
If the virtual page number stored in the bypass conversion buffered stem is differed with first virtual page number, right The virtual page number and its corresponding physical address stored in the bypass conversion buffered stem carries out out team.
It is described that n groups in main memory is one-to-one in the 5th kind of implementation of the first aspect of the embodiment of the present invention Virtual page number and physical page number, which are stored to described, bypass conversion buffered to be included:
According to the order of virtual page number from big to small, the n one-to-one virtual page numbers are stored with physical page number To it is described it is bypass conversion buffered in memory cell in, wherein, minimum virtual page number and its corresponding physical page number are stored in It is described it is bypass conversion buffered in the corresponding memory cell of first address in.
The second aspect of the embodiment of the present invention provides a kind of based on physical address determining device of the queue to communication, bag Include:
Determining module, for determine it is bypass conversion buffered in whether there is the first virtual page number, stating the first virtual page number is The virtual page number of virtual address to be converted;
Memory module, in the case of first virtual page number is not present in bypass conversion buffered, by n in main memory The one-to-one virtual page number of group and physical page number store to it is described it is bypass conversion buffered in, wherein, n virtual page number includes Second virtual page number adjacent with first virtual page number and more than first virtual page number, the n turns for the bypass The quantity of memory cell in buffering is changed, physical page number corresponding with first virtual page number is used to determine and described to be converted The corresponding physical address of virtual address.
In the first implementation of second aspect of the embodiment of the present invention, the memory module includes:
First memory cell, in the case of the first virtual page number is not present in bypass conversion buffered, by n in main memory Individual one-to-one virtual page number and physical page number store to it is described it is bypass conversion buffered in, the n virtual page number includes Second virtual page number adjacent with first virtual page number and more than first virtual page number, the n turns for the bypass It is first virtual page number to change virtual page number minimum in the quantity of memory cell in buffering, the n virtual page number, and N virtual page number is continuous.
In second of implementation of second aspect of the embodiment of the present invention, the determining module includes:
Comparing unit, for according to preset order, successively by each virtual page number of bypass conversion buffered middle storage with First virtual page number is compared, until a current virtual page number is identical with first virtual page number or travels through Each virtual page number of the bypass conversion buffered middle storage;
Determining unit, if for it is described it is bypass conversion buffered in a virtual page number and the first virtual page number phase Together, it is determined that described bypass conversion buffered middle in the presence of the first virtual page number, if the bypass conversion buffered middle storage is each Individual virtual page number is all different from first virtual page number, it is determined that it is described it is bypass conversion buffered in be not present the first virtual page Number.
In the third implementation of second aspect of the embodiment of the present invention, the comparing unit includes:
Stem comparing subunit, for comparing the virtual page number stored in the bypass conversion buffered stem and described the One virtual page number, if the virtual page number stored in the bypass conversion buffered stem and first virtual page number not phase Together, team, the side are carried out out to the virtual page number and its corresponding physical address that are stored in the bypass conversion buffered stem Conversion buffered road is First Input First Output structure;
Subelement is controlled, for a current virtual page number to be identical with first virtual page number or the traversal side During each virtual page number of the conversion buffered middle storage in road, the stem comparing subunit is controlled to stop comparing.
In the 4th kind of implementation of second aspect of the embodiment of the present invention, the memory module includes:
Second memory cell, in the case of the first virtual page number is not present in bypass conversion buffered, according to virtual The order of page number from big to small, by the one-to-one virtual page numbers of n and physical page number store to it is described it is bypass conversion buffered in Memory cell in, wherein, minimum virtual page number and its corresponding physical page number be stored in it is described it is bypass conversion buffered in In the corresponding memory cell of first address, the n virtual page number includes adjacent with first virtual page number and is more than described Second virtual page number of the first virtual page number, the n is the quantity of the bypass conversion buffered middle memory cell, and described n empty It is first virtual page number to intend virtual page number minimum in page number, and the n virtual page number is continuous.
It is provided in an embodiment of the present invention that method and device is determined to the physical address of communication based on queue, by virtual address During being converted to physical address, if the virtual page number of virtual address to be converted is not present in bypass conversion buffered, By the one-to-one virtual page number of n groups in main memory and physical page number store to it is described it is bypass conversion buffered in, the n is described The quantity of bypass conversion buffered middle memory cell, illustrate to preserve in main memory and it is bypass conversion buffered in the corresponding relation that does not have deposit Store up it is bypass conversion buffered in, also, will be bypass conversion buffered in data in all unit be all updated;
Also, because n virtual page number includes adjacent with first virtual page number and is more than first virtual page Number the second virtual page number, so, can at least ensure next time virtual address conversion when, it is bypass conversion buffered in can inquire about To the second virtual page number, hosted without inquiring about, therefore, it is possible to reduce the time delay of address conversion.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is bypass conversion buffered middle storage virtual page number and the schematic diagram of physical page number;
Fig. 2 is a kind of flow chart for determining method to the physical address of communication based on queue disclosed in the embodiment of the present invention;
Fig. 3 is bypass conversion buffered middle storage virtual page number and the example of physical page number;
Fig. 4 is the example after bypass conversion buffered middle storage virtual page number and physical page number renewal shown in Fig. 3;
Fig. 5 is the flow that another determines method based on queue to the physical address of communication disclosed in the embodiment of the present invention Figure;
Fig. 6 is schematic diagram of the queue to communication framework;
Fig. 7 includes the example of 2 memory cell to be bypass conversion buffered;
Fig. 8 is the flow that another determines method based on queue to the physical address of communication disclosed in the embodiment of the present invention Figure;
Fig. 9 is a kind of reception signal based on queue to the physical address determining device of communication disclosed in the embodiment of the present invention Figure;
Figure 10 is another disclosed reception based on queue to the physical address determining device of communication of the embodiment of the present invention Schematic diagram;
Figure 11 is another disclosed reception based on queue to the physical address determining device of communication of the embodiment of the present invention Schematic diagram.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
It is a kind of disclosed in the embodiment of the present invention that method is determined to the physical address of communication based on queue, as shown in Fig. 2 bag Include:
S201:Determine it is bypass conversion buffered in whether there is the first virtual page number, first virtual page number is to be converted Virtual address virtual page number;
S202:In the case of the first virtual page number is not present in bypass conversion buffered, by n groups in main memory correspondingly Virtual page number is stored in bypass conversion buffered with physical page number, wherein, n virtual page number includes and first virtual page Second virtual page number number adjacent and more than first virtual page number, the n is the bypass conversion buffered middle memory cell Quantity.
It is bypass conversion buffered in the present embodiment to include memory cell, one group of corresponding void is stored in each memory cell Intend page number and physical page number.
In the prior art, when in bypass conversion buffered be not present the first virtual page number when, in order to obtain with it is described virtually The corresponding physical page number of virtual page number of location, it is necessary to inquire about the virtual page number of virtual address from main memory, when several times continuously from When bypass conversion buffered middle lookup is less than virtual page number, it is necessary to which continuously inquiry is hosted, and the time that inquiry main memory expends must It is so more than inquiring about the time of bypass conversion buffered consuming, so, the time delay of address conversion can be caused to increase.
For example, as shown in figure 3, be stored with bypass conversion buffered 4 groups of one-to-one virtual page numbers and physical page number, such as Really the first virtual page number is 15000, because can not find out 15000 in bypass conversion buffered, it is therefore desirable to from the page table in main memory Search, and when next page number to be checked is 16000, need also exist for inquiring about from main memory.
Generally, based on queue pair(Queue Pair)Communication process in, according to the virtual page number of virtual address from big To small order, virtual address is converted into physical address successively.
In the present embodiment, based on queue pair(Queue Pair)In communication process, according to virtual address virtual page number from Arrive the characteristics of virtual address is converted to physical address by small order successively greatly, when it is bypass conversion buffered it is middle lookup less than first During virtual page number, after illustrating the virtual page number of virtual address to be converted be all higher than it is bypass conversion buffered in existing virtual page Number, therefore, in the method described in the present embodiment, the n one-to-one virtual page numbers and physical page number in main memory are stored To in bypass conversion buffered, it is therefore intended that, update bypass conversion buffered with the virtual page number and its physical page number stored in main memory In in all memory cell with the virtual page number and its physical page number of storage, and virtual page number after updating include after need The virtual page number to be inquired about so that in inquiry afterwards, can reduce the number of times that inquiry is hosted, so as to reduce address conversion Time delay.
For example, in the case of figure 3, if the first virtual page number is 15000, by 15000 in the page table of main memory, 16000 and its corresponding physical page number update in bypass conversion buffered, the data of the bypass conversion buffered middle storage after renewal As shown in Figure 4.
In such as Fig. 4, after being updated using the method described in the present embodiment to the data of bypass conversion buffered middle storage, because Virtual page number for next virtual address to be converted is 16000, therefore, the corresponding relation energy of bypass conversion buffered middle storage Enough hits, without being inquired about again from main memory, so as to reduce time delay.
As can be seen from the above analysis, the method described in the present embodiment, fully takes into account queue to address conversion in communication The characteristics of order, the demand for reducing address conversion time delay can be met just., whereas if turning without queue to address in communication The restriction of order is changed, the virtual page number and its corresponding physical page number after renewal are probably to be needed inquire about next time in, now, Need for inquiring about from main memory, and time delay can not be effectively reduced.
Another determines method based on queue to the physical address of communication disclosed in the embodiment of the present invention, as shown in figure 5, bag Include:
S501:Determine it is bypass conversion buffered in whether there is the first virtual page number;
Alternatively, in the present embodiment, determine it is bypass conversion buffered in can with the presence or absence of the specific method of the first virtual page number With including:
According to preset order, each virtual page number of bypass conversion buffered middle storage is entered with first virtual page number Row compares, until it is described it is bypass conversion buffered in a virtual page number is identical with first virtual page number or the bypass It is conversion buffered to meet preparatory condition;
If it is described it is bypass conversion buffered in a virtual page number it is identical with first virtual page number, it is determined that it is described It is bypass conversion buffered it is middle there is the first virtual page number, bypass conversion buffered meet preparatory condition if described, it is determined that the side Road is conversion buffered middle in the presence of the first virtual page number.
Wherein, preset order can be the order of address from small to large, i.e., since the virtual page number that first address is stored, according to It is secondary each virtual page number of bypass conversion buffered middle storage to be compared with first virtual page number, when the bypass Stop comparing when a virtual page number in conversion buffered is identical with first virtual page number, determine described bypass conversion buffered It is middle to there is the first virtual page number;Stop comparing after each virtual page number of the bypass conversion buffered middle storage is traveled through, such as Each virtual page number of really bypass conversion buffered middle storage is different from first virtual page number, it is determined that the bypass turns Change and the first virtual page number is not present in buffering.
For example, the first virtual page number is 16000, for as shown in Figure 4 bypass conversion buffered, then according to address from greatly to Small order, is first compared the 15000 of stem, both differ with 16000, does not also travel through all virtual page numbers, therefore, after Continuous to be compared 16000 with 16000, both are identical, then stop comparing, and determine bypass conversion buffered middle in the presence of the first virtual page number.
In another example, the first virtual page number is 19000, then according to the order from address from big to small, respectively by the void in Fig. 4 Intend page number to be compared with 19000, what is finally compared is 16000 and 19000, and both are different, but it is all virtual to meet traversal This condition of page number, therefore, stops comparison procedure, because all virtual page numbers are all different from 19000, determines bypass conversion The first virtual page number is not present in buffering.
S502:If it is described it is bypass conversion buffered in be not present first virtual page number, by the n groups one in the main memory One corresponding virtual page number and physical page number store to it is described it is bypass conversion buffered in, wherein, n virtual page number includes and institute State that the first virtual page number is adjacent and the second virtual page number more than first virtual page number, the n is slow for the bypass conversion The quantity of memory cell in punching;
Alternatively, in the present embodiment, the n virtual page number is continuous, further, alternatively, the n virtual page number Middle minimum virtual page number is first virtual page number.
S503:If it is described it is bypass conversion buffered in there is first virtual page number, according to first virtual page Number corresponding physical page number, physical address is converted to by virtual address to be converted.
Method described in the present embodiment, can effectively reduce because it is bypass conversion buffered it is middle search less than it is to be converted virtually Caused by the virtual page number of location the problem of the increase of address conversion time delay.
Another is based on address conversion method of the queue to communication disclosed in the embodiment of the present invention, as shown in fig. 6, in queue To in communication, the software layer of transmitting terminal gets out the data for needing to transmit in internal memory, the software layer of receiving terminal is accurate in internal memory Get the buffering area for receiving data storage ready, the software layer of transmitting terminal creates the Work Queue Elements of transmission(Work Queue Element, WQE), WQE is then inserted into transmit queue(Send Queue, SQ)In, each WQE records one or more needs The data buffer zone of transmission, including the initial fictive address of the data buffer zone and size.The software layer of receiving terminal, which is created, to be received WQE, and WQE is sequentially inserted into receiving queue(Receive Queue, RQ)In.Each WQE points to one or more receive and delayed Area is rushed, including receives initial fictive address and the size of buffering area.The adapter of transmitting terminal(adapter)Handle SQ queue heads WQE, the data buffer zone indicated according to WQE is taken out data and sent to receiving terminal, and the adapter of receiving terminal once receives number According to just the first WQE of taking-up RQ queues, the data received are saved in the buffering area that WQE is indicated.When transmitting terminal When adapter handles what a SQ WQE, a completion queue element (QE) is generated(Completion Queue Element, CQE), queue is completed to indicate a completion sent, and the CQE is inserted into(Completion Queue, CQ)In.It is right In receiving terminal, when receiving what a packet, generate in a CQE, insertion CQ, indicate the completion of a reception.
Because in WQE being virtual address, adapter in processing, it is necessary to virtual address is converted into physical address, In the present embodiment, it is bypass conversion buffered be First Input First Output structure, Fig. 7 show it is bypass conversion buffered include 2 store The example of unit.Address conversion method described in the present embodiment, as shown in figure 8, including:
S801:Whether compare the virtual page number that is stored in the bypass conversion buffered stem and first virtual page number It is identical, if it is, S807 is performed, if not, performing S802;
S802:The virtual page number and its corresponding physical address stored in the bypass conversion buffered stem is gone out Team;
S803:Judge it is described it is bypass conversion buffered whether be empty, if it is, S804 is performed, if not, performing S801;
S804:Determine it is described it is bypass conversion buffered in be not present the first virtual page number;
S805:The one-to-one virtual page number of n groups in main memory is arrived described bypass conversion buffered with physical page number storage In;
Wherein, n virtual page number includes adjacent with first virtual page number and more than first virtual page number N virtual page number in second virtual page number and corresponding physical page number, the n groups corresponding relation it is continuous and the n it is virtual Minimum virtual page number is first virtual page number in page number.
, can be according to the order of virtual page number from big to small, by n groups corresponding relation storage described in the present embodiment In memory cell in bypass conversion buffered, wherein, minimum virtual page number and its corresponding physical page number are stored in the side In the corresponding memory cell of first address during road is conversion buffered.
S806:Middle corresponding with first virtual page number physical page number is determined from bypass conversion buffered;
Physical address can be determined according to the physical page number.
S807:Determine described bypass conversion buffered middle in the presence of the first virtual page number, execution S806.
For example, the virtual page number of virtual address to be converted, i.e. the first virtual page number are respectively 11000,12000,13000 With 14000.In Fig. 7-1, it is bypass conversion buffered in be stored with 11000 physical page numbers 1,2 corresponding with 12000, wherein, ASID tables Show process number.
Carry out conversion of the virtual page number for 11000 virtual address first, according to the method described in the present embodiment, by than Compared with, determine that stored in stem 11000 is identical with 11000, hit, then can obtain physical page number 1 so that by virtual address turn It is changed to physical address.
The conversion for the virtual address that virtual page number is 12000 is carried out again, by comparing, determines 11000 stored in stem It is different from 12000, then 11000 and 1 are gone out into team, go out it is bypass conversion buffered after team in data as shown in Fig. 7-2, be not sky, then Continue to compare, determine that stored in stem 12000 is identical with 12000, hit, virtual address can be converted to physical address.
Carry out again virtual page number be 13000 virtual address conversion, by compare determine stem in store 12000 with 13000 is different, and 12000 and 2 are gone out into team, go out it is bypass conversion buffered after team in data as shown in Fig. 7-3, be sky, it is determined that institute State it is bypass conversion buffered in be not present the first virtual page number, by the main memory two groups of corresponding relations storage to it is described bypass turn Change in buffering, such as Fig. 7-4, on this basis, as it was previously stated, 13000 and 14000 hit can be continued to complete, so as to complete The conversion of address.
In the example above, 13000 and 14000 be not present Fig. 7-1 shown in starting it is bypass conversion buffered in, to complete The process that one query is hosted is needed in all conversions, the present embodiment, and in the prior art, it is necessary to inquire about the mistake of main memory twice Journey, it is seen then that the method described in the present embodiment, can reduce the process that inquiry is hosted, so that processing speed is improved, also, bypass The quantity of conversion buffered middle memory cell is more, and the advantage of the method described in the present embodiment is bigger.
Secondly, in the method described in the present embodiment, the structure of bypass conversion buffered use First Input First Output, each time only Query request stem, with inquire about simultaneously in the prior art it is bypass conversion buffered in compared with all virtual page number, can reduce pair The loss of resource.
With above method embodiment accordingly, the embodiment of the present invention is also disclosed a kind of based on physics of the queue to communication Address determining device, as shown in figure 9, including:
Determining module 901, for determine it is bypass conversion buffered in whether there is the first virtual page number, state the first virtual page number For the virtual page number of virtual address to be converted;
Memory module 902, in the case of first virtual page number is not present in bypass conversion buffered, will be hosted The middle one-to-one virtual page number of n groups and physical page number store to it is described it is bypass conversion buffered in, wherein, in n virtual page number Including the second virtual page number adjacent with first virtual page number and more than first virtual page number, the n is the side The quantity of the conversion buffered middle memory cell in road, physical page number corresponding with first virtual page number is used to determine to wait to turn with described The corresponding physical address of virtual address changed.
Another disclosed in the present embodiment is based on physical address determining device of the queue to communication, as shown in Figure 10, bag Include:
Comparing unit 1001, for according to preset order, successively by each virtual page of bypass conversion buffered middle storage Number be compared with first virtual page number, until a current virtual page number it is identical with first virtual page number or Travel through each virtual page number of the bypass conversion buffered middle storage;
Determining unit 1002, if for it is described it is bypass conversion buffered in a virtual page number and first virtual page It is number identical, it is determined that it is described it is bypass conversion buffered it is middle there is the first virtual page number, if the bypass conversion buffered middle storage Each virtual page number is different from first virtual page number, it is determined that it is described it is bypass conversion buffered in be not present it is first virtual Page number;
First memory cell 1003, in the case of the first virtual page number is not present in bypass conversion buffered, by master Deposit the one-to-one virtual page numbers of n and physical page number store to it is described it is bypass conversion buffered in, wherein, n virtual page number Include the second virtual page number adjacent with first virtual page number and more than first virtual page number, the n is described Minimum virtual page number is first virtual page in the quantity of bypass conversion buffered middle memory cell, the n virtual page number Number, and the n virtual page number is continuous.
Another disclosed in the present embodiment is based on physical address determining device of the queue to communication, as shown in figure 11, bag Include:
Stem comparing subunit 1101, for comparing the virtual page number stored in the bypass conversion buffered stem and institute The first virtual page number is stated, if the virtual page number stored in the bypass conversion buffered stem and first virtual page number are not It is identical, team is carried out out to the virtual page number and its corresponding physical address stored in the bypass conversion buffered stem, it is described Bypass conversion buffered is First Input First Output structure;
Control subelement 1102, for a current virtual page number it is identical with first virtual page number or travel through institute When stating each virtual page number of bypass conversion buffered middle storage, the stem comparing subunit is controlled to stop comparing;
Determining unit 1103, if for it is described it is bypass conversion buffered in a virtual page number and first virtual page It is number identical, it is determined that it is described it is bypass conversion buffered it is middle there is the first virtual page number, if the bypass conversion buffered middle storage Each virtual page number is different from first virtual page number, it is determined that it is described it is bypass conversion buffered in be not present it is first virtual Page number;
Second memory cell 1104, in the case of the first virtual page number is not present in bypass conversion buffered, according to The order of virtual page number from big to small, the n one-to-one virtual page numbers and physical page number storage are turned to the bypass Change in the memory cell in buffering, wherein, minimum virtual page number and its corresponding physical page number are stored in the bypass conversion In the corresponding memory cell of first address in buffering, wherein, n virtual page number include it is adjacent with first virtual page number and More than the second virtual page number of first virtual page number, the n is the quantity of the bypass conversion buffered middle memory cell, institute Virtual page number minimum in n virtual page number is stated for first virtual page number, and the n virtual page number is continuous.
Acquisition module 1105, for it is bypass conversion buffered it is middle exist the first virtual page number in the case of, obtain with it is described The corresponding physical page number of first virtual page number;
Address determination module 1106, for according to the physical page number, it is determined that corresponding with the virtual address to be converted Physical address.
A kind of adapter disclosed in the embodiment of the present invention, including:
Processor, for determine it is bypass conversion buffered in whether there is the first virtual page number, first virtual page number is The virtual page number of virtual address to be converted, and it is described it is bypass conversion buffered in be not present first virtual page number situation Under, by the one-to-one virtual page number of n groups in main memory and physical page number store to it is described it is bypass conversion buffered in, wherein, n void Intending page number includes the second virtual page number adjacent with first virtual page number and more than first virtual page number, the n For the quantity of the bypass conversion buffered middle memory cell, physical page number corresponding with first virtual page number be used to determining with The corresponding physical address of the virtual address to be converted;
Memory, for storing the data produced in the program in the processor, and the processor running.
If the function described in the present embodiment method is realized using in the form of SFU software functional unit and is used as independent product pin Sell or in use, can be stored in a computing device read/write memory medium.Understood based on such, the embodiment of the present invention The part contributed to prior art or the part of the technical scheme can be embodied in the form of software product, and this is soft Part product is stored in a storage medium, including some instructions are to cause a computing device(Can be personal computer, Server, mobile computing device or network equipment etc.)Perform all or part of step of each embodiment methods described of the invention Suddenly.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage(ROM, Read-Only Memory), at random deposit Access to memory(RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.
The embodiment of each in this specification is described by the way of progressive, what each embodiment was stressed be with it is other Between the difference of embodiment, each embodiment same or similar part mutually referring to.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or using the present invention. A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one The most wide scope caused.

Claims (12)

1. a kind of determine method based on queue to the physical address of communication, it is characterised in that including:
Determine it is bypass conversion buffered in whether there is the first virtual page number, first virtual page number be virtual address to be converted Virtual page number;
It is described it is bypass conversion buffered in be not present first virtual page number in the case of, by n groups in main memory correspondingly Virtual page number and physical page number store to it is described it is bypass conversion buffered in, wherein, n virtual page number includes and the described first void Plan page number is adjacent and is more than the second virtual page number of first virtual page number, and the n is the bypass conversion buffered middle storage The quantity of unit, it is corresponding with the virtual address to be converted that physical page number corresponding with first virtual page number is used for determination Physical address;
Include during wherein described determination is bypass conversion buffered with the presence or absence of the first virtual page number:
According to preset order, each virtual page number of bypass conversion buffered middle storage is entered with first virtual page number successively Row compares, until a current virtual page number is identical with first virtual page number or traversal it is described it is bypass conversion buffered in Each virtual page number of storage;
If it is described it is bypass conversion buffered in a virtual page number it is identical with first virtual page number, it is determined that the bypass It is conversion buffered it is middle exist the first virtual page number, if each virtual page number of the bypass conversion buffered middle storage with it is described First virtual page number is different, it is determined that it is described it is bypass conversion buffered in the first virtual page number is not present.
2. according to the method described in claim 1, it is characterised in that minimum virtual page number is institute in the n virtual page number State the first virtual page number.
3. method according to claim 2, it is characterised in that the n virtual page number is continuous.
4. according to the method described in claim 1, it is characterised in that described according to preset order, successively will be bypass conversion buffered Each virtual page number of middle storage and first virtual page number be compared including:
Compare the virtual page number and first virtual page number stored in the bypass conversion buffered stem, the bypass conversion Buffer as First Input First Output structure;
If the virtual page number stored in the bypass conversion buffered stem is differed with first virtual page number, to described The virtual page number and its corresponding physical address stored in bypass conversion buffered stem carries out out team.
5. method according to claim 4, it is characterised in that the traversal bypass conversion buffered middle storage it is each Individual virtual page number includes:
It is described bypass conversion buffered for sky.
6. the method according to claim 4 or 5, it is characterised in that described by the one-to-one virtual page number of n groups in main memory Bypass conversion buffered include to described with physical page number storage:
According to the order of virtual page number from big to small, institute is arrived into the n one-to-one virtual page numbers and physical page number storage State it is bypass conversion buffered in memory cell in, wherein, minimum virtual page number and its corresponding physical page number are stored in described In the corresponding memory cell of first address in bypass conversion buffered.
7. according to the method described in claim 1, it is characterised in that also include:
In the case of the first virtual page number of bypass conversion buffered middle presence, physics corresponding with first virtual page number is obtained Page number;
According to the physical page number, it is determined that physical address corresponding with the virtual address to be converted.
8. it is a kind of based on physical address determining device of the queue to communication, it is characterised in that including:
Determining module, for determine it is bypass conversion buffered in whether there is the first virtual page number, state the first virtual page number for wait turn The virtual page number for the virtual address changed;
Memory module, in the case of first virtual page number is not present in bypass conversion buffered, by n groups one in main memory One corresponding virtual page number and physical page number store to it is described it is bypass conversion buffered in, wherein, n virtual page number includes and institute State that the first virtual page number is adjacent and the second virtual page number more than first virtual page number, the n is slow for the bypass conversion The quantity of memory cell in punching, physical page number corresponding with first virtual page number be used to determining with it is described to be converted virtual The corresponding physical address in address;
Wherein described determining module includes:
Comparing unit, for according to preset order, successively by each virtual page number of bypass conversion buffered middle storage with it is described First virtual page number is compared, until a current virtual page number is identical with first virtual page number or traversal is described Each virtual page number of bypass conversion buffered middle storage;
Determining unit, if for it is described it is bypass conversion buffered in a virtual page number it is identical with first virtual page number, The first virtual page number of the bypass conversion buffered middle presence is then determined, if each of the bypass conversion buffered middle storage is empty Intend page number all different from first virtual page number, it is determined that it is described it is bypass conversion buffered in the absence of the first virtual page number.
9. device according to claim 8, it is characterised in that the memory module includes:
First memory cell, in the case of the first virtual page number is not present in bypass conversion buffered, by n in main memory one One corresponding virtual page number and physical page number store to it is described it is bypass conversion buffered in, the n virtual page number includes and institute State that the first virtual page number is adjacent and the second virtual page number more than first virtual page number, the n is slow for the bypass conversion Minimum virtual page number is first virtual page number in the quantity of memory cell in punching, the n virtual page number, and n is individual Virtual page number is continuous.
10. device according to claim 8, it is characterised in that the comparing unit includes:
Stem comparing subunit, for comparing the virtual page number stored in the bypass conversion buffered stem and the described first void Intend page number, it is right if the virtual page number stored in the bypass conversion buffered stem is differed with first virtual page number The virtual page number and its corresponding physical address stored in the bypass conversion buffered stem carries out out team, the bypass conversion Buffer as First Input First Output structure;
Control subelement, for a current virtual page number it is identical with first virtual page number or travel through it is described bypass turn When changing each virtual page number stored in buffering, the stem comparing subunit is controlled to stop comparing.
11. device according to claim 10, it is characterised in that the memory module includes:
Second memory cell, in the case of the first virtual page number is not present in bypass conversion buffered, according to virtual page number Order from big to small, by the one-to-one virtual page numbers of n and physical page number storage to it is described it is bypass conversion buffered in deposit In storage unit, wherein, minimum virtual page number and its corresponding physical page number be stored in it is described it is bypass conversion buffered in first ground In the corresponding memory cell in location, the n virtual page number includes adjacent with first virtual page number and more than described first Second virtual page number of virtual page number, the n is the quantity of the bypass conversion buffered middle memory cell, the n virtual page Minimum virtual page number is first virtual page number in number, and the n virtual page number is continuous.
12. device according to claim 8, it is characterised in that also include:
Acquisition module, in the case of the first virtual page number of bypass conversion buffered middle presence, obtaining and described first is virtual The corresponding physical page number of page number;
Address determination module, for according to the physical page number, it is determined that corresponding physically with the virtual address to be converted Location.
CN201310359497.1A 2013-08-16 2013-08-16 It is a kind of that method and device is determined to the physical address of communication based on queue Active CN104375950B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310359497.1A CN104375950B (en) 2013-08-16 2013-08-16 It is a kind of that method and device is determined to the physical address of communication based on queue

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310359497.1A CN104375950B (en) 2013-08-16 2013-08-16 It is a kind of that method and device is determined to the physical address of communication based on queue

Publications (2)

Publication Number Publication Date
CN104375950A CN104375950A (en) 2015-02-25
CN104375950B true CN104375950B (en) 2017-08-25

Family

ID=52554883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310359497.1A Active CN104375950B (en) 2013-08-16 2013-08-16 It is a kind of that method and device is determined to the physical address of communication based on queue

Country Status (1)

Country Link
CN (1) CN104375950B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110908931B (en) * 2016-08-26 2021-12-28 中科寒武纪科技股份有限公司 Updating method of TLB module

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102866958A (en) * 2012-09-07 2013-01-09 北京君正集成电路股份有限公司 Method and device for accessing dispersed internal memory
CN102929796A (en) * 2012-06-01 2013-02-13 杭州中天微系统有限公司 Memory management module simultaneously supporting software backfilling and hardware backfilling

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080282055A1 (en) * 2005-12-29 2008-11-13 Rongzhen Yang Virtual Translation Lookaside Buffer
CN101246452B (en) * 2007-02-12 2010-12-15 国际商业机器公司 Method and apparatus for fast performing MMU analog, and total system simulator

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929796A (en) * 2012-06-01 2013-02-13 杭州中天微系统有限公司 Memory management module simultaneously supporting software backfilling and hardware backfilling
CN102866958A (en) * 2012-09-07 2013-01-09 北京君正集成电路股份有限公司 Method and device for accessing dispersed internal memory

Also Published As

Publication number Publication date
CN104375950A (en) 2015-02-25

Similar Documents

Publication Publication Date Title
CN103647807B (en) A kind of method for caching information, device and communication equipment
CN107301455B (en) Hybrid cube storage system for convolutional neural network and accelerated computing method
CN102479207B (en) Information search method, system and device
US20150127691A1 (en) Efficient implementations for mapreduce systems
CN111242277A (en) Convolutional neural network accelerator supporting sparse pruning and based on FPGA design
CN101426010A (en) Information processing apparatus and information processing system
CN108228083A (en) For the method and apparatus of data deduplication
CN104346401B (en) The method and apparatus of each inter-module message forwarding in cloud management platform
CN103546258B (en) Method and device for data transmission
CN103645994A (en) Data processing method and device
CN104765575A (en) Information storage processing method
CN103491152A (en) Metadata obtaining method, device and system in distributed file system
CN104102693A (en) Object processing method and device
CN102446087B (en) Instruction prefetching method and device
CN108829613A (en) Date storage method and storage equipment
CN107729536A (en) A kind of date storage method and device
CN103049240A (en) Peripheral component interconnect express (PCI-E) device and data receiving reordering method thereof
CN109086879B (en) Method for realizing dense connection neural network based on FPGA
CN106662895A (en) Computer device and data read-write method for computer device
CN104252416B (en) A kind of accelerator and data processing method
CN107908365A (en) The method, apparatus and equipment of User space memory system data interaction
CN104375950B (en) It is a kind of that method and device is determined to the physical address of communication based on queue
CN102855213B (en) A kind of instruction storage method of network processing unit instruction storage device and the device
US11456972B2 (en) Methods and arrangements to accelerate array searches
CN107819697A (en) Data transmission method, interchanger and data center

Legal Events

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