A time-triggered switch with expandable ports

By designing the scalable port structure and module in the time-triggered switch, combined with the true dual-port RAM and time synchronization frame preemption mechanism, the problem of the complex structure of the existing time-triggered switch is solved, and strong real-time and high-reliability time are achieved. Trigger Ethernet communication.

CN117768418BActive Publication Date: 2024-10-18HUNAN GREAT WALL GALAXY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311830478.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2024-10-18
Estimated Expiration
2043-12-27

AI Technical Summary

Technical Problem

Existing time-triggered switches have complex structures when compatible with time-triggered Ethernet protocols, making it difficult to achieve strong real-time performance, high certainty, and high reliability.

Method used

A time-triggered switch with scalable ports is designed, using MAC layer module, data link scheduling module, hybrid data scheduling module, descriptor cache module and time synchronization control module, through true dual-port RAM structure and time synchronization frame preemption mechanism , to achieve fast forwarding of data frames and global clock synchronization.

Benefits of technology

It realizes multi-port MAC address management and unicast, multicast, and broadcast forwarding of data frames, reduces the forwarding processing delay and overall complexity of time-triggered switches, and ensures the strong real-time and high performance of time-triggered Ethernet communication. reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117768418B_ABST
    Figure CN117768418B_ABST
Patent Text Reader

Abstract

A time-triggered switch with expandable ports includes a MAC layer module, a MAC address module, a data link scheduling module, a mixed data scheduling module, a descriptor buffer module, and a data link transmission control module; the MAC layer module is divided into a transmission port module and a receiving port module; the MAC address module is connected to the receiving port module; the data link scheduling module is connected to the receiving port module; the mixed data scheduling module is connected to the data link scheduling module; the descriptor buffer module is connected to the data link scheduling module; the input end of the data link transmission control module is connected to the mixed data scheduling module and the descriptor buffer module, and the output end is connected to the transmission port module of the MAC layer. Compared with commercial switches, the present invention can forward time-triggered data and other data, and can realize the preemption of time-triggered data, and can also serve as a main node in time synchronization, realizing global time synchronization of a time-triggered communication system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of switch equipment, and in particular to a time-triggered switch with expandable ports. Background Art

[0002] The rapid development of avionics systems has placed higher and higher demands on airborne networks, and has put forward high requirements in terms of network bandwidth, real-time performance and reliability. With the expansion and development of avionics systems, the demand for information interaction between devices is increasing, and the real-time requirements are also increasing. Traditional communication methods have gradually been replaced by new generation avionics communication methods such as time-triggered Ethernet and AFDX. The relevant time-triggered Ethernet protocols include AS6802 and IEEE1588.

[0003] The key component to realize the time-triggered Ethernet function is the time-triggered switch, which is responsible for the forwarding and processing of time-triggered data frames and event-triggered data frames, and as the central node in the time-triggered communication system, it also has the function of time synchronization. Compared with ordinary commercial switches, time-triggered switches are compatible with the time-triggered Ethernet protocol, and the expansion of its functions makes the structure complex. As the scale of the time-triggered Ethernet system continues to expand and develop, the functional complexity will increase significantly. Therefore, when applying the time-triggered Ethernet technology, it is necessary to consider the implementation method and cost to realize the software and hardware platform of the time-triggered Ethernet technology, and ensure the strong real-time, high determinism and high reliability of the time-triggered Ethernet system. Summary of the invention

[0004] The invention provides a time-triggered switch with expandable ports to solve the technical problem that the existing time-triggered switch is compatible with the time-triggered Ethernet protocol and has a complex structure.

[0005] To achieve the above object, the technical solution of the present invention is achieved as follows:

[0006] The present invention provides a time-triggered switch with expandable ports, comprising:

[0007] The MAC layer module is used to complete the transmission and reception of physical layer protocol data and is divided into a sending port module and a receiving port module;

[0008] The MAC address module is connected to the receiving port module and is responsible for recording the correspondence between the MAC address and the port and completing the address writing and query functions;

[0009] A data link scheduling module, whose input end is connected to the receiving port module, is used to classify and process data frames;

[0010] A hybrid data scheduling module, whose input end is connected to the output end of the data link scheduling module, is responsible for data caching during link channel selection;

[0011] A descriptor cache module, the input end of which is connected to the output end of the data link scheduling module, and the descriptor cache module is responsible for caching the descriptors transmitted from the data link scheduling module;

[0012] The data link transmission control module, whose input end is respectively connected to the output end of the hybrid data scheduling module and the descriptor buffer module, and whose output end is connected to the transmission port module of the MAC layer, is responsible for forwarding the data frames in the hybrid data buffer module;

[0013] The time synchronization control module is connected to the sending port module, is responsible for generating the local timestamp of the switch and controlling the sending time of the time synchronization frame, and encapsulates the timestamp into a time synchronization frame in the sending port module and sends it.

[0014] Further, the receiving port module in the MAC layer module includes:

[0015] The receiving processing module mac_rx is used to receive Ethernet data frames from other terminal nodes and extract the destination MAC address, source MAC address and frame type information in the Ethernet header according to the Ethernet frame format;

[0016] The calculation module RX_CRC is interconnected with the receiving processing module mac_rx, and is used to calculate the CRC check code, and transmit the calculated CRC check code to the receiving processing module mac_rx to check the correctness of the data frame transmission;

[0017] The address query module search is interconnected with the receiving processing module mac_rx and is used to query the destination port number according to the destination MAC address transmitted by the receiving processing module mac_rx; the destination port number is used to determine from which port of the switch a frame of Ethernet data is forwarded;

[0018] The address cache module SRC_FIFO, whose input end is connected to the output end of the receiving processing module mac_rx, is responsible for receiving the source MAC address from the mac_rx module, completing clock domain isolation and temporarily storing the MAC address;

[0019] The data buffer module RX_RAM, whose input end is connected to the output end of the receiving processing module mac_rx, is responsible for buffering a complete Ethernet data frame;

[0020] The data frame information buffer module RX_FIFO, whose input end is connected to the output end of the receiving processing module mac_rx, is responsible for recording the length, storage start address, type and destination port number information of the data frame stored in the data buffer module RX_RAM.

[0021] Further, the sending port module in the MAC layer module includes:

[0022] The data buffer module TX_RAM, the input end of which is connected to the output end of the data link transmission control module;

[0023] The descriptor module TX_FIFO, the input end of which is connected to the output end of the data link transmission control module;

[0024] The transmission processing module mac_tx, whose input end is connected to the data cache module TX_RAM and the descriptor module TX_FIFO, is responsible for parsing the data frame information obtained from the descriptor module TX_FIFO and sending the data cache module TX_RAM data frame to the external terminal node;

[0025] The calculation module TX_CRC is interconnected with the transmission processing module mac_tx and is responsible for calculating the data that needs to be checked.

[0026] Furthermore, in the forwarding process, if the time synchronization frame conflicts with other data frames, the sending port module in the MAC layer module preempts the sending of the time synchronization frame, and resends the preempted data frame after the sending is completed, so as to ensure global clock synchronization;

[0027] The sending port module and receiving port module in the MAC layer module use the Ethernet communication clock of 125MHz, the receiving processing module mac_rx and the sending processing module mac_tx use a 200MHz clock, and a true dual-port RAM structure is used between the 125MHz clock and the 200MHz clock in the two clock domains to achieve interaction, so as to reduce the forwarding processing delay of the time-triggered switch.

[0028] Furthermore, the MAC address module includes:

[0029] The MAC address is written into the control module, and the input end is connected to the receiving port module;

[0030] The N first RAM blocks are all connected to the output end of the MAC address write control module. The N first RAM blocks are all provided with an A port and a B port. The A port is used for learning and accessing the address table, and the B port is used for address query.

[0031] Further, the number of the sending port modules and the receiving port modules in the MAC layer module are both set to N;

[0032] The number of data link scheduling modules and data link transmission control modules are both set to N;

[0033] The input end of the hybrid data scheduling module is connected to the N receiving port modules in the MAC layer module through the N data link scheduling modules;

[0034] The output end of the hybrid data scheduling module is connected to the N sending port modules in the MAC layer module through the N data link sending control modules.

[0035] Further, the N first RAM blocks are respectively bound to the N receiving port modules, and when the first RAM block receives the destination MAC address from the receiving port module, the address table is traversed and queried to access, and unicast, multicast and broadcast forwarding of the data frame is realized according to the queried port number;

[0036] Before writing data into the first RAM block, multiple first RAM blocks are traversed and accessed. When all the read data are inconsistent, the MAC address is directly written into all the first RAM blocks to prevent inconsistent data information of each first RAM block.

[0037] Furthermore, the hybrid data scheduling module includes:

[0038] N condition judgment logic modules CL, input ends of the N condition judgment logic modules CL are respectively connected to the N data link scheduling modules;

[0039] N2 true dual-port RAMs are divided into N groups in total, each N true dual-port RAMs form a group, each group of true dual-port RAMs is sequentially arranged from 1 to N, and the output ends of the N conditional judgment logic modules CL are respectively connected to the N groups of true dual-port RAMs, and the N conditional judgment logic modules CL are used to control the N data link scheduling modules respectively to write the data of the N data link scheduling modules into the corresponding true dual-port RAMs;

[0040] N selection link logic modules SL are used to control the data output of N2 true dual-port RAM sending ports. The N selection link logic modules SL are sequentially arranged from 1 to N. The input ends of the N selection link logic modules SL are respectively connected to the true dual-port RAMs with the same sending port module number.

[0041] Furthermore, the true dual-port RAM is divided into three storage spaces, namely ET data storage address segment, TT data storage address segment and BF other data frame data storage address segment. The ET data segment address range is 0 to 0x7fff, the TT data segment address range is 0x8000 to 0xbfff, and the BF data segment address range is 0xc000 to 0xffff.

[0042] Furthermore, the descriptor cache module includes:

[0043] A write control combination logic module, the input end of which is connected to the output end of the data link scheduling module;

[0044] 2N 2A FIFO, the input end of which is connected to the output end of the write control combination logic module, and the write control combination logic module is used to store the starting address and data length information of the data frame stored in the hybrid data scheduling module into the corresponding FIFO;

[0045] The read-out control combinational logic module, whose input ends are respectively connected to the output ends of the 2N2 FIFOs, is responsible for selecting the route and outputting it to the data link sending control module for processing.

[0046] Beneficial effects of the present invention:

[0047] 1. The MAC address module in the present invention can manage and learn the MAC addresses of the devices connected to each switch port; bind the port number to the MAC address, and when the destination MAC address from the receiving port is received, the address table is traversed and queried to achieve unicast, multicast and broadcast forwarding of data frames. In order to meet the requirement that all ports can access the same MAC address module at the same time, a management method of writing MAC addresses to multiple address tables at the same time is adopted, and before writing, multiple address tables are traversed and accessed. When all the read data are inconsistent, the MAC address is directly written to all address tables to prevent inconsistent data information of each MAC address module. The capacity of the MAC address module can be expanded according to the communication port requirements.

[0048] 2. To ensure the strong real-time performance of time-triggered Ethernet communication, the present invention uses a time synchronization frame preemptive transmission mechanism to achieve rapid convergence of time synchronization, and uses a fast clock to drive all forwarding processing modules during the forwarding process. At the MAC transmission layer of the sending port module, when the time synchronization frame conflicts with other data frames, the time synchronization frame is preempted and sent, and the preempted data frame is resent after it is sent, effectively ensuring global clock synchronization. The sending port module and the receiving port module use the Ethernet communication clock of 125MHz, and the receiving processing module mac_rx and the sending processing module mac_tx both use a 200MHz clock. A true dual-port RAM structure is used between the 125MHz clock and the 200MHz clock in the two clock domains to achieve interaction, reduce the forwarding processing delay of the time-triggered switch, and reduce the overall complexity of the switch. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is a structural schematic diagram of the present invention;

[0050] Figure 2 It is a structural diagram of a receiving port module;

[0051] Figure 3 It is a structural diagram of the sending port module;

[0052] Figure 4It is a structural diagram of the MAC address module;

[0053] Figure 5 It is a structural diagram of a hybrid data cache module;

[0054] Figure 6 A schematic diagram showing the division of the internal storage space of the second RAM;

[0055] Figure 7 This is a structural diagram of the descriptor cache module. DETAILED DESCRIPTION

[0056] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Preferred embodiments of the present invention are provided in the drawings. However, the present invention can be implemented in many other different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.

[0057] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0058] It should also be noted that, in the embodiments of the present application, the same figure mark is used to represent the same component or the same part. For the same parts in the embodiments of the present application, the figure may only mark one of the parts or components as an example. It should be understood that the figure mark also applies to other identical parts or components.

[0059] Reference Figure 1 The embodiment of the present application provides a time-triggered switch with expandable ports, which is described below using a time-triggered switch with 8 ports, including:

[0060] The MAC layer module is used to complete the transmission and reception of physical layer protocol data and is divided into a sending port module and a receiving port module;

[0061] The MAC address module is connected to the receiving port module and is responsible for recording the correspondence between the MAC address and the port and completing the address writing and query functions;

[0062] A data link scheduling module, whose input end is connected to the receiving port module, is used to classify and process data frames;

[0063] A hybrid data scheduling module, whose input end is connected to the output end of the data link scheduling module, is responsible for data caching during link channel selection;

[0064] A descriptor cache module, the input end of which is connected to the output end of the data link scheduling module, and the descriptor cache module is responsible for caching the descriptors transmitted from the data link scheduling module;

[0065] The data link transmission control module, whose input end is respectively connected to the output end of the hybrid data scheduling module and the descriptor buffer module, and whose output end is connected to the transmission port module of the MAC layer, is responsible for forwarding the data frames in the hybrid data buffer module;

[0066] The time synchronization control module is connected to the sending port module, is responsible for generating the local timestamp of the switch and controlling the sending time of the time synchronization frame, and encapsulates the timestamp into a time synchronization frame in the sending port module and sends it.

[0067] Each port of the time-triggered switch uses a data link scheduling module, which cooperates with the mixed data scheduling module to store various data frames from the receiving port into the corresponding storage body. The high two bits of the storage body address bus are used to divide the storage space of time-triggered data frames, event-triggered data frames, and other data frames. The data link scheduling module parses the data frame description information and temporarily stores the data frame into the corresponding storage space.

[0068] The specific process of data processing of the time-triggered switch is as follows:

[0069] 1. The receiving port module receives Ethernet data frames from other terminal nodes and parses and receives the data frames. If the Ethernet data frame is of ARP type, the source MAC address is stored in the MAC address module and its source port is bound; if the Ethernet data frame is of other types, the MAC address module is queried according to the destination MAC address to obtain the data forwarding destination port. Regardless of the data type, the Ethernet data frame of the receiving port module is cached in the data cache module RX_RAM in the receiving port module, and the Ethernet data frame storage start address, data length, destination port number and data type information are recorded and handed over to the data link scheduling module for processing.

[0070] 2. The data link scheduling module transmits the corresponding data frame from the cache to the hybrid data scheduling module according to the type of Ethernet data frame and the forwarding destination port. The descriptive information parameters such as the destination port number, data length and storage start address of the Ethernet data frame are stored in the data descriptor cache module.

[0071] 3. The data link transmission control module transmits data from the hybrid data scheduling module to the transmission port module according to the information of the descriptor and the transmission order of TT data frames, ET data frames and other data frames. In this module, a mechanism is designed for TT data frames to preempt the transmission of other data frames. After the TT data frame is sent, the preempted data frame is resent.

[0072] 4. The sending port module sends the data transmitted by the data link sending control module to the terminal node. In addition, in this module, in order to ensure the time synchronization of the time-triggered communication system, the time synchronization data frame is sent every 10ms. The time synchronization data frame preempts the sending of all other data frames and then resends the preempted data frame.

[0073] In some embodiments, the receiving port module in the MAC layer module includes:

[0074] The receiving processing module mac_rx is used to receive Ethernet data frames from other terminal nodes and extract the destination MAC address, source MAC address and frame type information in the Ethernet header according to the Ethernet frame format;

[0075] The calculation module RX_CRC is interconnected with the receiving processing module mac_rx, and is used to calculate the CRC check code, and transmit the calculated CRC check code to the receiving processing module mac_rx to check the correctness of the data frame transmission;

[0076] The address query module search is interconnected with the receiving processing module mac_rx and is used to query the destination port number according to the destination MAC address transmitted by the receiving processing module mac_rx; the destination port number is used to determine from which port of the switch a frame of Ethernet data is forwarded;

[0077] The address cache module SRC_FIFO, whose input end is connected to the output end of the receiving processing module mac_rx, is responsible for receiving the source MAC address from the mac_rx module, completing clock domain isolation and temporarily storing the MAC address;

[0078] The data buffer module RX_RAM, whose input end is connected to the output end of the receiving processing module mac_rx, is responsible for buffering a complete Ethernet data frame;

[0079] The data frame information buffer module RX_FIFO, whose input end is connected to the output end of the receiving processing module mac_rx, is responsible for recording the length, storage start address, type and destination port number information of the data frame stored in the data buffer module RX_RAM.

[0080] Specifically, the structure of the receiving port module is as follows Figure 2 As shown, the structure of the receiving port module is composed of a receiving processing module mac_rx, a data buffer module RX_RAM, a data frame information buffer module RX_FIFO, a MAC address query module search, a source MAC address buffer module SRC_FIFO and a CRC calculation module RX_CRC.

[0081] The Ethernet data is received and processed in the receiving processing module mac_rx according to the Ethernet data frame protocol, and the data to be checked is transmitted to the calculation module RX_CRC. After the CRC check code is calculated, it is returned to the receiving processing module mac_rx. By comparing the calculated check code with the check code in the data frame, it is determined whether the data frame is transmitted incorrectly. The address query module search receives the destination MAC address transmitted by the receiving processing module mac_rx, and queries the destination port number. The destination port number is used to determine whether a frame of Ethernet data is forwarded from a certain port of the switch. The address cache module SRC_FIFO receives the source MAC address from the receiving processing module mac_rx. Its function is to complete the clock domain isolation and temporarily store the MAC address for binding the MAC address and the switch port number. The data cache module RX_RAM is responsible for caching a complete Ethernet data frame; the data frame information cache module RX_FIFO is responsible for caching the descriptor, which records the length, storage start address, type and destination port number of the data frame stored in the data cache module RX_RAM.

[0082] The receiving processing module mac_rx extracts the destination MAC address, source MAC address and frame type information from the Ethernet header according to the Ethernet frame format. The frame type is a field that distinguishes Ethernet data frames. The corresponding exchange processing is performed according to the different frame types. In the general Ethernet protocol, the Ethernet data frame types include IP protocol frames (frame type is 0x0800) and ARP (frame type is 0x0806) protocol frames. In the time-triggered Ethernet switch, two definition frames are added, namely TT data protocol frames, the type field is 0x0808; time synchronization data frames, the type field is 0x8888. The destination MAC address is transmitted to the address query module search, and the forwarding destination port of this data frame is queried, and the destination port number is transmitted to the receiving processing module mac_rx for parsing and processing; the source MAC address is determined according to the frame type field to be given to the MAC address learning module. If it is an ARP protocol frame, the source MAC address is bound to the receiving port number, and the MAC address learning module records the information to the MAC address module.

[0083] The address query module search accesses the information in the address table to query the port number corresponding to the destination MAC address, and outputs the port number to the receiving processing module mac_rx to complete the destination MAC address query function. If during the query, a round of access to the entire address table space has not yet obtained the corresponding port number, it is necessary to tell the receiving port module that this data frame should be broadcast; when the destination MAC address is a broadcast address, it means that the received data frame is a broadcast data frame; in the above two cases, both frames must be broadcast, and the broadcast port number is output to the receiving processing module mac_rx. While transmitting the port number, a handshake signal is given to the receiving processing module mac_rx to indicate that the MAC address query is complete.

[0084] In some embodiments, the number of the sending port modules and the receiving port modules in the MAC layer module is set to 8; the 8 sending port modules correspond to Figure 1 The sending port module 1 to the starting port module 8 in the 8 receiving port modules correspond to Figure 1 Receiving port module 1 to receiving port module 8;

[0085] The number of data link scheduling modules and data link transmission control modules are both set to 8;

[0086] The input end of the hybrid data scheduling module is connected to 8 receiving port modules in the MAC layer module through 8 data link scheduling modules;

[0087] The output end of the hybrid data scheduling module is connected to 8 sending port modules in the MAC layer module through 8 data link sending control modules.

[0088] In some embodiments, the transmit port module in the MAC layer module includes:

[0089] The data buffer module TX_RAM, the input end of which is connected to the output end of the data link transmission control module;

[0090] The descriptor module TX_FIFO, the input end of which is connected to the output end of the data link transmission control module;

[0091] The transmission processing module mac_tx, whose input end is connected to the data cache module TX_RAM and the descriptor module TX_FIFO, is responsible for parsing the data frame information obtained from the descriptor module TX_FIFO and sending the data cache module TX_RAM data frame to the external terminal node;

[0092] The calculation module TX_CRC is interconnected with the transmission processing module mac_tx and is responsible for calculating the data that needs to be checked.

[0093] Specifically, the structure of the sending port module is as follows Figure 3 As shown, the sending port module is divided into a sending processing module mac_tx, a data buffer module TX_RAM, a descriptor module TX_FIFO and a CRC calculation module TX_CRC.

[0094] The data cache module TX_RAM and the descriptor module TX_FIFO receive data transmitted from the data link transmission control module; the transmission processing module mac_tx parses the data frame information obtained from the descriptor module TX_FIFO and sends the data cache module TX_RAM data frame to the terminal.

[0095] The time synchronization data frame preempts the transmission of other data. The transmission processing module mac_tx encapsulates the timestamp timestamp and records the descriptor information of the preempted data frame. The data to be checked is transmitted to the calculation module TX_CRC for calculation, and the generated check code is transmitted to the transmission processing module mac_tx for transmission. After the time synchronization data frame is sent, the preempted data frame is read from the data cache module TX_RAM again according to the recorded descriptor information.

[0096] In some embodiments, the sending port module in the MAC layer module, during the forwarding process, if the time synchronization frame conflicts with the sending of other data frames, the time synchronization frame is preemptively sent, and the preempted data frame is resent after the sending is completed to ensure global clock synchronization;

[0097] The sending port module and receiving port module in the MAC layer module use the Ethernet communication clock of 125MHz, the receiving processing module mac_rx and the sending processing module mac_tx use a 200MHz clock, and a true dual-port RAM structure is used between the 125MHz clock and the 200MHz clock in the two clock domains to achieve interaction, so as to reduce the forwarding processing delay of the time-triggered switch.

[0098] In some embodiments, the MAC address module includes:

[0099] The MAC address is written into the control module, and the input end is connected to the receiving port module;

[0100] The eight first RAM blocks are all connected to the output end of the MAC address write control module. The eight first RAM blocks are all provided with an A port and a B port. The A port is used for learning and accessing the address table, and the B port is used for address query.

[0101] In some embodiments, the eight first RAM blocks are respectively bound to eight receiving port modules, and when the first RAM block receives the destination MAC address from the receiving port module, the address table is traversed and queried to implement unicast, multicast and broadcast forwarding of the data frame according to the queried port number;

[0102] Before writing data into the first RAM block, multiple first RAM blocks are traversed and accessed. When all the read data are inconsistent, the MAC address is directly written into all the first RAM blocks to prevent inconsistent data information of each first RAM block.

[0103] Specifically, the MAC_LUT module is a MAC address module, and its address table information is shown in Table 1. The data width of the first RAM block is set to 52 bits, the upper 48 bits are the MAC address, and the lower 4 bits are the switch port number, which is used to match the MAC address and the port. The address bus width of the first RAM block is set to 6, that is, the entire switch can learn and record 64 MAC addresses. According to the application situation, the number of MAC address storage can be appropriately expanded.

[0104] Table 1 Address table mapping

[0105]

[0106] The MAC_LUT module structure is as follows Figure 4 As shown, the working clock uses 200Mhz to improve the access processing speed of the address table. An address table is represented by a first RAM block. Port A of the first RAM block is used to learn and access the address table, and port B is used for address query. In order to meet the simultaneous address query access of the 8 ports of the switch, 8 first RAM blocks with the same configuration are used to manage the address table. The address query module search of each receiving port module of the switch queries the address table corresponding to each port, and hands the obtained port information data to the query module for processing. When learning the MAC address, the MAC address and port information are written to the 8 first RAM blocks at the same time. The MAC address and port information branches in the figure are connected to the 8 first RAM blocks to ensure that all address tables are in a synchronized state. The MAC address write module uniformly controls the entry of the MAC address and port information. Before entering, it is necessary to check whether the MAC address and port information exist in the address table. MAC address write control module (corresponding to Figure 4 The MAC address writing control in the MAC address writing control) accesses the address table information through the A port of the 8 first RAM blocks. When the 8 read address table information data are consistent, the MAC address duplication judgment is performed. If the address and port are repeated, the MAC address and port information are not written, otherwise the relevant information is written. When the address table information data is inconsistent, the MAC address and port information are directly written to all address tables.

[0107] Specifically, the data link scheduling module is responsible for reading the data frame information in the data frame information cache module RX_FIFO in the receiving port module, and according to the data frame length, storage start address, type and destination port, the Ethernet data frame corresponding to the information in the data cache module RX_RAM is selected and stored in the hybrid data scheduling module, and the data frame storage start address and descriptor information are recorded and stored in the descriptor cache module.

[0108] In some embodiments, the hybrid data scheduling module includes:

[0109] 8 condition judgment logic modules CL, input ends of the 8 condition judgment logic modules CL are respectively connected to 8 data link scheduling modules;

[0110] 64 true dual-port RAMs are divided into 8 groups, each of which has 8 true dual-port RAMs, and each group of true dual-port RAMs is sequentially arranged from 1 to 8, and the output ends of 8 conditional judgment logic modules CL are respectively connected to the 8 groups of true dual-port RAMs, and the 8 conditional judgment logic modules CL are used to control 8 data link scheduling modules respectively, so as to write the data of the 8 data link scheduling modules into the corresponding true dual-port RAMs;

[0111] 8 selection link logic modules SL are used to control the data output of 64 true dual-port RAM transmission ports. The 8 selection link logic modules SL are sequentially arranged from 1 to 8, and the input ends of the 8 selection link logic modules SL are respectively connected to the true dual-port RAM with the same transmission port module number.

[0112] In some embodiments, the true dual-port RAM is divided into three storage spaces, namely ET data storage address segment, TT data storage address segment and BF other data frame data storage address segment. The ET data segment address range is 0 to 0x7fff, the TT data segment address range is 0x8000 to 0xbfff, and the BF data segment address range is 0xc000 to 0xffff.

[0113] Specifically, the hybrid data scheduling module manages the storage of different types of data frames from different ports. Its structure is as follows: Figure 5As shown. The (Time-Trigger Ethernet, TTE) time-triggered switch is designed with 8 ports, namely 8 sending port modules and 8 receiving port modules. In this module, 64 true dual-port RAMs are used to cache and manage data. Data received by a switch port can be forwarded to 8 ports (including its local port), and a switch port can send data forwarded by 8 ports. Data is written to port A of the true dual-port RAM, and data is read out of port B. Before data is written to the true dual-port RAM, the conditional judgment logic module CL is used to control the data link scheduling module N (N is 1, 2, 3, ..., 8) to write the data link to the corresponding true dual-port RAM; data is read out from the true dual-port RAM, and the selection link logic module SL is used to control the data output of the sending port module. For each additional port added to the switch, a true dual-port RAM is added to the module to complete the port function expansion.

[0114] Each true dual-port RAM in the RAM_MATRIX module can cache 64KB of data. According to the data frame type, the true dual-port RAM is divided into three storage spaces. Figure 6 As shown, the storage space is divided into ET data storage address segment, TT data storage address segment and BF (other data frame) data storage address segment. The address range of ET data segment is 0~0x7fff, the address range of TT data segment is 0x8000~0xbfff, and the address range of BF data segment is 0xc000~0xffff. The write address bus width is 16 bits, and the address high 2 bits are used to distinguish the storage data frame type address segment. 2'b00 and 2'b01 represent the ET data storage address segment, 2'b10 represents the TT data storage address segment, and 2'b11 represents the BF data storage address segment. The lower 14 bits of the address bus represent the write address of the data. The address bus signal and the destination port signal are processed by the condition judgment logic module CL to control the data frame to be written to the corresponding true dual-port RAM. The link selection logic module SL receives the read signal of the data link transmission control module and controls the data read forwarding of each true dual-port RAM.

[0115] Specifically, the data link transmission control module is responsible for determining the forwarding of the data frame in the hybrid data cache module. When there is a data request to send to a certain port in the descriptor cache module, the information in the descriptor cache module is read, and after parsing, the data frame corresponding to the descriptor information in the hybrid data cache module is read. In order to ensure the real-time transmission of the TT data frame, when the TT data frame has a transmission request, the channel is occupied by the ET data frame transmission, and the TT data frame must be preempted. After the TT data frame is processed, the preempted ET data frame is resent.

[0116] Specifically, the time synchronization control module is applied to the time synchronization function. It generates local timestamp information of a switch and uses the master-slave synchronization method for time synchronization. Every 10ms period, time synchronization data frames are sent out from all ports of the switch to synchronize the time of other terminal nodes in the time-triggered Ethernet. The synchronized time-triggered Ethernet system can perform periodic data communication according to the time information. The time synchronization control module realizes the generation of the local timestamp of the switch and controls the sending time of the time synchronization frame. The timestamp is encapsulated into a time synchronization frame in the sending processing module mac_tx and sent.

[0117] In some embodiments, the descriptor cache module includes:

[0118] A write control combination logic module, the input end of which is connected to the output end of the data link scheduling module;

[0119] 128 FIFOs, the input ends are connected to the write control combination logic module (corresponding to Figure 7 The output end of the write control combination logic in the mixed data scheduling module is connected, and the write control combination logic module is used to store the starting address and data length information of the data frame stored in the mixed data scheduling module into the corresponding FIFO;

[0120] Readout control combinational logic module (corresponding to Figure 7 The read-out control combination logic in the data link sends data to the data link control module for processing.

[0121] Specifically, the descriptor cache module DES_FIFO consists of 128 FIFOs, the structure is as follows Figure 7 As shown. Its FIFO naming adopts the form of et_1to2, which means ET data frame or BF frame sent from port 1 to port 2, and tt_2to3 means TT data frame sent from port 2 to port 3. The descriptor cache module writes the descriptor transmitted from the data link scheduling module through the write control combinational logic, and stores the starting address and data length information of the data frame stored in the mixed data scheduling module into the corresponding FIFO. The empty signal of the FIFO triggers the lower-level module to start working, reads the data of the descriptor FIFO of this module, and selects the route of the data read from the FIFO through the output combinational logic circuit, and outputs it to the data link transmission control module for processing. Through the combinational logic management of this module, the connection between modules is reduced, and the multiplexing rate of the input and output buses is improved.

[0122] The present invention provides a time-triggered switch with expandable ports. Compared with commercial switches, it can forward time-triggered data and other data, and can realize the preemption of time-triggered data. It can also serve as a main node in time synchronization to realize global time synchronization of a time-triggered communication system. The time-triggered switch is designed in combination with the characteristics of FPGA resource structure, which effectively reduces the complexity of the time-triggered switch.

[0123] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered within the protection scope of the present invention. In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the ability of ordinary technicians in the field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A time-triggered switch with expandable ports, characterized in that: include: The MAC layer module is used to complete the transmission and reception of physical layer protocol data and is divided into a sending port module and a receiving port module; The MAC address module is connected to the receiving port module and is responsible for recording the correspondence between the MAC address and the port and completing the address writing and query functions; The data link scheduling module, whose input end is connected to the receiving port module, is used to classify and process the data frames; The hybrid data scheduling module, whose input end is connected to the output end of the data link scheduling module, is responsible for data buffering during link channel selection; The descriptor cache module has an input end connected to the output end of the data link scheduling module. The descriptor cache module is responsible for caching the descriptors transmitted from the data link scheduling module. The data link transmission control module has its input end connected to the output end of the hybrid data scheduling module and the descriptor cache module respectively, and its output end connected to the transmission port module of the MAC layer, and is responsible for forwarding data frames in the hybrid data cache module; The time synchronization control module is connected to the sending port module, is responsible for generating the local timestamp of the switch and controlling the sending time of the time synchronization frame, and encapsulates the timestamp into the time synchronization frame in the sending port module and sends it.

2. The time-triggered switch according to claim 1, wherein: The receiving port module in the MAC layer module includes: The receiving processing module mac_rx is used to receive Ethernet data frames from other terminal nodes and extract the destination MAC address, source MAC address and frame type information in the Ethernet header according to the Ethernet frame format; The calculation module RX_CRC is interconnected with the receiving processing module mac_rx, and is used to calculate the CRC check code and transmit the calculated CRC check code to the receiving processing module mac_rx to verify the correctness of the data frame transmission; Address query module search and receiving processing module mac _ rx are connected to each other and are used to query the destination port number based on the destination MAC address transmitted by the receiving processing module mac_rx; the destination port number is used to determine which port of the switch a frame of Ethernet data is forwarded from; The address buffer module SRC_FIFO, whose input end is connected to the output end of the receiving processing module mac_rx, is responsible for receiving the source MAC address from the mac_rx module, completing clock domain isolation and temporarily storing the MAC address; The data buffer module RX_RAM, whose input end is connected to the output end of the receiving processing module mac_rx, is responsible for buffering a complete Ethernet data frame; The data frame information buffer module RX_FIFO, whose input end is connected to the output end of the receiving processing module mac_rx, is responsible for recording the length, storage start address, type and destination port number information of the data frame stored in the data buffer module RX_RAM.

3. The time-triggered switch according to claim 2, wherein: The sending port module in the MAC layer module includes: The data buffer module TX_RAM has an input end connected to the output end of the data link transmission control module; The descriptor module TX_FIFO, the input end of which is connected to the output end of the data link transmission control module; The transmit processing module mac_tx, whose input end is connected to the data cache module TX_RAM and the descriptor module TX_FIFO, is responsible for parsing the data frame information obtained from the descriptor module TX_FIFO and sending the data cache module TX_RAM data frame to the external terminal node; The calculation module TX_CRC is interconnected with the transmission processing module mac_tx and is responsible for calculating the data that needs to be checked.

4. The time-triggered switch according to claim 3, wherein: The sending port module in the MAC layer module, during the forwarding process, if the time synchronization frame conflicts with other data frames, the time synchronization frame is preemptively sent, and the preempted data frame is resent after it is sent to ensure global clock synchronization; The sending and receiving port modules in the MAC layer module use the 125MHz Ethernet communication clock, while the receiving processing module mac_rx and the transmitting processing module mac_tx use a 200MHz clock. A true dual-port RAM structure is used to achieve interaction between the 125MHz clock and the 200MHz clock in the two clock domains to reduce the forwarding processing delay of the time-triggered switch.

5. The time-triggered switch according to claim 1, wherein: The MAC address module includes: The MAC address is written into the control module, and the input end is connected to the receiving port module; The N first RAM blocks are all connected to the output end of the MAC address write control module. The N first RAM blocks have an A port and a B port. The A port is used for learning and accessing the address table, and the B port is used for address query.

6. The time-triggered switch according to claim 5, characterized in that: The number of the sending port modules and the receiving port modules in the MAC layer module is set to N; The number of data link scheduling modules and data link transmission control modules is set to N; The input end of the hybrid data scheduling module is connected to the N receiving port modules in the MAC layer module through the N data link scheduling modules; The output end of the hybrid data scheduling module is connected to the N sending port modules in the MAC layer module through the N data link sending control modules.

7. The time-triggered switch according to claim 6, wherein: N first RAM blocks are respectively bound to N receiving port modules. When the first RAM block receives a destination MAC address from the receiving port module, it performs a traversal query access to the address table and implements unicast, multicast, and broadcast forwarding of the data frame according to the queried port number. Before writing data into the first RAM block, multiple first RAM blocks are traversed and accessed. When all read data are inconsistent, the MAC address is directly written into all first RAM blocks to prevent inconsistent data information in each first RAM block.

8. The time-triggered switch according to claim 6, wherein: The hybrid data scheduling module includes: N condition judgment logic modules CL, input ends of the N condition judgment logic modules CL are respectively connected to N data link scheduling modules; N 2 true dual-port RAMs, which are divided into N groups, each N true dual-port RAMs forming a group, each group of true dual-port RAMs being sequentially arranged from 1 to N, and output ends of the N conditional judgment logic modules CL are respectively connected to the N groups of true dual-port RAMs, the N conditional judgment logic modules CL being used to respectively control the N data link scheduling modules to write data of the N data link scheduling modules into corresponding true dual-port RAMs; N selection link logic modules SL, used to control N 2 The data output of the true dual-port RAM sending port is arranged in sequence from 1 to N, and the input ends of the N selection link logic modules SL are respectively connected to the true dual-port RAM with the same sending port module number.

9. The time-triggered switch according to claim 8, wherein: The true dual-port RAM is divided into three storage spaces, namely ET data storage address segment, TT data storage address segment and BF other data frame data storage address segment. The ET data segment address range is 0~0x7fff, the TT data segment address range is 0x8000~0xbfff, and the BF data segment address range is 0xc000~0xffff.

10. The time-triggered switch according to claim 1, wherein: The descriptor cache module includes: A write control combination logic module, wherein the input end is connected to the output end of the data link scheduling module; 2N 2 A FIFO, the input end of which is connected to the output end of the write control combination logic module, and the write control combination logic module is used to store the starting address and data length information of the data frame stored in the mixed data scheduling module into the corresponding FIFO; Readout control combination logic module, the input terminals are connected to 2N 2 The output end of each FIFO is connected, responsible for selecting the route and outputting it to the data link sending control module for processing.

Citation Information

Patent Citations

  • Input buffer structure and data forwarding method of Ethernet switch

    CN108306835A

  • Time-triggered Ethernet switch based on multiple planes and scheduling packet switching method

    CN110460548A