CN101089835A - Control method, system and equipment of single serial port multi-CPU - Google Patents

Control method, system and equipment of single serial port multi-CPU Download PDF

Info

Publication number
CN101089835A
CN101089835A CN 200710028332 CN200710028332A CN101089835A CN 101089835 A CN101089835 A CN 101089835A CN 200710028332 CN200710028332 CN 200710028332 CN 200710028332 A CN200710028332 A CN 200710028332A CN 101089835 A CN101089835 A CN 101089835A
Authority
CN
Grant status
Application
Patent type
Prior art keywords
serial
cpu
port
management module
unit
Prior art date
Application number
CN 200710028332
Other languages
Chinese (zh)
Other versions
CN100511200C (en )
Inventor
刘华伟
冯健
霍红伟
Original Assignee
华为技术有限公司
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

Links

Abstract

A method for controlling single serial-interface multi-CPU includes receiving serial-interface switchover command sent from control terminal by source CPU, changing state information sent to serial-interface management module by source CPU according to said serial-interface switchover command and switching serial-interface from source CPU to another CPU by serial-interface manage module according to changed state information. The system used for realizing said method is also disclosed.

Description

单串口多CPU的控制方法、系统及设备 Single control method of serial multi-CPU system and device

技术领域 FIELD

本发明涉及通信领域,尤其涉及一种单串口多CPU的控制方法、系统及设备。 The present invention relates to communication field, and particularly relates to a control method for a single-port multi-CPU system and apparatus.

背景技术 Background technique

随着电子技术的发展,单板硬件设计复杂度越来越高,一块单板上可能有多个中央处理单元(Center Process Unit,CPU),尤其是在高级电信计算平台(Advanced Telecom Computing Architecture,ATCA)架构产品的单板中实现了业务与管理平面的分离,这样在一块单板中除了业务CPU的调试串口外,还有底板管理控制器(Baseboard Management Controller,BMC)的CPU的调试串口,因此需要在单板设计多路串口电路,增加了设计的复杂性,同时多个串口插座会占用很多印刷电路板(Printed Circuit Board,PCB)和面板空间,增加了电路布局和结构设计的难度。 With the development of electronic technology, hardware board design complexity increasing, a single board may have multiple central processing units (Center Process Unit, CPU), in particular computing platform (Advanced Telecom Computing Architecture in advanced telecommunications, ATCA) board architecture of the product to achieve a separation of business and management plane, so that a single board in addition to debug serial CPU business, as well as the CPU serial debugging BMC (Baseboard management controller, BMC), and Thus the need to design a multi-channel serial interface circuit board, increasing the complexity of the design, while the serial port on the plurality of printed circuit boards will take up a lot (printed circuit board, PCB) and the panel space, increasing the difficulty of the circuit layout and design.

针对上述问题,如图1所示,现有技术是将单板上各路CPU分别通过的通用异步串口101,亦称为通用异步收/发信器(Universal AsynchronousReceiver/Transmitter,UART),与单板复杂可编程逻辑器件102(ComplexProgrammable Logic Device,CPLD)连接,在面板上设置一个串口插座106,通过与之相匹配的串口插头105与控制终端107连接,并通过RS232接口104与串口电平切换电路103连接,其中RS232(Recommended Standard 232)是电信工业联合会/美国电子工业协会(TIA/EIA)制定的推荐232标准,是数据终端设备和数据电路终接设备之间二进制串行数据交换接口。 For the above problem, shown in Figure 1, the prior art is a single board CPU brightest respectively universal asynchronous serial port 101, also referred to as Universal Asynchronous Receiver / sender (Universal AsynchronousReceiver / Transmitter, UART), and a single plate complex programmable logic device 102 (ComplexProgrammable logic device, CPLD) connector, a serial port is provided on the panel socket 106, connected by a serial matched control terminal 105 and the plug 107, and switch 104 via the serial port RS232 interface level circuit 103 is connected, wherein RS232 (recommended standard 232) is a telecommunications industry Association / electronic industries Association (TIA / EIA) standard established by recommendation 232, a data terminal equipment and data circuit terminating equipment binary serial data exchange between the interface . 在CPLD的输出端,串口电平切换电路103通过一个UART与CPLD连接。 At the output of the CPLD, serial level switching circuit 103 via a UART connection and CPLD. 然后,在单板上设置一跳线或拨码开关108用于控制CPLD进行串口切换。 Then, the board provided with a DIP switch or jumper 108 for controlling serial switch the CPLD. 然而在实施该技术的过程中,跳线或拨码开关仍然需要人工控制,无法实现远程维护。 However, in the implementation of this technique, a jumper or dip switch still need manual control, remote maintenance can not be achieved.

发明内容 SUMMARY

本发明实施例所要解决的技术问题在于,提供一种单串口多CPU的控制方法、系统及设备,可以实现单串口在多个CPU之间自动切换。 Example technical problem to be solved by the present invention is to provide a method for controlling a multi-port single CPU, system and equipment, a single port can be achieved automatically switch between the plurality of CPU.

一种单串口多CPU的控制方法,包括:源CPU接收控制终端发送的串口切换命令;所述源CPU根据所述串口切换命令变更其发送给串口管理模块的状态信息;所述串口管理模块根据变更后的状态信息将串口从源CPU切换到另一个CPU。 The method of controlling a single-port multi-CPU, comprising: a source receiving a control CPU serial handover command sent by a terminal; the source CPU sends it to the changed status information management module according to the serial port handover command; port management module according to the state information after the change over from a source port to another CPU to CPU.

一种单串口多CPU控制系统,包括至少两个CPU、串口插座及其相匹配的串口插头,其中,该系统还包括:一串口管理模块,其与多个CPU连接,并通过串口插座及串口插头与一控制终端连接,用于根据所述CPU发送的状态信息进行串口切换。 A single-port multi-CPU system control, comprising at least two CPU, and serial port connector socket match, wherein the system further comprises: a port management module, which is connected to a plurality of CPU, through the serial port and the outlet port and and a control terminal connected to the plug, for switching the serial port according to the status information sent by the CPU.

一种CPU,其中,该CPU还包括:串口切换命令接收单元,用于接收控制终端发送的串口切换命令;串口切换命令响应单元,用于接收到所述串口切换命令后变更其发送给串口管理模块的状态信息;状态信息发送单元,用于向所述串口管理模块发送所述状态信息。 One kind of CPU, wherein the CPU further comprises: serial switching command receiving unit, a control port for receiving a handover command sent by the terminal; serial switching command response unit for changing sent to the serial port management after receiving the handover command the status information module; status information transmitting unit for transmitting the state information to the serial management module.

一种串口管理模块,该串口管理模块包括:状态信息接收单元,用于接收所述CPU发送的状态信息;状态信息分析单元,用于根据所述状态信息接收单元接收到的状态信息判断是否发生串口切换,并将判断结果输出;串口切换执行单元,用于接收所述状态信息分析单元输出的判断结果,当判断为发生串口切换,则根据所述判断结果将串口从源CPU切换到另一个CPU。 One kind of port management module, the port management module comprising: status information receiving means for receiving said status information sent by the CPU; state information analysis unit, to the information receiving unit receives the state information determines whether or not occur according to the state serial switching, and outputs the determination result; serial handover execution unit for receiving the status information of the determination result output from the analyzing means, when it is determined that the serial handover occurs, according to the determination result is switched from the source port to another CPU CPU.

上述单串口多CPU的控制方法、系统及设备是通过发送串口切换命令到CPU,通过CPU更改其发送给串口管理模块的状态信息实现了一个串口在多个CPU之间自动切换,从而无需人工控制,并可以实现远程维护。 The control method of the single-port multi-CPU, the device is switched by the system and sent to the CPU serial command, to change its state to a port management module implemented by the CPU of the information automatically switch between a plurality of serial CPU, eliminating the need for manual control and remote maintenance can be achieved.

附图说明 BRIEF DESCRIPTION

图1是现有单串口多CPU控制系统的结构框图;图2是本发明实施例的一种单串口多CPU控制系统的结构框图; FIG. 1 is a block diagram of the existing single serial control multi-CPU system; FIG. 2 embodiment of the present invention is a system block diagram of an embodiment of a single multi-port control CPU;

图3是本发明实施例的一种CPU的结构框图;图4是本发明实施例的一种串口管理模块的结构框图;图5是图4中所述状态信息分析单元22的结构框图;图6是图4中所述状态信息分析单元22的结构框图;图7是本发明实施例的一种单串口多CPU控制系统的结构框图;图8是图7所述的状态检测单元501状态检测的逻辑示意图;图9是图7所述串口故障检测单元213故障检测的逻辑示意图;图10是图7所述串口切换执行单元23的逻辑状态机示意图;图11是本发明实施例的一种单串口多CPU的控制方法的主流程图;图12是本发明实施例的一种单串口多CPU的控制方法的详细流程图。 FIG 3 is a block diagram of a CPU according to an embodiment of the present invention; FIG. 4 is a structural block diagram of a serial management module according to embodiments of the present invention; FIG. 5 is a block diagram of the status information analyzing unit 22 of FIG. 4; and FIG. 6 is a block diagram in FIG. 4 in the state information analyzing unit 22; FIG. 7 is a block diagram of a single-port multi-CPU embodiment of the control system according to the present invention; FIG. 8 is a state diagram of the detecting unit 7 detects a state 501 the diagram; FIG. 9 is a schematic diagram of fault detector 213 in FIG. 7 serial fault detection unit; FIG. 10 is a diagram of the switch 7 serial execution logic unit 23 is a schematic view of a state machine; FIG. 11 is an embodiment of the present invention single multiple serial main flowchart of CPU control method; FIG. 12 is a detailed flowchart illustrating a control method for a single-port multi-CPU embodiment of the present invention.

具体实施方式 detailed description

本发明实施例提供的一种单串口多CPU的控制方法及系统、设备是通过在串口插座与CPU之间设置一串口管理模块,利用控制终端向CPU发送串口切换命令,源CPU接收到所述串口切换命令后更改其发送给串口管理模块的状态信息,而串口管理模块则根据所述状态信息进行串口切换。 A single-port multi-CPU provided in the control method and system, apparatus according to the present invention, by providing the control terminal transmits a serial port management module between the CPU socket and CPU serial handover command, the source CPU receives serial change its status information to a port management module after the handover command, and the serial port management module switching is performed according to the state information.

下面结合附图具体阐述本发明实施例的技术方案。 A specific embodiment of the technical solution described embodiment of the present invention in conjunction with the accompanying drawings.

参考图2,是本发明实施例的一种单串口多CPU控制系统的结构框图;根据该图可知,一种单串口多CPU控制系统包括至少两个CPU(本图以三个CPU为例)、控制终端107、串口插座106及其相匹配的串口插头105,其中,在CPU与串口插座106之间设置有一串口管理模块2,用于根据所述CPU发送的状态信息进行串口切换。 Referring to Figure 2, a block diagram of a single multi-CPU serial control system according to an embodiment of the present invention; seen from the figure, a single-port multi-CPU system comprises at least two control CPU (three in the present FIG CPU Example) , the control terminal 107, the serial port 106 and outlet connector port 105 match, wherein, between the CPU and the outlet port 106 is provided with a port management module 2, for switching the serial port according to the status information sent by the CPU. 串口管理模块2与多个CPU连接,同时与串口插座106连接,而串口插座106通过串口插头105与控制终端107连接。 And a plurality of port management module connected to the CPU 2 is also connected to the outlet port 106, through the serial port 106 and outlet port 105 and the control plug terminal 107 is connected.

当需要将第一CPU切换到其它CPU时,控制终端107通过串口插座106和串口管理模块2向第一CPU发送串口切换命令,第一CPU接收到串口切换命令后立即变更其发送给串口管理模块2的状态信息,串口管理模块2根据所述状态信息将串口从第一CPU切换到第二CPU。 When the CPU needs to be switched to the other of the first CPU, the control terminal 1072 transmits a handover command to the serial port through the serial port on the first CPU and the port management module 106, changes the first CPU receives serial port management module transmits to the handover command immediately after status information 2, the port management module 2 port information according to the state switching from the first CPU to the second CPU.

在具体实现时,如图3所示,所述图2中的每一中央处理单元(CPU)至少包括:串口切换命令接收单元302,用于接收控制终端107发送的串口切换命令; In specific implementation, shown in Figure 3, each of the central processing unit (CPU) in the FIG. 2 at least comprises: serial switching command receiving unit 302, a control terminal for receiving a serial transmission of handover command 107;

串口切换命令响应单元303,与串口切换命令接收单元302耦接,用于接收到所述串口切换命令后,变更其发送给串口管理模块2的状态信息;串口控制信息发送单元301,用于向串口管理模块2发送所述状态信息;在具体实现时,如图4所示,所述图2中的串口管理模块2至少包括:状态信息接收单元21,用于接收所述CPU发送的状态信息;状态信息分析单元22,用于根据状态信息接收单元21接收到的状态信息判断是否发生串口切换,并将判断结果输出;串口切换执行单元23,用于接收状态信息分析单元22输出的判断结果,状态信息分析单元22当判断为发生串口切换时,则根据所述判断结果将串口从源CPU切换到另一个CPU。 Serial switching command response unit 303, the serial port switch command receiving unit 302 coupled to the serial port after receiving the handover command, change the status 2 information management module sends it to the serial port; serial information transmission control unit 301, for the port management module transmits the status information 2; in specific implementation, as shown in FIG. 4, FIG. 2 of the port management module comprises at least 2: status information receiving unit 21, for receiving said status information sent by the CPU ; status information analyzing unit 22, for determining based on the state information received by the information receiving unit 21 whether the status of the serial handover occurs, and outputs the determination result; serial handover performing unit 23, a determination result output from the reception state information analyzing unit 22 , status information analyzing unit 22 determines that the serial port when handover occurs, according to the determination result is switched from the source CPU port to another CPU.

在本具体实施例中,如图5所示,所述图4中的状态信息分析单元22至少包括:一状态检测单元501,用于在设定的时间内检测到所述状态信息发生改变时,判断为发生串口切换,并判断结果输出到串口切换执行单元23。 When a state detection unit 501, for detecting the state information is changed within a set period of time: in this particular embodiment, as shown in FIG. 5, FIG. 4 of the state information analyzing unit 22 includes at least , serial switching occurs is determined, and the determination result is output to the serial port handover execution unit 23. 串口切换执行单元23根据所述判断结果将串口从源CPU切换到另一个CPU。 Serial handover execution unit 23 in accordance with the determination result is switched from the source CPU port to another CPU.

在本具体实施例中,所述图4中的状态信息分析单元22还可以有其它方式实现,如图6所示,状态信息分析单元22具体包括:串口切换状态寄存器601,用于保存串口切换状态表;串口切换查询单元602,与串口控制信息接收单元601耦接,用于根据所述状态信息在串口切换状态寄存器601中查找与所述状态信息相对应的串口切换状态,并作为判断结果输出到串口切换执行单元23。 In this particular embodiment, the 4 state information analysis unit 22 may also be implemented in other ways, as shown in FIG. 6, the status information analyzing unit 22 comprises: a switching state of the serial register 601 for storing port switching state table; query serial switching unit 602, the serial port control information receiving unit 601 coupled to the serial port is used to find the switching state corresponding to the state information in the serial register 601 according to the switching state of the status information, and as a result of determination output to the serial port handover execution unit 23.

其中,串口切换状态寄存器601中存放的串口切换状态可以是表1所示的串口切换状态表。 Wherein the serial port switching state of the switching state register 601 may be stored in the serial switching state table shown in Table 1.

表1、串口切换状态表 Table 1, switch port state table

各路CPU的状态信息可以通过数据地址总线或通用输入输出(GPIO)来设置,如:第一CPU的状态信息是低电平0、第二CPU状态信息是低电平0、第三CPU状态信息是高电平1,且当前串口接在第一CPU上。 Brightest state information may be set CPU address bus or a data general purpose input output (GPIO) by, for example: status information of the first CPU 0 is low, the second state information is low CPU 0, the state of the third CPU 1 information is high, and the current port connected to the first CPU.

当需要将串口从第一CPU切换到另一个CPU时,直接通过控制终端发送串口切换命令,第一CPU根据其接收到的串口切换命令将其发送给串口管理模块的状态信息由低电平0变更为高电平1,即:串口控制信息接收单元201接收到三路CPU状态信息分别为101;状态信息接收单元21接收所述状态信息,并将该状态信息输出给串口切换查询单元602,串口切换查询单元602根据状态信息101到串口切换状态寄存器601中查找串口切换状态表,如表1所示,查询到三路CPU的串口切换状态从001变为了101,即:第一CPU的状态信息从0变为1,则判断为发生切换,且串口切换状态101对应的串口切换方向是从第一CPU切换到第二CPU,则将判断结果送到串口切换执行单元23,串口切换执行单元23根据所述查询结果将串口从第一CPU切换到第二CPU上,完成自动切换。 When the status information needs to be switched from the first port to the CPU another CPU, directly through the control terminal transmits a handover command port, a first CPU sends it to the serial port management module in accordance with the handover command it receives from low 0 1 is changed to the high level, namely: serial control information receiving unit 201 receives state information of the three-way CPU 101, respectively; state information receiving unit 21 receives the state information and the state information output unit 602 to query the serial switching, serial switching unit 602 to find a query based on the status information 101 to the serial port switching state register 601 in the switching state table, as shown in table 1, the query to the serial three-way switching state 001 changes from the CPU 101, namely: a first state of the CPU information from 0 to 1, it is determined that the handover occurs, and a serial port switching direction corresponding to the switching state 101 is switched from the first CPU to the second CPU, then the determination result to the handover execution unit 23 serial, serial handover execution unit the serial switch 23 according to the query result from the first CPU to the second CPU, automatic switching is completed.

在上述实施例中,所述串口管理模块还可以包括一串口故障检测单元,用于对CPU或串口进行故障检测,并输出检测结果到所述串口切换执行单元。 In the above embodiment, the port management module may further include a serial port fault detecting means for detecting the fault CPU or serial port, and outputs a detection result to the serial handover execution unit. 所述串口切换执行单元还用于根据所述串口故障检测单元输出的检测结果进行串口切换。 The handover performing unit further serial port for performing handover in accordance with said output port failure detection unit.

以上阐述了本发明实施例的一种单串口多CPU控制系统及CPU、串口管理模块,为了进一步阐述本发明实施例的技术方案,下面提出了一种单串口多CPU控制系统的一个优选实施例。 Set forth above, a single serial multi-CPU and CPU control system, serial management module of the embodiment of the present invention, in order to further illustrate the technical solutions of the embodiments of the present invention, the following is proposed a multi-CPU serial a single-preferred embodiment of the control system .

参考图7,是本发明实施例的一种单串口多CPU控制系统的结构框图;根据该图,第一中央处理单元31、第二中央处理单元32及底板管理控制器33分别通过通用异步串口101与串口管理模块2的串口切换执行单元23连接,串口管理模块2通过UART(通用异步串口)与串口电平转换电路103连接,而串口电平转换电路103通过RS232接口104与一个串口插座106连接,该串口插座通过与之相匹配的串口插头105与控制终端107连接。 Referring to Figure 7, is a block diagram showing a single-port multi-CPU embodiment of the control system according to the present invention; FIG According to this, the first central processing unit 31, the second central processing unit 32 and the BMC 33, respectively through the universal asynchronous serial port 10123 is connected to the serial handover performing unit port management module 2, the port management module 2 connected to the serial level conversion circuit 103 through UART (universal asynchronous serial interface), while the serial level conversion circuit 103 via RS232 interface 104 to a serial port socket 106 connected to a serial port through the receptacle connector to match the serial control terminal 107 and the plug 105. 其中,串口电平转换电路103是将RS232标准的数字电平转换为UART标准的数字电平,当串口插座103与串口管理模块2的接口是统一标准时,则可以省去该串口电平转换电路。 Wherein serial level converter circuit 103 that converts standard RS232 digital levels of the UART standard digital level, when the outlet port 103 and the port management module 2 interfaces is a uniform standard, the serial port of the level shifter circuit can be omitted .

如图7所示,第一中央处理单元31、第二中央处理单元32以及底板管理控制器33分别向串口控制信息接收单元21发送状态信息(图示为:串口心跳信号),当串口要从其中一个CPU(称该CPU为源CPU)切换到另一个CPU时,只需利用控制终端107向源CPU发送串口切换命令,该串口切换命令需要通过串口管理模块2传送到源CPU。 7, the first central processing unit 31, the second central processing unit 32 and the BMC message to the serial port 33, respectively, the state control information receiving unit 21 (illustrated as: serial heartbeat signal), and from the serial port wherein when a CPU (source CPU is called the CPU) to switch to another CPU, only the control terminal 107 transmits a handover command to the source CPU serial port, the serial port switch command needs to be transmitted through the port management module 2 to the source CPU.

源CPU接收到所述串口切换命令后,立即变更其发送给串口管理模块2的串口心跳信号的状态(如:高电平变为低电平或低电平变为高电平)。 After the CPU receives the serial source handover command, it immediately changes the state to a serial port management module 2 heartbeats (such as: high to low or low to high). 当串口管理模块2的状态信息接收单元21接收到所述串口心跳信号后,利用状态信息分析单元22中的状态检测单元501对所述串口心跳信号进行处理,如图8所示。 When port management module 2 status information receiving unit 21 receives the heartbeat signal to the serial port, using the state information analyzing unit 22 of the state detection unit 501 serial heartbeat signal is processed, as shown in FIG.

参考图8,是图7所述的状态检测单元501状态检测的逻辑示意图;根据该图,当控制终端向源CPU发送串口切换命令时,串口管理模块立即启动状态检测单元中的计数器72,当状态检测单元的跳变沿检测单元71检测到所述串口心跳信号的状态发生改变时,则发送计数清零信号给计数器72,使计数器72停止计数并输出计数结果到计数溢出判断器73。 Referring to Figure 8, is the schematic diagram of FIG. 7 is a state detection unit 501 detects the state; FIG According to this, when the control terminal transmits a handover command to the source of the CPU serial, port management module will immediately start state detection unit in the counter 72, when when state detector 71 detects that the serial heartbeat signal state of the cell edge detection unit is changed, the retransmission count clear signal to the counter 72, the counter 72 stops counting and outputs the counted result to the counter 73 overflows is determined. 如果计数溢出,则计数溢出判断器73向串口切换执行单元23输出1,表示在计数器规定的时间内串口心跳信号的状态未发生改变;如果计数未溢出,则计数溢出判断器73向串口切换执行单元212输出0,表示在计数器规定的时间内串口心跳信号的状态发生改变。 If the counter overflows, the counter overflow determiner 73 to the serial handover execution unit 23 outputs 1, indicates that the serial heartbeat signal status is not changed within a predetermined counter time; if the count does not overflow, the counter overflow determiner 73 is switched to the serial execution unit 212 outputs 0 to indicate state changes within a predetermined time counter serial heartbeat signal. 串口切换执行单元23将根据状态检测单元的计数溢出判断器73的输出结果进行串口切换。 Serial handover execution unit 23 determines an overflow output port 73 is switched in accordance with the count state detection unit.

当CPU或串口发生故障,使得系统不能正常工作时,串口管理模块2的串口故障检测单元213可以进行故障检测及维护处理,如图9所示。 When the CPU serial or failure, so that the system does not function properly, the serial port management module 213 of the failure detection unit 2 can detect the fault and maintenance process, as shown in FIG.

参考图9,是图7所述串口故障检测单元213故障检测的逻辑示意图;根据该图,当串口故障单元的下降沿检测单元81检测到控制终端向源CPU发送串口信息时,立即启动计数器83,当上升沿检测单元82检测到源CPU反馈的串口响应信息时,立即发送计数清零信号给计数器83,将计数结果输出到计数溢出判断器84。 Referring to Figure 9, a schematic diagram 213 of FIG failure detection means detecting a failure of the port 7; FIG According to this, when the falling edge of the serial link fault detecting unit 81 detects the control unit transmits the terminal information to the source of the CPU serial port, immediately start a counter 83 when the detection unit 82 detects the rising edge of the serial port in response to the feedback information source CPU immediately sends a signal to the counter 83 clears the count, the count result is output to the counter 84 overflow determiner. 如果计数溢出,则计数溢出判断器84向串口切换管理模块212输出0,表示计数超时,即在规定的时间内未接收到串口响应信息,说明所述CPU或所述串口出现故障;如果计数未溢出,则计数溢出判断器84向串口切换管理模块212输出1,表示所述CPU或所述串口工作正常。 If the counter overflows, the counter 84 outputs an overflow determiner port 0 to the handover management module 212, it represents a time-out count, i.e., within a predetermined period of time has not received the response information to the serial port, the serial port or said CPU instructions; faulty if the count is not overflow, the overflow counter 84 determines the handover management module 212 to output port 1, indicating that the CPU or the serial work.

串口切换执行单元接收到所述状态检测单元或串口故障检测单元的输出结果时,将根据所述输出结果进行串口切换处理,如图9所示。 Serial port handover execution unit receives the result of the state detection unit or the output port of the failure detection unit, the serial port switching processing according to the output result, as shown in FIG.

参考图10,是图7所示串口切换执行单元23的逻辑状态机示意图;该图是以3路CPU为例,但不限于此,当系统上电初始化时,如果第一CPU的串口心跳信号先为高电平1,则串口接第一CPU;如果第二CPU的串口心跳信号先为高电平1,则串口接第二CPU;如果底板管理控制器的串口心跳信号先为高电平1,则串口接底板管理控制器。 Referring to Figure 10, the state machine logic diagram of the serial handover execution unit 23 shown in FIG. 7; and FIG. 3 is an example way CPU, but is not limited thereto, when the system power-on initialization, if a first CPU serial heartbeat 1 to a high level, the serial port connected to the first CPU; heartbeat signal if the second port of the CPU 1 to the high level, the serial port connected to the second CPU; heartbeat signal if the serial BMC prior to the high level 1, the Baseboard management controller serial connection. 当需要进行串口切换时,则按照第一CPU切换到第二CPU、第二CPU切换到底板管理控制器、底板管理控制器切换到第一CPU循环处理。 When the need for serial switch, the switch according to the first CPU to the second CPU, a second CPU in the end switching board management controller, BMC CPU cycles to switch to the first process.

当第一CPU的串口心跳信号经状态检测单元处理输出为0或串口故障检测单元处理输出为0时,则将串口从第一CPU切换到第二CPU;当第二CPU的串口心跳信号经状态检测单元处理输出为0或串口故障检测单元处理输出为0时,则将串口从第二CPU切换到底板管理控制器;当底板管理控制器的串口心跳信号经状态检测单元处理输出为0或经串口故障检测单元处理输出为0时,则将串口从底板管理控制器切换到第一CPU。 When the first CPU serial heartbeat signal output processing state detection unit is 0 or serial fault detection unit processes the output is 0, then the CPU switches from the first port to the second CPU; heartbeat signal when the state of the second serial interface of the CPU detection processing unit outputs 0 or serial fault detection unit processes the output is zero, then the port in the end plate from the second switching management controller CPU; heartbeat when the serial signal output processing state detection unit is 0 BMC or by serial fault detection unit processes the output is zero, then the serial port is switched from the first to the baseboard management controller CPU.

上面结合附图具体阐述了本发明实施例的一种单串口多CPU控制系统及CPU、串口管理模块,下面将结合图11、图12阐述本发明实施例的一种单串口多CPU的控制方法的技术方案。 Specifically set forth above in conjunction with the accompanying drawings, a single serial multi-CPU and CPU control system, serial management module of the embodiment of the present invention, the following in conjunction with FIG. 11, FIG. 12 describes a control method for a single-port multi-CPU embodiment of the present invention technical solutions.

参考图11,是本发明实施例的一种单串口多CPU的控制方法的主流程图;该方法包括:步骤S101,源CPU接收控制终端发送的串口切换命令;步骤S102,所述源CPU根据所述串口切换命令变更其发送给串口管理模块的状态信息;步骤S103,所述串口管理模块根据变更后的状态信息将串口从源CPU切换到另一个CPU。 Referring to Figure 11, is a main flowchart of a control method for a single-port multi-CPU embodiment of the present invention; the method comprising: step S101, the CPU receives a control source serial handover command sent by a terminal; step S102, the CPU source according to the handover command to change the serial status information sent to the serial management module; step S103, the management module to the serial port is switched from the source CPU to another in accordance with the changed state information.

其中,步骤S103具体可以为:当所述串口管理模块在设定的时间内检测到所述状态信息发生改变时,则将串口从源CPU切换到另一个CPU。 Wherein, the step S103 may be: when the port management module detects that the state information is changed within the set time, then the source port is switched from the CPU to another CPU.

在具体实现时,步骤S103具体可以为:所述串口管理模块在其串口切换状态表中查找所述变更后的状态信息对应的串口切换状态,并根据所述串口切换状态将串口从源CPU切换到另一个CPU。 In specific implementation, step S103 may specifically be: the serial port switched state management module searches for a state change information corresponding to the port in which the state switching table and the handover from a source CPU serial port according to the switching state to another CPU.

较佳地,本发明实施例提供的一种单串口多CPU的控制方法,还可以包括串口管理模块检测到源CPU或该CPU对应的串口发生故障时,自动将串口从所述源CPU切换到另一个CPU的步骤。 Preferably, the method of controlling a single-port multi-CPU according to an embodiment of the present invention may further include a source port management module detects a CPU or the CPU of the corresponding serial port when a fault occurs, automatically switching from the source port to the CPU step another CPU.

为了进一步叙述本发明实施例的一种单串口多CPU的控制方法,下面结合图12,详细阐述该方法的技术方案。 To further describe a method of controlling a single embodiment of the present invention, the serial embodiment of a multi-CPU, below in connection with FIG. 12, detail aspect of the process.

参考图12,是本发明实施例的一种单串口多CPU的控制方法的详细流程图;根据该图可知,所述一种单串口多CPU的控制方法包括:步骤S201,所有CPU向串口管理模块发送状态信息。 Referring to Figure 12, is a detailed flowchart of a control method for a single-port multi-CPU embodiment of the present invention; seen from the figure, the control method of a single-port multi-CPU comprises: step S201, the management of all the CPU to the serial port module status information is transmitted.

步骤S202,控制终端向源CPU发送包括串口切换命令的串口信息,该串口信息经过所述串口管理模块传送到所述源CPU。 Step S202, the control CPU includes a source terminal sends a handover command messages on the serial port, the source port information is transmitted to the CPU through the serial management module.

步骤S103,源CPU的串口切换命令接收单元接收到所述串口切换命令后,其串口切换命令响应单元变更所述状态信息,如将状态信息从低电平变为高电平或从高电平变为低电平;同时,源CPU向控制终端发送串口响应信息;同时,串口管理模块启动其状态检测单元中的第一计数器和串口故障检测单元中的第二计数器,然后同时执行步骤S204和步骤S205。 Step S103, the handover command source CPU serial receiving unit after receiving the handover command serial port, the serial port switch command response unit which changes the status information, such as status information from the low level to the high level or from high level goes low; the same time, the source CPU sends information to the serial port in response to a control terminal; Meanwhile, port management module to start its state detection unit in the first counter and serial interface failure detection unit in the second counter, and then performs step S204 and simultaneously step S205.

一方面,在步骤S204中,串口管理模块的状态信息分析单元利用其状态检测单元检测所述状态信息;步骤S2041,如果状态检测单元检测到所述状态信息未发生改变时,进入步骤S204,否则,执行步骤S2042;步骤S2042,状态检测单元判断第一计数器是否溢出,如果没有溢出,则进入步骤S206。 In one aspect, in step S204, the port management module status information analyzing unit using its state detection unit detects the state information; step S2041, if the state detection unit detects that the status information is not changed, entering step S204, otherwise , step S2042; step S2042, a first state detection unit determines whether the counter overflows, an overflow if not, the process proceeds to step S206.

另一方面,在步骤S205中,串口故障检测单元检测源CPU发送的串口响应信息;步骤S2051,当检测到所述第二计数器有溢出,而在步骤S2052中,串口故障检测单元未收到所述串口响应信息时,进入步骤S206。 On the other hand, in step S205, the serial port in response to the fault detection means detects the information sent by the CPU source; Step S2051, when detecting an overflow of the second counter, and in step S2052, the serial port does not receive the failure detection unit when the serial port in response to said information, proceeds to step S206.

步骤S206,串口切换执行单元根据状态检测单元或串口故障检测单元的输出结果,将串口从源CPU切换到另一个CPU。 Step S206, the handover execution unit in accordance with the serial output of the state detection unit or the serial link fault detecting unit, the serial port is switched from the source CPU to another CPU.

由上述实施例可知,本发明实施例提供的一种单串口多CPU的控制方法及系统、设备中,一方面,利用控制终端向CPU发送串口切换命令,进行串口自动切换,即使单板插入了系统的机框,仍然可以对该系统进行操作,且操作方便,支持远程维护;另一方面,利用串口故障检测单元进行串口故障自动检测和恢复,避免出现串口挂死,提高了串口的可用性和可靠性;再则,本发明实施例是使用了一个串口插座,降低了单板成本,同时减少了电路布局的空间占用,提高了电路集成度。 Seen from the above embodiments, embodiments of a single-port multi-CPU provided in the control method and system, the apparatus of the present invention, in one aspect, the control terminal transmits a handover command to the serial port, the serial port automatically switches to the CPU, even when the board is inserted chassis system, the system can still operate, and easy to operate, support remote maintenance; on the other hand, the failure detection unit using the serial port automatic fault detection and recovery, serial to avoid a hanging, improved availability and serial reliability; Furthermore, embodiments of the present invention is the use of a serial socket, to reduce the cost of the board, while reducing the space occupied by the circuit layout, increased circuit integration.

以上所揭露的仅为本发明一种较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。 While the invention disclosed in the above embodiment only a preferred embodiment, of course, not intended to limit the scope of the invention, therefore equivalent changes made under this invention as claimed in claim fall within the scope of the present invention.

Claims (15)

  1. 1.一种单串口多CPU的控制方法,其特征在于,该方法包括:源CPU接收控制终端发送的串口切换命令;所述源CPU根据所述串口切换命令变更其发送给串口管理模块的状态信息;所述串口管理模块根据变更后的状态信息将串口从源CPU切换到另一个CPU。 A method for controlling a single-port multi-CPU, characterized in that, the method comprising: receiving a control source for the CPU serial handover command sent by a terminal; the source sends it to the CPU changes the state of the serial port management module according to the handover command information; and the port management module according to the state information after the change over from a source port CPU to another CPU.
  2. 2.如权利要求1所述的方法,其特征在于,所述串口管理模块根据所述变更后的状态信息将串口从源CPU切换到另一个CPU的步骤具体为:当所述串口管理模块在设定的时间内检测到所述状态信息发生改变时,则将串口从源CPU切换到另一个CPU。 2. The method according to claim 1, wherein said serial port management module is switched according to the state information after the change from the source CPU to another CPU in step is specifically: if the port management module the condition is detected within the set time when the information changes, then the source port is switched from the CPU to another CPU.
  3. 3.如权利要求1所述的方法,其特征在于,所述串口管理模块根据所述变更后的状态信息将串口从源CPU切换到另一个CPU的步骤具体为:所述串口管理模块在其串口切换状态表中查找所述变更后的状态信息对应的串口切换状态,并根据所述串口切换状态将串口从源CPU切换到另一个CPU。 3. The method according to claim 1, characterized in that, the serial port switch management module according to the state information is changed from the source CPU to another CPU in step is specifically: the port management module in its serial port switching state of the switching state lookup table state information corresponding to the change, and the serial port is switched from the source CPU to another port according to the switching state.
  4. 4.如权利要求2或3所述的方法,其特征在于,该方法还包括:串口管理模块检测到源CPU或该CPU对应的串口发生故障时,自动将串口从所述源CPU切换到另一个CPU。 4. The method of claim 2 or claim 3, wherein the method further comprises: the source port management module detects a CPU or the CPU of the corresponding serial port when a fault occurs, automatically switching from the source port to the other CPU a CPU.
  5. 5.一种单串口多CPU控制系统,包括至少两个CPU、串口插座及其相匹配的串口插头,其特征在于,该系统还包括:一串口管理模块,其与多个CPU连接,并通过串口插座及串口插头与一控制终端连接,用于根据所述CPU发送的状态信息进行串口切换。 A single multi-CPU serial control system comprising at least two CPU, serial port socket and plug match, characterized in that the system further comprises: a port management module, which is connected to a plurality of CPU, and by serial port plug and socket and a control terminal connected to the serial port of the switch according to the status information sent by the CPU.
  6. 6.如权利要求5所述的系统,其特征在于,所述CPU还包括:串口切换命令接收单元,用于接收控制终端发送的串口切换命令;串口切换命令响应单元,用于接收到所述串口切换命令后变更其发送给串口管理模块的状态信息;状态信息发送单元,用于向所述串口管理模块发送所述状态信息。 6. The system of claim 5, wherein said CPU further comprises: serial switching command receiving unit, a control port for receiving a handover command sent by the terminal; serial switching command response unit for receiving the after the handover command port state change to the port management module which transmits information; status information transmitting unit for transmitting the state information to the serial management module.
  7. 7.如权利要求5或6任意一项所述的系统,其特征在于,所述串口管理模块包括:状态信息接收单元,用于接收所述CPU发送的状态信息;状态信息分析单元,用于根据所述状态信息接收单元接收到的状态信息判断是否发生串口切换,并将判断结果输出;串口切换执行单元,用于接收所述状态信息分析单元输出的判断结果,当判断为发生串口切换,则根据所述判断结果将串口从源CPU切换到另一个CPU。 As claimed in claim 5 or 7. The system of any one of claim 6, wherein the port management module comprising: status information receiving means for receiving said status information sent by the CPU; the status information analyzing unit for serial whether a handover occurs according to the state information receiving unit receives the status information determining and outputting the determination result; serial handover execution unit for receiving the status information of the determination result output from the analyzing means, when it is determined that the serial switching occurs, the result of the determination is switched from the source CPU port to another CPU.
  8. 8.如权利要求7所述的系统,其特征在于,所述状态信息分析单元包括:一状态检测单元,用于在设定的时间内检测到所述状态信息发生改变时,判断为发生串口切换,并将判断结果输出到所述串口切换执行单元。 8. The system according to claim 7, wherein the status information analysis unit comprises: a state detection unit configured to detect when the state information is changed within the set time, it is determined that the occurrence of serial switching, and outputs the determination result to the serial handover execution unit.
  9. 9.如权利要求7所述的系统,其特征在于,所述状态信息分析单元包括:串口切换状态寄存器,用于保存串口切换状态表;串口切换查询单元,用于根据所述状态信息在串口切换状态寄存器中查找与所述状态信息相对应的串口切换状态,并作为判断结果输出到所述串口切换执行单元。 9. The system according to claim 7, wherein the status information analysis unit comprises: serial switching state registers for storing port switching status table; query serial switching unit, according to the state information for the serial switch port status register to find the switching state corresponding to the state information, and as a determination result is output to the serial port handover execution unit.
  10. 10.如权利要求8或9所述的系统,其特征在于,所述串口管理模块还包括一串口故障检测单元,用于对CPU或串口进行故障检测,并输出用于指示串口切换执行单元执行串口切换的检测结果到所述串口切换执行单元。 10. The system of claim 8 or claim 9, wherein the port management module further comprises a serial interface failure detection unit, or CPU serial port for fault detection, and outputs a handover execution unit performs serial indicating serial switching detection result to the serial handover execution unit.
  11. 11.一种CPU,其特征在于,该CPU还包括:串口切换命令接收单元,用于接收控制终端发送的串口切换命令;串口切换命令响应单元,用于接收到所述串口切换命令后变更其发送给串口管理模块的状态信息;状态信息发送单元,用于向所述串口管理模块发送所述状态信息。 A CPU, wherein the CPU further comprises: serial switching command receiving unit, a control port for receiving a handover command sent by the terminal; serial switching command response unit for changing its serial port after receiving the handover command to a port management module status information; status information transmitting unit for transmitting the state information to the serial management module.
  12. 12.一种串口管理模块,其特征在于,该串口管理模块包括:状态信息接收单元,用于接收所述CPU发送的状态信息;状态信息分析单元,用于根据所述状态信息接收单元接收到的状态信息判断是否发生串口切换,并将判断结果输出;串口切换执行单元,用于接收所述状态信息分析单元输出的判断结果,当判断为发生串口切换,则根据所述判断结果将串口从源CPU切换到另一个CPU。 A port management module, wherein, the port management module comprising: status information receiving means for receiving said status information sent by the CPU; the status information analyzing unit for receiving the information receiving unit according to the state the state information determines whether the serial handover occurs, and outputs the determination result; serial handover execution unit for receiving the status information of the determination result output from the analyzing means, when it is determined that the serial handover occurs, according to the result of the determination from the serial port CPU is switched to another source CPU.
  13. 13.如权利要求12所述的串口管理模块,其特征在于,所述状态信息分析单元包括:一状态检测单元,用于在设定的时间内检测到所述状态信息发生改变时,则判断为发生串口切换,并将判断结果输出到所述串口切换执行单元。 13. The port management module according to claim 12, wherein the status information analysis unit comprises: a state detection unit configured to detect when the state information is changed within the set time, it is determined serial port switch occurs, and outputs the determination result to the serial handover execution unit.
  14. 14.如权利要求12所述的串口管理模块,其特征在于,所述状态信息分析单元包括:串口切换状态寄存器,用于保存串口切换状态表;串口切换查询单元,用于根据所述状态信息在串口切换状态寄存器中查找与所述状态信息相对应的串口切换状态,并作为判断结果输出到所述串口切换执行单元。 14. The port management module according to claim 12, wherein the status information analysis unit comprises: serial switching state registers for storing port switching status table; query serial switching unit, according to the state information for Find serial port status register switching the switching state corresponding to the state information, and as a determination result is output to the serial port handover execution unit.
  15. 15.如权利要求14所述的串口管理模块,其特征在于,所述串口管理模块还包括一串口故障检测单元,用于对CPU或串口进行故障检测,并输出用于指示串口切换执行单元执行串口切换的检测结果到所述串口切换执行单元。 15. The port management module according to claim 14, wherein the port management module further comprises a serial interface failure detection unit, or CPU serial port for fault detection, and outputs a handover execution unit performs serial indicating serial switching detection result to the serial handover execution unit.
CN 200710028332 2007-05-30 2007-05-30 Control method, system and equipment of single serial port multi-CPU CN100511200C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200710028332 CN100511200C (en) 2007-05-30 2007-05-30 Control method, system and equipment of single serial port multi-CPU

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200710028332 CN100511200C (en) 2007-05-30 2007-05-30 Control method, system and equipment of single serial port multi-CPU

Publications (2)

Publication Number Publication Date
CN101089835A true true CN101089835A (en) 2007-12-19
CN100511200C CN100511200C (en) 2009-07-08

Family

ID=38943198

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200710028332 CN100511200C (en) 2007-05-30 2007-05-30 Control method, system and equipment of single serial port multi-CPU

Country Status (1)

Country Link
CN (1) CN100511200C (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101527667B (en) 2008-03-05 2011-05-18 四零四科技股份有限公司 Method for separating transceiver from bus under multipoint architecture
CN102169454A (en) * 2011-05-09 2011-08-31 瑞斯康达科技发展股份有限公司 Multi-processor debugging serial port circuit switching method, device and system
CN102420718A (en) * 2011-11-22 2012-04-18 江苏亿通高科技股份有限公司 Portable multimedia over coax alliance (MoCA) network tester
CN102486741A (en) * 2010-12-02 2012-06-06 鸿富锦精密工业(深圳)有限公司 System and method for sharing serial port
CN103345459A (en) * 2013-06-05 2013-10-09 福建星网锐捷通讯股份有限公司 Switching method and switching circuit based on multiplexing of multiple-processor serial ports on single board
CN103699462A (en) * 2014-01-08 2014-04-02 闽南师范大学 Single chip microprocessor system with reliability design
CN104142899A (en) * 2014-07-30 2014-11-12 广东威创视讯科技股份有限公司 Method and device for controlling multiprocessor through single serial port
CN105677602A (en) * 2015-12-30 2016-06-15 努比亚技术有限公司 Terminal port reusing device and method
CN105912438A (en) * 2016-03-07 2016-08-31 联想(北京)有限公司 Baseboard control system, electronic equipment and information processing method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6104721A (en) 1997-12-02 2000-08-15 Symmetry Communcations System DSP based dynamic resource allocation multiprocessor communications board
JP2001282758A (en) 2000-02-28 2001-10-12 Lucent Technol Inc Method and device for controlling plural processors while using serial buses

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101527667B (en) 2008-03-05 2011-05-18 四零四科技股份有限公司 Method for separating transceiver from bus under multipoint architecture
CN102486741A (en) * 2010-12-02 2012-06-06 鸿富锦精密工业(深圳)有限公司 System and method for sharing serial port
CN102169454A (en) * 2011-05-09 2011-08-31 瑞斯康达科技发展股份有限公司 Multi-processor debugging serial port circuit switching method, device and system
CN102169454B (en) 2011-05-09 2014-09-17 瑞斯康达科技发展股份有限公司 Multi-processor debugging serial port circuit switching method, device and system
CN102420718B (en) 2011-11-22 2014-07-30 江苏亿通高科技股份有限公司 Portable multimedia over coax alliance (MoCA) network tester
CN102420718A (en) * 2011-11-22 2012-04-18 江苏亿通高科技股份有限公司 Portable multimedia over coax alliance (MoCA) network tester
CN103345459A (en) * 2013-06-05 2013-10-09 福建星网锐捷通讯股份有限公司 Switching method and switching circuit based on multiplexing of multiple-processor serial ports on single board
CN103345459B (en) * 2013-06-05 2016-03-30 福建星网锐捷通讯股份有限公司 The method based on the switching board serial processors a plurality of multiplexing and switching circuit
CN103699462A (en) * 2014-01-08 2014-04-02 闽南师范大学 Single chip microprocessor system with reliability design
CN103699462B (en) * 2014-01-08 2015-04-08 闽南师范大学 Single chip microprocessor system with reliability design
CN104142899A (en) * 2014-07-30 2014-11-12 广东威创视讯科技股份有限公司 Method and device for controlling multiprocessor through single serial port
CN104142899B (en) * 2014-07-30 2017-06-13 广东威创视讯科技股份有限公司 Single serial control method and apparatus for multiprocessor
CN105677602A (en) * 2015-12-30 2016-06-15 努比亚技术有限公司 Terminal port reusing device and method
CN105912438A (en) * 2016-03-07 2016-08-31 联想(北京)有限公司 Baseboard control system, electronic equipment and information processing method

Also Published As

Publication number Publication date Type
CN100511200C (en) 2009-07-08 grant

Similar Documents

Publication Publication Date Title
US20050066106A1 (en) Input/output unit access switching system and method
US20020097672A1 (en) Redundant control architecture for a network device
CN1753376A (en) Biprimary controlled network equipment and its master back-up switching method
US7644215B2 (en) Methods and systems for providing management in a telecommunications equipment shelf assembly using a shared serial bus
CN1983975A (en) System for managing high-level telecommunication computing construction frame and server long-distance control
US20070233833A1 (en) Data transmission system for electronic devices with server units
US6795933B2 (en) Network interface with fail-over mechanism
CN1983987A (en) Monitor of rear card board in intelligent-platform management interface system
CN1960261A (en) Method and system of obtaining physical slot number of single board, and type of slot
US20090204736A1 (en) Computing device with flexibly configurable expansion slots, and method of operation
US20070101029A1 (en) Multiplexed computer peripheral device connection switching interface
CN200983158Y (en) A knife management card for computer knife server
US20110131361A1 (en) Computer apparatus, computer system and adapter carry-over method
CN101159842A (en) Backup method and apparatus for video signal congress
CN1373427A (en) Device and method for implementing dual system slots
CN101789557A (en) Multifunctional interface conversion device
CN1777137A (en) Data translation device and system based on ethernet and serial communication technology
CN1904842A (en) Apparatus and method of CMOS parameter setting and maintaining
US20060059456A1 (en) Composite computer apparatus and management method thereof
CN101582797A (en) Management board and two-unit standby system and method
CN102073562A (en) Hardware-based main/standby switch arbitration method
US20110307639A1 (en) Virtual serial port management system and method
CN1422041A (en) Back-up system based on fast Ethernet bus
CN1750419A (en) Method and device for realizing single board backup in communication network device
CN101630297A (en) Converter and control system

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C14 Granted