Switch device, and serial communication interface switching method and apparatus
By introducing serial port position detection signals and gate units into the switch equipment, automatic switching of multiple serial communication interfaces is achieved, and the production and management costs in the existing technology are solved due to compatibility with the front and rear panel requirements, and the materials are reduced The classification and control needs of the list improve the universality and efficiency of the design.
Patent Information
- Application Number
- PCT/CN2024/081500
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-27
- Filing Date
- 2024-03-13
- Publication Date
- 2025-01-02
AI Technical Summary
In the existing switch modular design, in order to be compatible with the CPU debugging serial port requirements on the front and rear panels, two different bills of materials need to be maintained, resulting in high production and management costs.
Design a switch device, including substrate, serial port unit, processor, resistor unit and gate unit, automatically switch the serial communication interface through the serial port position detection signal, realize automatic switching of multiple serial communication interfaces, only one is required to maintain. Bill of materials for substrates.
The production and management costs of switch equipment are reduced, and the automatic switching function is used to reduce the classification and control needs of bill of materials, and the universality and efficiency of the design are improved.
Smart Images

Figure CN2024081500_02012025_PF_FP_ABST
Abstract
Description
Switch device, serial communication interface switching method and device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on June 27, 2023, with application number 202310767752.X, and entitled “Switch device, switching method of serial communication interface and device thereof”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The embodiments of the present application relate to the field of computers, and in particular to a switch device, a switching method for a serial communication interface, and a device thereof. Background Art
[0004] With the massive expansion of internet data center infrastructure and the advancement of switch technology, there's a clear trend toward modularization in switch hardware design. Modular hardware design allows switch hardware vendors to launch higher-speed, higher-capacity iterations at lower costs and faster speeds. Making modularity more versatile has become a key consideration in switch hardware design.
[0005] The current universal baseboards in modular switch designs have a signal path serial resistance selection feature to accommodate both front and rear panel requirements for the central processing unit (CPU) debugging serial port. For designs with the serial port on the front panel, the resistor is connected to the front panel. For designs with the serial port on the rear panel, the resistor is connected to the rear panel. While this design is simple, it requires maintaining the bill of materials (BOM) for the universal baseboards corresponding to the two designs. This requires classifying and controlling the material numbers of the printed circuit board assemblies (PCBAs) corresponding to the two designs in the BOM database, significantly increasing production and management costs.
[0006] Summary of the Invention
[0007] The embodiments of the present application provide a switch device, a serial communication interface switching method, and an apparatus thereof, to at least solve the problem of high cost in producing and managing switch devices in the related art.
[0008] According to a first aspect, a switch device is provided, comprising a substrate, a serial port unit, and a processor, a resistor unit, and a gating unit arranged on the substrate, wherein: the serial port unit comprises a plurality of serial communication interfaces, each serial communication interface comprises a signal input terminal and a signal output terminal; the gating unit is electrically connected to the processor and the resistor unit, respectively, and is configured to control a serial communication interface to be connected to the processor upon receiving a control signal.
[0009] In an exemplary embodiment, the switch device also includes: at least one interface board, the serial port unit is arranged on the interface board, the interface board includes a first interface board and / or a second interface board, the first interface board and the second interface board are two panels located at different positions of the switch device; at least one switching board card, and the at least one switching board card is electrically connected to the interface board.
[0010] In an exemplary embodiment, there are multiple interface boards, and the switch device further includes a data switch, which is configured to electrically connect at least one switch card with at least one interface board.
[0011] In an exemplary embodiment, the switch device also includes: a serial port position detection module, which is arranged in at least one switch board and is configured to detect the setting positions of multiple serial communication interfaces and output a serial port position detection signal, the setting positions including the first interface board and / or the second interface board; a signal trigger module, which is electrically connected to the serial port position detection module and is configured to output a first control signal to the gating unit when the serial port position detection signal indicates that one of the multiple serial communication interfaces is provided on the first interface board, so that the gating unit controls the first serial communication interface to be connected to the processor according to the first control signal; and output a second control signal to the gating unit when the serial port position detection signal indicates that one of the multiple serial communication interfaces is provided on the second interface board, so that the gating unit controls the second serial communication interface to be connected to the processor according to the second control signal.
[0012] In an exemplary embodiment, the serial port position detection signal is a level signal, and the signal trigger module is configured to: when the serial port position detection signal indicates that one of the multiple serial communication interfaces is provided on a first interface board, the level signal is pulled up, and the output first control signal is a first logic signal, so that the selection unit controls the first serial communication interface to be connected to the processor according to the first logic signal; when the serial port position detection signal indicates that one of the multiple serial communication interfaces is provided on a second interface board, the level signal is pulled down, and the output first control signal is a second logic signal, so that the selection unit controls the second serial communication interface to be connected to the processor according to the second logic signal.
[0013] In an exemplary embodiment, when the interface board includes a first interface board, the first interface board is a front panel of the switch device.
[0014] In an exemplary embodiment, the plurality of serial communication interfaces includes a front serial communication interface disposed on the front panel.
[0015] In an exemplary embodiment, when the interface board includes a second interface board, the first interface board is a rear panel of the switch device.
[0016] In an exemplary embodiment, the plurality of serial communication interfaces includes a rear serial communication interface disposed on a rear panel.
[0017] In an exemplary embodiment, the gating unit includes multiple gating modules, each gating module has multiple gating branches, wherein: the multiple gating branches are respectively configured to connect the processor with different resistance modules; the resistance modules electrically connected to the same gating module are configured to be electrically connected to different serial communication interfaces; the gating unit is configured to switch one gating branch in each gating module into a path according to a control signal.
[0018] In an exemplary embodiment, each resistance module has a first end electrically connected to the serial communication interface and a second end electrically connected to the gating unit, the second end of the resistance module electrically connected to the signal input end of the target serial communication interface is connected to the first gating module, and the second end of the resistance module electrically connected to the signal output end of the target serial communication interface is connected to the second gating module, and the target serial communication interface is any one of a plurality of serial communication interfaces.
[0019] In an exemplary embodiment, the switch device further includes: a plurality of panel connectors electrically connected to the plurality of serial communication interfaces in a one-to-one correspondence, and each resistor module is electrically connected to the serial communication interface through the panel connector.
[0020] In an exemplary embodiment, the plurality of panel connectors includes: a first panel connector configured to be electrically connected to a first interface board; and a second panel connector configured to be electrically connected to a second interface board.
[0021] In an exemplary embodiment, the gating unit includes a first gating module and a second gating module, wherein: the first gating module has a first gating branch and a second gating branch, the first end of the first gating branch is set to be electrically connected to the signal input end of the first serial communication interface on the first interface board through the first panel connector, the first end of the second gating branch is set to be electrically connected to the signal input end of the second serial communication interface on the second interface board through the second panel connector, and the second end of the first gating branch and the second end of the second gating branch are set to be electrically connected to the processor; the second gating module has a third gating branch and a fourth gating branch, the first end of the third gating branch is set to be electrically connected to the signal output end of the first serial communication interface on the first interface board through the first panel connector, the first end of the fourth gating branch is set to be electrically connected to the signal output end of the second serial communication interface on the second interface board through the second panel connector, and the second end of the third gating branch and the second end of the fourth gating branch are set to be electrically connected to the processor.
[0022] In an exemplary embodiment, the multiple resistor modules include a first resistor module, a second resistor module, a third resistor module and a fourth resistor module, wherein: the first end of the first resistor module is electrically connected to the first end of the first selection branch, and the second end of the first resistor module is electrically connected to the first panel connector; the first end of the second resistor module is electrically connected to the first end of the second selection branch, and the second end of the second resistor module is electrically connected to the second panel connector; the first end of the third resistor module is electrically connected to the first end of the third selection branch, and the second end of the third resistor module is electrically connected to the first panel connector; the first end of the fourth resistor module is electrically connected to the first end of the fourth selection branch, and the second end of the fourth resistor module is electrically connected to the second panel connector.
[0023] According to a second aspect, a method for switching a serial communication interface is provided, which is applied to the above-mentioned switch device. The switching method includes: obtaining serial port position detection signals of multiple serial communication interfaces in a serial port unit in the switch device, wherein the serial port position detection signals are used to indicate the setting positions of the multiple serial communication interfaces; converting the serial port position detection signals into control signals, and outputting the control signals to a gating unit in the switch device, so that the gating unit controls at least one first serial communication interface to connect to a processor in the switch device according to the control signal.
[0024] In an exemplary embodiment, a switch device includes a first interface board and / or a second interface board, the first interface board and the second interface board are two panels of the switch device located at different positions, the serial port unit in the switch device is set on the interface board, converts a serial port position detection signal into a control signal, and outputs the control signal to a gating unit in the switch device, including: when the serial port position detection signal indicates that a first serial communication interface is set on the first interface board among multiple serial communication interfaces, converts the serial port position detection signal into a first control signal, and outputs the first control signal to the gating unit, so that the gating unit controls the first serial communication interface to be connected to the processor according to the first control signal; when the serial port position detection signal indicates that a second serial communication interface is set on the second interface board among multiple serial communication interfaces, converts the serial port position detection signal into a second control signal, and outputs the second control signal to the gating unit, so that the gating unit controls the second serial communication interface to be connected to the processor according to the second control signal.
[0025] In an exemplary embodiment, the serial port position detection signal is a level signal, and the serial port position detection signal is converted into a first control signal, and the first control signal is output to the gating unit, so that the gating unit controls the first serial communication interface to be connected to the processor according to the first control signal, including: outputting a pull-up signal to a signal trigger module in a switch device, so that the signal trigger module pulls up the level signal and outputs a first logic signal, and the gating unit controls the first serial communication interface to be connected to the processor according to the first logic signal.
[0026] In an exemplary embodiment, the serial port position detection signal is a level signal, and the serial port position detection signal is converted into a second control signal, and the second control signal is output to the gating unit, so that the gating unit controls the second serial communication interface to be connected to the processor according to the second control signal, including: outputting a pull-down signal to a signal trigger module in a switch device, so that the signal trigger module pulls down the level signal and outputs a second logic signal, and the gating unit controls the second serial communication interface to be connected to the processor according to the second logic signal.
[0027] According to a third aspect, a switching device for a serial communication interface is provided, which is applied to the above-mentioned switch device. The switching device includes: an acquisition module, configured to obtain serial port position detection signals of multiple serial communication interfaces in a serial port unit, wherein the serial port position detection signals are used to indicate the setting positions of the multiple serial communication interfaces; a conversion module, configured to convert the serial port position detection signals into control signals and output the control signals to a gating unit in the switch device, so that the gating unit controls at least one first serial communication interface to be connected to a processor in the switch device according to the control signal.
[0028] According to a fourth aspect, a non-volatile readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0029] According to a fifth aspect, an electronic device is also provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0030] Through the present application, since the serial port unit in the switch device includes multiple serial communication interfaces, each resistor module is electrically connected to a serial communication interface, and the resistor modules electrically connected to the signal input end and signal output end of the same serial communication interface are different, the selection unit can control a serial communication interface to connect to the processor when receiving a control signal, thereby realizing automatic switching of each serial communication interface among the multiple serial communication interfaces. Therefore, compared with the related art that requires maintaining two kinds of bills of materials for substrates on the front and back panels to meet the serial port needs, only one kind of bill of materials for substrates needs to be maintained, and then only the material number of one kind of designed substrate needs to be classified and controlled in the bill of materials database. Therefore, the problem of high cost of producing and managing switch devices in the related art can be solved, and the cost of producing and managing switch devices can be greatly reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] FIG1 is a structural block diagram of a switch device according to the related art;
[0032] FIG2 is a structural block diagram of a switch device according to an embodiment of the present application;
[0033] FIG3 is a structural block diagram of another switch device according to an embodiment of the present application;
[0034] FIG4 is a flow chart of a method for switching a serial communication interface according to an embodiment of the present application;
[0035] FIG5 is a structural block diagram of a switching device for a serial communication interface according to an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0038] As described in the background, current universal baseboards for modular switch designs offer signal path serial resistance selection to accommodate both front-panel and rear-panel CPU debug serial ports. Specifically, for designs with front-panel serial ports, a resistor jumper is connected to the front panel. For designs with rear-panel serial ports, a resistor jumper is connected to the rear panel. Optionally, as shown in Figure 1, the switch device has a universal substrate 100′, on which a CPU 10′, a front panel connector 20′ and a rear panel connector 30′ are provided. The switch device also has a relative front panel and rear panel, a front serial communication interface 40′ (front serial port) is provided on the front panel, and a rear serial communication interface 50′ (rear serial port) is provided on the rear panel. When the UART (Universal Asynchronous Receiver / Transmitter) 0 signal line (UART0_TX signal line and UART0_RX signal line) of the CPU is connected to the front panel connector 20′, the front serial communication interface 40′ and the UART0 signal line of the CPU 10′ are turned on. When the UART0 signal line (UART0_TX signal line and UART0_RX signal line) of the CPU is connected to the rear panel connector 30′, the rear serial communication interface 50′ and the UART0 signal line of the CPU 10′ are turned on. For products with a front-panel serial port design, resistors R1′ and R3′ are soldered, while resistors R2′ and R4′ are not. For products with a rear-panel serial port design, resistors R1′ and R3′ are not soldered, while resistors R2′ and R4′ are soldered. This design method requires maintaining a bill of materials (BOM) for the universal substrate corresponding to the two designs. This requires classifying and controlling the material numbers of the printed circuit board assemblies (PCBAs) corresponding to the two designs in the BOM database, significantly increasing production and management costs.
[0039] In order to solve the problem of high cost in producing and managing switch devices in the related art, embodiments of the present application provide a switch device, a switching method for a serial communication interface, and a device thereof.
[0040] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.
[0041] For ease of description, some nouns or terms involved in the embodiments of the present application are explained below:
[0042] A switch is a network device configured to forward electrical (or optical) signals. It provides a dedicated electrical signal path between any two network nodes connected to the switch. The most common switch is the Ethernet switch. Other common switches include telephone voice switches and fiber optic switches.
[0043] Switch board: consists of a switching chip and a processor. The switching chip provides an external optical module to receive status information of each interface board of the switch. The processor obtains the port status of the board and the board status sent by the interface board through the Ethernet protocol stack. At the same time, it obtains the power and temperature status data of the board through the two-wire serial bus (Inter-Integrated Circuit, I2C bus), and encapsulates the board status data (including port status, board power status and temperature, etc.) into Ethernet messages and sends them to the network management terminal.
[0044] Interface board: includes a switching chip and a processor. The switching chip is connected to an external optical module and sends the board status information to the switching board. The processor obtains the port status of the board through the Ethernet protocol stack, and also obtains the power and temperature status data of the board through the two-wire serial bus (I2C bus). It encapsulates the board status data into Ethernet messages and sends them to the switching chip, which then forwards them to the switching board.
[0045] In this embodiment, a switch device is provided. FIG2 is a structural block diagram of a switch device according to an embodiment of the present application. As shown in FIG2 , the switch device includes a substrate 100, a serial port unit 200, and a processor 300, a resistor unit 400, and a gating unit 500 disposed on the substrate 100, wherein:
[0046] The serial port unit 200 includes a plurality of serial communication interfaces, each of which includes a signal input terminal and a signal output terminal;
[0047] The strobe unit 500 is electrically connected to the processor 300 and the resistance unit 400 respectively, and is configured to control a serial communication interface to communicate with the processor 300 when a control signal is received.
[0048] Through the above embodiment, since the serial port unit in the switch device includes multiple serial communication interfaces, each resistor module is electrically connected to a serial communication interface, and the resistor modules electrically connected to the signal input and signal output ends of the same serial communication interface are different. Therefore, by causing the selection unit to control a serial communication interface to connect to the processor when receiving a control signal, it is possible to achieve automatic switching of each of the multiple serial communication interfaces. Compared with the related art that requires maintaining two bills of materials for substrates on the front and back panels to meet the serial port needs, only the bill of materials for one substrate needs to be maintained, and then only the material number of one designed substrate needs to be classified and controlled in the bill of materials database. Therefore, the problem of high costs in producing and managing switch devices in the related art can be solved, and the production and management costs of switch devices can be greatly reduced.
[0049] In some optional embodiments, the switch device in this embodiment further includes at least one interface board and at least one switch card, wherein: the serial port unit is disposed on the interface board, the interface board includes a first interface board and / or a second interface board, the first interface board and the second interface board being two panels located at different positions in the switch device; and the at least one switch card is electrically connected to the interface board. By disposing multiple serial communication interfaces on the same or different interface boards, the gating unit can be used to switch the serial communication interfaces on the same or different interface boards. The one or more interface boards are electrically connected to the at least one switch card to complete the data exchange function of the switch.
[0050] Exemplarily, the first interface board and the second interface board are the front panel and rear panel of the switch device respectively. At least one serial port unit is provided on the front panel and the rear panel. When the selection unit receives a control signal, the serial communication interface on the front panel and / or the rear panel is controlled to be connected with the processor, thereby realizing automatic switching of the serial communication interface on the front panel and the rear panel.
[0051] In some optional embodiments, there are multiple interface boards, and the switch device further includes a data switch configured to electrically connect at least one switch card to at least one interface board. If there are multiple interface boards, the data switch can connect multiple interface boards to the main switch board to complete the data exchange function of the switch.
[0052] Exemplarily, the switch cards include a master switch board (Master) and a slave switch board (Slaver), configured to receive status information from each interface board in the switch device. When the switch device is operating normally, a data switch connects the interface boards to the master switch board to complete the switch's data exchange function. If the master switch board fails, the data switch is controlled to connect several interface boards to a new master switch board, allowing the slave switch board to function as the new master switch board.
[0053] In some optional embodiments, the switch device in this embodiment further includes a serial port position detection module and a signal trigger module, wherein: the serial port position detection module is arranged in at least one switch board, and is configured to detect the setting positions of multiple serial communication interfaces and output a serial port position detection signal, the setting positions including the first interface board and / or the second interface board; the signal trigger module is electrically connected to the serial port position detection module, and is configured to output a first control signal to the selection unit when the serial port position detection signal indicates that one of the multiple serial communication interfaces is provided on the first interface board, so that the selection unit controls the first serial communication interface to be connected to the processor according to the first control signal, and output a second control signal to the selection unit when the serial port position detection signal indicates that one of the multiple serial communication interfaces is provided on the second interface board, so that the selection unit controls the second serial communication interface to be connected to the processor according to the second control signal.
[0054] In the above optional implementation, since the design of the switching board is generally different, the signal source that displays whether the serial communication interface is located on the front panel or the rear panel is designed on this board, and the pull-up or pull-down circuit design is performed on this board. It is only necessary to design and produce the switching board, and directly use the existing general substrate in stock to perform system-level assembly and functional verification.
[0055] The embodiment of the present application introduces a serial port position detection signal for switch design and controls the selection unit to ensure that the serial communication interface switching of the universal substrate can correctly correspond to the position of the serial communication interface on different panels, thereby ensuring the universality of the universal substrate. Therefore, during the iterative design process of the switch, the universal substrate design can be kept unchanged, and only one PCRA material number is maintained in the production library. For new switch equipment, only the main switch board needs to be designed and produced, and the universal substrate in existing inventory can be directly used for system-level assembly and functional verification.
[0056] In the above optional embodiment, the serial port position detection signal can be a level signal, and the signal trigger module is configured to: when the serial port position detection signal indicates that one of the multiple serial communication interfaces is provided on the first interface board, the level signal is pulled up, and the output first control signal is a first logic signal, so that the selection unit controls the first serial communication interface to be connected to the processor according to the first logic signal; when the serial port position detection signal indicates that one of the multiple serial communication interfaces is provided on the second interface board, the level signal is pulled down, and the output first control signal is a second logic signal, so that the selection unit controls the second serial communication interface to be connected to the processor according to the second logic signal.
[0057] In the above optional embodiment, when the interface board includes a first interface board, the first interface board may be a front panel of the switch device. In this case, the plurality of serial communication interfaces may include a front serial communication interface provided on the front panel.
[0058] In the above optional embodiment, when the interface board includes a second interface board, the first interface board may be a rear panel of the switch device. In this case, the plurality of serial communication interfaces may include a rear serial communication interface provided on the rear panel.
[0059] Exemplarily, the serial port position detection signal FRONT_ABS comes from the main switching board in the switch device, and the above-mentioned first interface board and the above-mentioned second interface board are respectively the front panel and the rear panel of the switch device. For the serial port position detection signal FRONT_ABS, for the design with a serial communication interface provided on the front panel, the FRONT_ABS level signal is pulled up; for the design without a serial communication interface provided on the front panel, the FRONT_ABS level signal is pulled down to the ground terminal (Ground, GND). When the serial communication interface of the switch device is designed to be on the front panel, the FRONT_ABS signal is pulled up on the main switching board, the FRONT_ABS signal level is high, and the corresponding logic is "1". The selection unit connects the front serial communication interface on the front panel with the central processing unit (CPU) on the universal substrate according to the logic value of the FRONT_ABS signal; when the serial communication interface is not detected on the front panel, that is, the serial communication interface of the switch device is designed to be set on the rear panel, the FRONT_ABS signal is pulled down to GND on the main switching board, the FRONT_ABS signal level is low, and the corresponding logic is "0". The selection unit connects the rear serial communication interface on the rear panel with the central processing unit (CPU) on the universal substrate according to the logic value of the FRONT_ABS signal.
[0060] In some optional embodiments, the gating unit includes multiple gating modules, each gating module having multiple gating branches, wherein: the multiple gating branches are respectively configured to connect the processor to different resistor modules; the resistor modules electrically connected to the same gating module are configured to be electrically connected to different serial communication interfaces; and the gating unit is configured to switch one gating branch in each gating module into a path according to a control signal. For the baseboard in the switch device, in addition to the gating unit, the resistors can be uniformly soldered to the baseboard, thereby allowing the universal baseboard design corresponding to the baseboard to have only a single bill of materials. Specifically, only the material numbers of the printed circuit board assembly (PCBA) corresponding to the aforementioned design need to be classified and controlled in the database of the bill of materials, which greatly increases production and management costs.
[0061] In the above optional embodiment, since each gating module has multiple gating branches, each gating branch connects a serial communication interface to the processor through a resistance module, and different gating branches in the same gating module are connected to different serial communication interfaces, so that when the gating unit receives a control signal, the gating unit can control any one of the multiple serial communication interfaces to be connected to the processor on the substrate according to the control signal, and then when the multiple serial communication interfaces are located on different interface boards, automatic switching of the serial communication interfaces on multiple boards is realized.
[0062] In the above optional embodiment, each resistance module has a first end electrically connected to the serial communication interface and a second end electrically connected to the selection unit, the second end of the resistance module electrically connected to the signal input end of the target serial communication interface is connected to the first selection module, and the second end of the resistance module electrically connected to the signal output end of the target serial communication interface is connected to the second selection module, and the target serial communication interface is any one of the multiple serial communication interfaces.
[0063] For example, as shown in FIG3 , the gating unit includes two gating modules, namely a switch controller-T60 and a switch controller-R70 , wherein the CPU 10 is connected to the UART0_TX signal line and the UART0_RX signal line. The logical relationship between the above signal lines and the switch controller is shown in the following table:
[0064] Optionally, as shown in the table above, the switch controller-T has two gating branches A and B, the gating branch A is electrically connected to R1, the gating branch B is electrically connected to R2, and the switch controller-R has two gating branches C and D, the gating branch C is electrically connected to R3, and the gating branch D is electrically connected to R4, wherein:
[0065] The switch controller-T is configured to universally select the switching of branches A and B. When the input signal of the switch controller-T is a logic "1", the switch is switched to branch A to connect the UART0_TX signal line connected to the CPU to the front serial communication interface through resistor R1. When the input signal of the switch controller-T is a logic "0", the switch is switched to branch B to connect the UART0_TX signal line connected to the CPU to the rear serial communication interface through resistor R2.
[0066] The switch controller-R is set to be universal, in which the switching of the selection branches C and D is performed. When the input signal of the switch controller-R is logic "1", the switch is switched to the C path to be turned on, so that the UART0_RX signal line connected to the CPU is connected to the front serial communication interface through the resistor R3. When the input signal of the switch controller-R is logic "0", the switch is switched to the D path to be turned on, so that the UART0_RX signal line connected to the CPU is connected to the rear serial communication interface through the resistor R4.
[0067] In some optional implementations, the switch device in this embodiment further includes multiple panel connectors, which are electrically connected to the multiple serial communication interfaces in a one-to-one correspondence, and each resistor module is electrically connected to the serial communication interface through the panel connector.
[0068] In the above optional embodiment, the plurality of panel connectors may include a first panel connector and a second panel connector, wherein: the first panel connector is configured to be electrically connected to the first interface board; and the second panel connector is configured to be electrically connected to the second interface board. Optionally, when the first interface board is a front panel, the first panel connector is a front panel connector, and when the second interface board is a rear panel, the second panel connector is a rear panel connector.
[0069] Exemplarily, as shown in FIG3 , the serial port position detection signal FRONT_ABS comes from a main switch board (not shown) in the switch device. The first interface board and the second interface board are the front panel and the rear panel of the switch device, respectively. For the serial port position detection signal FRONT_ABS:
[0070] When the serial communication interface of the switch device is designed to be on the front panel, the FRONT_ABS signal is pulled up on the main switch board. The FRONT_ABS signal level is high, and the corresponding logic is "1". The A path in the switch controller-T60 and the C path in the switch controller-R70 are connected. The UART0 signal line (UART0_TX signal line and UART0_RX signal line) of the CPU10 is connected to the front panel connector 20. The front serial communication interface 40 and the UART0 signal line of the CPU10 are connected.
[0071] When the serial communication interface of the switch device is designed to be on the rear panel, the FRONT_ABS signal is pulled down to the ground (GND) on the main switching board, the FRONT_ABS signal level is low, and the corresponding logic is "0". The B path in the switch controller-T60 and the D path in the switch controller-R70 are turned on, the UART0 signal line (UART0_TX signal line and UART0_RX signal line) of the CPU10 are connected to the rear panel connector 30, and the rear serial communication interface 50 and the UART0 signal line of the CPU10 are turned on.
[0072] In some optional embodiments, the gating unit includes a first gating module and a second gating module, wherein: the first gating module has a first gating branch and a second gating branch, the first end of the first gating branch is set to be electrically connected to the signal input end of the first serial communication interface on the first interface board through the first panel connector, the first end of the second gating branch is set to be electrically connected to the signal input end of the second serial communication interface on the second interface board through the second panel connector, and the second end of the first gating branch and the second end of the second gating branch are set to be electrically connected to the processor; the second gating module has a third gating branch and a fourth gating branch, the first end of the third gating branch is set to be electrically connected to the signal output end of the first serial communication interface on the first interface board through the first panel connector, the first end of the fourth gating branch is set to be electrically connected to the signal output end of the second serial communication interface on the second interface board through the second panel connector, and the second end of the third gating branch and the second end of the fourth gating branch are set to be electrically connected to the processor.
[0073] In the above optional embodiment, the multiple resistor modules include a first resistor module, a second resistor module, a third resistor module and a fourth resistor module, wherein: the first end of the first resistor module is electrically connected to the first end of the first selection branch, and the second end of the first resistor module is electrically connected to the first panel connector; the first end of the second resistor module is electrically connected to the first end of the second selection branch, and the second end of the second resistor module is electrically connected to the second panel connector; the first end of the third resistor module is electrically connected to the first end of the third selection branch, and the second end of the third resistor module is electrically connected to the first panel connector; the first end of the fourth resistor module is electrically connected to the first end of the fourth selection branch, and the second end of the fourth resistor module is electrically connected to the second panel connector.
[0074] The above-mentioned first resistance module, the above-mentioned second resistance module, the above-mentioned third resistance module and the above-mentioned fourth resistance module can be a single resistance element with the same resistance value, or a plurality of resistance elements connected in series, or a plurality of resistance elements connected in parallel. The number of resistance elements in each resistance module and the resistance value of a single resistance element are not limited in the embodiments of this application.
[0075] For example, as shown in FIG3 , the first gating module and the second gating module are switch controller-T60 and switch controller-R70 respectively, the serial port position detection signal FRONT_ABS comes from the main switching board (not shown) in the switch device, the first interface board and the second interface board are the front panel and rear panel of the switch device respectively, the first panel connector is the front panel connector 20, the second panel connector is the rear panel connector 30, the switch controller-T60 has two gating branches A and B, and the switch controller-T60 is set to The switching of the strobe branches A and B is universal, and the switch controller-R70 has two strobe branches C and D. The switch controller-R70 is configured to universally switch the strobe branches C and D. The first resistor module, the second resistor module, the third resistor module, and the fourth resistor module are resistors R1, R2, R3, and R4, respectively. In this case, the CPU 10, the front panel connector 20, the rear panel connector 30, the switch controller-T60, the switch controller-R70, the resistors R1, R2, R3, and R4 are provided on the substrate 100, wherein:
[0076] When the input signal of the switch controller-T60 is logic "1", the switch is switched to the A path to be turned on, and the UART0_TX signal line of the CPU10 is connected to the front panel connector 20 through the resistor R1, so that the UART0_TX signal line of the front serial communication interface 40 and the CPU10 is turned on through the front panel connector 20;
[0077] When the input signal of the switch controller-T70 is logic "0", the switch is switched to the B path for conduction, and the UART0_TX signal line of the CPU10 is connected to the rear panel connector 30 through the resistor R2, so that the UART0_TX signal line of the rear serial communication interface 50 and the CPU10 is connected through the rear panel connector 30;
[0078] When the input signal of the switch controller-R70 is logic "1", the switch is switched to C path for conduction, the UART0_RX signal line of the CPU10 is connected to the front panel connector 20 through the resistor R3, and the UART0 signal line of the front serial communication interface 40 and the CPU10 is connected;
[0079] When the input signal of the switch controller -R70 is logic "0", the switch switches to the D path and the UART0_RX signal line of the CPU10 is connected to the rear panel connector 30 through the resistor R4, and the rear serial communication interface 50 and the UART0 signal line of the CPU10 are connected.
[0080] For the switch device in the above example, in addition to the switch controller-T and switch controller-R, resistors R1, R2, R3, and R4 can be uniformly soldered on the substrate, so that the universal substrate design corresponding to the substrate can have only one bill of materials. That is, only the material numbers of the printed circuit board assembly (PCBA) corresponding to the above design in the bill of materials database need to be classified and controlled, which greatly increases production and management costs.
[0081] In this embodiment, a method for switching a serial communication interface is provided, which is applied to the switch device of the aforementioned embodiment. FIG4 is a flow chart of the method for switching a serial communication interface according to the embodiment of the present application. As shown in FIG4 , the flow chart includes the following steps:
[0082] Step S102: acquiring serial port position detection signals of a plurality of serial communication interfaces in a serial port unit in a switch device, wherein the serial port position detection signals are used to indicate setting positions of the plurality of serial communication interfaces;
[0083] Step S104 : converting the serial port position detection signal into a control signal, and outputting the control signal to a gating unit in the switch device, so that the gating unit controls at least one first serial communication interface to connect to the processor in the switch device according to the control signal.
[0084] Through the above steps, after obtaining the serial port position detection signals of multiple serial communication interfaces in the serial port unit of the switch device, the serial port position detection signals are converted into control signals, so that the selection unit can control at least one first serial communication interface to connect to the processor in the switch device according to the control signal, thereby realizing automatic switching of each of the multiple serial communication interfaces. Compared with the related art that requires maintaining the bill of materials of two substrates to meet the serial port requirements on the front and back panels, only the bill of materials of one substrate needs to be maintained, and then only the material number of one designed substrate in the bill of materials database needs to be classified and controlled. Therefore, the problem of high cost of producing and managing switch devices in the related art can be solved, and the cost of producing and managing switch devices can be greatly reduced.
[0085] In some optional embodiments, the switch device in this embodiment includes a first interface board and / or a second interface board, the first interface board and the second interface board are two panels located at different positions of the switch device, the serial port unit in the switch device is set on the interface board, the serial port position detection signal is converted into a control signal, and the control signal is output to the selection unit in the switch device, including: when the serial port position detection signal indicates that one of the multiple serial communication interfaces is provided with a first serial communication interface provided on the first interface board, the serial port position detection signal is converted into a first control signal, and the first control signal is output to the selection unit, so that the selection unit controls the first serial communication interface to be connected to the processor according to the first control signal; when the serial port position detection signal indicates that one of the multiple serial communication interfaces is provided with a second serial communication interface provided on the second interface board, the serial port position detection signal is converted into a second control signal, and the second control signal is output to the selection unit, so that the selection unit controls the second serial communication interface to be connected to the processor according to the second control signal.
[0086] Exemplarily, the first interface board and the second interface board are the front panel and rear panel of the switch device respectively. At least one serial port unit is provided on the front panel and the rear panel. When the selection unit receives a control signal, the serial communication interface on the front panel and / or the rear panel is controlled to be connected with the processor, thereby realizing automatic switching of the serial communication interface on the front panel and the rear panel.
[0087] In the above optional implementation, since the design of the switching board is generally different, the signal source that displays whether the serial communication interface is located on the front panel or the rear panel is designed on this board, and the pull-up or pull-down circuit design is performed on this board. It is only necessary to design and produce the switching board, and directly use the existing general substrate in stock to perform system-level assembly and functional verification.
[0088] The embodiment of the present application introduces a serial port position detection signal for switch design, and controls the selection unit to ensure that the serial communication interface switching of the universal substrate can correctly correspond to the position of the serial communication interface on different panels, thereby ensuring the universality of the universal substrate. Therefore, during the iterative design process of the switch, the universal substrate design can be kept unchanged, and only one PCBA material number is maintained in the production library. For new switch equipment, only the main switch board needs to be designed and produced, and the universal substrate in existing inventory can be directly used for system-level assembly and functional verification.
[0089] In the above optional embodiment, the serial port position detection signal can be a level signal. The serial port position detection signal is converted into a first control signal, and the first control signal is output to the gating unit, so that the gating unit controls the first serial communication interface to be connected to the processor according to the first control signal. It can include: outputting a pull-up signal to a signal trigger module in the switch device, so that the signal trigger module pulls up the level signal and outputs a first logic signal, and the gating unit controls the first serial communication interface to be connected to the processor according to the first logic signal.
[0090] In the above optional embodiment, the serial port position detection signal can be a level signal. Converting the serial port position detection signal into a second control signal and outputting the second control signal to the gating unit so that the gating unit controls the second serial communication interface to be connected to the processor according to the second control signal can include: outputting a pull-down signal to a signal trigger module in the switch device so that the signal trigger module pulls down the level signal and outputs a second logic signal, and the gating unit controls the second serial communication interface to be connected to the processor according to the second logic signal.
[0091] Exemplarily, the serial port position detection signal FRONT_ABS comes from the main switching board in the switch device, and the above-mentioned first interface board and the above-mentioned second interface board are respectively the front panel and the rear panel of the switch device. For the serial port position detection signal FRONT_ABS, for the design with a serial communication interface on the front panel, the FRONT_ABS level signal is pulled up; for the design without a serial communication interface on the front panel, the FRONT_ABS level signal is pulled down to the ground terminal (GND). When the serial communication interface of the switch device is designed to be on the front panel, the FRONT_ABS signal is pulled up on the main switching board, the FRONT_ABS signal level is high, and the corresponding logic is "1". The selection unit connects the front serial communication interface on the front panel with the central processing unit (CPU) on the universal substrate according to the logic value of the FRONT_ABS signal; when the serial communication interface is not detected on the front panel, that is, the serial communication interface of the switch device is designed to be set on the rear panel, the FRONT_ABS signal is pulled down to GND on the main switching board, the FRONT_ABS signal level is low, and the corresponding logic is "0". The selection unit connects the rear serial communication interface on the rear panel with the central processing unit (CPU) on the universal substrate according to the logic value of the FRONT_ABS signal.
[0092] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a non-volatile readable storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0093] This embodiment also provides a serial communication interface switching device for use in the switch device described in the aforementioned embodiment. This device is configured to implement the aforementioned embodiment and its alternative implementations, and details already described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. While the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
[0094] FIG5 is a structural block diagram of a switching device for a serial communication interface according to an embodiment of the present application. As shown in FIG5 , the device includes:
[0095] an acquisition module 22 configured to acquire serial port position detection signals of a plurality of serial communication interfaces in the serial port unit, wherein the serial port position detection signals are used to indicate setting positions of the plurality of serial communication interfaces;
[0096] The conversion module 24 is configured to convert the serial port position detection signal into a control signal and output the control signal to the gating unit in the switch device, so that the gating unit controls at least one first serial communication interface to connect with the processor in the switch device according to the control signal.
[0097] It should be noted here that the above-mentioned acquisition module 22 and conversion module 24 can correspond to step S102 and step S104 in the aforementioned embodiment. The instances and application scenarios implemented by multiple modules and corresponding steps are the same, but are not limited to the contents disclosed in the aforementioned embodiment.
[0098] Through the above-mentioned device, after the acquisition module 22 acquires the serial port position detection signals of multiple serial communication interfaces in the serial port unit of the switch device, the serial port position detection signals are converted into control signals through the conversion module 24, thereby enabling the selection unit to control at least one first serial communication interface to connect to the processor in the switch device according to the control signal, thereby achieving automatic switching of each of the multiple serial communication interfaces. Compared with the related art that requires maintaining the bill of materials of two substrates to meet the serial port requirements on the front and back panels, only the bill of materials of one substrate needs to be maintained, and further, only the material number of one designed substrate in the bill of materials database needs to be classified and controlled. Therefore, the problem of high cost of producing and managing switch devices in the related art can be solved, and the cost of producing and managing switch devices can be greatly reduced.
[0099] In some optional embodiments, the switch device in this embodiment includes a first interface board and / or a second interface board, the first interface board and the second interface board are two panels located at different positions of the switch device, and the serial port unit in the switch device is set on the interface board. The above-mentioned conversion module 24 includes: a first sub-conversion module, which is configured to convert the serial port position detection signal into a first control signal when the serial port position detection signal indicates that one of the multiple serial communication interfaces is provided on the first interface board, and output the first control signal to the selection unit, so that the selection unit controls the first serial communication interface to be connected to the processor according to the first control signal; a second sub-conversion module, which is configured to convert the serial port position detection signal into a second control signal when the serial port position detection signal indicates that one of the multiple serial communication interfaces is provided on the second interface board, and output the second control signal to the selection unit, so that the selection unit controls the second serial communication interface to be connected to the processor according to the second control signal.
[0100] In the above optional embodiment, the serial port position detection signal can be a level signal, and the above first sub-conversion module can include: a pull-up sub-module, which is configured to output a pull-up signal to a signal trigger module in the switch device, so that the signal trigger module pulls up the level signal and outputs a first logic signal, and the selection unit controls the first serial communication interface to be connected to the processor according to the first logic signal.
[0101] In the above optional embodiment, the serial port position detection signal can be a level signal, and the above second sub-conversion module can include: a pull-down sub-module, which is configured to output a pull-down signal to a signal trigger module in the switch device, so that the signal trigger module pulls down the level signal and outputs a second logic signal, and the selection unit controls the second serial communication interface to be connected to the processor according to the second logic signal.
[0102] In the above optional implementation, since the design of the switching board is generally different, the signal source that displays whether the serial communication interface is located on the front panel or the rear panel is designed on this board, and the pull-up or pull-down circuit design is performed on this board. It is only necessary to design and produce the switching board, and directly use the existing general substrate in stock to perform system-level assembly and functional verification.
[0103] The embodiment of the present application introduces a serial port position detection signal for switch design, and controls the selection unit to ensure that the serial communication interface switching of the universal substrate can correctly correspond to the position of the serial communication interface on different panels, thereby ensuring the universality of the universal substrate. Therefore, during the iterative design process of the switch, the universal substrate design can be kept unchanged, and only one PCBA material number is maintained in the production library. For new switch equipment, only the main switch board needs to be designed and produced, and the universal substrate in existing inventory can be directly used for system-level assembly and functional verification.
[0104] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0105] An embodiment of the present application further provides a non-volatile readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when running.
[0106] In an exemplary embodiment, the above-mentioned non-volatile readable storage medium may include, but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other non-volatile readable storage media that can store computer programs.
[0107] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0108] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0109] For optional examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementations, and this embodiment will not be described in detail here.
[0110] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices, they can be implemented using program code executable by the computing device, and thus, they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0111] The above are merely optional embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may be subject to various modifications and variations. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A switch device, characterized in that: The invention comprises a substrate, a serial port unit, and a processor, a resistor unit and a gating unit arranged on the substrate, wherein: The serial port unit includes a plurality of serial communication interfaces, each of which includes a signal input terminal and a signal output terminal; The resistance unit includes a plurality of resistance modules, each of which is electrically connected to one of the serial communication interfaces, and the resistance modules electrically connected to the signal input terminal and the signal output terminal of the same serial communication interface are different; The gating unit is electrically connected to the processor and the resistance unit respectively, and is configured to control one of the serial communication interfaces to be connected to the processor when a control signal is received.
2. The switch device according to claim 1, characterized in that: Also includes: at least one interface board, the serial port unit is arranged on the interface board, the interface board comprises a first interface board and / or a second interface board, the first interface board and the second interface board are two panels of the switch device located at different positions; At least one switch board, at least one of the switch boards is electrically connected to the interface board.
3. The switch device according to claim 2, characterized in that: There are multiple interface boards, and the switch device further includes a data switching switch, which is configured to electrically connect at least one of the switch boards with the at least one interface board.
4. The switch device according to claim 2, characterized in that: Also includes: a serial port position detection module, arranged in at least one of the switch boards, configured to detect the setting positions of the plurality of serial communication interfaces and output a serial port position detection signal, wherein the setting positions include the first interface board and / or the second interface board; A signal trigger module is electrically connected to the serial port position detection module and is configured to output a first control signal to the gating unit when the serial port position detection signal indicates that one of the multiple serial communication interfaces is provided on the first interface board, so that the gating unit controls the first serial communication interface to be connected to the processor according to the first control signal, and to output a second control signal to the gating unit when the serial port position detection signal indicates that one of the multiple serial communication interfaces is provided on the second interface board, so that the gating unit controls the second serial communication interface to be connected to the processor according to the second control signal.
5. The switch device according to claim 4, characterized in that: The serial port position detection signal is a level signal, and the signal trigger module is configured as follows: The serial port position detection signal indicates that one of the plurality of serial communication interfaces is provided on the first interface board. In the case of a first serial communication interface on the processor, the level signal is pulled up, and the output first control signal is a first logic signal, so that the gating unit controls the first serial communication interface to be connected to the processor according to the first logic signal; When the serial port position detection signal indicates that there is a second serial communication interface set on the second interface board among the multiple serial communication interfaces, the level signal is pulled down, and the output first control signal is a second logic signal, so that the selection unit controls the second serial communication interface to be connected to the processor according to the second logic signal.
6. The switch device according to any one of claims 2 to 5, characterized in that: In a case where the interface board includes the first interface board, the first interface board is a front panel of the switch device.
7. The switch device according to claim 6, characterized in that: The plurality of serial communication interfaces include a front serial communication interface disposed on the front panel.
8. The switch device according to any one of claims 2 to 5, characterized in that: In the case that the interface board includes the second interface board, the first interface board is a rear panel of the switch device.
9. The switch device according to claim 8, characterized in that: The plurality of serial communication interfaces include a rear serial communication interface disposed on the rear panel.
10. The switch device according to any one of claims 2 to 5, characterized in that: The gating unit comprises a plurality of gating modules, each of which has a plurality of gating branches, wherein: The plurality of strobe branches are respectively configured to connect the processor with different resistance modules; The resistance modules electrically connected to the same strobe module are configured to be electrically connected to different serial communication interfaces; The gating unit is configured to switch one of the gating branches in each of the gating modules to a pass path according to the control signal.
11. The switch device according to claim 10, characterized in that: Each of the resistance modules has a first end electrically connected to the serial communication interface and a second end electrically connected to the selection unit. The second end of the resistance module electrically connected to the signal input end of the target serial communication interface is connected to the first selection module, and the second end of the resistance module electrically connected to the signal output end of the target serial communication interface is connected to the second selection module. The target serial communication interface is any one of the multiple serial communication interfaces.
12. The switch device according to claim 10, characterized in that: Also includes: A plurality of panel connectors are electrically connected to the plurality of serial communication interfaces in a one-to-one correspondence, and each of the resistor modules is electrically connected to the serial communication interface through the panel connector.
13. The switch device according to claim 12, characterized in that: The plurality of panel connectors include: A first panel connector, configured to be electrically connected to the first interface board; The second panel connector is configured to be electrically connected to the second interface board.
14. The switch device according to claim 13, characterized in that: The gating unit comprises a first gating module and a second gating module, wherein: The first gating module comprises a first gating branch and a second gating branch, wherein a first end of the first gating branch is configured to be electrically connected to a signal input end of a first serial communication interface on the first interface board through the first panel connector, a first end of the second gating branch is configured to be electrically connected to a signal input end of a second serial communication interface on the second interface board through the second panel connector, and a second end of the first gating branch and a second end of the second gating branch are configured to be electrically connected to the processor; The second selection module has a third selection branch and a fourth selection branch, the first end of the third selection branch is configured to be electrically connected to the signal output end of the first serial communication interface on the first interface board through the first panel connector, the first end of the fourth selection branch is configured to be electrically connected to the signal output end of the second serial communication interface on the second interface board through the second panel connector, and the second end of the third selection branch and the fourth end of the second selection branch are configured to be electrically connected to the processor.
15. The switch device according to claim 14, characterized in that: The plurality of resistance modules include a first resistance module, a second resistance module, a third resistance module and a fourth resistance module, wherein: The first end of the first resistor module is electrically connected to the first end of the first selection branch, and the second end of the first resistor module is electrically connected to the first panel connector; A first end of the second resistance module is electrically connected to a first end of the second selection branch, and a second end of the second resistance module is electrically connected to the second panel connector; The first end of the third resistor module is electrically connected to the first end of the third selection branch, and the second end of the third resistor module is electrically connected to the first panel connector; A first end of the fourth resistance module is electrically connected to a first end of the fourth selection branch, and a second end of the fourth resistance module is electrically connected to the second panel connector.
16. A method for switching a serial communication interface, characterized in that: Applied to the switch device according to any one of claims 1 to 15, the switching method comprises: Acquire serial port position detection signals of a plurality of serial communication interfaces in a serial port unit in the switch device, wherein the serial port position detection signal is used to indicate a setting position of at least one of the serial communication interfaces; The serial port position detection signal is converted into a control signal, and the control signal is output to a gating unit in the switch device, so that the gating unit controls at least one of the first serial communication interfaces to be connected to a processor in the switch device according to the control signal.
17. The switching method according to claim 16, characterized in that: The switch device includes a first interface board and / or a second interface board, wherein the first interface board and the second interface board are two panels of the switch device located at different positions, and the serial port unit in the switch device is arranged on the interface board, and the converting of the serial port position detection signal into a control signal and outputting the control signal to the gating unit in the switch device includes: When the serial port position detection signal indicates that the plurality of serial communication interfaces include a first serial communication interface provided on the first interface board, converting the serial port position detection signal into a first control signal, and outputting the first control signal to the gating unit, so that the gating unit controls the first serial communication interface to be connected to the processor according to the first control signal; When the serial port position detection signal indicates that one of the multiple serial communication interfaces is a second serial communication interface provided on the second interface board, the serial port position detection signal is converted into a second control signal, and the second control signal is output to the enabling unit, so that the enabling unit controls the second serial communication interface to be connected to the processor according to the second control signal.
18. The switching method according to claim 17, characterized in that: The serial port position detection signal is a level signal, and the serial port position detection signal is converted into a first control signal, and the first control signal is output to the gating unit, so that the gating unit controls the first serial communication interface to be connected to the processor according to the first control signal, including: Output a pull-up signal to a signal trigger module in the switch device, so that the signal trigger module pulls up the level signal and outputs a first logic signal, and the gating unit controls the first serial communication interface to be connected to the processor according to the first logic signal.
19. The switching method according to claim 17, characterized in that: The serial port position detection signal is a level signal, and the serial port position detection signal is converted into a second control signal, and the second control signal is output to the gating unit, so that the gating unit controls the second serial communication interface to be connected to the processor according to the second control signal, including: Output a pull-down signal to a signal trigger module in the switch device, so that the signal trigger module pulls down the level signal and outputs a second logic signal, and the gating unit controls the second serial communication interface to be connected to the processor according to the second logic signal.
20. A switching device for a serial communication interface, characterized in that: Applied to the switch device according to any one of claims 1 to 15, the switching device comprises: an acquisition module, configured to acquire serial port position detection signals of a plurality of serial communication interfaces in the serial port unit, wherein the serial port position detection signal is used to indicate a setting position of at least one of the serial communication interfaces; The conversion module is configured to convert the serial port position detection signal into a control signal and output the control signal to a gating unit in the switch device, so that the gating unit controls at least one of the first serial communication interfaces to be connected to the processor in the switch device according to the control signal.
21. A non-volatile readable storage medium, characterized in that: The non-volatile readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 16 to 19 when executed by a processor.
22. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 16 to 19 are implemented.
Citation Information
Patent Citations
USB interface access device
CN109800196A
Switch equipment and switching method and device of serial communication interface
CN116506378A
Memory interface having extended strobe burst for read timing calibration
US20110225445A1
