A high-speed real-time streaming media bus data transmission method based on FPGA
By introducing the time slice communication management mechanism of FPGA in Ethernet, separating real-time and non-real-time data channels, the data throughput and delay problems of Ethernet under high load conditions are solved, and the certainty and real-time nature of communication are improved.
Patent Information
- Application Number
- CN202011477874.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-15
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2040-12-15
AI Technical Summary
In the case of large network load, the data throughput and transmission delay of Ethernet are affected, resulting in the limitation of the certainty and real-time nature of communication.
Using standard Ethernet IEEE802.3u as the transmission medium, a time slice communication management mechanism based on FPGA is designed, and the data link layer is divided into real-time and non-real-time data transmission channels. Data frame transmission is carried out through fixed-time cycle signals to ensure that Real-time data uncached forwarding and priority transmission to avoid data conflicts.
It improves bandwidth utilization, avoids conflicts in communication data, and enhances the reliability and real-timeness of the streaming media bus communication data system.
Smart Images

Figure CN114640420B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of bus data transmission, and in particular relates to a high-speed real-time streaming media bus data transmission method based on FPGA. Background Art
[0002] With the rapid development of automation, the development of automation technology is increasingly affected by established information technology and its standards. In this situation, with the development of industrial automation from low speed to high speed, from low precision to high precision, and from centralized control to distributed control, new requirements are put forward for the transmission speed and data volume of the bus in the field. On the other hand, the rapid development of information technology such as Ethernet requires comprehensive and seamless information integration from the field control layer to the management layer.
[0003] Due to the carrier sense multiple access / collision detection (CSMA / CD) method used by Ethernet, when the network load is relatively large, sometimes the information of some nodes cannot be sent out in time, which greatly affects the data throughput and transmission delay of Ethernet, and limits the certainty and real-time nature of Ethernet communication. Summary of the invention
[0004] The purpose of the present invention is to solve the problem in the prior art that when the network load is relatively large, the information of some nodes cannot be sent out in time, which greatly affects the data throughput and transmission delay of Ethernet and limits the certainty and real-time performance of Ethernet communication. In view of this problem, the present invention provides a high-speed real-time streaming media bus data transmission method, which adopts the standard Ethernet IEEE802.3u as the transmission medium, supports a transmission rate of 1000Mbit / s, and designs a time slice communication management mechanism based on FPGA to manage and allocate data packets transmitted by the data link layer, overcomes the disadvantages of insufficient bandwidth utilization and frequent conflicts in communication data, effectively improves bandwidth utilization, avoids conflicts in communication data, and improves the reliability and real-time performance of the streaming media bus communication data system.
[0005] Specifically, the present invention provides a high-speed real-time streaming media bus data transmission method based on FPGA, which adds a data frame transmission control layer to the data link layer of the streaming media bus, and divides the underlying data transmission channel into a real-time data transmission channel and a non-real-time data transmission channel through a time cycle signal of a fixed duration. In a time cycle, the data transmission process includes:
[0006] S1, the central control host sends the SOC data frame started by the current cycle to all slave devices in the streaming media bus, so as to synchronize the time of all the slave devices;
[0007] S2, the central control host and all slave devices of the streaming media bus exchange and transmit real-time data frames of this cycle;
[0008] S3. The central control host transmits non-real-time data frames to all slave devices in the streaming media bus.
[0009] Preferably, before step S1, the following steps are also included:
[0010] When the central control host generates a cycle interrupt signal through a cycle, the central control host generates downlink data frames of SOC, SOA and TAIL, respectively providing all slave devices on the streaming media bus with the time cycle start position information, non-real-time data transmission start position information and the time cycle end position information.
[0011] Preferably, the data transmission method further includes:
[0012] The central control host and the slave devices on the streaming media bus work respectively in the following ways:
[0013] Transmit real-time data frames in real-time channels;
[0014] Transmit non-real-time data frames in a non-real-time channel.
[0015] Preferably, at the start stage, step S1 includes:
[0016] S11, the central control host sends the SOC data frame to the slave device directly connected to the central control host via the streaming media bus;
[0017] S12. The upstream slave device of the streaming media bus forwards the SOC data frame to the downstream slave device of the streaming media bus.
[0018] Preferably, in the real-time time slot of this cycle, step S2 includes:
[0019] S21, the central control host sends real-time downlink data frames to all slave devices of the streaming media bus;
[0020] S22, all slave devices on the streaming media bus receive downlink data frame information sent by the central control host respectively;
[0021] S23, all slave devices on the streaming media bus respectively detect the type of the received downlink data frame, parse the received downlink data frame information, and then perform initialization configuration to generate an uplink data frame;
[0022] S24, all slave devices on the streaming media bus feed back initialization configuration uplink data frames to the central control host through the upstream slave devices of the streaming media bus, so as to perform real-time data exchange between all slave devices on the streaming media bus and the central control host;
[0023] S25. When a slave device on the streaming media bus receives a non-real-time data frame, the non-real-time data frame is cached in a respective SRAM.
[0024] Preferably, the step S22 further includes:
[0025] All slave devices on the streaming media bus obtain the timestamp information of the SOC data frame and use this time reference to synchronize time with the central control host.
[0026] All slave devices on the streaming media bus receive cycle time parameters, maintain cycle signals, and manage time slots within the cycle;
[0027] All slave devices on the streaming media bus obtain configuration parameters of each upstream terminal device of the streaming media bus, perform initialization configuration and generate uplink data frames.
[0028] Preferably, after step S2 and before step S3, the method further includes: a step of ending the real-time time slot, in which:
[0029] The central control host sends the SOA data frame to the slave device directly connected to the central control host via the streaming media bus;
[0030] The upstream slave device of the streaming media bus forwards the SOA data frame to the downstream slave device of the streaming media bus.
[0031] Preferably, step S32 includes: in the non-real-time time slot of the current cycle,
[0032] The central control host sends non-real-time downlink data frames to all slave devices on the streaming media bus;
[0033] All slave devices on the streaming media bus respectively receive the non-real-time downlink data frame information sent by the central control host;
[0034] All slave devices on the streaming media bus respectively detect the type of received downlink data frames, parse the received downlink data frame information, and configure to generate uplink data frames;
[0035] All slave devices on the streaming media bus feed back configured uplink data frames to the central control host through the upstream slave devices of the streaming media bus, which are used for non-real-time data exchange between all slave devices on the streaming media bus and the central control host;
[0036] When all slave devices on the streaming media bus receive real-time data frames respectively, they pack the real-time downlink data frames and cache the packed real-time downlink data frames into their respective RAMs.
[0037] Preferably, after S3, the process further includes: the end of the non-real-time time slot, the central control host sends a downlink TAIL data frame, and the current cycle ends.
[0038] Preferably, according to the above-mentioned data transmission method, the data transmission method further includes:
[0039] During the time synchronization stage of each cycle, the central control host sends polling request frames PReq to all slave devices on the streaming bus in a fixed-length time cycle. Each slave device on the streaming bus immediately responds to the request of the polling request frame PReq in a Pres manner and transmits real-time and / or non-real-time data.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] The present invention adopts standard Ethernet IEEE802.3u as the transmission medium, supports a transmission rate of 1000Mbit / s, and designs a time slice communication management mechanism based on FPGA to manage and allocate data packets transmitted at the data link layer, effectively improving bandwidth utilization, avoiding conflicts in communication data, and improving the reliability and real-time performance of the streaming media bus communication data system. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic flow chart of a high-speed real-time streaming media bus data transmission method based on FPGA provided by the present invention;
[0043] Figure 2 A schematic diagram of a network topology structure provided by the present invention;
[0044] Figure 3 Schematic diagram of the streaming media bus communication module-to-module structure provided by the present invention;
[0045] Figure 4 A schematic diagram of a frame structure of a high-speed real-time streaming media bus data transmission method based on FPGA provided by the present invention;
[0046] Figure 5 A schematic diagram of the central control host function implementation process provided by the present invention;
[0047] Figure 6Schematic diagram of data frame transmission of the streaming media bus provided by the present invention (SOC: start of cycle, cycle start frame containing timestamp; SOA: start of asynchronous data, non-real-time data start frame);
[0048] Figure 7 A schematic diagram of a slave device function implementation flow provided by the present invention;
[0049] Figure 8 A schematic diagram of the structure of the central control host provided by the present invention;
[0050] Fig. 9 A schematic diagram of the structure of a slave device of a high-speed real-time streaming media bus data transmission method based on FPGA provided by the present invention. DETAILED DESCRIPTION
[0051] The present invention provides a high-speed real-time streaming media bus on a hardware platform based on FPGA. The bus adds a data frame transmission control layer on the data link layer, and adopts a fixed-length time cycle signal to divide the bottom data transmission channel into a real-time data transmission channel and a non-real-time data transmission channel. For example, when real-time data frame transmission is performed in the real-time channel, the real-time communication channel adopts a module of non-buffered forwarding transmission and priority transmission to realize the real-time transmission of control command data frames. The local clock of the central control host is used as a reference clock. Through the method of accurate clock synchronization, the IEEE1588 clock synchronization protocol standard is implemented by FPGA+hardware circuit mode to realize the time synchronization of each slave device and the central control host, and the jitter of the synchronization system is less than 100ns. The real-time communication channel adopts non-buffered forwarding transmission and priority transmission modules to realize the real-time transmission of control command data frames. The forwarding delay of the slave device is less than 1us, which ensures the realization of real-time communication within one cycle; the non-real-time data communication channel adopts bandwidth time division multiplexing mode to realize Ethernet high-throughput data information communication, overcomes the conflict of data transmission on the network, and ensures the real-time and stability of data frame transmission on the line.
[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0053] The bus design scheme of the present invention is based on standard Ethernet technology, adopts FPGA+PHY chip mode, adds a deterministically scheduled data frame control management layer in the data link layer, and realizes conflict-free transmission of data frames within the communication cycle.
[0054] The high-speed real-time streaming media bus design proposed in the present invention does not redefine a new Ethernet structure, but uses a special Ethernet frame type 0x88EE in the standard Ethernet frame structure. In this way, the streaming media bus protocol frame can be distinguished from the Ethernet data frame, and the real-time control data can be directly written into the streaming media bus protocol frame, transmitted in accordance with the real-time channel processing method, and can be transmitted in the same network with Ethernet frames complying with other protocols.
[0055] This embodiment makes full use of the full-duplex characteristics of Ethernet and uses master-slave mode media access control. Figure 2 As shown in the figure, the master device (central control host) and the slave devices (1 to n slave devices, n is an integer not less than 1) adopt a linear topology structure of hand-in-hand serial connection. The central control host, as the master device, sends Ethernet data frames to each slave device. The slave device can directly receive the data frame and extract data information from the data frame. At the same time, it also transmits the received data frame to the PHY1 of the next connected slave device on the streaming media bus through its own PHY2. All slave devices on the bus send processed data frames to the central control host through their own PHY1, and the PHY1 of the upstream slave device forwards it to the PHY of the central control host. When the slave device on the streaming media bus receives a non-real-time data frame, it transmits it to the non-real-time interface module.
[0056] The high-speed real-time streaming media bus provided in this embodiment adds a data frame transmission control layer to the data link layer, and divides the underlying data transmission channel into a real-time data transmission channel and a non-real-time data transmission channel through a fixed-duration time cycle signal, and transmits real-time data frames in the real-time channel and non-real-time data frames in the non-real-time channel. Highly real-time data frames are transmitted in the real-time channel, such as motion control, I / O control, and command data frames, such as Figure 3 The real-time channel part shown in FIG. Non-real-time data frames are transmitted in the non-real-time channel, such as video data frames, TCP / IP data frames, etc. Figure 3 The non-real-time channel portion is shown.
[0057] The present invention adopts the standard IEEE802.3 Ethernet frame structure. Figure 4 The meaning of each part is shown in Table 1 below.
[0058]
[0059] Table 1 Frame structure meaning
[0060] In this embodiment, the FPGA+NOIS+PHY hardware architecture is adopted in the design of the central control host (i.e., the master station), and the FPGA+PHY hardware architecture is adopted in the design of the slave device (i.e., the slave station). The central control host periodically generates a periodic SOC heartbeat data frame, which contains system configuration information such as timestamp and system cycle parameters.
[0061] The structure diagram of the central control host (i.e., master station) is as follows: Figure 8 As shown, the communication cycle of the master station is controlled by the on-board clock crystal oscillator, and its control accuracy can reach 80ns. The communication cycle can be set according to the control needs to achieve the cycle requirements. When the central control host is in the normal working stage, such as Figure 6 The medium cycle period is set to 2ms.
[0062] When the central control host generates a cycle interrupt signal through each time cycle, the central control host generates downlink data frames of SOC, SOA and TAIL, specifically, periodic SOC heartbeat data frames, which contain system configuration information such as timestamp and system cycle parameters, and send SOC heartbeat frames, SOA data frames and TAIL data frames in each cycle, respectively providing all slave devices on the streaming media bus with the starting position information of the time cycle, the starting position information of non-real-time data transmission and the ending position information of the time cycle.
[0063] In the present invention, a time cycle includes three parts, an initial stage, a second stage and a third stage. Figure 1 As shown, S1, the central control host sends the SOC data frame started by the current cycle to all slave devices in the streaming media bus, which is used to synchronize the time of all slave devices, and the time jitter of all devices in the synchronized system is less than 100ns.
[0064] The time synchronization design adopts a precise clock synchronization method, takes the local clock of the central control host as the reference clock, and uses the IEEE1588 clock synchronization protocol standard through FPGA+hardware circuit to synchronize each terminal device with the central control host. The maximum jitter of all slave devices (i.e., terminal devices or slave stations) on the data link of the streaming media bus is less than 100ns, thereby ensuring the synchronization of the local system time and the reference clock system time, thereby achieving the synchronization performance of all slave devices (i.e., terminal devices or slave stations) of the streaming media bus.
[0065] S2. The central control host exchanges and transmits real-time data frames of this cycle with all slave devices of the streaming media bus, and transmits process control data frames and control command data frames with high real-time performance requirements.
[0066] S3, the central control host and all slave devices in the streaming media bus transmit non-real-time data frames, usually large-capacity data frames with low real-time requirements, such as user data or TCP / IP data frames, which are transmitted in this stage.
[0067] In the present invention, step S1 at the start stage includes: the central control host manages all slave devices on the streaming media bus, and sends configuration initialization data frames to the slave devices to initialize the slave stations and prepare for communication.
[0068] S11, the central control host sends the SOC data frame to the slave device directly connected to the central control host via the streaming media bus;
[0069] S12. The upstream slave device of the streaming media bus forwards the SOC data frame to the downstream slave device of the streaming media bus.
[0070] In the present invention, the central control host uses a local clock to maintain a cycle signal of a fixed period. When the cycle generates a cycle interrupt signal, the central control host generates SOC data frames, SOA data frames and TAIL data frames; the central control host also uses a local clock to manage the time slots within the cycle; the real-time channel and the non-real-time channel are divided into real-time time slots and non-real-time time slots by the above three data frames. The central control host sends SOC data frames to all slave devices of the streaming media bus, so that in real-time data communication, after the SOC heartbeat frame, the central control host sends real-time data exchange with the slave devices on the streaming media bus, so as to achieve the function of the master station controlling the operation of the slave station and processing the real-time status of the slave station.
[0071] In the present invention, within the real-time time slot of this cycle, step S2 includes:
[0072] S21, the central control host sends real-time downlink data frames to all slave devices of the streaming media bus;
[0073] S22, all slave devices on the streaming media bus receive downlink data frame information sent by the central control host respectively;
[0074] S23, all slave devices on the streaming media bus respectively detect the type of the received downlink data frame, parse the received downlink data frame information, obtain the timestamp information of the SOC data frame, use it as the time reference for time synchronization, obtain the configuration parameters of each terminal device, and then perform initialization configuration to generate an uplink data frame;
[0075] S24, all slave devices on the streaming media bus respectively feed back the initialized configured uplink data frames to the central control host through the upstream slave devices of the streaming media bus, which are used for real-time data exchange between all slave devices on the streaming media bus and the central control host; at the same time, the central control host receives the data frames transmitted uplink by all terminal devices on the streaming media bus, including SOC data frames, real-time data frames and non-real-time data frames.
[0076] At the same time, the central control host receives the non-real-time data frame, first caches the non-real-time data frame into the SRAM, waits for the non-real-time time slot, and sends it in the non-real-time time slot of the current cycle and the non-real-time time slot of the next cycle. Real-time data communication between the central control host (i.e., the master station) and all slave devices (i.e., slave stations) on the streaming media bus is realized, and real-time data exchange between the master station and the slave station is completed within the time interval between the SOC heartbeat frame and the SOA data frame, so that the master station controls the operation of the slave station and processes the real-time status of the slave station.
[0077] The central control host adopts multi-channel time division multiplexing to realize non-real-time data frame transmission, configure system parameters, control and manage non-real-time data transmission of all slave stations, avoid conflicts in data transmission on the streaming media bus, reasonably utilize bandwidth, and handle accidental events during the communication process.
[0078] S25. When all slave devices on the streaming media bus receive non-real-time data frames, the non-real-time data frames are cached in their respective SRAMs.
[0079] The central control host distinguishes the frame types of the received data frames, and obtains the working status of each terminal device by parsing the SOC data frames returned by the terminal devices (i.e., slave devices). Based on the working status of the central control host and each terminal device, the bandwidth time-division multiplexing configuration parameters are adjusted at the same time; the central control host parses the real-time control command data frames received from each terminal device, and completes the operation of the control command frames within this cycle, ensuring that the control commands of the central control host are completed within a cycle and the real-time nature of the control actions.
[0080] In the present invention, the step S22 further includes: all slave devices on the streaming media bus parse and receive the downlink data frame information of the central control host.
[0081] All slave devices on the streaming media bus obtain the timestamp information of the SOC data frame and use this time reference to synchronize time with the central control host.
[0082] All slave devices on the streaming media bus receive cycle time parameters, maintain cycle signals, and manage time slots within the cycle.
[0083] All slave devices on the streaming media bus obtain configuration parameters of each upstream terminal device of the streaming media bus, perform initialization configuration and generate uplink data frames.
[0084] At the same time, the central control host receives the data frames transmitted uplink by all terminal devices, including SOC data frames, real-time control command frames and non-real-time data frames.
[0085] In the present invention, after step S2 and before step S3, the following steps are further included: the real-time time slot ends,
[0086] The central control host sends the SOA data frame to the slave device directly connected to the central control host via the streaming media bus, and the PHY1 of the slave device receives the SOA data frame and transmits the received SOA data frame to the FPGA chip in the slave device;
[0087] The upstream slave device of the streaming bus forwards the SOC data frame to the downstream slave device of the streaming bus. Specifically, the upstream slave device of the streaming bus transmits the SOA data frame received in its FPGA chip to the PHY2 connected to itself, and its PHY2 transmits the SOA data frame to the downstream slave device of the streaming bus of the device through the streaming bus.
[0088] The slave device (i.e., terminal device or slave station) on the streaming media bus adopts the characteristics of PHY1, FPGA chip, and PHY2 in the FPGA hardware, and realizes the data frame forwarding function based on the FPGA's time slice communication management mechanism, that is, the received data frame is directly forwarded and processed without caching. The transmission forwarding delay of each terminal device is 1us, which ensures the fast and real-time requirements of the streaming media real-time bus slave device communication.
[0089] During the real-time time slot of this cycle, the slave device (i.e., the terminal device) on the streaming media bus processes real-time data frames, and the terminal device receives the real-time data frames sent by the central control host (i.e., the main station), receives, parses and configures different types of data frames accordingly; at the same time, during the real-time communication cycle, it sends data frames with high real-time requirements such as real-time control commands to the central control host, and uses its own arbitration module to control and adjust the transmission of different types of data, avoiding conflicts in line communication transmission on the streaming media bus, thereby ensuring the immediacy, stability and reliability of real-time data frame transmission.
[0090] During the real-time time slot of this cycle, the slave device (i.e., the terminal device) on the streaming media bus receives a non-real-time data frame, and the terminal device directly forwards the non-real-time data frame sent by the central control host (i.e., the main station) to the non-real-time interface module; at the same time, the terminal device caches the non-real-time data in the connected SRAM, and sends the SRAM-cached non-real-time data frame to the central control host (i.e., the main station) within the non-real-time data transmission time slice to ensure smooth uplink data frame communication and prevent conflicts from destroying the real-time and stability of data transmission.
[0091] The schematic diagram of the function implementation flow of the slave device (i.e., terminal device or slave station) on the streaming media bus is as follows: Fig. 9 As shown, all terminal devices designed for the high-speed real-time streaming media bus receive all types of data frames transmitted downstream by the central control host. When the terminal device receives the SOC heartbeat frame, it parses the reference timestamp and synchronizes the time with the central control host. At the same time, the real-time data frame is sent to the real-time interface module, and the non-real-time data frame is sent to the non-real-time interface module. In the current cycle, the real-time data frame of the central control device (i.e., the central control host) is fed back through the PHY1 of the slave device. In the cycle, the SOC heartbeat frame is used as the cycle start mark to send the real-time data frame, and the SOA data frame is used as the non-real-time moment mark to send the non-real-time data frame.
[0092] At the same time, the terminal device receives real-time data frames and caches the real-time data frames in RAM; at the same time, the terminal device receives non-real-time data frames and caches the non-real-time data frames in SRAM; the terminal device sends real-time data frames and non-real-time data frames in the corresponding time slots according to the real-time time slots and non-real-time time slots given by the SOC heartbeat frame.
[0093] In the present invention, the terminal device is implemented based on the FPGA hardware structure, such as Figure 7 As shown, the function of the terminal device (slave device) is realized in that the terminal device (slave device) receives the data frame sent downlink from the central control host and distinguishes the type of the data frame. Parse the SOC data frame, maintain the periodic signal according to the received cycle time parameters, and manage the time slot within the cycle. At the same time, process the received real-time data frame, and send the real-time command data frame to the real-time interface module. At the same time, the received non-real-time data frame is cached in the SRAM and waits to be sent. When the terminal device receives the SOC data frame, it sends the real-time data frame cached in the RAM to the central control host as the start time of the real-time time slot.
[0094] When the terminal device receives the SOA data frame, it sends the non-real-time data frame buffered in the SRAM to the central control host as the start time of the non-real-time time slot.
[0095] In the present invention, step S3 includes: in the non-real-time time slot of the current cycle, the central control host sends a non-real-time downlink data frame to all slave devices of the streaming media bus.
[0096] All slave devices on the streaming media bus receive the non-real-time downlink data frame information sent by the central control host, including the non-real-time data frames received by all slave devices on the streaming media bus and sent to the non-real-time interface module. At the same time, due to the parallel processing data characteristics of FPGA, the real-time interface module connected to the terminal device receives the real-time data frame, and packages the real-time data frame into a real-time command data frame, caches it to the RAM connected to it, and waits to be sent during the real-time gap in the cycle.
[0097] All slave devices on the streaming media bus respectively detect the type of received downlink data frames, parse the received downlink data frame information, and configure to generate uplink data frames;
[0098] All slave devices on the streaming media bus feed back the configured uplink data frames to the central control host through the upstream slave devices of the streaming media bus, which are used for non-real-time data exchange between all slave devices on the streaming media bus and the central control host; at the same time, the central control host sends the received non-real-time data frames to the switch through PHY2 to achieve large-capacity data communication with Ethernet devices. When the central control host generates a real-time command frame in a non-real-time time slot, the command frame is first cached in the internal RAM of the FPGA, waiting for the real-time time slot, and sent in the real-time time slot of the next cycle.
[0099] The central control host function is implemented as follows: Figure 5As shown, the hardware structure of the central control host based on FPGA+NOIS adopts a local clock to maintain a fixed-cycle cycle signal. When the time cycle generates a cycle interrupt signal, the central control host generates a SOC heartbeat frame SOC, SOA data frame and TAIL data frame; the central control host also adopts a local clock to manage the time slots within the cycle; using the parallel processing characteristics of FPGA, the central control host also processes each data frame received by each interface at the same time, and detects the type of data frame received by each interface; caches the real-time data frame into the RAM inside the FPGA, waits during the non-real-time time slot within the cycle, and waits for the real-time time slot of the next time cycle to transmit the real-time uplink data frame cached in the RAM inside the FPGA to the central control host; when it is a non-real-time time slot, the central control host caches the non-real-time data frame into the SRAM cache chip, and waits for the real-time time slot of the next time cycle to transmit the non-real-time data frame in the SRAM cache chip to the central control host. That is, when the central control host's cycle starts, it sends the SOC data frame, marking the start of the real-time time slot. In the real-time time slot, the central control host sends the real-time data frame cached in the RAM. When the real-time time slot ends, the central control host sends the SOA data frame, marking the start of the non-real-time time slot. In the non-real-time time slot, the central control host sends the non-real-time data cached in the SRAM.
[0100] When all slave devices on the streaming media bus receive real-time data frames respectively, they pack the real-time downlink data frames and cache the packed real-time downlink data frames into their respective RAMs.
[0101] In the present invention, after S3, the end of the non-real-time time slot is also included. The central control host sends a downlink TAIL data frame to all slave devices on the streaming media bus, marking the end of this cycle. That is, when the terminal device receives the TAIL data frame, it marks the end of the cycle.
[0102] In the present invention, according to the above-mentioned data transmission method, the data transmission method further includes:
[0103] In the present invention, a hybrid method of time slice and polling is used to realize synchronous transmission of data frames. In order to coordinate, the master device in the streaming media bus operates the mobilization of periodic time slots and synchronizes all slave devices connected to the bus accordingly, and controls periodic data communication. In the time synchronization stage of each cycle, the central control host sends a polling request frame PReq to all slave devices on the streaming media bus in a fixed time cycle, and each slave device on the streaming media bus immediately responds to the request of the polling request frame PReq in a Pres manner and transmits real-time and / or non-real-time data.
[0104] Obviously, the described embodiments are only some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0105] The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. Although various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise noted.
[0106] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of the claims of the present invention to be approved.
Claims
1. A high-speed real-time streaming media bus data transmission method based on FPGA, characterized in that: A data frame transmission control layer is added to the data link layer of the streaming media bus. Through a fixed-duration time cycle signal, the underlying data transmission channel is divided into a real-time data transmission channel and a non-real-time data transmission channel. In a time cycle, the data transmission process includes: S0, when the central control host generates a cycle interrupt signal through the cycle, the central control host generates downlink data frames of SOC, SOA and TAIL, respectively providing all slave devices on the streaming media bus with the time cycle start position information, non-real-time data transmission start position information and the time cycle end position information, S1, the central control host sends the SOC data frame started by the current cycle to all slave devices in the streaming media bus for time synchronization of all slave devices; At the start, step S1 includes: S11, the central control host sends the SOC data frame to the slave device directly connected to the central control host via the streaming media bus; S12, the upstream slave device of the streaming media bus forwards the SOC data frame to the downstream slave device of the streaming media bus, wherein the real-time communication channel adopts non-buffered forwarding transmission, and the non-real-time data communication channel adopts bandwidth time division multiplexing to realize Ethernet high-throughput data information communication, S2, the central control host and all slave devices of the streaming media bus exchange and transmit real-time data frames of this cycle; S3, the central control host transmits non-real-time data frames with all slave devices in the streaming media bus, In the real-time time slot of this cycle, step S2 includes: S21, the central control host sends real-time downlink data frames to all slave devices of the streaming media bus; S22, all slave devices on the streaming media bus receive downlink data frame information sent by the central control host respectively; S23, all slave devices on the streaming media bus respectively detect the type of the received downlink data frame, parse the received downlink data frame information, and then perform initialization configuration to generate an uplink data frame; S24, all slave devices on the streaming media bus feed back initialization configuration uplink data frames to the central control host through the upstream slave devices of the streaming media bus, so as to perform real-time data exchange between all slave devices on the streaming media bus and the central control host; S25, when the slave device on the streaming media bus receives a non-real-time data frame, the non-real-time data frame is cached in the SRAM set by each device. The step S22 further includes: All slave devices on the streaming media bus obtain the timestamp information of the SOC data frame and use this time reference to synchronize time with the central control host. All slave devices on the streaming media bus receive cycle time parameters, maintain cycle signals, and manage time slots within the cycle; All slave devices on the streaming media bus obtain configuration parameters of each upstream terminal device of the streaming media bus, perform initialization configuration and generate uplink data frames, The data transmission method further comprises: The central control host and the slave devices on the streaming media bus work respectively as follows: Transmit real-time data frames in real-time channels; The non-real-time data frame is transmitted in the non-real-time channel. The real-time data frame is sent with the SOC heartbeat frame as the cycle start mark in the cycle period, and the non-real-time data frame is sent with the SOA data frame as the non-real-time time mark.
2. The data transmission method according to claim 1, characterized in that: After step S2 and before step S3, the process further includes a step of ending the real-time time slot, in which: The central control host sends SOA data frames to the slave devices directly connected to the central control host via the streaming media bus; The upstream slave device of the streaming media bus forwards the SOA data frame to the downstream slave device of the streaming media bus.
3. The data transmission method according to claim 2, characterized in that: Step S3 includes: in the non-real-time time slot of the current cycle, The central control host sends non-real-time downlink data frames to all slave devices on the streaming media bus; All slave devices on the streaming media bus respectively receive the non-real-time downlink data frame information sent by the central control host; All slave devices on the streaming media bus respectively detect the type of received downlink data frames, parse the received downlink data frame information, and configure to generate uplink data frames; All slave devices on the streaming media bus feed back configured uplink data frames to the central control host through the upstream slave devices of the streaming media bus, which are used for non-real-time data exchange between all slave devices on the streaming media bus and the central control host; When all slave devices on the streaming media bus receive real-time data frames respectively, they pack the real-time downlink data frames and cache the packed real-time downlink data frames into their respective RAMs.
4. The data transmission method according to claim 3, characterized in that: After S3, the following also includes: the end of the non-real-time time slot, the central control host sends a downlink TAIL data frame, and the current cycle ends.
5. The data transmission method according to any one of claims 1 to 4, characterized in that: The data transmission method further comprises: During the time synchronization stage of each cycle, the central control host sends polling request frames PReq to all slave devices on the streaming bus in a fixed-length time cycle. Each slave device on the streaming bus immediately responds to the request of the polling request frame PReq in a Pres manner and transmits real-time and / or non-real-time data.
