DSP communication system and method based on CSME private protocol

Through the DSP communication system with CSME private protocol, the Ethernet bus is used to connect the CPU and the DSP expansion board to realize the cascading expansion of DSP resources, solving the problem of limited concurrency of DSP chips in the existing technology, reducing the cost of equipment replacement, and simplifying the Expansion process to adapt to changing user scenario needs.

CN113110946BActive Publication Date: 2024-11-01ITIBIA TECH (SUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110388692.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-12
Publication Date
2024-11-01
Estimated Expiration
2041-04-12

AI Technical Summary

Technical Problem

The number of concurrency of DSP chips in existing IPPBX devices is limited, which leads to the need to replace CPU and hardware when high concurrency is required, which increases costs and inconvenience, and inconvenience in expanding the concurrency of calls.

Method used

Through the DSP communication system based on CSME private protocol, the CPU motherboard and the DSP expansion board are connected by an Ethernet bus to realize resource management and control message interaction between the CPU motherboard and the DSP expansion board, and the expansion cascade method is used to expand DSP resources to avoid changing the CPU. need.

Benefits of technology

It realizes the expansion of call concurrency without replacing the CPU, reduces the cost of equipment expansion, simplifies maintenance and expansion processes, and adapts to changing user scenario needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113110946B_ABST
    Figure CN113110946B_ABST
Patent Text Reader

Abstract

The present invention relates to a DSP communication system and method based on a CSME private protocol. A CPU mainboard and a DSP expansion board are connected via an Ethernet bus. The CPU mainboard comprises a CSME protocol library module 1 and a DSP management library module, and the DSP expansion board comprises a CSME protocol library module 2 and a DSP function library module. The CSME protocol library module 1 and the CSME protocol library module 2 based on the Ethernet bus communicate using the CSME private protocol, and the CPU mainboard controls the DSP expansion board to apply for DSP resources, and the DSP expansion board reports the state of the DSP to the CPU mainboard and manages it, thereby realizing control message interaction between the CPU mainboard and the DSP expansion board. The expansion and control of DSP resources are realized, and the requirements of variable user scenarios and expansion are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a DSP communication system and method based on a CSME private protocol. Background Art

[0002] At present, the DSP chips used in IPPBX equipment are all integrated inside the CPU, and the maximum number of transcodings supported is small, resulting in a low concurrent caps. Therefore, after the CPU is selected for the equipment, the number of DSP resources is limited, resulting in the need to replace the CPU, hardware board, etc., or even replace the equipment if the user of a certain application needs a large number of concurrent calls, which makes it inconvenient to expand the number of concurrent calls.

[0003] Since the core component of the equipment is the CPU, the cost of replacing the CPU is relatively high.

[0004] This external expansion method can solve the need, but replacing the main frame CPU to meet user expansion needs will significantly increase costs. Summary of the invention

[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a DSP communication system and method based on the CSME private protocol.

[0006] The purpose of the present invention is achieved through the following technical solutions:

[0007] The DSP communication system based on the CSME private protocol is characterized in that: the CPU main board and the DSP expansion board are connected through an Ethernet bus, the CPU main board includes a CSME protocol library module 1 and a DSP management library module, and the DSP expansion board includes a CSME protocol library module 2 and a DSP function library module;

[0008] The CSME protocol library module 1 and the CSME protocol library module 2 based on the Ethernet bus communicate using the CSME private protocol, and control the DSP expansion board to apply for DSP resources through the CPU mainboard, and the DSP expansion board reports the DSP status to the CPU mainboard and manages it, thereby realizing control message interaction between the CPU mainboard and the DSP expansion board.

[0009] Further, the above-mentioned DSP communication system based on the CSME private protocol, wherein the CSME protocol library module 1 is used to send the DSP control request message and receive the underlying CSME message, encapsulate the upper layer sending control request message into a data packet with a CSME private protocol header and send it, and at the same time strip the CSME message header from the data received from the CSME private protocol header, and then send the data to the application layer;

[0010] The DSP management library module sends various command requests according to control needs, manages the message sending process of the state machine that sends the message, and receives events or responses reported by the bottom layer;

[0011] The CSME protocol library module 2 is used to receive and process the csme message from the CPU mainboard, and to encapsulate the csme message header and control the sending of the message sent from the DSP expansion board to the CPU mainboard;

[0012] The dsp function library module is used for the operation of the dsp function, realizing the final request function, and actively reporting events and notifications of abnormal status.

[0013] Furthermore, in the above-mentioned DSP communication system based on the CSME private protocol, the CSME protocol library module sends a DSP control message and receives a DSP message, wherein the CSME protocol library module sends a DSP control message, the DSP application layer sends the message to the bottom layer, the bottom layer encapsulates the received data with a CSME header, copies the data to the linked list header, starts the timer, sends the data to the destination MAC address, and retransmits the mechanism.

[0014] Furthermore, in the above-mentioned DSP communication system based on the CSME private protocol, the DSP application layer sends a message to the bottom layer, and uses the upper layer's send DSP request message interface csmencaps_sendmsg to receive the upper layer's data to be sent;

[0015] The bottom layer encapsulates the received data into a CSME header, assembles the DSP request message to be sent into the data of the private CSME message header, and the bottom CSME sending interface encapsulates the control message to be sent to the DSP expansion board into an Ethernet message with a CSME protocol header;

[0016] Copy the data to the linked list header, start the timer, and before sending the CSME message, first copy a copy of the CSME message and put it in the linked list, and start the timer at the same time, store the sent request message in the linked list for message management and confirmation of whether the message is sent successfully; when the timer for sending the DSP control message has not timed out, when the CPU main board receives the response ACK message from the DSP expansion board, the CSME protocol library module 1 deletes the DSP control message originally put into the linked list from the linked list, and checks whether the linked list is empty at this time. If not, send the next message added to the linked list; otherwise, wait for the next time when the CPU main board actively requests to send a control message; if the timer for sending the DSP control message times out, enable the retransmission mechanism at this time;

[0017] Send data to the destination MAC address, fill the Ethernet header of the csme message to support data transmission on the Ethernet bus, and send the dsp control message to the specified MAC destination address, that is, the dsp chip on the DSP expansion board;

[0018] The retransmission mechanism cooperates with the timer. When the timer for sending the dsp control message times out, the dsp message at the head of the linked list is sent to the DSP expansion board again. If the DSP expansion board does not receive the dsp control message, it can receive the message that was not received from the dsp before.

[0019] Further, in the above-mentioned DSP communication system based on the CSME private protocol, the CSME protocol library module 1 receives DSP messages, and the received DSP messages are divided into two types: messages responding to DSP and messages actively reported by DSP;

[0020] Respond to the dsp message, traverse the linked list after receiving the ack message, delete the message from the linked list if it matches the linked list, traverse the linked list and send the next message;

[0021] Among them, after receiving the ack message, the linked list is traversed to respond to the dsp message. When the dsp message received by the CPU mainboard is a responded ack message, the linked list is traversed on the CPU mainboard;

[0022] If there is a matching dsp control message in the linked list, the dsp control message in the linked list will be deleted from the linked list, otherwise the received message will be discarded directly;

[0023] Traverse the linked list to send the next message, traverse the linked list again, if there is a dsp message in the linked list, send the next dsp control message;

[0024] The message reported actively by dsp is judged as the message reported actively by dsp, and the actively reported message is sent to the upper application layer, and the upper application layer processes the message;

[0025] Wherein, it is determined that the message is a message actively reported by the DSP, and according to the type field of the message of the received data, it is determined that the message reported by the DSP expansion board is a message actively reported by the DSP expansion board;

[0026] Send the active reporting message to the upper layer application, remove the csme message header, and report the dsp original message from the bottom layer to the upper layer;

[0027] The upper application layer processes the messages, and the upper layer handles the events of the dsp.

[0028] Furthermore, in the above-mentioned DSP communication system based on the CSME private protocol, the DSP management library module is used for issuing and responding to DSP request commands;

[0029] Send dsp request service code, divide the service request into several parts, use the same channel structure for each step, configure each dsp request parameter, use linked list to ensure the order of each message, save the next step status of the current step, start the timer to determine whether the message is responded, complete the next step of the dsp request, and release the request message if there is no response in a certain transmission;

[0030] Send DSP request service code for upper layer applications to differentiate and process various DSP request messages; actively send request service code for specific functions to DSP expansion board;

[0031] Divide the business request into several parts and send them. Divide the specific functions to be completed into several steps. When performing each step, save the state of the step at that time for the sequential execution of the steps.

[0032] Each step uses the same channel structure. The first step of each time applies for the corresponding channel structure to store the corresponding request message; the subsequent sub-steps use the channel structure applied for the first time to confirm that it is a complete service request and to distinguish different DSP request services;

[0033] Configuration of each dsp request parameter. For different dsp request messages, configure different parameters and quantities;

[0034] Use a linked list to ensure that each message is sent in order. Use a global linked list to determine whether there is no message element in the linked list. If not, add the dsp request message to be sent at this time to the head of the global linked list, and then start sending the dsp request message; if there is a message element in the linked list, put the dsp request message to be sent into the global linked list;

[0035] Save the next step status of the current step, save the next step status of the dsp request message to be sent, and encapsulate the required message header;

[0036] Start the timer to determine whether the message is responded to, and at the same time, the upper layer dsp control message enters the bottom layer csme sending interface csmencaps_sendmsg by calling the sendto interface; the bottom layer CSME protocol library module sends the message to the DSP expansion board and delivers it to the dsp chip;

[0037] Complete the sending of the next step of the DSP request. When receiving the response from the DSP, parse the message, find the previously saved next step status value, and then enter the step corresponding to the DSP request, encapsulate the message header and data again, and cycle in sequence; until all the steps of this DSP request are completed, this DSP request is considered completed;

[0038] If there is no response to a certain transmission, the request message will be released. If the started timer times out and no response message is received to the request message of this step, it is considered that the DSP request message has failed and all the data of the saved DSP message will be released.

[0039] Furthermore, in the above-mentioned DSP communication system based on the CSME private protocol, the CSME protocol library module 2 is used to send and receive original data messages, encapsulate and strip the CSME message header, and process the DSP chip data.

[0040] Furthermore, in the above-mentioned DSP communication system based on the CSME private protocol, the DSP function library module is used to apply for DSP resources, send tone, and send incoming display.

[0041] The present invention is based on a DSP communication method of a CSME private protocol. The CPU mainboard sends a DSP request to be sent by an upper-layer DSP management library module to a corresponding sending interface csmencaps_sendmsg registered by a bottom-layer CSME protocol library module through a system call interface sendto. The bottom-layer CSME protocol library module obtains skb data to be sent, first applies for a necessary CSME protocol header size space and a target and channel structure for managing CSME data to be sent and received, fills in the fields required by the CSME protocol header, and then determines whether the previously applied channel sending chain list is an empty chain list. If so, inserts the data message to be sent that has encapsulated the CSME protocol header into the tail of the sending chain list, starts a timer, sets the timeout time of the timer and the required The number of retransmissions of the sent message; if the sending linked list is not an empty linked list, it means that there are still dsp request messages that have been sent but have not been responded to. At this time, the dsp message to be sent is added to the end of the sending linked list to ensure that the dsp request message sent first is processed first. Only when the dsp request message waiting for a response exceeds the number of retransmissions and still has not received the corresponding ack response, the dsp request message waiting for a response will be deleted from the linked list, and the next request message of the dsp request message waiting for a response will be sent at the same time; finally, the dev_queue_xmit interface is called to send the data to be sent from the Ethernet bus to the dsp chip on the DSP expansion board through the network card interface. After receiving the dsp request message, the dsp chip processes the request message and sends an ack message back to the CPU mainboard to inform the CPU mainboard that the DSP expansion board has received the request message;

[0042] The CSME protocol library module 2 manages and processes the received CSME protocol data. The DSP expansion board sends the CSME protocol data packet encapsulated by the CSME protocol library module 2 to the CPU mainboard from the DSP expansion board through the Ethernet bus. The bottom network port of the mainboard receives the CSME protocol data packet and directly sends it to the receiving interface csmencaps_rcv of the CSME protocol library module 1. The interface first determines whether the destination address of the received data is the destination address of the local end, and then determines whether the received CSME message is a response ACK message or an actively reported DSP notification message, and determines it through the cr field of the CSME protocol header of the received data;

[0043] If it is a response ack message, determine whether the received ack message is the request message that the sending list is waiting for a response to; if not, release the received skb data; if so, delete the dsp request message that is waiting for an ack response from the sending list, and delete the timer that was started when the dsp request was sent before; traverse the sending list again, if there is a dsp request message that needs to be sent in the sending list and the request message needs an ack response, send the request message to the network port directly through the interface dev_queue_xmit, and start the timer again for retransmission; if the dsp request message to be sent in the sending list does not need to return an ack response message, send the request message directly to the network port, and delete the dsp request message to be sent from the sending list;

[0044] After processing the received message from the DSP expansion board, the received message is added to the end of the receiving queue list. The receiving interface csmencaps_recvmsg of the CSME protocol library module 1, when it monitors that there is data to be read, sends the skb data added to the receiving queue list to the upper-layer dsp management library module. The upper-layer revcfrom of the dsp management library module receives the message and then performs corresponding processing;

[0045] If the received message is a notification message actively reported by the DSP expansion board, the underlying CSME protocol library module sends the received dsp message to the dsp management library module. The dsp management library module analyzes whether the received message is an event or a response. If it is an event, it is processed as an event. If it is a response, first determine whether the serial number of the received notification message is the most recently received notification message. If so, determine whether the received notification message needs to return an ack message. If necessary, the local end sends an ack response message to the DSP expansion board again and considers that the notification message received this time is not the latest notification message. If it is the latest notification message, the local end updates the serial number of the notification message that has been received, and then sends the ack message of this notification message back to the DSP expansion board.

[0046] Compared with the prior art, the present invention has significant advantages and beneficial effects, which are specifically embodied in the following aspects:

[0047] ① The present invention adopts a method of extending dsp chip boards to realize the cascade extension of dsp resources. When the number of concurrent calls needs to be expanded, there is no need to replace equipment, replace CPU and other means to achieve the purpose of expanding the number of concurrent users. Instead, the dsp expansion board is connected, and a dsp management library and a CSME protocol library are added to the mainboard to expand the dsp resources to expand the number of concurrent calls, thereby solving the needs of changing user scenarios and capacity expansion.

[0048] ② The main frame device CPU and the extended DSP board exchange signals through the Ethernet bus to complete the main frame CPU's control function over the extended DSP;

[0049] ③Use the expansion cascade method to achieve the expansion and control of DSP resources. The resources of the mainboard can be increased by the expansion devices, thus saving costs; the equipment expansion is simple and maintenance is convenient.

[0050] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by practicing the specific embodiments of the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 : The overall architecture diagram of the system of the present invention;

[0052] Figure 2 :CSME protocol library module 1 sends dsp control message flow diagram;

[0053] Figure 3 :CSME protocol library module 1 receiving response dsp message flow diagram;

[0054] Figure 4 : Schematic diagram of the message flow of CSME protocol library module 1 receiving active reporting from dsp;

[0055] Figure 5 : Schematic diagram of the specific process of sending request messages by the dsp management library module;

[0056] Figure 6 : Specific schematic diagram of the present invention. DETAILED DESCRIPTION

[0057] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, a specific implementation scheme is now described in detail.

[0058] like Figure 1As shown, in the DSP communication system based on the CSME private protocol, the CPU mainboard 1 and the DSP expansion board 2 are connected via an Ethernet bus, the CPU mainboard 1 includes a CSME protocol library module 101 and a DSP management library module 102, and the DSP expansion board 2 includes a CSME protocol library module 201 and a DSP function library module 202;

[0059] The CSME protocol library module 1 101 based on the Ethernet bus and the CSME protocol library module 2 201 communicate using the CSME private protocol, and control the DSP expansion board 2 to apply for DSP resources through the CPU mainboard 1, and the DSP expansion board 2 reports the DSP status to the CPU mainboard 1 and manages it, thereby realizing the control message interaction between the CPU mainboard 1 and the DSP expansion board 2.

[0060] CSME protocol library module 101, used to send dsp control request message and receive bottom layer CSME message, encapsulate the upper layer control request message into a data packet with CSME private protocol header, and strip the CSME message header from the data received with CSME private protocol header, and then send the data to the application layer;

[0061] The DSP management library module 102 sends various command requests according to control needs, manages the message sending process of the state machine that sends the message, and receives events or responses reported by the bottom layer;

[0062] CSME protocol library module 2 201, used for receiving and processing CSME messages from CPU main board 1, and encapsulating CSME message headers and sending control for messages sent from DSP expansion board 2 to CPU main board 1;

[0063] The DSP function library module 202 is used for the operation of the DSP function, realizing the final request function, and actively reporting events and notifications of abnormal status.

[0064] CSME protocol library module 101, sends dsp control messages, such as Figure 2 , and receive dsp messages such as Figure 3 , Figure 4 ;

[0065] Among them, the CSME protocol library module 101 sends a dsp control message, the dsp application layer sends the message to the bottom layer, the bottom layer encapsulates the received data into a csme header, copies the data to the linked list header, starts the timer, sends the data to the destination MAC address, and retransmits the mechanism;

[0066] The dsp application layer sends messages to the bottom layer, and uses the upper layer's send dsp request message interface csmencaps_sendmsg to receive the data to be sent by the upper layer;

[0067] The bottom layer encapsulates the received data into a CSME header, assembles the DSP request message to be sent into the data of the private CSME message header, and the bottom CSME sending interface encapsulates the control message to be sent to the DSP expansion board 2 into an Ethernet message with a CSME protocol header;

[0068] Copy the data to the linked list header, start the timer, and before sending the CSME message, first copy a copy of the CSME message and put it into the linked list, and start the timer at the same time, store the sent request message into the linked list for message management and confirmation of whether the message is sent successfully; when the timer for sending the DSP control message has not timed out, when the CPU main board 1 receives the response ACK message from the DSP expansion board 2, the CSME protocol library module 101 deletes the DSP control message originally put into the linked list from the linked list, and checks whether the linked list is empty at this time. If not, send the next message added to the linked list; otherwise, wait for the next time when the CPU main board 1 actively requests to send a control message; if the timer for sending the DSP control message times out, enable the retransmission mechanism at this time;

[0069] Send data to the destination MAC address, fill the Ethernet header of the csme message, and support data transmission on the Ethernet bus, so that the dsp control message is sent to the specified MAC destination address, that is, the dsp chip on the DSP expansion board 2;

[0070] The retransmission mechanism cooperates with the timer. When the timer for sending the dsp control message times out, the dsp message at the head of the linked list is sent to the DSP expansion board 2 again. If the DSP expansion board 2 does not receive the dsp control message, it can receive the message that was not received from the dsp before.

[0071] The CSME protocol library module 101 receives dsp messages, and the received dsp messages are divided into two types: messages responding to dsp and messages actively reported by dsp;

[0072] Respond to the dsp message, traverse the linked list after receiving the ack message, delete the message from the linked list if it matches the linked list, traverse the linked list and send the next message;

[0073] Among them, after receiving the ack message, the linked list is traversed to respond to the dsp message. When the dsp message received by the CPU mainboard is a responded ack message, the linked list is traversed on the CPU mainboard 1;

[0074] If there is a matching dsp control message in the linked list, the dsp control message in the linked list will be deleted from the linked list, otherwise the received message will be discarded directly;

[0075] Traverse the linked list to send the next message, traverse the linked list again, if there is a dsp message in the linked list, send the next dsp control message;

[0076] The message reported actively by dsp is judged as the message reported actively by dsp, and the actively reported message is sent to the upper application layer, and the upper application layer processes the message;

[0077] Wherein, it is determined that the message is a message actively reported by the DSP, and according to the type field of the message of the received data, it is determined that the message reported by the DSP expansion board 2 is a message actively reported by the DSP expansion board 2;

[0078] Send the active reporting message to the upper layer application, remove the csme message header, and report the dsp original message from the bottom layer to the upper layer;

[0079] The upper application layer processes the messages, and the upper layer handles the events of the dsp.

[0080] The dsp management library module 102 is used for issuing and responding to dsp request commands, such as Figure 5 ;

[0081] Send dsp request service code, divide the service request into several parts, use the same channel structure for each step, configure each dsp request parameter, use linked list to ensure the order of each message, save the next step status of the current step, start the timer to determine whether the message is responded, complete the next step of the dsp request, and release the request message if there is no response in a certain transmission;

[0082] Send DSP request service code, which is used for upper layer applications to distinguish and process various DSP request messages; actively send the request service code of specific function to DSP expansion board 2;

[0083] Divide the business request into several parts and send them. Divide the specific functions to be completed into several steps. When performing each step, save the state of the step at that time for the sequential execution of the steps.

[0084] Each step uses the same channel structure. The first step of each time applies for the corresponding channel structure to store the corresponding request message; the subsequent sub-steps use the channel structure applied for the first time to confirm that it is a complete service request and to distinguish different DSP request services;

[0085] Configuration of each dsp request parameter. For different dsp request messages, configure different parameters and quantities;

[0086] Use a linked list to ensure that each message is sent in order. Use a global linked list to determine whether there is no message element in the linked list. If not, add the dsp request message to be sent at this time to the head of the global linked list, and then start sending the dsp request message; if there is a message element in the linked list, put the dsp request message to be sent into the global linked list;

[0087] Save the next step status of the current step, save the next step status of the dsp request message to be sent (used to know what operation to perform next after receiving the dsp response), and encapsulate the required message header;

[0088] The timer is started to determine whether the message is responded to, and at the same time, the upper layer dsp control message enters the bottom layer csme sending interface csmencaps_sendmsg by calling the sendto interface; the bottom layer CSME protocol library module 1 (101) sends the message to the DSP expansion board (2) and delivers it to the dsp chip;

[0089] Complete the sending of the next step of the DSP request. When receiving the response from the DSP, parse the message, find the previously saved next step status value, and then enter the step corresponding to the DSP request, encapsulate the message header and data again, and cycle in sequence; until all the steps of this DSP request are completed, this DSP request is considered completed;

[0090] If there is no response to a certain transmission, the request message will be released. If the started timer times out and no response message is received to the request message of this step, it is considered that the DSP request message has failed and all the data of the saved DSP message will be released.

[0091] CSME protocol library module 201 is used to send and receive original data messages, encapsulate and strip the message header of CSME, and process DSP chip data.

[0092] The DSP function library module 202 is used to apply for DSP resources, send tone sounds, and send incoming displays.

[0093] like Figure 6As shown, the CPU motherboard 1 sends the dsp request to be sent by the upper-layer dsp management library module 102 to the corresponding sending interface csmencaps_sendmsg registered by the underlying CSME protocol library module 101 through the system call interface sendto. The underlying CSME protocol library module 101 obtains the skb data to be sent, first applies for the necessary CSME protocol header size space and the target and channel structures for managing the CSME data to be sent and received, fills in the fields required by the CSME protocol header, and then determines whether the sending linked list of the previously applied channel is an empty linked list. If so, insert the data message to be sent that has been encapsulated with the CSME protocol header into the tail of the sending linked list, start the timer, set the timeout of the timer and the repeatable time of the message to be sent The number of transmissions; if the sending linked list is not an empty linked list, it means that there are still dsp request messages that have been sent but have not been responded to. At this time, the dsp message to be sent is added to the end of the sending linked list to ensure that the dsp request message sent first is processed first. Only when the dsp request message waiting for a response exceeds the number of retransmissions and still has not received the corresponding ack response, the dsp request message waiting for a response will be deleted from the linked list, and the next request message of the dsp request message waiting for a response will be sent at the same time; finally, the dev_queue_xmit interface is called to send the data to be sent from the Ethernet bus to the dsp chip on the DSP expansion board 2 through the network card interface. After receiving the dsp request message, the dsp chip processes the request message and sends an ack message back to the CPU mainboard 1 to inform the CPU mainboard 1 that the DSP expansion board 2 has received the request message;

[0094] The CSME protocol library module 201 manages and processes the received CSME protocol data. The DSP expansion board 2 sends the CSME protocol data packet encapsulated by the CSME protocol library module 201 to the CPU main board 1 through the Ethernet bus. The bottom network port of the main board receives the CSME protocol data packet and directly sends it to the receiving interface csmencaps_rcv of the CSME protocol library module 101. The interface first determines whether the destination address of the received data is the destination address of the local end, and then determines whether the received CSME message is a response ACK message or an actively reported DSP notification message, and determines it through the cr field of the CSME protocol header of the received data;

[0095] If it is a response ack message, determine whether the received ack message is the request message that the sending list is waiting for a response to; if not, release the received skb data; if so, delete the dsp request message that is waiting for an ack response from the sending list, and delete the timer that was started when the dsp request was sent before; traverse the sending list again, if there is a dsp request message that needs to be sent in the sending list and the request message needs an ack response, send the request message to the network port directly through the interface dev_queue_xmit, and start the timer again for retransmission; if the dsp request message to be sent in the sending list does not need to return an ack response message, send the request message directly to the network port, and delete the dsp request message to be sent from the sending list;

[0096] After processing the received message from DSP expansion board 2, the received message is added to the tail of the receiving queue list. The receiving interface csmencaps_recvmsg of CSME protocol library module 101, when monitoring that there is data to be read, sends the skb data added to the receiving queue list to the upper layer dsp management library module 102. The upper layer revcfrom of dsp management library module 102 receives the message and then performs corresponding processing;

[0097] If the received message is a notification message actively reported by the DSP expansion board 2, the underlying CSME protocol library module 101 sends the received DSP message to the DSP management library module 102. The DSP management library module 102 analyzes whether the received message is an event or a response. If it is an event, it is processed as an event. If it is a response, it is first determined whether the sequence number of the received notification message is the most recently received notification message. If so, it is determined whether the received notification message needs to return an ACK message. If necessary, the local end sends an ACK response message to the DSP expansion board 2 again, and considers that the notification message received this time is not the latest notification message. If it is the latest notification message, the local end updates the sequence number of the notification message that has been received, and then sends the ACK message of this notification message back to the DSP expansion board 2.

[0098] In summary, the present invention adopts the method of extending the dsp chip board to realize the cascading and expansion of the extended dsp resources. When the number of concurrent calls needs to be expanded, there is no need to replace the equipment, replace the CPU and other means to achieve the purpose of expanding the number of concurrent users. Instead, the dsp expansion board is connected and the dsp management library and CSME protocol library are added to the mainboard to expand the dsp resources to expand the number of concurrent calls and solve the changing user scenarios and capacity expansion needs.

[0099] The main frame device CPU and the extended DSP board exchange signals through the Ethernet bus to complete the control function of the main frame CPU over the extended DSP.

[0100] The expansion and control of DSP resources can be realized by adopting the expansion cascade method. The resources of the mainboard can be increased by the expansion equipment, thus saving costs; the equipment expansion is simple and maintenance is convenient.

[0101] It should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the scope of rights of the present invention. At the same time, the above description should be understandable and implementable for professionals in the relevant technical field. Therefore, other equivalent changes or modifications that do not deviate from the spirit disclosed by the present invention should be included in the scope of the patent application.

Claims

1. A DSP communication system based on the CSME private protocol, characterized by: The CPU main board (1) and the DSP expansion board (2) are connected via an Ethernet bus, the CPU main board (1) comprises a CSME protocol library module 1 (101) and a DSP management library module (102), and the DSP expansion board (2) comprises a CSME protocol library module 2 (201) and a DSP function library module (202); The CSME protocol library module 1 (101) and the CSME protocol library module 2 (201) based on the Ethernet bus communicate using the CSME private protocol, and control the DSP expansion board (2) to apply for DSP resources through the CPU main board (1), and the DSP expansion board (2) reports the DSP status to the CPU main board (1) and manages it, thereby realizing the control message interaction between the CPU main board (1) and the DSP expansion board (2); CSME protocol library module 1 (101), used to send DSP control request messages and receive CSME messages from the bottom layer, encapsulate the control request message sent by the upper layer into a data packet with a CSME private protocol header and send it, and at the same time strip the CSME message header from the data received with the CSME private protocol header, and then send the data to the application layer; The DSP management library module (102) sends various command requests according to control needs, manages the message sending process of the state machine that sends the message, and receives events or responses reported by the bottom layer; The CSME protocol library module 2 (201) is used to receive and process CSME messages from the CPU main board (1), and to encapsulate and process the CSME message header of the message sent from the DSP expansion board (2) to the CPU main board (1), and to control the sending; The dsp function library module (202) is used for the operation of dsp functions, realizing the final request function, and actively reporting events and notifications of abnormal states.

2. The DSP communication system based on the CSME private protocol according to claim 1, characterized in that: The CSME protocol library module 1 (101) sends a dsp control message and receives a dsp message, wherein the CSME protocol library module 1 (101) sends a dsp control message, the dsp application layer sends the message to the bottom layer, the bottom layer encapsulates the received data with a csme header, copies the data to the linked list header, starts a timer, and sends the data to the destination MAC address.

3. The DSP communication system based on the CSME private protocol according to claim 2, characterized in that: The dsp application layer sends messages to the bottom layer, and uses the upper layer's send dsp request message interface csmencaps_sendmsg to receive the data to be sent by the upper layer; The bottom layer encapsulates the received data into a CSME header, assembles the DSP request message to be sent into the data of the private CSME message header, and the bottom layer CSME sending interface encapsulates the control message to be sent to the DSP expansion board (2) into an Ethernet message with a CSME protocol header; Copy the data to the linked list header, start the timer, and before sending the CSME message, first copy the CSME message and put it into the linked list, and start the timer at the same time, store the sent request message into the linked list for message management and confirmation of whether the message is sent successfully; when the timer for sending the DSP control message has not timed out, when the CPU main board (1) receives the response ACK message from the DSP expansion board (2), the CSME protocol library module 1 (101) deletes the DSP control message originally put into the linked list from the linked list, and checks whether the linked list is empty at this time. If not, send the next message added to the linked list; otherwise, wait for the next time when the CPU main board (1) actively requests to send a control message; If the timer for sending the dsp control message times out, the retransmission mechanism is enabled; Send the data to the destination MAC address, fill the Ethernet header of the csme message to support the transmission of data on the Ethernet bus, and send the dsp control message to the specified MAC destination address, that is, the dsp chip on the DSP expansion board (2); The retransmission mechanism cooperates with the timer. When the timer for sending the dsp control message times out, the dsp message placed at the head of the linked list is sent to the DSP expansion board (2) again. If the DSP expansion board (2) does not receive the dsp control message, it receives the dsp message that was not received before again.

4. The DSP communication system based on the CSME private protocol according to claim 1, characterized in that: The CSME protocol library module 1 (101) receives dsp messages, and the received dsp messages are divided into two types: messages responding to dsp and messages actively reported by dsp; Respond to the dsp message, traverse the linked list after receiving the ack message, delete the message from the linked list if it matches the linked list, traverse the linked list and send the next message; Among them, when receiving the ack message, the linked list is traversed to respond to the dsp message. When the dsp message received by the CPU mainboard is a response ack message, the linked list is traversed on the CPU mainboard (1); If there is a matching dsp control message in the linked list, the dsp control message in the linked list will be deleted from the linked list, otherwise the received message will be discarded directly; Traverse the linked list to send the next message, traverse the linked list again, if there is a dsp message in the linked list, send the next dsp control message; The message reported actively by dsp is judged as the message reported actively by dsp, and the actively reported message is sent to the upper application layer, and the upper application layer processes the message; wherein the message is determined to be a message actively reported by the DSP, and according to the type field of the message of the received data, it is determined that the message reported by the DSP expansion board (2) is a message actively reported by the DSP expansion board (2); Send the active reporting message to the upper layer application, remove the csme message header, and report the dsp original message from the bottom layer to the upper layer; The upper application layer processes the messages, and the upper layer handles the events of the dsp.

5. The DSP communication system based on the CSME private protocol according to claim 1, characterized in that: DSP management library module (102), used for issuing and responding to DSP request commands; Send dsp request service code, divide the service request into several parts, use the same channel structure for each step, configure each dsp request parameter, use linked list to ensure the order of each message, save the next step status of the current step, start the timer to determine whether the message is responded, complete the next step of the dsp request, and release the request message if there is no response in a certain transmission; Sending a DSP request service code for upper layer applications to differentiate between various DSP request messages; actively sending a request service code for a specific function to the DSP expansion board (2); Divide the business request into several parts and send them. Divide the specific functions to be completed into several steps. When performing each step, save the state of the step at that time for the sequential execution of the steps. Each step uses the same channel structure. The first step of each time applies for the corresponding channel structure to store the corresponding request message; the subsequent sub-steps use the channel structure applied for the first time to confirm that it is a complete service request and to distinguish different DSP request services; Configuration of each dsp request parameter. For different dsp request messages, configure different parameters and quantities; Use a linked list to ensure that each message is sent in order. Use a global linked list to determine whether there is no message element in the linked list. If not, add the dsp request message to be sent at this time to the head of the global linked list, and then start sending the dsp request message; if there is a message element in the linked list, put the dsp request message to be sent into the global linked list; Save the next step status of the current step, save the next step status of the dsp request message to be sent, and encapsulate the required message header; A timer is started to determine whether the message is responded to, and at the same time, the upper layer dsp control message enters the bottom layer csme sending interface csmencaps_sendmsg by calling the sendto interface; the bottom layer CSME protocol library module 1 (101) sends the message to the DSP expansion board (2) and delivers it to the dsp chip; Complete the sending of the next step of the DSP request. When receiving the response from the DSP, parse the message, find the previously saved next step status value, and then enter the step corresponding to the DSP request, encapsulate the message header and data again, and cycle in sequence; until all the steps of this DSP request are completed, this DSP request is considered completed; If there is no response to a certain transmission, the request message will be released. If the started timer times out and no response message is received to the request message of this step, it is considered that the DSP request message has failed and all the data of the saved DSP message will be released.

6. The DSP communication system based on the CSME private protocol according to claim 1, characterized in that: The CSME protocol library module 2 (201) is used to send and receive original data messages, encapsulate and strip the CSME message header, and process DSP chip data.

7. The DSP communication system based on the CSME private protocol according to claim 1, characterized in that: The DSP function library module (202) is used to apply for DSP resources, send tone sounds, and send incoming displays.

8. A DSP communication method based on a CSME private protocol, characterized in that: The CPU main board (1) sends the DSP request to be sent by the upper-layer DSP management library module (102) to the corresponding sending interface csmencaps_sendmsg registered by the underlying CSME protocol library module (101) through the system call interface sendto. The underlying CSME protocol library module (101) obtains the skb data to be sent, first applies for the necessary CSME protocol header size space and target and channel structures for managing the CSME data to be sent and received, fills in the fields required by the CSME protocol header, and then determines whether the sending linked list of the previously applied channel is an empty linked list. If so, insert the data message to be sent that has been encapsulated with the CSME protocol header into the end of the sending linked list, start the timer, set the timeout of the timer and the retransmission period of the message to be sent. times; if the sending linked list is not an empty linked list, it means that there are still dsp request messages that have been sent but have not been responded to. At this time, the dsp message to be sent is added to the end of the sending linked list to ensure that the dsp request message sent first is processed first. Only when the dsp request message waiting for a response exceeds the number of retransmissions and still does not receive the corresponding ack response, the dsp request message waiting for a response will be deleted from the linked list, and the next request message of the dsp request message waiting for a response will be sent at the same time; finally, the dev_queue_xmit interface is called to send the data to be sent from the Ethernet bus to the dsp chip on the DSP expansion board (2) through the network card interface. After receiving the dsp request message, the dsp chip processes the request message and sends an ack message back to the CPU mainboard (1) to inform the CPU mainboard (1) that the DSP expansion board (2) has received the request message; The CSME protocol library module 2 (201) manages and processes the received CSME protocol data. The DSP expansion board (2) sends the CSME protocol data packet encapsulated by the CSME protocol library module 2 (201) from the DSP expansion board (2) to the CPU main board (1) through the Ethernet bus. The bottom network port of the main board receives the CSME protocol data packet and directly sends it to the receiving interface csmencaps_rcv of the CSME protocol library module 1 (101). The interface first determines whether the destination address of the received data is the destination address of the local end, and then determines whether the received CSME message is a response ACK message or an actively reported DSP notification message, and determines it through the cr field of the CSME protocol header of the received data. If it is a response ack message, determine whether the received ack message is the request message that the sending list is waiting for a response to; if not, release the received skb data; if so, delete the dsp request message that is waiting for an ack response from the sending list, and delete the timer that was started when the dsp request was sent before; traverse the sending list again, if there is a dsp request message that needs to be sent in the sending list and the request message needs an ack response, send the request message to the network port directly through the interface dev_queue_xmit, and start the timer again for retransmission; if the dsp request message to be sent in the sending list does not need to return an ack response message, send the request message directly to the network port, and delete the dsp request message to be sent from the sending list; After processing the message received from the DSP expansion board (2), the received message is added to the end of the receiving queue list. After the receiving interface csmencaps_recvmsg of the CSME protocol library module 1 (101) monitors that there is data to be read, the skb data added to the receiving queue list is sent to the upper layer dsp management library module (102). The upper layer revcfrom of the dsp management library module (102) receives the message and then performs corresponding processing; If the received message is a notification message actively reported by the DSP expansion board (2), the bottom CSME protocol library module 1 (101) sends the received DSP message to the DSP management library module (102). The DSP management library module (102) analyzes whether the received message is an event or a response. If it is an event, it is processed as an event. If it is a response, it first determines whether the sequence number of the received notification message is the most recently received notification message. If so, it determines whether the received notification message needs to return an ACK message. If necessary, the local end sends an ACK response message to the DSP expansion board (2) again and considers that the notification message received this time is not the latest notification message. If it is the latest notification message, the local end updates the sequence number of the notification message that has been received, and then sends the ACK message of this notification message back to the DSP expansion board (2).