Universal bus control system and method
By using a universal bus control system and initialization configuration signals, the bus master system and level transceivers can adapt to different interface communication protocols and level types, thus solving the problems of complexity and compatibility in computer bus interface design and realizing flexible data transmission across multiple interfaces.
Patent Information
- Application Number
- CN202511485335.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2045-10-17
AI Technical Summary
Existing computer bus interfaces suffer from complex hardware designs and require software drivers designed for different interfaces due to differences in protocols and physical voltage levels, resulting in poor flexibility and compatibility.
A general-purpose bus control system is adopted, which generates initialization configuration signals through the user interface to configure the bus master system and level transceivers to meet the communication protocol and level type of the target interface, thereby realizing data transmission and reception of multiple communication protocols and interfaces under one bus system.
It improves the flexibility and compatibility of computer bus systems, simplifies hardware design, and can easily meet diverse peripheral connection needs.
Smart Images

Figure CN120950438B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer bus, in particular to a universal bus control system and method. BACKGROUND
[0002] A computer bus is used to connect various functional components inside a computer device and transmit various data therebetween. Since different peripherals often have different physical layer interfaces, encoding methods, communication protocols, etc., and conventional bus interfaces such as I2C, SPI, CAN, UART, USB, etc. often have a single protocol, physical level method and internal encoding method, they cannot be compatible with each other, which leads to the need for different bus interfaces to connect different peripherals, resulting in complex and inflexible hardware design, and the need for different drivers for different interfaces in software design, leading to long software and hardware development cycle and poor product flexibility. SUMMARY
[0003] The present application aims to provide a universal bus control system and method, which can simultaneously or time-divisionally implement multiple communication protocols and interfaces under a set of bus systems, thereby realizing data transmission between a user end and various target interfaces of different interface types.
[0004] The universal bus control system according to the first aspect of the present application comprises:
[0005] a user interface configured to send an initialization configuration signal, receive an initialization configuration completion signal and transmit and receive data, wherein the initialization configuration signal is generated according to the number and interface type of M target interfaces;
[0006] a bus master system connected to the user interface and configured to complete configuration according to the initialization configuration signal, so that the bus master system meets the communication protocol corresponding to the interface type of the target interface;
[0007] N level transceivers, each connected to the bus master system; each target interface is connected to one level transceiver; the level transceiver connected to the target interface is configured to complete configuration according to the initialization configuration signal, so that the level transceiver meets the communication protocol and level type corresponding to the interface type of the target interface; wherein M and N are positive integers, and M is less than or equal to N;
[0008] In the case where the bus master system and N level transceivers complete configuration according to the initialization configuration signal, the user interface realizes data transmission with M target interfaces through the bus master system and N level transceivers.
[0009] According to some embodiments of the present application, the bus master system comprises:
[0010] an application layer, comprising an application layer driver, a bus configuration interface, an application sending data interface and an application receiving data interface, wherein the application layer driver is connected with the user interface, the bus configuration interface, the application sending data interface and the application receiving data interface respectively;
[0011] a transport layer, comprising a transport layer configurator, a transport sending packet generator, a transport layer sending buffer, a transport layer receiving buffer and a transport receiving packet parser;
[0012] a link layer, comprising a link layer configurator, a link sending packet generator and a link receiving packet parser;
[0013] a physical layer configurator, an encoder and a decoder;
[0014] the physical layer configurator, the encoder, the decoder and N level transceivers as a physical layer; each of the level transceivers has a level configuration port and a first connection port and a second connection port for connecting the target interface;
[0015] wherein the bus configuration interface is connected with the transport layer configurator, the link layer configurator and the physical layer configurator respectively; the user interface, the application layer driver, the application sending data interface, the transport sending packet generator, the transport layer sending buffer, the link sending packet generator, the encoder and the N level transceivers are connected in sequence; the N level transceivers, the decoder, the link receiving packet parser, the transport layer receiving buffer, the transport receiving packet parser, the application receiving data interface, the application layer driver and the user interface are connected in sequence.
[0016] According to some embodiments of the present application, the transport layer further comprises a flow controller, which is connected with the transport layer sending buffer, the transport layer receiving buffer, the link sending packet generator and the link receiving packet parser respectively.
[0017] According to some embodiments of the present application, the link layer further comprises a link layer retransmission buffer, which is connected with the link sending packet generator, the encoder, the link receiving packet parser and the flow controller respectively.
[0018] The universal bus control method according to the second aspect of the embodiments of the present application is applied to the universal bus control system according to the first aspect of the embodiments of the present application, and comprises the following steps:
[0019] obtaining first to-be-transmitted information through the user interface;
[0020] transmit the first to-be-transmitted information to the level transceiver connected to the target interface through the bus master system, so as to transmit the first to-be-transmitted information to the target interface through the level transceiver;
[0021] The bus master system and the level transceiver connected to the target interface are pre-configured according to an initialization configuration signal, so that the bus master system meets the communication protocol corresponding to the interface type of the target interface, and the level transceiver meets the communication protocol and the level type corresponding to the interface type of the target interface.
[0022] According to some embodiments of the present application, the step of transmitting the first to-be-transmitted information to the level transceiver connected to the target interface through the bus master system, so as to transmit the first to-be-transmitted information to the target interface through the level transceiver, comprises:
[0023] The application layer driver acquires the payload data packet issued by the user interface; wherein the payload data packet contains the first to-be-transmitted information;
[0024] The application layer driver performs analysis processing on the payload data packet to obtain first application sending data, and sends the first application sending data to an application sending data interface;
[0025] The application sending data interface performs bit width conversion processing and clock domain conversion processing on the first application sending data to obtain second application sending data, and issues the second application sending data to a transmission sending packet generator;
[0026] The transmission sending packet generator performs packet processing on the second application sending data to obtain transmission sending data, and issues the transmission sending data to a transmission layer sending buffer;
[0027] The transmission layer sending buffer performs cache processing on the transmission sending data to obtain a first cache data packet, and issues the first cache data packet to a link layer sending packet generator in order;
[0028] The link layer sending packet generator performs packet processing on the first cache data packet to obtain link sending data, and issues the link sending data to a physical layer encoder;
[0029] The encoder performs analysis and encoding processing on the link layer sending data to obtain first symbol data, and issues the first symbol data to the level transceiver;
[0030] The level transceiver performs level conversion on the first code data to obtain a transmit level signal, and sends the transmit level signal to the first connection port that is connected to the target interface. The transmit level signal satisfies the level signal type corresponding to the interface type of the target interface, and the transmit level signal contains the first information to be transmitted.
[0031] According to some embodiments of this application, the general bus control method further includes:
[0032] The second information to be transmitted is obtained through a level transceiver that is connected to the target interface;
[0033] The second information to be transmitted is transmitted to the user interface through the bus master system;
[0034] The bus master system and the level transceiver connected to the target interface are pre-configured according to the initialization configuration signal, so that the bus master system meets the communication protocol corresponding to the interface type of the target interface, and the level transceiver meets the communication protocol and level type corresponding to the interface type of the target interface.
[0035] According to some embodiments of this application, obtaining the second information to be transmitted via a level transceiver connected to the target interface includes:
[0036] The level transceiver acquires a received level signal through a second connection port connected to the target interface; wherein the received level signal contains the second information to be transmitted.
[0037] The received level signal is level-converted to obtain the second code data;
[0038] The step of transmitting the second information to be transmitted to the user interface through the bus master system includes:
[0039] The level transceiver sends the second code data to the decoder;
[0040] The decoder decodes the second code data to obtain the physical data to be transmitted, and then transmits the physical data to the link receiving packet parser.
[0041] The link receiving packet parser parses and verifies the physical uplink data to obtain correctly parsed and verified link uplink data, and then uploads the link uplink data to the transport layer receiving buffer.
[0042] The transport layer receive buffer performs buffering processing on the transmitted and received data to obtain a second buffered data packet, and sends the second buffered data packet to the transmit and receive packet parser in an orderly manner.
[0043] The transmission and reception packet parser parses the second cached data packet to obtain the transmission and uploading data, and then uploads the transmission and uploading data to the application receiving data interface.
[0044] The application receiving data interface performs bit width conversion and clock domain conversion on the transmitted data to obtain the first application data, and then sends the first application data to the application layer driver.
[0045] The application layer driver performs application layer processing on the first application-uploaded data to obtain the second application-uploaded data, and sends the second application-uploaded data to the user interface; wherein, the second application-uploaded data contains the second information to be transmitted.
[0046] According to some embodiments of this application, the bus master system and the level transceiver connected to the target interface are pre-configured according to initialization configuration signals, including:
[0047] Obtain bus configuration commands and bus status acquisition commands issued by the application layer driver; wherein, the bus configuration commands and the bus status acquisition commands are obtained by the application layer driver parsing the initialization configuration signal, the initialization configuration signal is obtained by the application layer driver from the user interface, and the initialization configuration signal is generated according to the number and type of the target interface;
[0048] The bus configuration command is parsed to obtain the transport layer configuration command, the link layer configuration command, and the physical layer configuration command, and then sent to the transport layer configurator, the link layer configurator, and the physical layer configurator, respectively; the bus status acquisition command is parsed to obtain the transport layer status acquisition command, the link layer status acquisition command, and the physical layer status acquisition command, and then sent to the transport layer configurator, the link layer configurator, and the physical layer configurator, respectively.
[0049] Obtain the transport layer status response packet, link layer status response packet, and physical layer status response packet sent by the transport layer configurator, the link layer configurator, and the physical layer configurator, respectively;
[0050] Based on the transport layer status response packet, the link layer status response packet, and the physical layer status response packet, an application layer status response packet is generated and sent to the application layer driver. Upon receiving the application layer status response packet, the application layer driver analyzes the status of each layer based on the application layer status response packet, obtains the status analysis results for each layer, and if the status analysis results indicate that the status of each layer is normal, it sends an initialization configuration completion signal back to the user interface.
[0051] According to some embodiments of this application, after analyzing the state of each layer based on the application layer state response packet to obtain the state analysis results of each layer, the method further includes:
[0052] If the state analysis results of each layer indicate that there is an anomaly in the state of each layer, the bus master system and the level transceiver connected to the target interface are repeatedly initialized and configured until the state analysis results of each layer indicate that the state of each layer is normal.
[0053] In this embodiment, the general bus control system and method of this application consists of a user interface connected to the user terminal, multiple level transceivers connected to multiple target interfaces, and an initialization configuration signal generated based on the number and type of the multiple target interfaces to complete the bus protocol configuration. This ensures that the bus master system for information transmission meets the corresponding communication protocol, and that the level transceivers connected to the target interfaces meet the corresponding level requirements. This enables the simultaneous or time-division implementation of multiple communication protocols and interfaces within a single bus system, thereby completing data transmission and reception between the user terminal and target interfaces of various interface types. This significantly improves the flexibility and compatibility of the computer bus system, greatly simplifies the complexity of hardware design, and allows the system to easily handle diverse peripheral connection needs.
[0054] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. Attached Figure Description
[0055] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0056] Figure 1 This is a schematic diagram of the structure of an embodiment of the universal bus control system of this application;
[0057] Figure 2 This is a flowchart illustrating an embodiment of the general bus control method of this application. Detailed Implementation
[0058] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0059] In the description of this application, the use of terms such as "first," "second," etc., is for the purpose of distinguishing technical features only and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of the technical features indicated.
[0060] In the description of this application, it should be understood that the orientation descriptions, such as up, down, etc., are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.
[0061] In the description of this application, it should be noted that, unless otherwise explicitly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.
[0062] The technical solution of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are some embodiments of this application, not all embodiments.
[0063] Figure 1 This is a schematic diagram of the structure of an embodiment of the universal bus control system of this application; Figure 2 This is a flowchart illustrating an embodiment of the general bus control method of this application. See below. Figures 1 to 2 The embodiments of this application will be further described below.
[0064] like Figure 1 As shown in the figure, this application proposes a general bus control system, including a user interface, a bus master system, and N level transceivers;
[0065] The user interface is used to send initialization configuration signals, receive initialization configuration completion signals, and send and receive data; the initialization configuration signals are generated based on the number and type of the M target interfaces.
[0066] The bus master system connects to the user interface and is used to complete the configuration according to the initialization configuration signal so that the bus master system meets the communication protocol corresponding to the interface type of the target interface.
[0067] There are N level transceivers, all connected to the bus master system; each target interface is connected to one level transceiver; the level transceivers connected to the target interface are configured according to the initialization configuration signal so that the level transceivers meet the communication protocol and level type corresponding to the interface type of the target interface; where M and N are both positive integers, and M is less than or equal to N;
[0068] In this scenario, after the bus master system and N level transceivers complete their configuration according to the initialization configuration signal, the user interface can transmit and receive data with M target interfaces through the bus master system and N level transceivers.
[0069] In this embodiment, the general-purpose bus control system of this application consists of a user interface connected to the user end, multiple level transceivers connected to multiple target interfaces, and initialization configuration signals generated based on the number and type of multiple target interfaces to complete the bus protocol configuration. That is, the bus protocol configuration can be flexibly customized according to the requirements, so that the bus master system for information transmission meets the corresponding communication protocol, and the level transceivers connected to the target interfaces meet the corresponding level requirements. This enables the simultaneous or time-division implementation of multiple communication protocols and interfaces in a single bus system, including but not limited to serial ports, CAN bus interfaces, IIC bus interfaces, SPI bus interfaces, QSPI bus interfaces, GPIO interfaces, sGPIO interfaces, etc., thereby completing the data transmission and reception between the user end and target interfaces of various different interface types. This can significantly improve the flexibility and compatibility of the computer bus system, and greatly simplify the complexity of hardware design, enabling the system to easily cope with diverse peripheral connection requirements.
[0070] It is understood that the general-purpose bus control system of this application can be a CPU, FPGA, CPLD, other programmable logic circuits, dedicated logic circuits or chips, hardware circuits, software logic implemented in high-level programming languages, or a combination of several or all of the above, which can realize logic processing and data exchange. Specifically, the user interface can be a hardware circuit, software logic, or other circuits or software that can realize data exchange; the bus master system can be a hardware circuit, software logic, or a combination of hardware and software that can realize data exchange and logic processing; and the level transceiver can be an FPGA, CPLD, other programmable logic circuits, dedicated logic chips, digital-to-analog / analog-to-digital converter chips, hardware circuits, or other devices, equipment, or circuits that can realize controlled conversion of digital signals to analog signals.
[0071] The target interface can be of the following types: serial port, CAN bus interface, IIC bus interface, SPI bus interface, QSPI bus interface, GPIO interface, sGPIO interface, etc.
[0072] In some implementations, the bus master system includes an application layer, a transport layer, a link layer, a physical layer configurator, an encoder, and a decoder;
[0073] The application layer includes an application layer driver, a bus configuration interface, an application data transmission interface, and an application data reception interface. The application layer driver is connected to the user interface, the bus configuration interface, the application data transmission interface, and the application data reception interface, respectively.
[0074] The transport layer includes a transport layer configurator, a transport packet generator, a transport layer transmit buffer, a transport layer receive buffer, and a transport receive packet parser.
[0075] The link layer includes the link layer configurator, the link sending packet generator, and the link receiving packet parser;
[0076] Physical layer configurator, encoder, decoder;
[0077] The physical layer consists of a physical layer configurator, encoder, decoder, and N level transceivers; each level transceiver has a level configuration port and a first connection port and a second connection port for connecting to the target interface.
[0078] The bus configuration interface is connected to the transport layer configurator, link layer configurator, and physical layer configurator respectively; the user interface, application layer driver, application data transmission interface, transport packet generator, transport layer transmit buffer, link packet generator, encoder, and N level transceivers are connected in sequence; the N level transceivers, decoder, link receive packet parser, transport layer receive buffer, transport receive packet parser, application receive data interface, application layer driver, and user interface are connected in sequence.
[0079] In this embodiment, the bus master system adopts a layered structure, which makes it easier for the software layer to map the bus interface to the system device tree. Each layer has a configurator, and the bus configuration interface is connected to the transport layer configurator, link layer configurator, and physical layer configurator, respectively. Therefore, the user interface can configure the features of each functional layer of the bus master system through the bus configuration interface, improving the bus master system's ability to adapt to different communication interface protocols and demonstrating strong software-defined hardware capabilities. In addition, the application layer directly interfaces with the user interface, using a unified user interface to directly encapsulate and decapsulate application layer protocols from user objects. This isolates the configuration interfaces of each sub-module of bus control, the underlying communication protocol, and the bus timing from user data, improving the convenience and flexibility of user-side software development.
[0080] In some cases, the user interface can be used as a module within the application layer.
[0081] The aforementioned user interface, application layer driver, application data transmission interface, transmission packet generator, transmission layer transmission buffer, link transmission packet generator, encoder, and N level transceivers are connected in sequence to form a data transmission path from the user terminal to the target interface; the aforementioned N level transceivers, decoder, link receive packet parser, transmission layer receive buffer, transmission receive packet parser, application receive data interface, application layer driver, and user interface are connected in sequence to form a data transmission path from the target interface to the user terminal.
[0082] Each of the above level transceivers has a level configuration port and a first connection port and a second connection port for connecting to the target interface. Specifically, each level transceiver may have three sets of analog interfaces to the outside of the bus system, including one set of level configuration ports ECFG, one set of transmit / receive ports TX / RX, and one set of receive ports RX.
[0083] In some implementations, the transport layer further includes a flow controller, which is connected to the transport layer transmit buffer, the transport layer receive buffer, the link transmit packet generator, and the link receive packet parser, respectively.
[0084] In this embodiment, the flow controller is connected to the transport layer transmit buffer, the transport layer receive buffer, the link transmit packet generator, and the link receive packet parser. This enables the monitoring and management of the flow of the transmit and receive data transmission paths to prevent data congestion and loss, ensure the stability and reliability of data transmission, and thus guarantee the flow allocation capability of the general-purpose bus control system and improve the system utilization.
[0085] Specifically, when congestion occurs in the transmission data path, i.e., when the data reception rate at the target interface is slow, the target interface sends a level signal containing a flow control command. The level transceiver converts the level signal into symbol information and uploads it to the decoder. The decoder decodes the signal and uploads it to the link receive packet parser. The link receive packet parser parses the received data packets and sends the parsed flow control command to the flow controller. The flow controller receives the flow control command from the link layer receive packet parser and performs flow control on the transport layer transmit buffer according to the flow control command, thereby alleviating the congestion in the transmission data path.
[0086] Specifically, when the data transmission path is congested, i.e. when the data reception rate on the user side is slow, the flow controller can directly monitor the remaining capacity information of the transport layer receive buffer to determine the current level of congestion. When the remaining space reaches a certain preset value, it determines that congestion has occurred and triggers flow limiting. The flow controller sends a flow control command to the link packet generator and sends it to the target interface side through the encoder and level transceiver, notifying it to reduce the data transmission rate, thereby alleviating the congestion of the data transmission path.
[0087] It is understandable that flow control commands may include different levels of flow control commands to handle different levels of congestion, such as flow limiting signals and stop sending signals.
[0088] In some implementations, the link layer also includes a link layer retransmission buffer, which is connected to the link sending packet generator, encoder, link receiving packet parser, and flow controller, respectively.
[0089] In this embodiment, the link layer retransmission buffer connects the link packet generator, encoder, link packet parser, and flow controller. It can receive and buffer data sent by the link packet generator. When the link packet parser detects an error in the parsed data packet, it receives a retransmission command from the link packet parser and then reports a retransmission signal to the flow controller. This causes the flow controller to control the transport layer transmit buffer to suspend sending data to the link packet generator. At this point, the link layer retransmission buffer can send retransmission data to the encoder, realizing error retransmission and improving the reliability of system data transmission.
[0090] It is understandable that the transport layer transmit buffer, transport layer receive buffer, and link layer retransmission buffer in the bus master system can be storage circuits, devices, or equipment such as FIFO, RAM, Flash, and DDR that can realize fast data writing and reading; other modules in the bus master system can be hardware circuits, software logic, or a combination of hardware and software that can realize data exchange and logic processing.
[0091] like Figure 2 As shown in the embodiments of this application, a general bus control method is also proposed. This method can be applied to the above-mentioned general bus control system. The general bus control method includes the following steps:
[0092] Step 101: Obtain the first information to be transmitted through the user interface;
[0093] Step 102: Transmit the first information to be transmitted to the level transceiver connected to the target interface through the bus master system, so as to transmit the first information to be transmitted to the target interface through the level transceiver.
[0094] The bus master system and the level transceiver connected to the target interface are pre-configured according to the initialization configuration signal so that the bus master system meets the communication protocol corresponding to the interface type of the target interface, and the level transceiver meets the communication protocol and level type corresponding to the interface type of the target interface.
[0095] In this embodiment, the general bus control method is applied to a general bus control system. It connects to the user terminal via a user interface and multiple target interfaces via multiple level transceivers. The bus protocol configuration is completed by generating initialization configuration signals based on the number and type of the multiple target interfaces. This ensures that the bus master system for information transmission meets the corresponding communication protocol, and the level transceivers connected to the target interfaces meet the corresponding level requirements. This enables the simultaneous or time-division implementation of multiple communication protocols and interfaces within a single bus system, thereby completing data transmission and reception between the user terminal and target interfaces of various interface types. This significantly improves the flexibility and compatibility of the computer bus system and greatly simplifies the complexity of hardware design, allowing the system to easily handle diverse peripheral connection needs.
[0096] Understandably, due to the use of a layered structure, the actual data transmission process involves data processing such as encapsulation / decapsulation, encoding / decoding, and level conversion. The data type changes during the transmission process from the user interface through various modules to the target interface, but all of them contain the initial information to be transmitted.
[0097] In some implementations, transmitting the first information to be transmitted via the bus master system to a level transceiver connected to the target interface, thereby transmitting the first information to be transmitted via the level transceiver to the target interface, includes:
[0098] The application layer driver obtains the payload data packet sent by the user interface; wherein, the payload data packet contains the first information to be transmitted;
[0099] The application layer driver parses and processes the payload data packet to obtain the first application sent data, and then sends the first application sent data to the application sent data interface;
[0100] The application sends data interface performs bit width conversion and clock domain conversion on the first application sends data to obtain the second application sends data, and then sends the second application sends data to the transmission packet generator;
[0101] The transmission packet generator encapsulates the data sent by the second application to obtain the transmission data, and then sends the transmission data to the transport layer transmission buffer.
[0102] The transport layer transmit buffer buffer performs buffering processing on the transmitted data to obtain the first buffered data packet, and then sends the first buffered data packet to the link layer transmit packet generator in an orderly manner;
[0103] The link layer packet generator encapsulates the first buffered data packet to obtain the link transmission data, and then sends the link transmission data to the physical layer encoder.
[0104] The encoder parses and encodes the data transmitted from the link layer to obtain the first code metadata, and then sends the first code metadata to the level transceiver.
[0105] The level transceiver performs level conversion on the first code data to obtain a transmit level signal, and sends the transmit level signal to the first connection port of the connected target interface. The transmit level signal satisfies the level signal type corresponding to the interface type of the target interface, and contains the first information to be transmitted.
[0106] This embodiment describes in detail the data transmission process from the user terminal to the target interface. This process can realize the simultaneous or time-sharing implementation of multiple communication protocols and interfaces under a single bus system, thereby completing the data transmission between the user terminal and target interfaces of various different interface types.
[0107] In some implementations, the data transmission process from the user terminal to the target interface specifically includes the following steps:
[0108] Step 1: After receiving the initialization success signal, the user sends a payload data packet to the application layer driver through the user interface;
[0109] Step 2: After the application layer driver parses the application-sent data, it sends it to the application-sent data interface.
[0110] Step 3: The application sending data interface performs bit width conversion, clock domain conversion, and other processing on the application sending data sent from the application layer, and then sends the processed data to the transmission packet generator.
[0111] Step 4: The data sent by the application's data sending interface is processed into packets according to the configured functions and then sent to the transport layer sending buffer.
[0112] Step 5: Buffer the transport layer data packets sent by the transmission packet generator, and send the buffered data packets to the link layer packet generator in an orderly manner according to the traffic management signal sent by the traffic controller;
[0113] Step 6: The link layer packet generator encapsulates the data sent to the transport layer transmit buffer according to the configuration and sends it to the physical layer encoder and the link layer retransmission buffer. If the link layer retransmission buffer function is configured: after receiving the receive verification error signal from the link receive packet parser, the peer retransmits the command packet and sends it to the physical layer encoder.
[0114] Step 7: The physical layer encoder parses and encodes the data sent from the link layer according to the configuration information, and sends the converted symbol information to the level transceiver.
[0115] Step 8: The level transceiver converts the symbol information sent by the encoder into level signals according to the configured level conversion rules and sends them to the first connection port.
[0116] Step nine: If the link layer retransmission buffer function is configured, the following steps are taken: The link layer buffer receives data sent by the link sending packet generator, and after receiving the retransmission signal from the link receiving packet parser, it reports the retransmission signal to the flow controller and sends retransmission data to the physical layer encoder; then steps seven and eight are repeated.
[0117] In some implementations, the general bus control method further includes:
[0118] The second information to be transmitted is obtained through a level transceiver connected to the target interface;
[0119] The second piece of information to be transmitted is transmitted to the user interface via the bus master system;
[0120] The bus master system and the level transceiver connected to the target interface are pre-configured according to the initialization configuration signal so that the bus master system meets the communication protocol corresponding to the interface type of the target interface, and the level transceiver meets the communication protocol and level type corresponding to the interface type of the target interface.
[0121] Understandably, due to the use of a layered structure, the actual data transmission process involves data processing such as encapsulation / decapsulation, encoding / decoding, and level conversion. The data type changes during the transmission process from the target interface through various modules to the user interface, but all of them contain the second information to be transmitted.
[0122] In some implementations, the second information to be transmitted is obtained through a level transceiver connected to the target interface, including:
[0123] The level transceiver acquires the received level signal through the second connection port of the target interface; wherein, the received level signal contains the second information to be transmitted;
[0124] The received level signal is level-converted to obtain the second code data.
[0125] The second piece of information to be transmitted is transmitted to the user interface via the bus master system, including:
[0126] The level transceiver sends the second code data to the decoder;
[0127] The decoder decodes the second code metadata to obtain the physical data to be transmitted, and then transmits the physical data to the link receiving packet parser.
[0128] The link receive packet parser parses and verifies the physical uplink data to obtain the correctly parsed and verified link uplink data, and then sends the link uplink data to the transport layer receive buffer.
[0129] The transport layer receive buffer buffer performs buffering processing on the transmitted and received data to obtain a second buffered data packet, and then sends the second buffered data packet to the transmit and receive packet parser in an orderly manner.
[0130] The transmit / receive packet parser parses and processes the second buffered data packets to obtain the transmit / upload data, and then uploads the transmit / upload data to the application receive data interface;
[0131] The application receives data interface to perform bit width conversion and clock domain conversion on the transmitted data to obtain the first application transmitted data, and then transmits the first application transmitted data to the application layer driver.
[0132] The application layer driver performs application layer processing on the data sent by the first application to obtain the data sent by the second application, and sends the data sent by the second application to the user interface; wherein, the data sent by the second application contains the second information to be transmitted.
[0133] This embodiment describes in detail the data reception process from the target interface to the user terminal. This process can realize the simultaneous or time-sharing implementation of multiple communication protocols and interfaces under a single bus system, thereby completing the data reception between the user terminal and target interfaces of various different interface types.
[0134] In some implementations, the data reception process from the target interface to the user terminal specifically includes the following steps:
[0135] Step 1: The level transceiver inputs a level signal to the second connection port, converts it into symbol information according to the configured level conversion rules, and then sends the symbol information to the decoder.
[0136] Step 2: The decoder performs serial-to-parallel conversion on the symbol information transmitted by the level transceiver and sends the converted data to the link receive packet parser.
[0137] Step 3: Perform link packet parsing on the data transmitted from the physical layer, and send the correctly parsed payload data to the transport layer receive buffer, send the parsed flow control command to the transport layer flow controller, send the parsed retransmission command to the link layer retransmission buffer, and send the parsing error signal to the link packet generator.
[0138] Step four: The transport layer receive buffer caches the data sent by the link receive packet parser, reports the remaining capacity information to the flow controller, and sends the cached data to the transport receive packet parser.
[0139] Step 5: The transmit / receive packet parser parses the data sent to the transport layer receive buffer and sends the parsed data to the application receive data interface.
[0140] Step 6: Apply the data receiving interface to perform bit width conversion, clock domain conversion, and other processing on the data sent by the transmit receiving packet parser, and then send the processed data to the application layer driver.
[0141] Step 7: The application layer driver performs application layer processing on the data received by the application receiving data interface and sends it to the user interface.
[0142] In some implementations, the bus master system and the level transceiver of the connected target interface are pre-configured according to initialization configuration signals, including:
[0143] Obtain bus configuration commands and bus status acquisition commands issued by the application layer driver; wherein, the bus configuration commands and bus status acquisition commands are obtained by parsing the initialization configuration signals by the application layer driver, and the initialization configuration signals are obtained from the user interface by the application layer driver, and the initialization configuration signals are generated according to the number and type of the target interfaces;
[0144] The bus configuration command is parsed to obtain the transport layer configuration command, link layer configuration command, and physical layer configuration command, and then sent to the transport layer configurator, link layer configurator, and physical layer configurator respectively; the bus status acquisition command is parsed to obtain the transport layer status acquisition command, link layer status acquisition command, and physical layer status acquisition command, and then sent to the transport layer configurator, link layer configurator, and physical layer configurator respectively.
[0145] Obtain the transport layer status response packet, link layer status response packet, and physical layer status response packet sent by the transport layer configurator, link layer configurator, and physical layer configurator, respectively.
[0146] Based on the transport layer status response packet, link layer status response packet, and physical layer status response packet, an application layer status response packet is generated and sent to the application layer driver. After receiving the application layer status response packet, the application layer driver analyzes the status of each layer according to the application layer status response packet, obtains the status analysis results of each layer, and if the status analysis results of each layer indicate that the status of each layer is normal, it sends an initialization configuration completion signal back to the user interface.
[0147] In this embodiment, the initialization configuration process is described in detail, with the bus configuration interface as the main body. According to the configuration requirements, namely the number and type of the target interfaces to be connected, the user completes the pre-initialization configuration before data transmission. It can realize the simultaneous or time-sharing implementation of multiple communication protocols and interfaces under a single bus system. The user-side software development is convenient and flexible, and the software-defined hardware capability is strong.
[0148] In some implementations, after receiving the configuration command issued by the bus configuration interface, the transport layer, link layer, and physical layer parse their respective configuration information and configure the modules within each layer accordingly. After the configuration is completed, they collect the status information of each module and report it to the bus configurator.
[0149] In some implementations, the transport layer configuration may include: transport packet generator packet format configuration, transport layer transmit buffer depth and buffer block configuration, flow controller trigger conditions and flow control hierarchy configuration, transport receive packet parser unpacking format configuration, and transport layer receive buffer depth and buffer block configuration. After the above configuration is completed, the transport layer configurator collects its configuration status information and generates a transport layer status response packet to report to the bus configuration interface.
[0150] In some implementations, the link layer configuration may include: link packet generator packet format configuration, link layer retransmission function configuration, link layer retransmission buffer triggering conditions, depth and buffer block configuration, and link receiver packet parser unpacking format configuration; after the above configuration is completed, the link layer configurator collects its status information and generates a link layer status response packet to report to the bus configurator interface.
[0151] In some implementations, physical layer configuration may include: parallel-to-serial conversion configurations such as encoder encoding format configuration, scrambling configuration, interleaving configuration, synchronization frame configuration, and link training frame configuration; serial-to-parallel conversion configurations such as decoder decoding format configuration, descrambling configuration, deinterleaving configuration, synchronization frame reception alignment, and link training frame reception parsing; digital-to-analog / analog-to-digital conversion configurations such as level conversion type configuration, level conversion protocol configuration, synchronization configuration, channel number configuration, and sampling processing configuration for N level transceivers, respectively, and bus level type configurations are implemented according to the level configuration port ECFG configuration level; if the link training function is configured, link training frames are sent / received immediately after configuration and link connection status is generated; after the above configurations are completed, the physical layer configurator collects its status information and generates a physical layer status response packet to report to the bus configurator interface.
[0152] In some implementations, the states of each layer are analyzed based on the application layer state response packets to obtain the state analysis results for each layer. This process further includes:
[0153] If the status analysis results of each layer indicate that there is an anomaly in the status of each layer, the bus master system and the level transceivers of the connected target interfaces are repeatedly initialized and configured until the status analysis results of each layer indicate that the status of each layer is normal.
[0154] In this embodiment, after receiving the application layer status response packet, the application layer driver analyzes the status of each layer. If the status is normal, the initialization is successful and an initialization configuration completion signal is sent back to the user interface. If the status is abnormal, the initialization is repeated according to the configuration until the initialization is successful. Specifically, the initialization failure can be re-initialized, and the number of repeated initializations, full-process repeated initialization, or partial initialization of abnormal modules can all be configured. Otherwise, an initialization failure signal can also be sent back to the user interface.
[0155] In some implementations, the application layer of the system includes a user interface, an application layer driver, a bus configuration interface, an application data sending interface, and an application data receiving interface. The application layer driver is connected to the user interface, the bus configuration interface, the application data sending interface, and the application data receiving interface, respectively. The application layer is used to implement application layer processing, including data interaction with the user, parsing and issuing user commands, processing and issuing user-sent data, processing and sending user-received data, and collecting, processing, and sending bus status information.
[0156] The aforementioned user interface enables data exchange between the bus and the user.
[0157] The aforementioned application layer driver can first parse the data sent from the user interface to extract bus configuration commands, bus status acquisition commands, and application data, and then send the bus configuration commands and bus status acquisition commands to the bus configuration interface module and the application data to the application data sending interface. Second, it can acquire the bus status from the bus configuration interface, obtain the bus status data, and send it to the user interface. In addition, it can process the data received by the application data receiving interface at the application layer and send it to the user interface.
[0158] The aforementioned bus configuration interface can, firstly, parse bus configuration commands issued by the application layer driver, extracting transport layer configuration commands, link layer configuration commands, and physical layer configuration commands, and then send the transport layer configuration commands to the transport layer configurator, the link layer configuration commands to the link layer configurator, and the physical layer configuration commands to the physical layer configurator. Secondly, it can parse bus status acquisition commands issued by the application layer driver, extracting transport layer status acquisition commands, link layer status acquisition commands, and physical layer status acquisition commands, and then send the transport layer status acquisition commands to the transport layer configurator, the link layer status acquisition commands to the link layer, and the physical layer status acquisition commands to the physical layer. Thirdly, it can collect and process status data sent by the transport layer configurator, the link layer configurator, and the physical layer configurator, and then send the processed status data to the application layer driver.
[0159] The aforementioned application data sending interface can perform bit-width conversion, clock domain conversion, and other processing on the application data sent from the application layer, and then send the processed data to the transmission packet generator.
[0160] The aforementioned application receiving data interface can perform bit-width conversion, clock domain conversion, and other processing on the data sent by the transmission receiving packet parser, and then send the processed data to the application layer driver.
[0161] In this embodiment, the application layer directly interfaces with the user interface, using a unified user interface to directly encapsulate and decapsulate application layer protocols with user objects. This isolates the configuration interfaces of each submodule of bus control, the underlying communication protocol, and the bus timing from user data, improving the convenience and flexibility of software development.
[0162] In some implementations, the transport layer in the system includes a transport layer configurator, a transport packet generator, a transport layer transmit buffer, a transport layer receive buffer, a transport receive packet parser, and a flow controller. The transport layer is used to implement transport layer processing, including data interaction with the application layer and the data link layer, parsing and executing configuration commands issued through the bus configuration interface, collecting, processing, and uploading transport layer status, processing and buffering transmit data, controlling transmit data flow, and buffering and processing receive data.
[0163] The aforementioned transport layer configurator firstly parses transport layer configuration commands issued by the bus configuration interface, extracting configuration commands for the transport packet generator, transport layer transmit buffer, flow controller, transport receive packet parser, and transport layer receive buffer. It then sends the transport packet generator configuration command to the transport packet generator, the transport layer transmit buffer configuration command to the transport layer transmit buffer, the flow controller configuration command to the flow controller, the transport receive packet parser configuration command to the transport receive packet parser, and the transport layer receive buffer configuration command to the transport layer receive buffer. Secondly, it acquires the status information of various transport layer functional modules, including the transport packet generator, transport layer transmit buffer, flow controller, transport receive packet parser, and transport layer receive buffer. Thirdly, it parses transport layer status acquisition commands issued by the bus configuration interface, extracting the specific modules and functional points whose status needs to be acquired. After processing the specific status information through address mapping and status response packet format encapsulation, it sends the information back to the bus configuration interface.
[0164] The aforementioned packet generator first configures packet format, verification method, and transport layer address configuration according to configuration commands issued by the transport layer configurator. The packet content and format include, but are not limited to, necessary information such as packet header, flags, source address, destination address, checksum, and packet trailer, as well as their combinations, and all of this information and combination can be configured through the configurator. Second, it can send status information to the transport layer configurator. Finally, it can perform corresponding packet processing on data sent by the application's data sending interface according to the configured functions and send it to the transport layer sending buffer.
[0165] The aforementioned transport layer transmit buffer can firstly configure buffer depth, warning depth, buffer segmentation, etc., according to the configuration commands issued by the transport layer configurator; secondly, it can cache the transport layer data packets issued by the transport transmit packet generator, and orderly send the cached data packets to the link layer transmit packet generator according to the traffic management signals sent by the traffic controller.
[0166] The aforementioned flow controller can, firstly, monitor the remaining capacity information of the transport layer receive buffer; secondly, it can receive flow restriction signals and stop transmission signals sent by the link layer receive packet parser; thirdly, it can receive retransmission signals from the link layer retransmission buffer; and finally, it can be configured according to the configuration commands issued by the transport layer configurator. Specifically, this includes configuring the flow restriction triggered by the remaining space of the transport layer receive buffer, configuring the signals sent by the link layer receive packet parser, configuring the signals sent by the link layer retransmission buffer, configuring the sending of peer flow control commands to the link packet generator, and configuring the flow control module and retransmission control module to the transport layer send buffer.
[0167] The aforementioned transport layer receive buffer can first be configured with buffer depth, buffer segmentation, etc., according to the configuration commands issued by the transport layer configurator; secondly, it can cache the data sent by the link receive packet parser, report the remaining capacity information to the flow controller, and send cached data to the transport receive packet parser.
[0168] The aforementioned packet parser can first configure functions such as packet parsing format, checksum method, and transport layer address according to configuration commands issued by the transport layer configurator. The parsing content and format of each layer should correspond to the packet content format, including but not limited to necessary information such as packet header, flags, source address, destination address, checksum, and packet trailer, as well as their combinations. All of this information and their combinations can be configured through the configurator. Second, it can parse the data sent to the transport layer receive buffer and send the parsed data to the application receive data interface.
[0169] In this embodiment, the transport layer performs secondary encapsulation / decapsulation processing on the application layer's data transmission / link layer's data reception interface, providing data packets of different communication protocols to the link layer. Furthermore, it has a configurable optional mapping address function, enabling simultaneous configuration of different transport layer address mappings, such as destination address and source address, allowing for time-sharing or time-division multiplexing of different communication protocols, resulting in high flexibility in data transmission and reception. Simultaneously, the transport layer transmit buffer, transport layer receive buffer, and flow controller improve the accuracy and efficiency of data transmission and reception.
[0170] In some implementations, the link layer of the system includes a link layer configurator, a link transmit packet generator, a link layer retransmission buffer, and a link receive packet parser. The link layer is used to implement link layer processing, including data interaction with the transport and physical layers, parsing and executing configuration commands issued through the bus configuration interface, collecting, processing, and transmitting link layer status, processing transmitted data and retransmitting errors, and parsing and verifying received data.
[0171] The aforementioned link layer configurator first parses the link layer configuration commands sent from the bus configuration interface, extracting configuration commands for the link transmitting packet generator, link layer retransmission buffer, and link receiving packet parser. It then sends the link transmitting packet generator configuration command to the link transmitting packet generator, the link layer retransmission buffer configuration command to the link layer retransmission buffer, and the link receiving packet parser configuration command to the link receiving packet parser. Second, it obtains the status information of each functional module in the link layer, including the status information of the link transmitting packet generator, link layer retransmission buffer, link receiving packet parser, and link receiving packet parser. Third, it parses the link layer status acquisition commands sent from the bus configuration interface, extracting the specific modules and functional points whose status needs to be acquired. After processing the specific status information through address mapping and status response packet format encapsulation, it sends it up to the bus configuration interface.
[0172] The aforementioned link packet generator can first configure functions such as packet format, verification method, and link layer address according to the configuration commands issued by the link layer configurator; secondly, it can send status information to the link layer configurator; finally, it can process the data sent to the transport layer transmit buffer according to the configuration and send it to the physical layer encoder and the link layer retransmission buffer; in addition, if the retransmission function is configured: after the link receive packet parser sends a receive verification error signal, it generates a peer retransmission command packet and sends it to the physical layer encoder.
[0173] The aforementioned link-layer retransmission buffer can first configure retransmission, buffer depth, and buffer segmentation according to configuration commands issued by the link-layer configurator; second, it can receive data issued by the link sending packet generator; and finally, it can receive retransmission signals from the link receiving packet parser, report retransmission signals to the flow controller, and issue retransmission data to the physical layer encoder.
[0174] The aforementioned link receive packet parser can, firstly, configure functions such as link packet parsing format configuration, verification method configuration, link layer address configuration, flow control command, retransmission command, and other special command configuration according to the configuration commands issued by the link layer configurator; secondly, it can parse the data transmitted from the physical layer into a link packet format, and send the correctly parsed payload data to the transport layer receive buffer, send the parsed flow control command to the transport layer flow controller, and send the parsed retransmission command to the link layer retransmission buffer; finally, it can send the receive verification error signal to the link packet generator.
[0175] In this embodiment, the link layer performs three packet encapsulation / decapsulation processes on the data sent by the transport layer and received by the physical layer. Specifically, firstly, the link layer generates the data type required by the decoder based on the data packets of different communication protocols and sends them to the decoder. Simultaneously, upon receiving a flow control signal from the flow controller, it also generates a flow control command packet and sends it to the decoder. The flow control function is optional. Secondly, when the link receiving packet parser detects an error in the parsed data packet, it sends a receive verification error signal to the link layer packet generator. The link layer retransmission buffer then sends a pause signal to the flow controller to stop the transport layer from sending data traffic and retransmits the erroneous data packet. The retransmission function is optional. Furthermore, after parsing the flow control command, the link receiving packet parser sends it to the transport layer flow controller. Finally, after parsing the correct data packet, the link receiving packet parser completes the link layer receive packet encapsulation and sends it to the transport layer receive parser. The link layer receive packet encapsulation function is optional. In summary, automatic retransmission in case of bus errors improves data transmission reliability, and the strong bus port traffic allocation capability improves bus system utilization.
[0176] In some implementations, the physical layer of the system includes a physical layer configurator, an encoder, a decoder, and N level transceivers. The physical layer is used to implement physical layer processing, including data interaction with the link layer and external analog interfaces, parsing and executing configuration commands issued by the bus interface, collecting, processing, and transmitting physical layer status, parsing transmitted data, processing and transmitting encoded data, and decoding, processing, and transmitting received data.
[0177] The aforementioned physical layer configurator first parses the physical layer configuration commands sent from the bus configuration interface, extracting encoder configuration commands, decoder configuration commands, and N level transceiver configuration commands. It then sends the encoder configuration command to the encoder, the decoder configuration command to the decoder, and the N level transceiver configuration commands to the N level transceivers respectively. Second, it acquires the status information of each functional module in the physical layer, including the status information of the encoder, decoder, and N level transceivers. Third, it parses the physical layer status acquisition commands sent from the bus configuration interface, extracting the specific modules and functional points whose status needs to be acquired. After processing the specific status information through address mapping and status response packet format encapsulation, it sends it up to the bus configuration interface.
[0178] The encoder described above can first configure parallel-to-serial conversion, such as encoding format configuration, scrambling code configuration, interleaving configuration, synchronization frame configuration, and link training frame configuration, according to the configuration commands issued by the physical layer configurator. Among these, the scrambling code, synchronization code, and link training frame encoding addition functions are optional. Secondly, it can parse and encode the data sent from the link layer according to the configuration information, and send the converted symbol information to N level transceivers.
[0179] The aforementioned decoder, firstly, can perform serial-to-parallel conversion configurations such as decoding format configuration, descrambling code configuration, deinterleaving configuration, synchronization frame reception alignment, and link training frame reception parsing according to configuration commands issued by the physical layer configurator; secondly, it can perform serial-to-parallel conversion processing on the symbol information transmitted by N level transceivers and send the converted data to the link receiving packet parser.
[0180] The aforementioned N level transceivers can, firstly, configure digital-to-analog / analog-to-digital conversion (DAC) settings such as level conversion type, level conversion protocol, synchronization, channel number, and sampling processing according to configuration commands issued by the physical layer configurator; secondly, configure the bus level type according to the level configuration port ECFG; thirdly, convert the encoder's symbol information into level signals according to the configured level conversion rules and send them to the external analog output interface; and finally, convert the input level signals from the external analog input interface into symbol information according to the configured level conversion rules and send the symbol information to the decoder.
[0181] Specifically, the physical layer performs level conversion, classification, parsing, encoding, scrambling, synchronization, and link training frame encoding on the data sent from the link layer, generating N allocated symbols and sending them to N level transceivers respectively. After level conversion of the received level signal at the external receiving port, the symbol information is processed in the decoder, and a physical layer received data packet is generated and sent to the link received packet parser.
[0182] The above N level transceivers have N level configuration ports (ECFG), N sets of transmit / receive ports (TX / RX), and N sets of receive ports (RX).
[0183] The aforementioned N level configuration ports ECFG configure the transmit / receive levels of the N level transceivers through an external analog configuration interface. The external analog configuration interface can be for pull-up resistors and pull-down resistors, etc., configured via analog signals, typically voltage.
[0184] The above N sets of transmit / receive ports TX / RX can be configured as single-ended transmit ports, differential transmit ports, or single-ended bidirectional transmit / receive ports according to the physical layer configurator and in conjunction with the level configuration port ECFG. It can be understood that differential transmit ports require bidirectional transmit ports to be implemented.
[0185] The above N sets of receiving ports RX can be configured as single-ended receiving ports, differential receiving ports, or idle states according to the physical layer configurator and in combination with the level configuration port ECFG. It can be understood that differential receiving ports need to be implemented as dual-ended receiving ports.
[0186] It should be noted that the level type and transmit / receive type of the physical layer transmit / receive ports TX / RX of each level transceiver should maintain a one-to-one correspondence with the physical layer receive port RX. Specifically, firstly, the level of the transmit / receive ports TX / RX and the receive port RX should be of the same type; secondly, when the transmit / receive port TX / RX is a single-ended transmit port, the receive port should be a single-ended receive port; when the transmit / receive port TX / RX is a differential transmit port, the receive port RX should be a differential receive port; when the transmit / receive port TX / RX is a single-ended bidirectional transmit / receive port, the receive port RX is in an idle state; in summary, different level transceivers can be configured with different level types and transmit / receive types according to requirements.
[0187] In this embodiment, the physical layer uses a configurator and configuration port to connect and communicate with multiple target interfaces of various types and levels, thereby reducing the complexity of hardware design for the bus system when facing different communication receptions and improving the multiplexing capability of hardware ports and the flexibility of the system.
[0188] In some embodiments, this application also proposes a general bus control circuit that includes the above-described general bus control system.
[0189] In addition, embodiments of the present invention also provide a control device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor and the memory can be connected via a bus or other means.
[0190] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0191] The non-transient software program and instructions required to implement the general bus control method of the above embodiments are stored in memory. When executed by the processor, the general bus control method of the above embodiments is executed.
[0192] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0193] Furthermore, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions that are executed by a processor or controller, for example, by a processor of the aforementioned control device, causing the processor to perform the general bus control method described in the above embodiments.
[0194] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0195] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
Claims
1. A universal bus control system, characterized in that, include: The user interface is used to send initialization configuration signals, receive initialization configuration completion signals, and send and receive data; wherein, the initialization configuration signals are generated based on the number and type of the M target interfaces; The bus master system is connected to the user interface and is used to complete the configuration according to the initialization configuration signal so that the bus master system meets the communication protocol corresponding to the interface type of the target interface. N level transceivers are all connected to the bus master system; each target interface is connected to one level transceiver; the level transceiver connected to the target interface is configured according to the initialization configuration signal so that the level transceiver meets the communication protocol and level type corresponding to the interface type of the target interface; where M and N are both positive integers, and M is less than or equal to N; Wherein, when the bus master system and the N level transceivers complete the configuration according to the initialization configuration signal, the user interface realizes data transmission and reception with the M target interfaces through the bus master system and the N level transceivers; The bus master system includes: The application layer includes an application layer driver, a bus configuration interface, an application data sending interface, and an application data receiving interface. The application layer driver is connected to the user interface, the bus configuration interface, the application data sending interface, and the application data receiving interface, respectively. The transport layer includes a transport layer configurator, a transport packet generator, a transport layer transmit buffer, a transport layer receive buffer, and a transport receive packet parser. The link layer includes the link layer configurator, the link sending packet generator, and the link receiving packet parser; The physical layer includes the physical layer configurator, encoder, and decoder; The physical layer configurator, the encoder, the decoder, and N level transceivers constitute the physical layer; each level transceiver has a level configuration port and a first connection port and a second connection port for connecting to the target interface; The bus configuration interface is connected to the transport layer configurator, the link layer configurator, and the physical layer configurator, respectively. The user interface, the application layer driver, the application data transmission interface, the transport packet generator, the transport layer transmit buffer, the link packet generator, the encoder, and the N level transceivers are connected in sequence. The N level transceivers, the decoder, the link receive packet parser, the transport layer receive buffer, the transport receive packet parser, the application receive data interface, the application layer driver, and the user interface are connected in sequence.
2. The universal bus control system according to claim 1, characterized in that, The transport layer also includes a flow controller, which is connected to the transport layer transmit buffer, the transport layer receive buffer, the link transmit packet generator, and the link receive packet parser, respectively.
3. The universal bus control system according to claim 2, characterized in that, The link layer also includes a link layer retransmission buffer, which is connected to the link sending packet generator, the encoder, the link receiving packet parser, and the flow controller.
4. A universal bus control method, characterized in that, Applied to the universal bus control system as described in any one of claims 1 to 3, the universal bus control method includes the following steps: Obtain the first information to be transmitted through the user interface; The first information to be transmitted is transmitted through the bus master system to the level transceiver connected to the target interface, so that the first information to be transmitted is transmitted to the target interface through the level transceiver; The bus master system and the level transceiver connected to the target interface are pre-configured according to the initialization configuration signal, so that the bus master system meets the communication protocol corresponding to the interface type of the target interface, and the level transceiver meets the communication protocol and level type corresponding to the interface type of the target interface.
5. The universal bus control method according to claim 4, characterized in that, The step of transmitting the first information to be transmitted to the target interface via the bus master system to the level transceiver connected to the target interface, so as to transmit the first information to be transmitted to the target interface via the level transceiver, includes: The application layer driver obtains the payload data packet sent by the user interface; wherein the payload data packet contains the first information to be transmitted; The application layer driver parses the payload data packet to obtain the first application sent data, and sends the first application sent data to the application sent data interface; The application sending data interface performs bit-width conversion and clock domain conversion on the first application sending data to obtain the second application sending data, and then sends the second application sending data to the transmission packet generator. The transmission packet generator encapsulates the data sent by the second application to obtain transmission data, and then sends the transmission data to the transport layer transmission buffer. The transport layer transmit buffer performs buffering processing on the transmitted data to obtain a first buffered data packet, and then sends the first buffered data packet to the link layer transmit packet generator in an orderly manner. The link layer packet generator encapsulates the first cached data packet to obtain link transmission data, and then sends the link transmission data to the physical layer encoder. The encoder parses and encodes the data sent by the link layer to obtain first code metadata, and then sends the first code metadata to the level transceiver. The level transceiver performs level conversion on the first code data to obtain a transmit level signal, and sends the transmit level signal to the first connection port that is connected to the target interface. The transmit level signal satisfies the level signal type corresponding to the interface type of the target interface, and the transmit level signal contains the first information to be transmitted.
6. The universal bus control method according to claim 4, characterized in that, The general bus control method also includes: The second information to be transmitted is obtained through a level transceiver that is connected to the target interface; The second information to be transmitted is transmitted to the user interface through the bus master system; The bus master system and the level transceiver connected to the target interface are pre-configured according to the initialization configuration signal, so that the bus master system meets the communication protocol corresponding to the interface type of the target interface, and the level transceiver meets the communication protocol and level type corresponding to the interface type of the target interface.
7. The universal bus control method according to claim 6, characterized in that, The step of obtaining the second information to be transmitted through a level transceiver connected to the target interface includes: The level transceiver acquires a received level signal through a second connection port connected to the target interface; wherein the received level signal contains the second information to be transmitted. The received level signal is level-converted to obtain the second code data; The step of transmitting the second information to be transmitted to the user interface through the bus master system includes: The level transceiver sends the second code data to the decoder; The decoder decodes the second code data to obtain the physical data to be transmitted, and then transmits the physical data to the link receiving packet parser. The link receiving packet parser parses and verifies the physical uplink data to obtain correctly parsed and verified link uplink data, and then uploads the link uplink data to the transport layer receiving buffer. The transport layer receive buffer performs buffering processing on the data transmitted on the link to obtain a second buffered data packet, and sends the second buffered data packet to the transport receive packet parser in an orderly manner. The transmission and reception packet parser parses the second cached data packet to obtain the transmission and uploading data, and then uploads the transmission and uploading data to the application receiving data interface. The application receiving data interface performs bit width conversion and clock domain conversion on the transmitted data to obtain the first application data, and then sends the first application data to the application layer driver. The application layer driver performs application layer processing on the first application-uploaded data to obtain the second application-uploaded data, and sends the second application-uploaded data to the user interface; wherein, the second application-uploaded data contains the second information to be transmitted.
8. The universal bus control method according to claim 4, characterized in that, The bus master system and the level transceiver connected to the target interface are pre-configured according to the initialization configuration signal, including: Obtain bus configuration commands and bus status acquisition commands issued by the application layer driver; wherein, the bus configuration commands and the bus status acquisition commands are obtained by the application layer driver parsing the initialization configuration signal, the initialization configuration signal is obtained by the application layer driver from the user interface, and the initialization configuration signal is generated according to the number and type of the target interface; The bus configuration command is parsed to obtain the transport layer configuration command, the link layer configuration command, and the physical layer configuration command, and then sent to the transport layer configurator, the link layer configurator, and the physical layer configurator, respectively; the bus status acquisition command is parsed to obtain the transport layer status acquisition command, the link layer status acquisition command, and the physical layer status acquisition command, and then sent to the transport layer configurator, the link layer configurator, and the physical layer configurator, respectively. Obtain the transport layer status response packet, link layer status response packet, and physical layer status response packet sent by the transport layer configurator, the link layer configurator, and the physical layer configurator, respectively; Based on the transport layer status response packet, the link layer status response packet, and the physical layer status response packet, an application layer status response packet is generated and sent to the application layer driver. Upon receiving the application layer status response packet, the application layer driver analyzes the status of each layer based on the application layer status response packet, obtains the status analysis results for each layer, and if the status analysis results indicate that the status of each layer is normal, it sends an initialization configuration completion signal back to the user interface.
9. The universal bus control method according to claim 8, characterized in that, The step of analyzing the state of each layer based on the application layer state response packet to obtain the state analysis results of each layer, further includes: If the state analysis results of each layer indicate that there is an anomaly in the state of each layer, the bus master system and the level transceiver connected to the target interface are repeatedly initialized and configured until the state analysis results of each layer indicate that the state of each layer is normal.
Citation Information
Patent Citations
Data processing method, data processing device, equipment and storage medium
CN112579508A
FPGA-based SATA bus system and implementation method thereof
CN120687399A