CN101777037B - Method and system for searching data transmission in engine real-time system - Google Patents

Method and system for searching data transmission in engine real-time system Download PDF

Info

Publication number
CN101777037B
CN101777037B CN 201010110829 CN201010110829A CN101777037B CN 101777037 B CN101777037 B CN 101777037B CN 201010110829 CN201010110829 CN 201010110829 CN 201010110829 A CN201010110829 A CN 201010110829A CN 101777037 B CN101777037 B CN 101777037B
Authority
CN
China
Prior art keywords
request command
result
cpu
coprocessor
submodule
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
CN 201010110829
Other languages
Chinese (zh)
Other versions
CN101777037A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN 201010110829 priority Critical patent/CN101777037B/en
Publication of CN101777037A publication Critical patent/CN101777037A/en
Priority to PCT/CN2010/077126 priority patent/WO2011095012A1/en
Application granted granted Critical
Publication of CN101777037B publication Critical patent/CN101777037B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/28Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Advance Control (AREA)

Abstract

The invention discloses a method for searching data transmission in an engine real-time system, particularly comprising the following steps: a CPU receives and stores a request command; the request command is encapsulated and a request command packet is sent to a buffer in a coprocessor; the coprocessor reads the request command packet and analyzes the request command to execute corresponding operation; an execution result is written into the buffer, the execution result is encapsulated after full execution and then a result data packet is returned; the CPU analyzes the result data packet and checks the execution result, and then removes the correspondingly finished request command and waits the next request command; and the invention also comprises a system for searching data transmission in the engine real-time system, on the basis of the method and the system of the invention, the transmission efficiency can be improved, the excessive occupation of CPU resource can be avoided, and the stable and reliable operation of a CPU system can be ensured.

Description

The method and system of data transmission in a kind of Lookup engine real-time system
Technical field
The present invention relates to the real time operating system of computer realm, refer in particular to the method and system of data transmission in a kind of Lookup engine real-time system.
Background technology
Real time operating system (Real Time Operating System, RTOS) be the operating system that guarantees to complete specific function in the certain hour restriction, its principal feature is that central processing unit (Central ProcessingUnit, CPU) need to be completed certain operation in setting time.Widespread use along with real time operating system, required type of service to be processed also constantly increases, generally, CPU need to complete the task of carrying out data interaction with external unit in setting time, and these data interaction tasks have following characteristics: 1, once data transmission quantity is little; 2, need to guarantee real-time Transmission; 3, the execution time of transmission is uncertain; 4, need data transmission frequently; 5, transmission reliability is had relatively high expectations.
Lookup engine (Search Engine) is the critical function module of the equipment such as router, three-tier switch, mainly completes the hardware-accelerated of the operations such as route querying, packet classification.Because there is real-time update in route table items, so Lookup engine adopts aforesaid real time operating system to realize usually.
At present, the Lookup engine of high bandwidth uses ternary content addressable internal memory (Ternary ContentAddressable Memory, TCAM) usually.TCAM can support exact matching, longest prefix match and any position coupling, can also return results within a memory access cycle, and adopt the general repeatedly memory access of other technologies just can return results.Therefore, utilize the Lookup engine of TCAM to adopt the Lookup engine of similar technology to possess obvious advantage than other.But, be subject to the restriction of current technological level, the seek rate of TCAM is difficult to increase substantially again, simultaneously capacity also be difficult to accomplish very large, and expensive, power consumption is very large.
Now, because the continuous expansion of network capacity causes the reasons such as route table items increase, route oscillation, therefore, in the Lookup engine of realizing by real time operating system, CPU need to carry out a large amount of various operations such as route table items renewal to the coprocessor of plug-in TCAM, making needs between CPU and coprocessor frequently to carry out request command and return to execution result, cause the problems such as the route table items update efficiency is low, CPU usage is high, simultaneously, low data bulk frequently alternately also the docking port bandwidth cause waste, can't guarantee Systems balanth and reliability.
Summary of the invention
In view of this, fundamental purpose of the present invention is to provide the method and system of data transmission in a kind of Lookup engine real-time system, improves the transfer efficiency of interface, discharges the processing pressure of CPU, and avoiding frequently, command interaction takies too much cpu resource.
For achieving the above object, technical scheme of the present invention is achieved in that
The invention provides the method for data transmission in a kind of Lookup engine real-time system, described method comprises:
CPU receives and the storage resource request order;
When timer overflows or reach fixing request command number, with the described request Command encapsulate and send the buffer memory of request command bag in the coprocessor; Described fixing request command number is initiated frequency, request command packet length, interruption treatment effeciency and coprocessor internal resource according to different application scenarios, comprehensive request command and is selected;
Coprocessor reads described request order bag, and parses request command execution corresponding operating;
Coprocessor writes buffer memory with execution result, waits for and all carries out the rear use described execution result of encapsulation and return results packet;
CPU resolves described result data bag, removes the corresponding request command of completing after the verification execution result, waits for next request command.
Wherein, after described CPU analysis result packet verification execution result, also comprise:
When request command corresponding to described execution result is dropped or during the request command execution error, retransmits the described request order.
Wherein, in described CPU storage resource request commands steps, specifically comprise:
Described CPU is cached to request command in external memory storage.Wherein, different according to the purpose Lookup engine of described request order when a plurality of plug-in Lookup engine of described CPU management, the described request order is cached in corresponding external memory storage.
Wherein, described coprocessor writes execution result in the buffer memory step, specifically comprises:
When the same described coprocessor of a plurality of CPU management, described coprocessor arranges CPU corresponding to a plurality of inner buffers, is used for storing respectively the described execution result of the described request order bag that corresponding different CPU sends over.
Wherein, the method with the described request Command encapsulate specifically comprises:
The encapsulation principle is to select the request command of same kind; And/or the similar request command of type; And/or data volume is little and need frequently that the request command of data transmission is packaged together;
The request command bag of encapsulation specifically comprises: packet start field, device number field, packet length field, order type field, order length field, order data field, check field and packet trailer field.
Wherein, the described method that returns results packet specifically comprises: return to described result data bag by interrupt mode or inquiry mode.
The present invention also provides the system of data transmission in a kind of Lookup engine real-time system, and described system comprises: CPU module and co-processor module, wherein,
Described CPU module, be used for receiving and the storage resource request order, when timer overflows or reach fixing request command number, request command is packaged into the request command bag and sends to described co-processor module, after the result data bag returns, remove the corresponding request command of completing after analysis result packet verification execution result, wait for next request command; Described fixing request command number is initiated frequency, request command packet length, interruption treatment effeciency and coprocessor internal resource according to different application scenarios, comprehensive request command and is selected;
Described co-processor module is used for reading described request order bag, and parses described request command execution corresponding operating; Execution result is write buffer memory, after waiting for all execution, execution result is packaged into described result data bag and returns.
Wherein, described CPU module comprises: request command classification and control submodule, request command encapsulate submodule, analyzing sub-module and interpretation of result as a result and retransmit submodule, wherein,
Described request command catalog and control submodule is used for receiving and store the request command that operation layer sends, and sends to described request Command encapsulate submodule to encapsulate the described request command catalog according to encapsulating principle after meeting the encapsulation condition;
Described request Command encapsulate submodule is used for receiving the described request command catalog and controls the described request order that submodule sends, and encapsulates, and sends to described coprocessor;
Described analyzing sub-module as a result is used for resolving the described result data bag that returns, and the described execution result that parses is passed to described interpretation of result and retransmits submodule;
Described interpretation of result and re-transmission submodule are used for the described execution result of verification, return to the described request command catalog and control submodule and remove the corresponding request command of completing, and wait for next request command.
Wherein, described Co-processor Module also comprises: coprocessor request command analyzing sub-module, request command implementation sub-module, coprocessor result encapsulation submodule,
Described coprocessor request command analyzing sub-module is used for parsing the described request order of request command bag, and with the described request command routing to described request command execution submodule;
Described request command execution submodule is used for carrying out the described request order and execution result is passed to described coprocessor result encapsulation submodule;
Described coprocessor result encapsulation submodule is used for the described execution result that the transmission of encapsulation described request command execution submodule comes, and returns results packet to the CPU module.
Wherein, described interpretation of result and re-transmission submodule also are used in verification:
When request command corresponding to described execution result is dropped or during the execution result mistake of described request order, returns to described request Command encapsulate submodule and retransmit the described request order.
Wherein, described request command catalog and the order of control submodule store request specifically comprise:
Described request command catalog and the order of control submodule cache request, wherein different according to the purpose Lookup engine of request command when an a plurality of plug-in Lookup engine of CPU module management, request command is cached in corresponding different buffer memorys.
Wherein, described coprocessor result encapsulation submodule also needs the described execution result of buffer memory before encapsulation, specifically comprise:
When the same coprocessor of a plurality of CPU module management, coprocessor result encapsulation submodule arranges CPU corresponding to a plurality of inner buffers, is used for storing respectively the described execution result of the described request order bag that corresponding different CPU sends over.
the method and system of raising Lookup engine data transmission efficiency provided by the present invention, type and transmission needs according to request command or execution result, request command or execution result are encapsulated, form with packet is transmitted, can increase the quantity of information of each bus transfer, under the prerequisite that does not change TCAM, improve the transfer efficiency of interface, reduce the execution frequency of request command or increase the polling interval in setting time simultaneously, interrupt when significantly reducing execution result and returning or the frequency of inquiry, discharge the processing pressure of CPU, avoid too much occupied of cpu resource, guarantee the stable and reliability service of cpu system.
Description of drawings
Fig. 1 is the structural representation of Lookup engine real-time system;
Fig. 2 is the method flow schematic diagram that the present invention improves the Lookup engine data transmission efficiency;
Fig. 3 is the request command pack arrangement schematic diagram of the encapsulation of the update instruction between CPU and Lookup engine in the present invention;
Fig. 4 a is the organigram of a kind of DEV_ID decoding in the present invention;
Fig. 4 b is the organigram of a kind of CMD_TYPE decoding in the present invention;
Fig. 5 is the system architecture schematic diagram that the present invention improves the Lookup engine data transmission efficiency;
Fig. 6 is the detailed structure view that the present invention improves the system of Lookup engine data transmission efficiency.
Embodiment
For a better understanding of the present invention, first introduce the Lookup engine real-time system, as shown in Figure 1: Lookup engine generally includes: CPU 11, external memory storage 12, bridge sheet 13, coprocessor 14 and TCAM 15.
CPU 11, are used for the control and management of system.Usually also comprise the parts such as IO controller, inner cache in CPU.When CPU can carry out according to program, the requirement of every instruction, send control signal to storer, arithmetical unit, input-output device, controls the operation of computing machine various piece.Mainly be responsible in the present invention the functions such as route calculating, Lookup engine renewal and system's control and management.Inner cache configuration makes the speed of CPU Information Access information be improved; The IO controller is the interface of CPU 11 and external unit communication.
External memory storage 12 is memory storages of establishing in order to make up the not enough and longer-term storage information of CPU 11 memory sizes, is generally used for request command that the storage service layer sends etc.
Bridge sheet 13 claims again the outside interconnection of high speed (PCI-E/PCI), is used for connecting CPU 11 and coprocessor 14.In the situation that the plug-in one or more coprocessors 14 of one or more CPU 11 need to be set up point-to-point communication modes between each CPU 11 and each coprocessor 14 by bridge sheet 13.
Coprocessor 14 is used for making to carry out computing together with CPU 11.The function of coprocessor 14 is to realize substituting the instruction of several softwares in hardware.By with the Multiple Code instruction as single instruction, reduced the number of code command, and the mode that directly realizes instruction in hardware, code is accelerated.Coprocessor 14 by plug-in TCAM, is completed the forward process of IP message in the present invention.Generally described coprocessor 14 can pass through network processing unit, programmable gate array (Field ProgrammingGate Array, FPGA), and other special ICs (Application Specific IntegratedCircuits, ASIC) are realized.
TCAM 15, are used for realizing the Lookup engine function.
Basic thought of the present invention is in above-mentioned framework, and at first CPU receives and the storage resource request order; Request command is encapsulated as the request command bag and sends to buffer memory in coprocessor; Coprocessor read requests order bag, and parse request command execution corresponding operating; Execution result is write buffer memory, wait for that all carrying out rear encapsulation execution result is the result data bag and returns; Remove the corresponding request command of completing after CPU analysis result packet verification execution result, wait for next request command.
The technical solution of the present invention is further elaborated below in conjunction with the drawings and specific embodiments.
Fig. 2 is a kind of method flow schematic diagram that improves the Lookup engine data transmission efficiency of the present invention, as shown in Figure 2, the present invention includes following steps:
Step 201, CPU receives and the storage resource request order;
Concrete, CPU receives the request command that is sended over by operation layer, and request command is cached in external memory storage.Wherein, different according to the different Lookup engines of purpose of request command when a plurality of plug-in Lookup engine of this CPU management, request command is cached in corresponding external memory storage.Described request command can be the update instruction between CPU and Lookup engine.
Step 202, the package request order;
Concrete, when timer overflows or reach fixing request command number, carry out encapsulation operation for request command.If between request command interval time long, adopt to wait for the mode of fixed number encapsulation can causing request in time not carry out, corresponding service or function are impacted.Therefore adopt the mode of timer or fixed number encapsulation to encapsulate.Concrete, when request command is intensive, employing encapsulates when reaching the request command of fixed number, and described fixed number is according to different application scenarios, and comprehensive request command initiates frequency, request command packet length, it is selected to interrupt after the factors such as treatment effeciency and coprocessor internal resource; And when request command is sparse, adopt to wait for the set time encapsulation, the described set time can specifically be set as required, as: 1 microsecond or 1 millisecond.The encapsulation principle of request command is according to actual conditions, selects the request command of same kind or the similar request command of type to be packaged together as far as possible, can make like this encapsulation simpler; Can also be with data volume little and need frequently that the request command of data transmission is packaged together, as needs frequently interrupt notification CPU process, perhaps the CPU request command that needs inquiry mode frequently to read the coprocessor data is packaged together.Adopt and wait for the set time and according to above-mentioned encapsulation principle, request command encapsulated, can reduce the execution frequency of request command or increase the polling interval in setting time.
Concrete, the request command packaged type is illustrated in figure 3 as the request command pack arrangement schematic diagram that the update instruction between CPU and Lookup engine encapsulates, and each request command bag is made of following field:
SOP 301: the packet start field, represent the initial of a packet, the SOP field can be a fixing signless integer of 32 or a cumulative sequence of data packet descriptor, wraps in the memory block and the border between a upper packet in order to identify data;
DEV_ID 302: the device number field, describe the destination address of current packet, Fig. 4 a has listed a kind of possible DEV_ID decoding, for example, the destination address of 0 this packet of expression is CPU0, and the destination address of 4 these packets of expression is first Lookup engines in system;
PKT_LEN 303: the packet length field, and the total length of description current data packet, coprocessor can come the analysis request order according to this field;
CMD_TYPE 304: order type field, the command type of current data packet is described, Fig. 4 b has listed a kind of possible CMD_TYPE decoding, 0 expression Lookup engine read command, 1 expression Lookup engine is write register command, 2 expression Lookup engines are write data command, 3 expression Lookup engine look-up commands, 4 expression Lookup engine delete commands, 5 expression coprocessor read register orders, 6 expression coprocessors are write register command, 7 expression coprocessor read data orders, and 8 expression coprocessors are write data command
CMD_LEN 305: the order length field, the current command length is described, and request command encapsulation hour hands encapsulate the difficulty that can reduce encapsulation and resolve to isometric request command, also can carry out for not isometric order during actual package;
CMD_DATA 306: the order data field, describe and fill the packet that encapsulates, fill for not isometric request command, send according to equal length, be that different request command packet lengths are identical, can greatly reduce the cost of coprocessor side command analysis;
CRC 307: check field is used for the request command bag of encapsulation is carried out verification, for the interface data transmission CRC(Cyclic Redundancy Check of high reliability) be necessary very much, the below lists a kind of possible CRC32 polynomial expression:
1+x1+x2+x4+x5+x7+x8+x10+x11+x12+x16+x22+x23+x26+x32
EOP 308: the packet trailer field, the end of a packet of expression, the EOP field can be a fixing signless integer of 32 or a cumulative sequence of data packet descriptor, is used for data of sign and wraps in border between memory block and next packet.
Step 203 sends the request command bag;
Concrete, because the data volume after encapsulation is larger, therefore can utilize direct memory access (DirectMemory Access, DMA) controller transmits, at first CPU carries out initialization to dma controller, and send operational order to the IO controller, then, after executing current transmission, CPU at once hangs up or only carries out built-in function, after obtaining outside interconnection control by dma controller, the output read write command directly transmits data, and the efficient of CPU is greatly improved, and has improved simultaneously the utilization factor of bus bandwidth.The request command bag that sends preferably first carries out CRC check, to guarantee the integrality of data.Described request order bag sends in the inner buffer of coprocessor, and when the same coprocessor of a plurality of CPU management, coprocessor need to arrange CPU corresponding to a plurality of inner buffers, is used for storing respectively the request command bag that different CPU sends over.
Step 204, parses request command at coprocessor read requests order bag;
Concrete, coprocessor is read the request command bag in buffer memory internally, and checks the crc field of request command bag, when verification makes mistakes, needs notice CPU to retransmit, to guarantee the reliability of system.The command analysis of coprocessor inside can be realized by hardware, when using network processing unit, can utilize the microcode in network processing unit partly to realize.
Step 205, coprocessor is carried out request command, and execution result is write corresponding buffer memory;
Concrete, coprocessor is carried out request command in order, and in the buffer memory with the corresponding different CPU described in execution result write step 203.
Step 206 waits for that all command execution are complete, all execution results is encapsulated, and return results packet;
Concrete, wait for that all command execution are complete, all execution results are encapsulated according to the method for packing of describing in step 202.The encapsulation of coprocessor inside can be realized by hardware, when using network processing unit, can utilize the microcode in network processing unit partly to realize.The method that returns results packet can be by interrupt mode or inquiry mode and other existing methods.
When returning results packet by interrupt mode, coprocessor sends result to CPU and is ready to return interruption, the reading result packet of having no progeny during CPU receives and returns.Wherein, the result that coprocessor sends is ready to return interruption and preferably takies the fixing interrupt pin of CPU, if adopt interrupt, namely with the multiplexing interrupt pin of a plurality of interruptions of system, need to read interrupt register judgement interrupt type, can affect the treatment effeciency of interruption.
When returning results packet by inquiry mode, coprocessor is put result and is ready to sign, CPU adopts the result of Fixed Time Interval inquiry coprocessor to be ready to sign, inquire result and be ready to indicate rear reading result packet, and the removing result is ready to sign.Wherein, choosing of the time interval can be chosen according to combined factors such as the quantity that returns results packet that encapsulates and route table items renewal frequencies.Realize by timer, enable timer when CPU sends the request command bag, timeing closing device when not having new request command bag to send after the result data bag returns can better reduce the utilization factor of CPU like this.
Step 207, CPU reading result packet is also resolved, and has judged whether that request command is dropped, when having request command to be dropped, execution in step 208; Normally carried out when request command, execution in step 209;
Wherein, take N(N as 1,2,3 ... natural number) individual request command is encapsulated as example, coprocessor can return to N execution result equally.Each execution result has fed back the situation whether corresponding request command is executed correctly, CPU need to check each execution result, when occurring there is no the situation of execution result, illustrates that corresponding request command is dropped, when perhaps mistake appears in execution result, all need to resend request command.In order to guarantee the performance of system, the request command that resends can be sent into next encapsulation process, encapsulate and send together with new request command that operation layer sends.
Step 208 is returned to step 202 and is retransmitted the request command that is dropped;
Step 209 returns to operation layer with execution result or directly abandons and return step 201 and removes the correct request command of carrying out and wait for new request command.
Fig. 5 is the system architecture schematic diagram that the present invention improves the Lookup engine data transmission efficiency, and this system comprises CPU module 51 and co-processor module 52, wherein,
CPU module 51, be used for receiving and the storage resource request order, request command be encapsulated as the request command bag and send to co-processor module 52, after the result data bag returns, remove the corresponding request command of completing after analysis result packet verification execution result, wait for next request command;
Co-processor module 52 is used for read requests order bag, and parses request command execution corresponding operating; Execution result is write buffer memory, wait for that all carrying out rear encapsulation execution result is the result data bag and returns.
Fig. 6 is the detailed structure view that the present invention improves the system of Lookup engine data transmission efficiency, this system comprises: request command classification and control submodule 601, request command encapsulation submodule 602, coprocessor request command analyzing sub-module 603, request command implementation sub-module 604, coprocessor result encapsulate submodule 605, analyzing sub-module 606 and interpretation of result as a result and retransmit submodule 607, wherein
Request command classification and control submodule 601 is arranged in CPU module 51, is used for receiving and stores the request command that operation layer sends, and meeting after the encapsulation condition classifies request command according to the encapsulation principle sends to request command to encapsulate submodule 602 to encapsulate;
Concrete, request command classification and control submodule 601 receive the request command that is sended over by operation layer, and with the request command buffer memory.Wherein, different according to the different Lookup engines of purpose of request command when an a plurality of plug-in Lookup engine of CPU management, request command is cached in corresponding different buffer memorys.Described request command can be the update instruction between CPU and Lookup engine.When timer overflows or reach fixing request command number, meet the condition that encapsulates, request command can be sent to request command encapsulation submodule 602 to encapsulate.If between request command interval time long, adopt to wait for the mode of fixed number encapsulation can causing request in time not carry out, corresponding service or function are impacted.Therefore adopt the mode of timer or fixed number encapsulation to encapsulate.Concrete, when request command is intensive, employing encapsulates when reaching the request command of fixed number, and described fixed number is according to different application scenarios, and comprehensive request command initiates frequency, request command packet length, it is selected to interrupt after the factors such as treatment effeciency and coprocessor internal resource; And when request command is sparse, adopt to wait for the set time encapsulation, the described set time can specifically be set as required, as: 1 microsecond or 1 millisecond.The described encapsulation principle of request command is according to actual conditions, selects the request command of same kind or the similar request command of type to be packaged together as far as possible, can make like this encapsulation simpler; Can also be with data volume little and need frequently that the request command of data transmission is packaged together, as needs frequently interrupt notification CPU process, perhaps the CPU request command that needs inquiry mode frequently to read the coprocessor data is packaged together.Adopt and wait for the set time and according to above-mentioned encapsulation principle, request command encapsulated, can reduce the execution frequency of request command or increase the polling interval in setting time.
Request command encapsulation submodule 602 is arranged in CPU module 51, is used for the reception request command classification and controls the request command that submodule 601 sends, and encapsulates, and sends to coprocessor request command analyzing sub-module 603;
Concrete, the request command packaged type is illustrated in figure 3 as the request command pack arrangement schematic diagram that the update instruction between CPU and Lookup engine encapsulates, and each request command bag is made of following field:
SOP 301: the packet start field, represent the initial of a packet, the SOP field can be a fixing signless integer of 32 or a cumulative sequence of data packet descriptor, wraps in the memory block and the border between a upper packet in order to identify data;
DEV_ID 302: the device number field, describe the destination address of current packet, Fig. 4 a has listed a kind of possible DEV_ID decoding, for example, the destination address of 0 this packet of expression is CPU0, and the destination address of 4 these packets of expression is first Lookup engines in system;
PKT_LEN 303: the packet length field, and the total length of description current data packet, coprocessor can come the analysis request order according to this field;
CMD_TYPE 304: order type field, the command type of current data packet is described, Fig. 4 b has listed a kind of possible CMD_TYPE decoding, 0 expression Lookup engine read command, 1 expression Lookup engine is write register command, 2 expression Lookup engines are write data command, 3 expression Lookup engine look-up commands, 4 expression Lookup engine delete commands, 5 expression coprocessor read register orders, 6 expression coprocessors are write register command, 7 expression coprocessor read data orders, and 8 expression coprocessors are write data command
CMD_LEN 305: the order length field, the current command length is described, and request command encapsulation hour hands encapsulate the difficulty that can reduce encapsulation and resolve to isometric request command, also can carry out for not isometric order during actual package;
CMD_DATA 306: the order data field, describe and fill the packet that encapsulates, fill for not isometric request command, send according to equal length, be that different request command packet lengths are identical, can greatly reduce the cost of coprocessor side command analysis;
CRC 307: check field is used for the request command bag of encapsulation is carried out verification, for the interface data transmission CRC(Cyclic Redundancy Check of high reliability) be necessary very much, the below lists a kind of possible CRC32 polynomial expression:
1+x1+x2+x4+x5+x7+x8+x10+x11+x12+x16+x22+x23+x26+x32
EOP 308: the packet trailer field, the end of a packet of expression, the EOP field can be a fixing signless integer of 32 or a cumulative sequence of data packet descriptor, is used for data of sign and wraps in border between memory block and next packet.
In described process of transmitting, because the data volume after encapsulation is larger, therefore can utilize dma controller to transmit, at first CPU carries out initialization to dma controller, and sends operational order to the IO controller, then, at once hang up or only carry out built-in function after CPU executes current transmission, after obtaining outside interconnection control by dma controller, the output read write command directly transmits data, the efficient of CPU is greatly improved, improved simultaneously the utilization factor of bus bandwidth.The request command bag that sends preferably first carries out CRC check, to guarantee the integrality of data.Described request order bag sends in the inner buffer of coprocessor request command analyzing sub-module 603, when the same coprocessor of a plurality of CPU management, coprocessor request command analyzing sub-module 603 need to arrange CPU corresponding to a plurality of inner buffers, is used for storing respectively the request command bag that different CPU sends over.
Coprocessor request command analyzing sub-module 603 is arranged in co-processor module 52, is used for the request command of analysis request order bag, and request command is passed to request command implementation sub-module 604;
Concrete, coprocessor request command analyzing sub-module 603 is read the request command bag in buffer memory internally, and checks the crc field of request command bag, when verification makes mistakes, needs notice CPU to retransmit, to guarantee the reliability of system.The command analysis of coprocessor request command analyzing sub-module 603 inside can be realized by hardware, when using network processing unit, can utilize the microcode in network processing unit partly to realize.
Request command implementation sub-module 604 is arranged in co-processor module 52, is used for carrying out request command and execution result is passed to coprocessor result encapsulation submodule 605;
Concrete, request command implementation sub-module 604, carry out in order request command, and execution result is write in the interior buffer memory of coprocessor result encapsulation submodule 605, when the same coprocessor of a plurality of CPU management, coprocessor result encapsulation submodule 605 need to arrange CPU corresponding to a plurality of inner buffers, is used for storing respectively the execution result of the request command bag that corresponding different CPU sends over.When request command is when upgrading for route table items, the request command execution module is completed the operation of the renewal of route table items.
Coprocessor result encapsulation submodule 605 is arranged in co-processor module 52, is used for package request command execution submodule 604 and transmits the execution result of coming, and return results packet;
Concrete, wait for that all command execution are complete, all execution results are encapsulated according to the identical method for packing of describing in request command encapsulation submodule 602.The encapsulation of coprocessor result encapsulation submodule 605 inside can be realized by hardware, when using network processing unit, can utilize the microcode in network processing unit partly to realize.The method that returns results packet can be by interrupt mode or inquiry mode and other existing methods.
Analyzing sub-module 606 as a result, are arranged in CPU module 51, are used for resolving the result data bag that returns, and the execution result that parses is passed to interpretation of result and retransmits submodule 607;
Concrete, according to the request command number of request command encapsulation submodule 602 encapsulation, parse the execution result of each request command, the execution result that parses is passed to interpretation of result and retransmits submodule 607.
Interpretation of result and re-transmission submodule 607 are arranged in CPU module 51, are used for the verification execution result.
Concrete, judged whether that request command is dropped or execution error, when having request command to be dropped or during execution error, return to request command encapsulation submodule 602 and retransmit and be dropped or the request command of execution error; When request command is normally carried out, execution result returned to operation layer or directly abandon and return the request command classification and control submodule 601 and remove the correct request command of carrying out and wait for new request command.
Wherein, take N(N as 1,2,3 ... natural number) individual request command is encapsulated as example, analyzing sub-module 606 should parse N execution result as a result.Each execution result has fed back the situation whether corresponding request command is executed correctly, interpretation of result and re-transmission submodule 607 check each execution result, when occurring there is no the situation of execution result, illustrate that corresponding request command is dropped, when perhaps mistake appears in execution result, all need to resend request command.In order to guarantee the performance of system, the request command that resends can be sent into next encapsulation process, encapsulate and send together with new request command that operation layer sends.
The above is only preferred embodiment of the present invention, is not for limiting protection scope of the present invention, all any modifications of doing within the spirit and principles in the present invention, is equal to and replaces and improvement etc., within all should being included in protection scope of the present invention.

Claims (12)

1. the method for the interior data transmission of Lookup engine real-time system, is characterized in that, described method comprises:
CPU receives and the storage resource request order;
When timer overflows or reach fixing request command number, with the described request Command encapsulate and send the buffer memory of request command bag in the coprocessor; Described fixing request command number is initiated frequency, request command packet length, interruption treatment effeciency and coprocessor internal resource according to different application scenarios, comprehensive request command and is selected;
Coprocessor reads described request order bag, and parses request command execution corresponding operating;
Coprocessor writes buffer memory with execution result, waits for and all carries out the rear use described execution result of encapsulation and return results packet;
CPU resolves described result data bag, removes the corresponding request command of completing after the verification execution result, waits for next request command.
2. method according to claim 1, is characterized in that, after described CPU analysis result packet verification execution result, also comprises:
When request command corresponding to described execution result is dropped or during the request command execution error, retransmits the described request order.
3. method according to claim 1 and 2, is characterized in that, in described CPU storage resource request commands steps, specifically comprises:
Described CPU is cached to request command in external memory storage; Wherein, different according to the purpose Lookup engine of described request order when a plurality of plug-in Lookup engine of described CPU management, the described request order is cached in corresponding external memory storage.
4. method according to claim 1 and 2, is characterized in that, described coprocessor writes execution result in the buffer memory step, specifically comprises:
When the same described coprocessor of a plurality of CPU management, described coprocessor arranges CPU corresponding to a plurality of inner buffers, is used for storing respectively the described execution result of the described request order bag that corresponding different CPU sends over.
5. method according to claim 1 and 2, is characterized in that, the method with the described request Command encapsulate specifically comprises:
The encapsulation principle is to select the request command of same kind; And/or the similar request command of type; And/or data volume is little and need frequently that the request command of data transmission is packaged together;
The request command bag of encapsulation specifically comprises: packet start field, device number field, packet length field, order type field, order length field, order data field, check field and packet trailer field.
6. method according to claim 1 and 2, is characterized in that, the described method that returns results packet specifically comprises: return to described result data bag by interrupt mode or inquiry mode.
7. the system of the interior data transmission of Lookup engine real-time system, is characterized in that, described system comprises: CPU module and co-processor module, wherein,
Described CPU module, be used for receiving and the storage resource request order, when timer overflows or reach fixing request command number, request command is packaged into the request command bag and sends to described co-processor module, after the result data bag returns, remove the corresponding request command of completing after analysis result packet verification execution result, wait for next request command; Described fixing request command number is initiated frequency, request command packet length, interruption treatment effeciency and coprocessor internal resource according to different application scenarios, comprehensive request command and is selected;
Described co-processor module is used for reading described request order bag, and parses described request command execution corresponding operating; Execution result is write buffer memory, after waiting for all execution, execution result is packaged into described result data bag and returns.
8. system according to claim 7, is characterized in that, described CPU module comprises: request command classification and control submodule, request command encapsulate submodule, analyzing sub-module and interpretation of result as a result and retransmit submodule, wherein,
Described request command catalog and control submodule is used for receiving and store the request command that operation layer sends, and sends to described request Command encapsulate submodule to encapsulate the described request command catalog according to encapsulating principle after meeting the encapsulation condition;
Described request Command encapsulate submodule is used for receiving the described request command catalog and controls the described request order that submodule sends, and encapsulates, and sends to described coprocessor;
Described analyzing sub-module as a result is used for resolving the described result data bag that returns, and the described execution result that parses is passed to described interpretation of result and retransmits submodule;
Described interpretation of result and re-transmission submodule are used for the described execution result of verification, return to the described request command catalog and control submodule and remove the corresponding request command of completing, and wait for next request command.
9. according to claim 7 or 8 described systems, is characterized in that, described Co-processor Module also comprises: coprocessor request command analyzing sub-module, request command implementation sub-module, coprocessor result encapsulation submodule,
Described coprocessor request command analyzing sub-module is used for parsing the described request order of request command bag, and with the described request command routing to described request command execution submodule;
Described request command execution submodule is used for carrying out the described request order and execution result is passed to described coprocessor result encapsulation submodule;
Described coprocessor result encapsulation submodule is used for the described execution result that the transmission of encapsulation described request command execution submodule comes, and returns results packet to the CPU module.
10. system according to claim 8, is characterized in that, described interpretation of result and re-transmission submodule also are used in verification:
When request command corresponding to described execution result is dropped or during the execution result mistake of described request order, returns to described request Command encapsulate submodule and retransmit the described request order.
11. according to claim 8 or 10 described systems is characterized in that, described request command catalog and the order of control submodule store request specifically comprise:
Described request command catalog and the order of control submodule cache request, wherein different according to the purpose Lookup engine of request command when an a plurality of plug-in Lookup engine of CPU module management, request command is cached in corresponding different buffer memorys.
12. system according to claim 9 is characterized in that, described coprocessor result encapsulation submodule also needs the described execution result of buffer memory before encapsulation, specifically comprise:
When the same coprocessor of a plurality of CPU module management, coprocessor result encapsulation submodule arranges CPU corresponding to a plurality of inner buffers, is used for storing respectively the described execution result of the described request order bag that corresponding different CPU sends over.
CN 201010110829 2010-02-03 2010-02-03 Method and system for searching data transmission in engine real-time system Active CN101777037B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN 201010110829 CN101777037B (en) 2010-02-03 2010-02-03 Method and system for searching data transmission in engine real-time system
PCT/CN2010/077126 WO2011095012A1 (en) 2010-02-03 2010-09-20 Method and system for data transmission in search engine real time system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010110829 CN101777037B (en) 2010-02-03 2010-02-03 Method and system for searching data transmission in engine real-time system

Publications (2)

Publication Number Publication Date
CN101777037A CN101777037A (en) 2010-07-14
CN101777037B true CN101777037B (en) 2013-05-08

Family

ID=42513503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010110829 Active CN101777037B (en) 2010-02-03 2010-02-03 Method and system for searching data transmission in engine real-time system

Country Status (2)

Country Link
CN (1) CN101777037B (en)
WO (1) WO2011095012A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101777037B (en) * 2010-02-03 2013-05-08 中兴通讯股份有限公司 Method and system for searching data transmission in engine real-time system
CN104540050A (en) * 2015-01-14 2015-04-22 北京飞音时代技术有限公司 Data processing method of integrated access devices
CN104765701B (en) * 2015-03-24 2018-05-29 华为技术有限公司 Data access method and equipment
CN105512102A (en) * 2015-12-01 2016-04-20 北京交控科技股份有限公司 Data parse method and system
CN108667765A (en) * 2017-03-28 2018-10-16 深圳市中兴微电子技术有限公司 A kind of data processing method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2326253A (en) * 1997-06-10 1998-12-16 Advanced Risc Mach Ltd Coprocessor data access control
US6434650B1 (en) * 1998-10-21 2002-08-13 Intel Corporation Apparatus and method for multiplexing bi-directional data onto a low pin count bus between a host CPU and co-processor
CN1121649C (en) * 2000-12-15 2003-09-17 智原科技股份有限公司 Data access controller, controlling method and its order format
US20060179273A1 (en) * 2005-02-09 2006-08-10 Advanced Micro Devices, Inc. Data processor adapted for efficient digital signal processing and method therefor
CN101097559A (en) * 2006-06-28 2008-01-02 中国科学院微电子研究所 System and method for realizing interconnect between main processor and coprocessor interface
CN101419629B (en) * 2008-12-11 2013-02-13 北京中星微电子有限公司 Remote call method, chip, calculation equipment and remote call apparatus
CN101777037B (en) * 2010-02-03 2013-05-08 中兴通讯股份有限公司 Method and system for searching data transmission in engine real-time system

Also Published As

Publication number Publication date
WO2011095012A1 (en) 2011-08-11
CN101777037A (en) 2010-07-14

Similar Documents

Publication Publication Date Title
TWI416334B (en) Method, bus interface device and processor for transmitting data transfer requests from a plurality of clients as packets on a bus
US6954806B2 (en) Data transfer apparatus and method
CN101777037B (en) Method and system for searching data transmission in engine real-time system
CN111327603B (en) Data transmission method, device and system
WO2016187813A1 (en) Data transmission method and device for photoelectric hybrid network
CN108132897B (en) SRIO controller based on ZYNQ platform soft core
KR970029126A (en) Multiprocessor system
CN106155960A (en) Shake hands and the UART serial port communication method of EDMA based on GPIO
CN110334040B (en) Satellite-borne solid-state storage system
CN103077148B (en) A kind of host communication method of Based PC IE and main frame
US5958024A (en) System having a receive data register for storing at least nine data bits of frame and status bits indicating the status of asynchronous serial receiver
US20230080588A1 (en) Mqtt protocol simulation method and simulation device
CN113179216B (en) Remote configuration method of register, computer equipment and storage medium
CN109117386B (en) System and method for remotely reading and writing secondary storage through network
CN111930676A (en) Method, device, system and storage medium for communication among multiple processors
CN100499666C (en) System and method for inter connecting SP14 equipment and PCI Express equipment
CN112836453B (en) SAS controller frame buffer area structure design method
CN112395230A (en) UART interface extension circuit based on programmable logic device
CN104714904A (en) RapidIO controller adopting window mapping mechanism and control method of RapidIO controller
CN106662895B (en) The method of computer equipment and computer equipment reading and writing data
US6856619B1 (en) Computer network controller
CN115396527A (en) PCIE and SRIO protocol conversion system and method based on FPGA
CN105630424A (en) Data processing method, device and system
CN113468090A (en) PCle communication method, device, electronic equipment and readable storage medium
CN104486442A (en) Method and device for transmitting data of distributed storage system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant