CN110493310A - A kind of protocol controller and method of software definition - Google Patents

A kind of protocol controller and method of software definition Download PDF

Info

Publication number
CN110493310A
CN110493310A CN201910646042.5A CN201910646042A CN110493310A CN 110493310 A CN110493310 A CN 110493310A CN 201910646042 A CN201910646042 A CN 201910646042A CN 110493310 A CN110493310 A CN 110493310A
Authority
CN
China
Prior art keywords
command character
data
packet
data packet
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910646042.5A
Other languages
Chinese (zh)
Other versions
CN110493310B (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.)
Information Engineering University of PLA Strategic Support Force
Original Assignee
Information Engineering University of PLA Strategic Support Force
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 Information Engineering University of PLA Strategic Support Force filed Critical Information Engineering University of PLA Strategic Support Force
Priority to CN201910646042.5A priority Critical patent/CN110493310B/en
Publication of CN110493310A publication Critical patent/CN110493310A/en
Application granted granted Critical
Publication of CN110493310B publication Critical patent/CN110493310B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/324Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the data link layer [OSI layer 2], e.g. HDLC

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Communication Control (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention provides the protocol controller and method of a kind of software definition.The protocol controller includes: link layer sending side functional unit, and the data packet for inputting to user input interface carries out packet caching and management, generates command character and data packet and command character combination are sent to PCS input parallel bus;Link receiving side functional unit, the data separating for inputting PCS on parallel bus are command character and data packet and provide to export data packet to user's output interface according to agreement;Link layer state register, for storing the status information of protocol controller link layer.This method comprises: the data packet for receiving user input interface input carries out packet caching and management, and select the data packet preferentially sent;Generate command character;Data packet and command character are sent to PCS input parallel bus;It is command character and data packet by data separating;Received data packet is exported to user's output interface.Invention increases the flexibilities of communication interface.

Description

A kind of protocol controller and method of software definition
Technical field
The present invention relates to high-speed serial communication technical field more particularly to a kind of devices of the protocol controller of software definition And method.
Background technique
Currently, HSSI High-Speed Serial Interface because its interface pin is less, transmission rate is high, strong interference immunity, wiring line it is simple, Become main data communication mode between chip and chip, board and equipment, such as in data center, high-performance calculation, thunder Up to all being carried out data transmission using serial communication mode in the infrastructure such as processing system, video monitoring system.But it is different Under application scenarios and demand, the interface protocol of communication may be different, and there are commonly Ethernet interfaces, Fiber Channel Interface, RapidIO interface, PCIe interface etc..In order to adapt to different demands, more and more high-performance treatments chips are all integrated A variety of HSSI High-Speed Serial Interface stones (IP kernel), such as the T2080 dsp chip of NXP, it is integrated with including Ethernet, PCIe, The SerDes of the various protocols such as RapidIO controller and a variety of frequency points increases chip applicability, but also significantly increases simultaneously The area and power consumption of chip.Traditional communication interface uses specific integrated circuit (Application Spacific Integrated Chip, ASIC) implementation, protocol type be it is unmodifiable, greatly limiting entire chip makes Use range.
Traditional HSSI High-Speed Serial Interface can only support the mutual of a kind of or a kind of agreement using the protocol analysis logic of rigidity Connection letter.High-speed serial communication agreement is generally made of many levels agreement, such as OSI(Open System Interconnection) reference model is divided into seven layers, is physical layer (PMA+PCS module), link layer (MAC), network respectively Layer, transport layer, session layer, expression layer and application layer, wherein physical layer and link layer constitute protocol controller, main to realize association The reliable transmission of (data) packet is discussed, function is generally realized using the circuit customized, and other each layers have been able to reality at present Existing software control.As shown in Figure 1, legacy protocol controller architecture: including physical layer and link layer, their major function and reality Existing mode is as follows:
1) PMA+PCS module: being responsible for the serioparallel exchange of transmission word, encoding and decoding, bit wide transformation, clock recovery and the functions such as synchronous, Different agreement is mainly reflected in transmission rate, encoding and decoding rule and bandwidth etc. and has differences.Since the coding of different agreement is advised It is then relatively fixed, and currently support the PLL technology of wideband point multi-protocols and timing recovery (SDR) technology also more mature, this portion Divide function generally using configurable ASIC circuit design.Wherein, PCS: full name Physical Coding Sublayer refers to object Manage coding sub-layer;PMA: full name Physical Medium Attachment refers to Physical Medium sub-layer.
2) MAC module: MAC be mainly responsible for link foundation and maintenance, the transmitting-receiving of protocol massages, parsing, Error Control and Flow control etc. is the functional module being closely related with agreement, and different agreement has dedicated IP kernel, currently without general solution Scheme.
Existing high-speed serial communication agreement is all based on the transport protocol of packet switch, and realizes link dimension using command character The reliable transmission of shield and data packet, therefore data packet and command character content can be transmitted on high-speed serial bus.In order to improve rate With reduce power consumption, the function of the link layer inside protocol controller generally uses ASIC design, can only support a kind of or a kind of The link establishment and packet sending and receiving function of agreement, therefore its scope of application is also restricted, and is primarily present lacking for 3 aspects Fall into: (1) message protocol of Port Profile controller processing is fixed, and cannot be converted according to demand;(2) existing chip is in order to suitable Different application scenarios are answered, the controller of integrated various protocols is needed, increases chip area and cost;It (3) can not be according to demand Carry out custom protocol.
Summary of the invention
It is fixed for the message protocol existing in the prior art due to the processing of Port Profile controller, it cannot be according to demand Converted, existing chip is in order to adapt to different application scenarios, need the controller of integrated various protocols, increase chip area With cost and the problems such as can not carry out custom protocol according to demand, the present invention provides a kind of protocol integrated test system of software definition Device and method, in order under unified flexible hardware structure, realize protocol controller can software definition, increase communication and connect Mouthful flexibility, to overcome the hardware structure lower port agreement of current rigidity that can not customize, the problems such as flexibility is low.
In a first aspect, the present invention provides a kind of protocol controller of software definition, which includes: link layer hair Send side functional unit, link layer receiving side functional unit and link layer state register;Wherein:
Link layer sending side functional unit, the data packet for inputting to user input interface carry out packet caching and management, by excellent First grade selects the data packet preferentially sent, generates link maintenance and the relevant command character of data pack receiving and transmitting and advise according to agreement It is fixed that data packet and command character combination are sent to PCS input parallel bus;
Link receiving side functional unit, for receiving the data on PCS input parallel bus, inputting PCS on parallel bus Data separating is command character and data packet, is parsed to command character and export received data packet according to agreement regulation To user's output interface;
Link layer state register, for storing the status information of protocol controller link layer.
Further, link layer sending side functional unit includes: to send packet caching management module, data packet transmission mould Block, command character generation module and command character and packet combining module;Wherein:
Packet caching management module is sent, for the data that user input interface inputs to be stored, classified and dispatched;According to association QoS rule as defined in discussing selects the data packet preferentially sent, and the data packet preferentially sent is exported to packet sending module;
Packet sending module, for receiving the data packet for sending the output of packet caching management module, and in data packet transmission process Middle calculating is simultaneously inserted into CRC;
Command character generation module, the status information for being stored according to link layer state register generate command character;
Command character and data combiners block, for providing selection packet sending module and command character generation module according to agreement Data are combined, and the data after combination are exported to PCS and input parallel bus.
Further, the packet sending module includes: CRC insertion submodule and CRC computational submodule;Wherein:
CRC computational submodule calculates CRC by packet for the data to transmission;
CRC is inserted into submodule, is provided to be inserted into the CRC in the data packet of transmission according to agreement.
Further, the command character generation module includes: the first TCAM submodule, command character memory, the first microcode Command memory and the first micro-code instruction implementation sub-module;Wherein:
First TCAM submodule, for storing the value of protocol controller link layer state register;
Command character memory, for all command characters as defined in agreement;
First micro-code instruction memory, for storing logic instruction;
First micro-code instruction implementation sub-module, for according to the value of current link layer status register and the storage of the first micro-code instruction The command character that the logic instruction of device output exports command character memory modifies to obtain final command character;
Wherein, it tables look-up to obtain a unique address according to the value that the first TCAM submodule exports, be tabled look-up according to the unique address Obtain the command character and the logic instruction for generating final command character.
Further, the link layer receiving side functional unit includes: that command character and data separating module, command character parse Module, packet-receiving module and reception packet caching management module;Wherein:
Command character and data separating module, for judging the data type on current PC S input parallel bus: if current PC S is defeated Entering the data on parallel bus is command character, and the PCS data inputted on parallel bus are input to command character parsing module;If working as Data on preceding PCS input parallel bus are data packets, then the PCS data inputted on parallel bus are delivered to data packet and received Module;
Command character parsing module, for parsing command character, extracting and handling the order in command character and information;
Packet-receiving module is used to analyze the received data and is aligned and is verified, by the data and associated check letter after verification Breath, which is sent to, receives packet caching management module;
Packet caching management module is received, for the data that packet-receiving module is sent to be stored, classified and are dispatched, according to QoS rule selects the data packet preferentially sent, and the data packet preferentially sent is exported to user's output interface.
Further, the packet-receiving module includes: data packet recombination submodule and CRC check submodule;Wherein:
Data packet recombinates submodule, is used to analyze the received data carry out reorganization operation, the reorganization operation includes according to command character The packet start information and end-of-packet information of parsing module output, are aligned received data, by the parallel data after alignment It is input to CRC check module;
CRC check submodule, is used to analyze the received data and is verified, and link layer state register is written in check results.
Further, the command character parsing module includes: the 2nd TCAM submodule, the second micro-code instruction memory and Two micro-code instruction implementation sub-modules;Wherein:
2nd TCAM submodule, for storing all command characters as defined in agreement;
Second micro-code instruction memory, for storing logic instruction;
Second micro-code instruction implementation sub-module, the logic instruction for being exported according to the second micro-code instruction memory is to input Command character and current link layer status register value carry out operation, and by operation result store to link layer state deposit Device;
Wherein, the 2nd TCAM submodule obtains a unique address according to the command character of input, is obtained according to the unique address For carrying out the logic instruction of operation.
Further, the status information includes: to receive command character information, send command character information, transmitting-receiving command character meter Number, send and receive packets count and transmitting-receiving caches at least one of free message.
Second aspect, the present invention provide a kind of control method of the protocol controller of software definition, comprising:
Step 1: receiving the data packet of user input interface input, packet caching and management are carried out to the data packet, and select excellent The data packet first sent;
Step 2: link maintenance and the relevant command character of data pack receiving and transmitting are generated according to the status information of link layer;
Step 3: data packet and command character are sent to PCS input parallel bus;
Step 4: receiving the data on PCS input parallel bus;
Step 5: being command character and data packet by the PCS data separating inputted on parallel bus;
Step 6: command character is parsed;
Step 7: according to the parsing result of command character by received data packet carry out recombination and CRC check, according to agreement regulation and The priority of data packet will successively be exported by the correct data packet after CRC check to user's output interface.
The third aspect, the present invention provide a kind of electronic equipment, which includes:
Memory and processor, the processor and the memory complete mutual communication by bus;The memory It is stored with the program instruction that can be executed by the processor, the processor calls described program instruction to be able to carry out such as lower section Method: receiving the data packet of user input interface input, carries out packet caching and management to the data packet, and select preferentially to send Data packet;Link maintenance and the relevant command character of data pack receiving and transmitting are generated according to the status information of link layer;By data packet and control System symbol is sent to PCS input parallel bus;Receive the data on PCS input parallel bus;PCS is inputted into the number on parallel bus According to being separated into command character and data packet;Command character is parsed;According to the parsing result of command character by received data packet into Row recombination and CRC check, will be successive by the correct data packet after CRC check according to the priority of agreement rule fixed sum data packet It exports to user's output interface.
Fourth aspect, the present invention provide a kind of computer readable storage medium, are stored thereon with computer program, the meter Calculation machine program realizes following method when being executed by processor: the data packet of user input interface input is received, to the data packet Packet caching and management are carried out, and selects the data packet preferentially sent;Link maintenance sum number is generated according to the status information of link layer According to the relevant command character of pack receiving and transmitting;Data packet and command character are sent to PCS input parallel bus;It is parallel total to receive PCS input Data on line;It is command character and data packet by the PCS data separating inputted on parallel bus;Command character is parsed;Root Received data packet is subjected to recombination and CRC check according to the parsing result of command character, according to the preferential of agreement rule fixed sum data packet Grade will successively be exported by the correct data packet after CRC check to user's output interface.
Beneficial effects of the present invention:
The protocol controller and method of a kind of software definition provided by the invention, can be according to protocol requirement, using software programming Customization of the mode to protocol controller hardware considerably increases the practicability and versatility of interface, compares existing fixed protocol Controller scheme, this protocol controller have the advantage that: (1) can change the protocol type of controller according to demand;(2) basis User demand increase or deletion command character, data packet format etc., realize the protocol communication of customization;(3) it is answered in various protocols With the flexibility and practicability under occasion, greatly improved.
Detailed description of the invention
Fig. 1 is a kind of structural schematic diagram of the protocol controller of software definition provided in an embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of command character generation module and command character parsing module provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of packet sending module and packet-receiving module provided in an embodiment of the present invention;
Fig. 4 is a kind of flow diagram of the control method of the protocol controller of software definition provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention;
Fig. 6 is the structural schematic diagram for the legacy protocol controller that the prior art provides.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached in the embodiment of the present invention Figure, technical solution in the embodiment of the present invention are explicitly described, it is clear that described embodiment is a part of the invention Embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making wound Every other embodiment obtained under the premise of the property made labour, shall fall within the protection scope of the present invention.
It is analyzed by the link layer functionality to different agreement, link layer mainly completes link maintenance and the transmitting-receiving of packet, Wherein link maintenance is generally realized by the relatively-stationary command character of several formats or control sequence, such as RapidIO association View packages beginning command character, finishing control symbol, state command character, link request command character, link response command character, packet confirmation control System symbol etc..Link layer realizes the maintenance of link and the transmitting-receiving of packet by sending and receiving corresponding command character;The transmission-receiving function of packet Mainly in receiving end according to beginning command character is packaged and finishing control symbol judges the starting and ending of data packet, to the parallel of input Data carry out alignment recombination and verification, and according to check results, the receive process of packet can trigger sending side and send corresponding command character Inform whether interface data packet in opposite end is properly received or occurs mistake;In transmitting terminal, according to data path bit wide pair in link The data packet carry out sequence transmission in packet caching is sent, and packages the beginning in data packet head addition during sending data packet Command character, the parallel data transmitting-receiving in packet tail addition finishing control symbol, between command character and data packet shared link layer and PCS layers Access.By analyzing the function of link layer, the present invention proposes a kind of new protocol controller framework based on software definition.
A kind of protocol controller of software definition provided in an embodiment of the present invention include: link layer sending side functional unit, Link layer receiving side functional unit and link layer state register;Wherein:
Link layer sending side functional unit, the data packet for inputting to user input interface carry out packet caching and management, by excellent First grade selects the data packet preferentially sent, generates link maintenance and the relevant command character of data pack receiving and transmitting and advise according to agreement It is fixed that data packet and command character combination are sent to PCS input parallel bus;
Link receiving side functional unit, for receiving the data on PCS input parallel bus, inputting PCS on parallel bus Data separating is command character and data packet, is parsed to command character and export received data packet according to agreement regulation To user's output interface;
Link layer state register, for storing the status information of protocol controller link layer.
Specifically, the workflow of protocol controller provided in an embodiment of the present invention are as follows: firstly, link layer sending side function Unit receives the data packet of user input interface input, carries out packet caching and management to the data packet, and select preferential send Data packet;Then, link layer sending side functional unit generates link maintenance according to the status information of link layer and data packet is received It sends out command character relevant, and the command character of the data packet for needing preferentially to send and generation is sent to PCS input parallel bus;It connects , link receiving side functional unit receives the data on PCS input parallel bus, and PCS is inputted the data on parallel bus It is separated into command character and data packet, and the data packet separated is subjected to recombination and forms complete data packet deposit caching;Most Afterwards, link receiving side functional unit parses command character, will be received according to the parsing result of command character according to agreement regulation Data packet export to user's output interface.
Wherein, PCS: full name Physical Coding Sublayer refers to Physical Coding Sublayer;
As shown in Figure 1, the embodiment of the present invention is provided with a kind of protocol controller of software definition, comprising: link layer sending side function It can unit 11, link layer receiving side functional unit 12 and link layer state register 13.Wherein:
Link layer sending side functional unit 11 includes: to send packet caching management module 111, packet sending module 112, control System symbol generation module 113 and command character and data combiners block 114;Packet caching management module 111 is sent to be used to input user The data of interface input are stored, classified and are dispatched;The QoS rule according to as defined in agreement selects the data packet preferentially sent, The data packet preferentially sent is exported to packet sending module 112;Packet sending module 112 sends packet caching for receiving The data packet that management module 111 exports, and calculated in packet data packet transmission process and be inserted into CRC;Command character generates mould The status information that block 113 is used to be stored according to link layer state register 13 generates command character;Command character and data combiners block 114 for providing that the data of selection packet sending module 112 and command character generation module 113 are combined according to agreement, so The data after combination are exported to PCS afterwards and input parallel bus.
The link layer receiving side functional unit 12 includes: command character and data separating module 121, command character parsing module 122, packet-receiving module 123 and reception packet caching management module 124;Command character is with data separating module 121 for judging Current PC S inputs the data type on parallel bus: if the data on current PC S input parallel bus are command characters, PCS is defeated Enter the data on parallel bus and is input to command character parsing module 122;If the data that current PC S is inputted on parallel bus are data The PCS data inputted on parallel bus are then delivered to packet-receiving module 123 by packet;Command character parsing module 122 is for solving Command character is analysed, extracts and handles the order in command character and information;Packet-receiving module 123 is used to analyze the received data progress Alignment and verification, by after verification data and associated check information be sent to receive packet caching management module 124;Receive packet caching The data that management module 124 is used to send packet-receiving module 123 are stored, classified and are dispatched, and are selected according to QoS rule The data packet preferentially first sent exports the data packet preferentially sent to user's output interface.
Specifically, workflow of the protocol controller provided in an embodiment of the present invention in sending side are as follows: firstly, it is slow to send packet It deposits management module 111 and receives the data that user is inputted by user input interface, the data of input are stored, classified and adjusted Degree;And the data packet preferentially sent is selected according to QoS rule, which is exported to packet sending module 112;Then, Packet sending module 112, which receives, sends the data packet that packet caching management module 111 exports, and the data packet received is sent to Command character and data combiners block 114, and calculated in data packet transmission process and be inserted into CRC;Then, command character generation module 113 according to link layer state register 13 store status information generate command characters, and by the command character be sent to command character with Data combiners block 114;Finally, the data packet of command character and the output of 114 received data packet sending module 112 of data combiners block The data of received two modules are exported to PCS and input parallel bus by the command character exported with command character generation module 113.
Workflow of the protocol controller of the embodiment of the present invention in receiving side are as follows: firstly, command character and data separating mould Block 121 receives the data on PCS input parallel bus, judges the data type on current PC S input parallel bus: if current The data that PCS is inputted on parallel bus are command characters, and the PCS data inputted on parallel bus are input to command character parsing module 122;If the data that current PC S is inputted on parallel bus are data packets, the PCS data inputted on parallel bus are delivered to number According to packet receiving module 123;Then, the control that command character parsing module 122 receives command character and data separating module 121 exports Symbol, parses the command character, extracts and handle the order in command character and information;Then, packet-receiving module 123 connects The data packet for receiving command character and the output of data separating module 121, is aligned and is verified to received parallel data, after verification Parallel data and associated check information be sent to receive packet caching management module 124;Finally, receiving packet caching management module The data of 124 received data packet receiving modules 123 output, the data packet preferentially sent is selected according to QoS rule, will preferentially be sent Data packet export to user's output interface.
Once command character parsing module 122 extracts and handles the order in command character and information illustration: such as packaging Beginning command character, command character parsing module 122 need to inform that packet-receiving module 123 is from the subsequent data of beginning command character are packaged The beginning of data packet.Command character is requested if it is link state, needs to trigger sending side according to current state and sends state control System symbol.Command character is confirmed if it is packet, then according to the definition of different agreement, it is necessary to update credit register or informing It sends data pack buffer management module and discharges corresponding memory space.
The status information that link layer state register 13 stores includes: to receive command character information, send command character information, receive Send out command character counting, send and receive packets count and transmitting-receiving caches at least one of free message.
Wherein, QoS: full name Quality of Service refers to service quality.
Need to cooperate the command character parsing module 122 of receiving side to realize flow in addition, sending packet caching management module 111 Control.
On the basis of the above embodiments, as shown in Fig. 2, the embodiment of the present invention provides a kind of command character generation module 113 With command character parsing module 122.Wherein:
The command character generation module 113 includes: that the first TCAM submodule 1131, command character memory 1132, the first microcode refer to Enable memory 1133 and the first micro-code instruction implementation sub-module 1134;First TCAM submodule 1131 is for storing protocol controller The value of link layer state register 13;Command character memory 1132 is for all command characters as defined in agreement;First micro-code instruction Memory 1133 is for storing logic instruction;First micro-code instruction implementation sub-module 1134 is used for according to current ink stratiform The value of state register 13 and the logic instruction of the first micro-code instruction memory 1133 output are defeated to command character memory 1132 Command character out modifies to obtain final command character;Wherein, it tables look-up to obtain according to the value that the first TCAM submodule 1131 exports One unique address tables look-up to obtain the command character for generating final command character and the logic according to the unique address Operational order.
The command character parsing module 122 includes: the 2nd TCAM submodule 1221,1222 and of the second micro-code instruction memory Second micro-code instruction implementation sub-module 1223;2nd TCAM submodule 1221 is for storing all command characters as defined in agreement;The Two micro-code instruction memories 1222 are for storing logic instruction;Second micro-code instruction implementation sub-module 1223 is used for according to the Command character and current link layer status register 13 of the logic instruction of two micro-code instruction memories 1222 output to input Value carry out operation, and operation result is stored to link layer state register 13;Wherein, 1131 basis of the 2nd TCAM submodule The command character of input obtains a unique address, obtains referring to for the logical operation for carrying out operation according to the unique address It enables.
Specifically, in command character generation module 113, the first TCAM submodule 1131 stores protocol controller link layer The content of correlated condition register, firstly, the first TCAM submodule 1131 can pass through output of tabling look-up according to the value of status register One unique address, which indexes the first micro-code instruction memory 1133 and command character memory 1132 simultaneously, wherein controlling Symbol memory 1132 stores all command characters of the agreement;Then, command character memory 1132 can be by looking into according to the address Table exports an initial command character to the first micro-code instruction implementation sub-module 1134, and the first micro-code instruction memory 1133 is according to this Address can export a micro-code instruction for logical operation to the first micro-code instruction implementation sub-module 1134 by tabling look-up;Most Afterwards, the first micro-code instruction implementation sub-module 1134 is according to the value and micro-code instruction of current link layer status register 13 to initial control System symbol is modified, and exports final command character, and update the value of correlated condition register simultaneously.
In command character parsing module 122, the 2nd TCAM submodule 1221 stores all command characters of agreement, firstly, 2nd TCAM submodule 1221 can be by tabling look-up to obtain a unique address according to the command character of input, and the allocation index second is micro- Code instruction memory 1222;Then, the second micro-code instruction memory 1222 according to the address can by table look-up export it is corresponding micro- Code instruction is to the second microcode implementation sub-module;Finally, the second micro-code instruction implementation sub-module 1223 is according to the micro-code instruction to working as The value of preceding link layer state register 13 and the command character of input carry out corresponding operation, and operation result is written to accordingly In link layer state register 13.
Micro-code instruction mainly include can to the input data of micro-code instruction implementation sub-module any position section carry out plus, Subtract, with or the logical operations such as exclusive or, displacement, set, removing instruction.
TCAM: full name is Ternary Content AddressableMemory, is a kind of three-state content addressing storage Device.
It should be noted that the difference of different agreement link layer is mainly reflected in the difference of command character and packet format, still The command character and packet format of each agreement are all relatively fixed.
As shown in the above, the embodiment of the present invention realizes that receiving end is controlled in such a way that TCAM+ may be programmed micro-code instruction The parsing of symbol and the generation of transmitting terminal command character are made, the command character of link layer can be programmed and be determined according to the demand of agreement System realizes software definition protocol controller.
On the basis of the various embodiments described above, as shown in figure 3, the embodiment of the present invention, which provides one kind, to be matched as needed The packet sending module 112 and packet-receiving module 123 set.Wherein:
The packet sending module 112 includes: CRC computational submodule 1121 and CRC insertion submodule 1122;CRC calculates son Module 1121, which is used to analyze the received data, calculates CRC by packet;CRC is inserted into submodule 1122 and is used to be provided according to agreement in transmission The CRC is inserted into data packet.
The packet-receiving module 123 includes: data packet recombination submodule 1231 and CRC check submodule 1232;Number It is used to analyze the received data carry out reorganization operation according to package-restructuring submodule 1231, the reorganization operation includes parsing according to command character The packet start information and end-of-packet information that module 122 exports, are aligned received data, and the parallel data after alignment is defeated Enter to CRC check module;CRC check submodule 1232, which is used to analyze the received data, to be verified, and chain is written in check results Road layer state register 13.
Specifically, packet sending module 112 mainly completes data packet CRC calculating, counts and send;Data packet receives mould Block 123 mainly completes recombination, counting and the verification of parallel data.
In sending side: firstly, the parallel data of 1121 pairs of CRC computational submodule inputs carries out CRC calculating by packet;Then, CRC insertion submodule 1122 is provided in the packet according to agreement or ending addition calculates resulting CRC, the completion link number of plies According to the encapsulation of packet.
In receiving side: being believed firstly, data packet recombinates submodule 1231 according to the parallel data of input and corresponding command character Breath recombinates the parallel data of input, and reorganization operation includes the packet start information provided according to command character parsing module 122 With end-of-packet information, the parallel data (centre there may be bubble) of input is aligned, the parallel data input after being aligned To CRC check submodule 1232;Then, the data that 1232 received data packet of CRC check submodule recombination submodule 1231 exports, The data are verified, and corresponding link layer state register 13 is written into check results.
It should be noted that packet-receiving module 123 and packet sending module 112 all can length to data packet into Row statistics, it is ensured that the total length of data packets sended and received is not more than the maximum packet length of protocol requirement.
As shown in the above, the embodiment of the present invention can need to calculate rule to the length and CRC of data packet according to agreement It is then customized and realizes software definition protocol controller.
As shown in figure 4, the embodiment of the present invention provides a kind of control method of the protocol controller of software definition, this method packet It includes:
S101: protocol controller receives the data packet of user input interface input, carries out packet caching and management to the data packet, And select the data packet preferentially sent;
S102: protocol controller generates link maintenance and the relevant command character of data pack receiving and transmitting according to the status information of link layer;
S103: data packet and command character are sent to PCS input parallel bus by protocol controller;
S104: protocol controller receives the data on PCS input parallel bus;
S105: the PCS data separating inputted on parallel bus is command character and data packet by protocol controller;
S106: protocol controller parses command character;
S107: received data packet is carried out recombination and CRC check according to the parsing result of command character by protocol controller, according to association The priority of view rule fixed sum data packet will successively be exported by the correct data packet after CRC check to user's output interface.
Fig. 5 is the structural block diagram of electronic equipment provided in an embodiment of the present invention.As shown in figure 5, the electronic equipment includes: to deposit Reservoir 502 and processor 501, the processor 501 and the memory 502 complete mutual communication by bus 503;Institute It states memory 502 and is stored with the program instruction that can be executed by the processor, the processor 501 calls described program to instruct energy Enough execute following method, for example, receive user input interface input data packet, to the data packet carry out packet caching and Management, and select the data packet preferentially sent;It is related to data pack receiving and transmitting that link maintenance is generated according to the status information of link layer Command character;Data packet and command character are sent to PCS input parallel bus;Receive the data on PCS input parallel bus;It will The data separating that PCS is inputted on parallel bus is command character and data packet;Command character is parsed;According to the parsing of command character As a result received data packet is subjected to recombination and CRC check, CRC check will be passed through according to the priority of agreement rule fixed sum data packet Correct data packet afterwards is successively exported to user's output interface.
The embodiment of the present invention also provides a kind of computer program product, and the computer program product is non-temporary including being stored in Computer program on state computer readable storage medium, the computer program include program instruction, when described program instructs When being computer-executed, computer is able to carry out method provided by above-mentioned each method embodiment, for example, it is defeated to receive user The data packet of incoming interface input carries out packet caching and management to the data packet, and selects the data packet preferentially sent;According to chain The status information of road floor generates link maintenance and the relevant command character of data pack receiving and transmitting;Data packet and command character are sent to PCS Input parallel bus;Receive the data on PCS input parallel bus;It is control by the PCS data separating inputted on parallel bus Symbol and data packet;Command character is parsed;Received data packet is subjected to recombination and the school CRC according to the parsing result of command character It tests, will successively be exported by the correct data packet after CRC check according to the priority of agreement rule fixed sum data packet defeated to user Outgoing interface.
The embodiment of the present invention also provides a kind of computer readable storage medium, the computer-readable recording medium storage meter The instruction of calculation machine, the computer instruction make the computer execute method provided by above-mentioned each method embodiment, for example, The data packet for receiving user input interface input carries out packet caching and management to the data packet, and selects the number preferentially sent According to packet;Link maintenance and the relevant command character of data pack receiving and transmitting are generated according to the status information of link layer;By data packet and control Symbol is sent to PCS input parallel bus;Receive the data on PCS input parallel bus;PCS is inputted into the data on parallel bus It is separated into command character and data packet;Command character is parsed;Received data packet is carried out according to the parsing result of command character Recombination and CRC check, will be successively defeated by the correct data packet after CRC check according to the priority of agreement rule fixed sum data packet Out to user's output interface.
Intercommunication is interconnected to heterogeneous protocol terminal, is also based on the scheme of field-programmable gate leve array (FPGA), But FPGA is fine-grained programming device, resource consumption is big, and area is big, and is not suitable for being integrated in traditional processor On chip.Compared to the scheme based on FPGA, protocol controller framework of the invention supports software definition, just by software programming The protocol type of protocol controller support can be changed, implementation is flexible, and modification is simple.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features; And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and Range.

Claims (10)

1. a kind of protocol controller of software definition characterized by comprising link layer sending side functional unit, link layer connect Receive side functional unit and link layer state register;Wherein:
Link layer sending side functional unit, the data packet for inputting to user input interface carry out packet caching and management, by excellent First grade selects the data packet preferentially sent, generates link maintenance and the relevant command character of data pack receiving and transmitting and advise according to agreement It is fixed that data packet and command character combination are sent to PCS input parallel bus;
Link receiving side functional unit, for receiving the data on PCS input parallel bus, inputting PCS on parallel bus Data separating is command character and data packet, is parsed to command character and export received data packet according to agreement regulation To user's output interface;
Link layer state register, for storing the status information of protocol controller link layer.
2. protocol controller according to claim 1, which is characterized in that link layer sending side functional unit includes: Send packet caching management module, packet sending module, command character generation module and command character and packet combining module; Wherein:
Packet caching management module is sent, for the data that user input interface inputs to be stored, classified and dispatched;According to association QoS rule as defined in discussing selects the data packet preferentially sent, and the data packet preferentially sent is exported to packet sending module;
Packet sending module, for receiving the data packet for sending the output of packet caching management module, and in data packet transmission process Middle calculating is simultaneously inserted into CRC;
Command character generation module, the status information for being stored according to link layer state register generate command character;
Command character and data combiners block, for providing selection packet sending module and command character generation module according to agreement Data are combined, and the data after combination are exported to PCS and input parallel bus.
3. protocol controller according to claim 2, which is characterized in that the packet sending module includes: that CRC is calculated Submodule and CRC are inserted into submodule;Wherein:
CRC computational submodule is used to analyze the received data and calculates CRC by packet;
CRC is inserted into submodule, and the CRC is inserted into the data packet of transmission for providing according to agreement.
4. protocol controller according to claim 2, which is characterized in that the command character generation module includes: first TCAM submodule, command character memory, the first micro-code instruction memory and the first micro-code instruction implementation sub-module;Wherein:
First TCAM submodule, for storing the value of protocol controller link layer state register;
Command character memory, for all command characters as defined in agreement;
First micro-code instruction memory, for storing logic instruction;
First micro-code instruction implementation sub-module, for according to the value of current link layer status register and the storage of the first micro-code instruction The command character that the logic instruction of device output exports command character memory modifies to obtain final command character;
Wherein, it tables look-up to obtain a unique address according to the value that the first TCAM submodule exports, be tabled look-up according to the unique address Obtain the command character and the logic instruction for generating final command character.
5. protocol controller according to any one of claims 1 to 4, which is characterized in that the link layer receiving side function list Member includes: command character and data separating module, command character parsing module, packet-receiving module and reception packet cache management mould Block;Wherein:
Command character and data separating module, for judging the data type on current PC S input parallel bus: if current PC S is defeated Entering the data on parallel bus is command character, and the PCS data inputted on parallel bus are input to command character parsing module;If working as Data on preceding PCS input parallel bus are data packets, then the PCS data inputted on parallel bus are delivered to data packet and received Module;
Command character parsing module, for parsing command character, extracting and handling the order in command character and information;
Packet-receiving module is used to analyze the received data and is aligned and is verified, by the data and associated check letter after verification Breath, which is sent to, receives packet caching management module;
Packet caching management module is received, for the data that packet-receiving module is sent to be stored, classified and are dispatched, according to QoS rule selects the data packet preferentially sent, and the data packet preferentially sent is exported to user's output interface.
6. protocol controller according to claim 5, which is characterized in that the packet-receiving module includes: data packet Recombinate submodule and CRC check submodule;Wherein:
Data packet recombinates submodule, is used to analyze the received data carry out reorganization operation, the reorganization operation includes according to command character The packet start information and end-of-packet information of parsing module output, are aligned received data, by the parallel data after alignment It is input to CRC check module;
CRC check submodule, is used to analyze the received data and is verified, and link layer state register is written in check results.
7. protocol controller according to claim 5, which is characterized in that the command character parsing module includes: second TCAM submodule, the second micro-code instruction memory and the second micro-code instruction implementation sub-module;Wherein:
2nd TCAM submodule, for storing all command characters as defined in agreement;
Second micro-code instruction memory, for storing logic instruction;
Second micro-code instruction implementation sub-module, the logic instruction for being exported according to the second micro-code instruction memory is to input Command character and current link layer status register value carry out operation, and by operation result store to link layer state deposit Device;
Wherein, the 2nd TCAM submodule obtains a unique address according to the command character of input, is obtained according to the unique address For carrying out the logic instruction of operation.
8. protocol controller according to claim 1, which is characterized in that the status information includes: to receive command character letter Breath, transmission command character information, transmitting-receiving command character count, send and receive packets count and transmitting-receiving caches at least one of free message.
9. a kind of control method of the protocol controller of software definition characterized by comprising
Step 1: receiving the data packet of user input interface input, packet caching and management are carried out to the data packet, and select excellent The data packet first sent;
Step 2: link maintenance and the relevant command character of data pack receiving and transmitting are generated according to the status information of link layer;
Step 3: data packet and command character are sent to PCS input parallel bus;
Step 4: receiving the data on PCS input parallel bus;
Step 5: being command character and data packet by the PCS data separating inputted on parallel bus;
Step 6: command character is parsed;
Step 7: according to the parsing result of command character by received data packet carry out recombination and CRC check, according to agreement regulation and The priority of data packet will successively be exported by the correct data packet after CRC check to user's output interface.
10. a kind of electronic equipment characterized by comprising
Memory and processor, the processor and the memory complete mutual communication by bus;The memory It is stored with the program instruction that can be executed by the processor, the processor calls described program instruction to be able to carry out right such as and wants Method described in asking 9.
CN201910646042.5A 2019-07-17 2019-07-17 Software defined protocol controller and method Active CN110493310B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910646042.5A CN110493310B (en) 2019-07-17 2019-07-17 Software defined protocol controller and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910646042.5A CN110493310B (en) 2019-07-17 2019-07-17 Software defined protocol controller and method

Publications (2)

Publication Number Publication Date
CN110493310A true CN110493310A (en) 2019-11-22
CN110493310B CN110493310B (en) 2021-09-10

Family

ID=68547299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910646042.5A Active CN110493310B (en) 2019-07-17 2019-07-17 Software defined protocol controller and method

Country Status (1)

Country Link
CN (1) CN110493310B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113206720A (en) * 2021-04-08 2021-08-03 江苏科大亨芯半导体技术有限公司 Method and device for realizing top-adjusting message path
CN113220625A (en) * 2021-05-12 2021-08-06 北京汇智诚芯科技有限公司 Design method of calculation amount proving system based on stream processing chip
CN114546495A (en) * 2021-09-03 2022-05-27 北京睿芯众核科技有限公司 Method and system for checking address attribute of RISC-V architecture processor
CN117851323A (en) * 2024-01-24 2024-04-09 苏州异格技术有限公司 PCIE interface construction method and PCIE interface construction system

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030137981A1 (en) * 2001-12-31 2003-07-24 Yin-Hsin Tsai Switch controller controlled by a link layer protocol and control method thereof
CN201355815Y (en) * 2008-12-26 2009-12-02 中国科学院空间科学与应用研究中心 IEEE1394 bus protocol controller applied in space technology
CN201355816Y (en) * 2008-12-26 2009-12-02 中国科学院空间科学与应用研究中心 Programmable IEEE1394 bus monitor
CN101764794A (en) * 2008-12-23 2010-06-30 中国科学院空间科学与应用研究中心 Programmable IEEE1394 bus monitoring system and monitoring method thereof
US20100234063A1 (en) * 2009-03-13 2010-09-16 Infineon Technologies Ag Mobile radio communication devices and methods for controlling a mobile radio communication device
CN103685580A (en) * 2013-12-18 2014-03-26 武汉邮电科学研究院 Software-defined-network-based northbound interface access system and method
CN104767828A (en) * 2015-04-24 2015-07-08 福州瑞芯微电子有限公司 Inter-chip high-speed interconnection link layer design method and system
CN109286471A (en) * 2018-09-30 2019-01-29 中国人民解放军战略支援部队信息工程大学 CRC check method and device towards SRIO controller
CN109495519A (en) * 2019-01-09 2019-03-19 天津芯海创科技有限公司 Physical code circuit and high speed interface protocol exchange chip
CN109947681A (en) * 2019-03-20 2019-06-28 天津芯海创科技有限公司 Stringization/deserializer and high speed interface protocol exchange chip

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030137981A1 (en) * 2001-12-31 2003-07-24 Yin-Hsin Tsai Switch controller controlled by a link layer protocol and control method thereof
CN101764794A (en) * 2008-12-23 2010-06-30 中国科学院空间科学与应用研究中心 Programmable IEEE1394 bus monitoring system and monitoring method thereof
CN201355815Y (en) * 2008-12-26 2009-12-02 中国科学院空间科学与应用研究中心 IEEE1394 bus protocol controller applied in space technology
CN201355816Y (en) * 2008-12-26 2009-12-02 中国科学院空间科学与应用研究中心 Programmable IEEE1394 bus monitor
US20100234063A1 (en) * 2009-03-13 2010-09-16 Infineon Technologies Ag Mobile radio communication devices and methods for controlling a mobile radio communication device
CN103685580A (en) * 2013-12-18 2014-03-26 武汉邮电科学研究院 Software-defined-network-based northbound interface access system and method
CN104767828A (en) * 2015-04-24 2015-07-08 福州瑞芯微电子有限公司 Inter-chip high-speed interconnection link layer design method and system
CN109286471A (en) * 2018-09-30 2019-01-29 中国人民解放军战略支援部队信息工程大学 CRC check method and device towards SRIO controller
CN109495519A (en) * 2019-01-09 2019-03-19 天津芯海创科技有限公司 Physical code circuit and high speed interface protocol exchange chip
CN109947681A (en) * 2019-03-20 2019-06-28 天津芯海创科技有限公司 Stringization/deserializer and high speed interface protocol exchange chip

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
唐龙飞 等: "一种多协议统一架构CMOS Serdes发送器电路设计", 《计算机技术与发展》 *
李银平: "集成多控制器的软件定义网络管理平台的研究", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *
肖亮乾: "软件定义无线网状网多控制器系统研究", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113206720A (en) * 2021-04-08 2021-08-03 江苏科大亨芯半导体技术有限公司 Method and device for realizing top-adjusting message path
CN113220625A (en) * 2021-05-12 2021-08-06 北京汇智诚芯科技有限公司 Design method of calculation amount proving system based on stream processing chip
CN113220625B (en) * 2021-05-12 2024-05-14 北京汇智诚芯科技有限公司 Design method of calculation amount proving system based on stream processing chip
CN114546495A (en) * 2021-09-03 2022-05-27 北京睿芯众核科技有限公司 Method and system for checking address attribute of RISC-V architecture processor
CN114546495B (en) * 2021-09-03 2022-12-20 北京睿芯众核科技有限公司 Method and system for checking address attribute of RISC-V architecture processor
CN117851323A (en) * 2024-01-24 2024-04-09 苏州异格技术有限公司 PCIE interface construction method and PCIE interface construction system
CN117851323B (en) * 2024-01-24 2024-06-07 苏州异格技术有限公司 PCIE interface construction method and PCIE interface construction system

Also Published As

Publication number Publication date
CN110493310B (en) 2021-09-10

Similar Documents

Publication Publication Date Title
CN110493310A (en) A kind of protocol controller and method of software definition
US20190373086A1 (en) Packet Processing Method and Apparatus
CN100594698C (en) Packet aggregation protocol for advanced switching
CN101252537B (en) Switching network communicating system, method and master control board
CN108833299B (en) Large-scale network data processing method based on reconfigurable switching chip architecture
CN107689931A (en) It is a kind of that Ethernet exchanging function system and method are realized based on domestic FPGA
CN109302372A (en) A kind of communication means, equipment and storage medium
CN106685826B (en) Switchboard stacked system, from equipment, exchange chip and processing protocol message method
CN104704779A (en) Method and apparatus for accelerating forwarding in software-defined networks
CN110300081A (en) A kind of method and apparatus of data transmission
CN104378161B (en) A kind of FCoE agreement accelerating engine IP kernel based on AXI4 bus architecture
WO2016078312A1 (en) Single board testing method and device
CN107342906A (en) A kind of detection method, equipment and the system of elephant stream
CN108965159A (en) Method for controlling quality of service, equipment and system
CN110505714A (en) Multi-link communication means, equipment and terminal
CN109005170A (en) A kind of conversion method of RapidIO agreement to FC agreement
CN113141279B (en) Switch mesh test system and method
CN105978762A (en) Redundant Ethernet data transmission device, system and method thereof
CN108574632A (en) A kind of message processing method, apparatus and system
CN109905321A (en) A kind of route control system interacted for customized high-speed interface with Ethernet
CN106911388A (en) The method and apparatus of self-adaptative adjustment different rates device port
CN103685041B (en) Programmable router and routing method based on bit granularity
CN109739124A (en) Multi-bus interface data handling utility system
CN107332794A (en) A kind of dynamic locking timing groove method communicated towards time triggered
CN116074253B (en) Message chained forwarding method and device

Legal Events

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