CN108897705A - A kind of data access device and method applied to communication system - Google Patents

A kind of data access device and method applied to communication system Download PDF

Info

Publication number
CN108897705A
CN108897705A CN201810716018.XA CN201810716018A CN108897705A CN 108897705 A CN108897705 A CN 108897705A CN 201810716018 A CN201810716018 A CN 201810716018A CN 108897705 A CN108897705 A CN 108897705A
Authority
CN
China
Prior art keywords
pointer
write
data
downloading
host
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.)
Withdrawn
Application number
CN201810716018.XA
Other languages
Chinese (zh)
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.)
Anhui He Soft Information Technology Co Ltd
Original Assignee
Anhui He Soft Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anhui He Soft Information Technology Co Ltd filed Critical Anhui He Soft Information Technology Co Ltd
Priority to CN201810716018.XA priority Critical patent/CN108897705A/en
Publication of CN108897705A publication Critical patent/CN108897705A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/12Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor
    • G06F13/124Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor where hardware is a sequential transfer control unit, e.g. microprocessor, peripheral processor or state-machine
    • G06F13/128Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor where hardware is a sequential transfer control unit, e.g. microprocessor, peripheral processor or state-machine for dedicated transfers to a network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/38Universal adapter
    • G06F2213/3808Network interface controller

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Information Transfer Systems (AREA)

Abstract

A kind of data access device and method applied to communication system include suitable for from a host downloading data and delivering the data to network interface:One writing controller is controlled by the host and exports a write-in pointer;One Read Controller is controlled by the writing controller and exports a reading pointer;One downloading determining device, including a pointer difference calculator and a comparison circuit, for the pointer difference calculator to calculate the spacing of the write-in pointer and the reading pointer as a pointer difference, which issues a downloading state instruction according to the pointer difference and one first reservation length to change the write-in pointer;And a transmission buffer, it is downloaded data according to the write-in pointer, and delivered away data according to the reading pointer.A kind of data access method and a kind of data access device of network interface controller are also disclosed for.

Description

A kind of data access device and method applied to communication system
Technical field
The invention relates to a kind of data access device and methods, particularly relate to a kind of data applied to communication system Access device and method.
Background technique
In general networking communication system, host (host) is by a network interface controller (Network Interface Controller, abbreviation NIC) data for depositing in the main memory of host are delivered on network.
Since NIC is before being sent to network by host for data, the data need to be kept in, therefore NIC can be slow comprising a transmission Rush device (transmitting buffer), known NIC be by it includes transmission buffer be divided into one or several pages (page), to store the network frame grouping (network frame packet) downloaded from main memory respectively.Work as biography When defeated buffer is divided into a page, which stores downloaded packet data, and is until page storage one is complete Whole grouping just starts the delivery of packets to network, thus causes throughput (throughput) bad.Work as transmission buffer It is downloading data to be stored by one of page, and the grouping for having deposited in another page is passed when being divided into two pages It passs away, so can be improved throughput, but must be realized with biggish memory space.
It is transmission of network grouping process that well-known technique, which waits until that NIC completely downloads grouping can just start the reason of transmitting outward, It is a Continuous behavior, if NIC starts transmission grouping when not yet downloading complete packet, when transmitted data on network rate is higher than NIC When from host downloading rate, the storing data that will lead to transmission buffer is read empty (empty), therefore transmit process is also interrupted. In addition, the way of well-known technique can be effectively retained read in the part that is grouped just read data it made not to be written, in response to Collision (collision) problem that may occur in network transfer process, when a collision occurs, the reading of transmission buffer refers to Needle (read pointer) may jump back to the previous address read to deliver the grouping transmitted not successfully again.
U.S. Patent No. 5,434,872 propose that a kind of log-on data of doing sth. in advance transmits (early initiation of Data transmission) method, do not wait until grouping completely downloaded, just data transmission is gone out.And the present invention uses Another implementation realizes data access.
Summary of the invention
Therefore, the purpose of the present invention is providing a kind of data access device and method applied to communication system, can be with But it is not limited to save memory space and lossless throughput.
A kind of data access device and method applied to communication system, the data access device of network interface controller, For the data transmission that is stored a host to network interface, which includes:One writing controller, foundation The control signal that the host is issued determines a write-in pointer;One Read Controller is determined according to the write-in pointer One reading pointer;One downloading determining device, for judging whether to receive from the host with the reading pointer according to the write-in pointer Data, including:One pointer difference calculator, to calculate the spacing of the write-in pointer and the reading pointer to generate a pointer difference; And a comparison circuit, for exporting an indication signal according to the pointer difference and a preset length, to indicate the data access Whether device is from the host receiving data;And a first-in first-out buffer, number is received from the host according to the write-in pointer According to, and network interface is transferred data to according to the reading pointer.
The present invention is applied to the data access method of communication system, is applicable in the data transmission that is stored a host to one Network interface, the data access method comprise the steps of:The control signal issued according to the host determines a write-in Pointer;A reading pointer is determined according to the write-in pointer;The spacing of the write-in pointer and the reading pointer is calculated to generate one Pointer difference;An indication signal is exported, according to the pointer difference and a preset length to indicate whether from the host receiving data; And when the indication signal is indicated from the host receiving data, then according to the write-in pointer from the host receiving data, and according to The reading pointer transfers data to the network interface.
Detailed description of the invention
Fig. 1 is a block diagram, illustrates the data access device of inventive network interface controller from a host downloading data simultaneously Deliver the data to network;
Fig. 2 is a block diagram, illustrates that the present invention is applied to the preferred embodiment of the data access device of communication system;
Fig. 3 is a flow chart, illustrates that the present invention is applied to the preferred embodiment of the data access method of communication system;
Fig. 4 is a flow chart, illustrates to compare write-in pointer and reading pointer in this preferred embodiment, to determine downloading packet count According to opportunity;
Fig. 5 is a block diagram, illustrates that the present invention is applied to another embodiment of the data access device of communication system;And
Fig. 6 is a schematic diagram, illustrates that the relationship of pointer and reading pointer relative to transmission buffer is written.
Primary clustering symbol description
100 data access device, 1 writing controller, 2 Read Controllers, 3 transmission buffers, 4 downloading determining devices, 41 pointer differences Calculator, 42 ruling calculators, 43 comparison circuits, 5 direct memory access (DMA) engines, 6 hosts, 61 main memories, 7 DMA buffering Controller, 81-84 step, 831-835 sub-step, CMP1 first comparator, the second comparator of CMP2, AND1 first and door, AND2 second and door, FF buffer, the first multiplexer of MUX1, the second multiplexer of MUX2, W1 accumulator, W2 multiplexer, W3 buffer.
Specific embodiment
For the present invention aforementioned and other technology contents, feature and effect, following cooperation with reference to one of schema compared with In the detailed description of good embodiment, can clearly it present.
Fig. 1 and Fig. 2 are please referred to, the preferred embodiment of the data access device of communication system is applied to for the present invention Application schematic diagram, in the present embodiment, which is integrated in an Ethernet interface controller, with coming from one One main memory 61 of host 6 downloads packet data, and packet data is delivered to Ethernet via a network interface (ethernet) on, but the present invention is not limited with Ethernet NIC and Ethernet.This preferred embodiment includes a writing controller 1, a Read Controller 2, a transmission buffer 3 (i.e. a first-in first-out buffer), a downloading determining device 4 and one directly store Device access engine (Direct Memory Access engine, abbreviation DMA engine) 5.The writing controller 1 output one Pointer is written, which exports a reading pointer, and the downloading determining device 4 includes a pointer difference calculator 41, one Ruling calculator 42 and a comparison circuit 43.Wherein, which can export one first reservation length (i.e. one is default Length) and one second reservation length.
The comparison circuit 43 is with a first comparator CMP1, one second comparator CMP2, one first and door AND1, one Second with door AND2, one first multiplexer MUX1, one second multiplexer MUX2 and a buffer FF, equal couplings relationship As shown in Figure 2.It note that the comparison circuit 43 is only a preferred embodiment, not limitation of the present invention, this technology neck Domain tool usually intellectual can apparent same logical operation is realized using different circuit designs, such as this compares Circuit can also a digital signal processing unit (Digital Signal Processing Unit) realize.
Whether the output that first comparator CMP1 compares pointer difference calculator 41 is not more than the first reservation length, this Whether the output that two comparator CMP2 compare pointer difference calculator 41 is greater than the second reservation length.Buffer FF can be by exporting One downloading state instruction (i.e. an indication signal, can indicate the data access device 100 whether from the host 6 receive data), and The complementary state instruction being complementary by output one.First result with door AND1 based on first comparator CMP1 with it is previous Complementary state indicates to determine to export, this second with result of the door AND2 based on second comparator CMP2 and previous downloading shape State indicates to determine to export.The first multiplexer MUX1 first is controlled with the output of door AND1 by this and to be chosen one first and set Definite value SET_A or the instruction of previous download state.The second multiplexer MUX2 is controlled to come by the output of the second and door AND2 The output of one second setting value SET_B or first multiplexer MUX1 are chosen, to be sent to buffer FF.
Wherein, due to starting at the beginning in the data access device 100, the write-in pointer is identical as the reading pointer meaning, So that the transmission buffer 3 have maximum can memory space, thus download state instruction is preset as representing executable downloading 0 value, complementary state instruction are preset as 1.Then during the running of the data access device 100, which can root Classified data is downloaded from the host 6 according to the write-in pointer, and packet data is delivered to by Ethernet according to the reading pointer Network.
Fig. 3 and Fig. 4 are please referred to, the preferred embodiment that the present invention is applied to the data access device 100 of communication system is held Capable data access method comprises the steps of:
Step 81:The host 6 issues one, and there is the request to be processed of plural number prompt to give the Ethernet NIC, and prompt each time is used To notify its main memory 61 to have a packet data to be processed.And after Ethernet NIC receives prompt, DMA can be promoted Engine 5 issues an access request of data to host 6.
Step 82:The writing controller 1 and the Read Controller 2 update the write-in pointer and the reading pointer respectively, with Two pointer is informed into the downloading determining device 4.
Step 83:The downloading determining device 4 compares the write-in pointer and the reading pointer, with comparison circuit as shown in Figure 2 43 come determine from the main memory 61 download packet data opportunity.
And step 83 includes following sub-step:
Sub-step 831:The pointer difference calculator 41 calculates the distance between the write-in pointer and the reading pointer and obtains a finger Needle is poor.
Sub-step 832:The ruling calculator 42 receives one and is required the re-transmission length B retransmitted when colliding, and connects A protection band (guard band) length G (can be positive integer or zero) is received, the two is added to obtain the first reservation length. Wherein, the effect of protection band is to increase the safe distance of write-in pointer and reading pointer.
In the present embodiment, in order to avoid 100 too frequent of data access device downloads packet data, the ruling calculator 42, which more retain length for first, adds a critical value, and will add up result and be considered as the second reservation length.Wherein, critical value can be Zero.In an alternative embodiment of the invention, the design for omitting the second reservation length equally can reach aforementioned critical value and be set as zero Effect, that is,:The the second comparator CMP2, second and door AND2 and the second multiplexer MUX2 of Fig. 2 and Fig. 5 are removed, and is left out The second signal for retaining length that second setting value SET_B and ruling calculator 42 are sent out, while by the first multiplexer The output of MUX1 is directly sent to buffer FF.
The ruling calculator 42 more receives the pointer difference, and is deducted the first reservation length and obtain a maximum downloading length Degree, to indicate maximum amount of data that the DMA engine 5 can be downloaded.
Sub-step 833:First comparator CMP1 compares whether the pointer difference is not more than the first reservation length.If than Relatively result be it is no, previous download state instruction (0 value) is transmitted to via the first multiplexer MUX1 and the second multiplexer MUX2 Buffer FF, thus buffer FF is caused to maintain the download state instruction (executable downloading) of 0 value, then jump to step 84.
If comparison result be it is yes, the first setting value SET_A (1 value) is via the first multiplexer MUX1 and more than second Business device MUX2 is transmitted to buffer FF, thus buffer FF is caused (can not to execute down the download state instruction for generating 1 value Carry), then jump to sub-step 834.
Sub-step 834:The write-in pointer is remained unchanged because that can not execute downloading, which is referred to by write-in Needle control and update reading pointer, make to release more can memory space, for execute downloading prepare.
Sub-step 835:Second comparator CMP2 compares whether the pointer difference is greater than the second reservation length.If comparing As a result be it is no, previous download state instruction (1 value) is transmitted to slow via the first multiplexer MUX1 and the second multiplexer MUX2 Storage FF, thus the download state for causing buffer FF that will maintain 1 value (can not execute downloading) indicates, then jumps back to sub-step 834。
If comparison result be it is yes, the second setting value SET_B (0 value) is transmitted to caching via the second multiplexer MUX2 Device FF, thus the download state for causing buffer FF to generate 0 value instruction (executable downloading) is caused, then jump to step 84.
So by the explanation of step 83 it is understood that when downloading state instruction is 0 (executable downloading), the downloading Determining device 4 is to retain length until pointer difference is not more than first, and download state instruction is just switched to 1 (can not execute downloading). And when downloading state instruction is 1 (can not execute downloading), which is to retain length until pointer difference is greater than second Download state instruction is just switched to 0 (executable downloading) by degree.
And under the situation that the critical value is zero (or the relevant design situation of the second reservation length is omitted as previously described Under), first, which retains length, is equal to the second reservation length, if download state refers at this point, pointer difference, which is greater than first, retains length Show and is switched to 0 (executable downloading);If pointer difference retains length no more than first, download state instruction is switched to 1 (can not Execute downloading).
Step 84:Host 6 refers to because receiving the access request of data from DMA engine 5 with the download state that 0 value is presented Show, and issuing one, there is the write request (i.e. one control signal) of plural number prompt to update write-in pointer to writing controller 1, Wherein each prompt of the write request corresponds to each prompt of the request to be processed, for indicating that the transmission buffer 3 can It carries out handling this pending data.The DMA engine 5 is further according to the maximum downloading length from the ruling calculator 42 Maximum download is determined, to carry out data downloading movement.Then, step 81 is jumped back to, the next time to be processed of host 6 is waited to ask The prompt asked.
The embodiment (such as Fig. 2) of the writing controller 1 can be with an accumulator W1, a multiplexer W2 and one Buffer W3.Multiplexer W2 is controlled by write request and is chosen the output by the output of buffer W3 or accumulator W1 It is sent to buffer W3.Only embodiment is not limited.Inventor wishes to retain the online of W3/Q to W1.
It is worth noting that, the DMA engine 5 is controlled by access request of data and download state instruction in this preferred embodiment System, and penetrate host 6 and issue the write request to control writing controller 1;It, can also be with but in another embodiment (such as Fig. 5) It is not indicated with the download state to influence the actuation of the DMA engine 5, but is indicated by the host and the complementary state common Write request is issued to the writing controller 1 through a DMA buffer control unit 7, it is made to update the write-in pointer.Certainly, may be used It is showed with other embodiment.In an alternative embodiment of the invention, the buffer FF of the comparison circuit 43 can be omitted, but The framework of comparison circuit 43 has then needed corresponding adjustment.
Pointer relationship is referring to Fig. 6, Fig. 6 illustrates the write-in pointer and the reading pointer relative to the transmission buffer 3 Relational graph.It shows that 3 length of transmission buffer is S, and having downloaded block length is P, and the storage location being grouped in downloading connects Continue after having downloaded grouping and has been written into length C.
It is read out using reading pointer to grouping has been downloaded, and reads data length X, and for possible generation Collision problem remains rigid reading part point and retransmits length B and protection strip length G.On the other hand, write-in pointer is with downloading The download progress of middle grouping and change, and the unread part (P-X) in addition to having downloaded grouping and retain part (B+G) and Be grouped in downloading have been written into part (C), rest part (S- ((P-X)+(B+G)+C)) can be considered can overwrite area, also It is the maximum downloading length that the ruling calculator 42 provides.At this point, the pointer difference between write-in pointer and reading pointer is equivalent to (S-((P-X)+C))。
Start at the beginning in the data access device 100, grouping (P=0) has not been downloaded in the transmission buffer 3, so Ignore and read data length X, retransmitted length B and protection strip length G, transmission buffer 3 has maximum memory space S at this time. And with have been written into part (C) increase, can overwrite area (S-C) will reduce.
In conclusion the present invention be applied to communication system data access device 100 by the comparison circuit 43 in due course according to Packet data is downloaded according to the relative condition of the write-in pointer and the reading pointer, the memory space of transmission buffer 3 can be saved And lossless throughput, therefore the purpose of the present invention can be reached really.
The foregoing is merely presently preferred embodiments of the present invention, when that cannot be limited the scope of implementation of the present invention with this, i.e., generally According to simple equivalent changes and modifications made by scope of the present invention patent and invention description content, as long as that is, according to writing Enter the opportunity that pointer carrys out determination data access at a distance from reading pointer, all belongs to the range that the invention patent may cover.

Claims (1)

1. a kind of data access device applied to communication system and, it is characterised in that:The data access device includes:Write-in Controller, the control signal issued according to the host determine write-in pointer;Read Controller is determined according to the write-in pointer Determine reading pointer;Determining device is downloaded, for judging whether to receive number from the host with the reading pointer according to the write-in pointer According to, including:Pointer difference calculator, to calculate the spacing of the write-in pointer and the reading pointer to generate pointer difference;And ratio Compared with circuit, for exporting indication signal according to the pointer difference and preset length, with indicate the data access device whether from this Host receiving data;And first-in first-out buffer, according to the write-in pointer from the host receiving data, and referred to according to the reading Needle transfers data to the network interface.
CN201810716018.XA 2018-06-30 2018-06-30 A kind of data access device and method applied to communication system Withdrawn CN108897705A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810716018.XA CN108897705A (en) 2018-06-30 2018-06-30 A kind of data access device and method applied to communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810716018.XA CN108897705A (en) 2018-06-30 2018-06-30 A kind of data access device and method applied to communication system

Publications (1)

Publication Number Publication Date
CN108897705A true CN108897705A (en) 2018-11-27

Family

ID=64347595

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810716018.XA Withdrawn CN108897705A (en) 2018-06-30 2018-06-30 A kind of data access device and method applied to communication system

Country Status (1)

Country Link
CN (1) CN108897705A (en)

Similar Documents

Publication Publication Date Title
US7464199B2 (en) Method, system, and program for handling Input/Output commands
US20210240650A1 (en) Methods and devices for extending usb 3.0-compliant communication over an extension medium
JP3127523B2 (en) Communication control device and data transmission method
US8402180B2 (en) Autonomous multi-packet transfer for universal serial bus
US20220066636A1 (en) Memory system and controlling method
EP3159803A1 (en) Data storage method and network interface card
CN1139220C (en) Half duplex uart control for single channel bi-directional wireless communications
CN116627869B (en) Data transmission method and device applied to electronic equipment
US20230315675A1 (en) Techniques for deconflicting usb traffic in an extension environment
CN110995507B (en) Network acceleration controller and method
US6801963B2 (en) Method, system, and program for configuring components on a bus for input/output operations
CN109408426B (en) Flexible and universal serial communication method and system
US6363076B1 (en) Phantom buffer for interfacing between buses of differing speeds
CN101616068B (en) Data access device and method applied to communication system
US6820140B2 (en) Method, system, and program for returning data to read requests received over a bus
CN108897705A (en) A kind of data access device and method applied to communication system
CN111026694A (en) Data receiving method, data receiving apparatus, image forming system, and electronic apparatus
CN116132532A (en) Message processing method and device and electronic equipment
CN113992608B (en) Network transceiver packet path optimization method, device and storage medium
EP4040735A1 (en) Vehicle control device and data transfer control method
TWI416336B (en) Nic with sharing buffer and method thereof
US9350686B2 (en) Data access device and method for communication system
JP2835487B2 (en) Printer buffer
CN118132474A (en) DMA-based data transmission system
EP1195685B1 (en) A process for interfacing a microprocessor with a packet based device and respective system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20181127

WW01 Invention patent application withdrawn after publication