Simulation model system of TTFC message scheduling

By designing a simulation model system for TTFC message scheduling, the problem of simulation scheduling of different types of data frames in the TTFC network is solved, efficient network performance simulation is achieved, simulation accuracy and flexibility are improved, and hardware simulation costs are reduced.

CN115733759BActive Publication Date: 2025-05-23CHINESE AERONAUTICAL RADIO ELECTRONICS RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211129636.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-16
Publication Date
2025-05-23
Estimated Expiration
2042-09-16

AI Technical Summary

Technical Problem

The simulation scheduling problems of different types of data frames in existing TTFC networks lead to uncertainty and security risks under strict timing requirements in traditional FC networks.

Method used

A simulation model system for TTFC message scheduling is designed, including switch model, terminal model and link model. By building network terminal model and switch model, the high and low priority scheduling and forwarding of data frames are realized, and the transmission, reception and forwarding behavior of different types of data frames are simulated.

Benefits of technology

Effectively simulate the performance characteristics of data frames of different message types in TTFC networks, improve network simulation accuracy and flexibility, reduce hardware simulation costs, and fill the gap in TTFC network simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115733759B_ABST
    Figure CN115733759B_ABST
Patent Text Reader

Abstract

The present invention discloses a simulation model system for TTFC message scheduling, including a switch model, a terminal model and a link model, wherein the input file includes a network simulation topology file and a simulation configuration file. Before running the simulation, the terminal model and the switch model are connected by using a link model according to the imported simulation topology file, thereby constructing a TTFC network simulation model topology structure; when running the simulation model, the switch model simulates the forwarding behavior of various types of data frames by reading the simulation configuration file, and the terminal model simulates the sending and receiving behavior of various types of data frames by reading the simulation configuration file. The present invention can be used to evaluate the performance characteristics of various types of data frames, thus filling the gap in the TTFC network simulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of network simulation, in particular to simulation research of aviation network, and is a simulation model system of TTFC message scheduling. Background Art

[0002] At present, network communication technology has developed rapidly in the fields of avionics systems and manufacturing. In FC networks, end systems communicate by exchanging data frames. The queuing of data frames in the input port queue of the switch will cause transmission delay, and the transmission delay further depends on the topology. This uncertain time behavior makes the traditional FC network not have the safety criticality of strict timing requirements. In order to ensure strong real-time performance, the time trigger mechanism is introduced into the FC network protocol to improve the performance of the network. Time-triggered Fibre Channel (TTFC) is a network used in the aerospace field to improve time criticality and safety criticality. It refers to the addition of a time trigger mechanism to the Fibre Channel FC network. TTFC network simulation is an effective means to understand the performance of the network. By constructing simulation models for different types of data frames in the TTFC network, the network performance of each type of data frame can be obtained, which helps the application of TTFC. Summary of the invention

[0003] The purpose of the invention is to provide a simulation model system for TTFC message scheduling, which solves the simulation scheduling problem of different types of data frames in the TTFC network by constructing a network terminal model and a switch model. Based on the data scheduling design of the terminal model, the data frame is sent and received in a high-low priority order after being generated; based on the data frame scheduling design of the switch model, the data frame is forwarded in a high-low priority order from the receiving port to the sending port. The delay characteristics of different data frames in the TTFC network are checked through the simulation results.

[0004] The object of the present invention is achieved through the following technical solutions:

[0005] A simulation model system for TTFC message scheduling includes a switch model, a terminal model and a link model. The input file includes a network simulation topology file and a simulation configuration file. Before running the simulation, the terminal model and the switch model are connected by using a link model according to the imported simulation topology file, so as to construct a TTFC network simulation model topology structure. When running the simulation model, the switch model simulates the forwarding behavior of various types of data frames by reading the simulation configuration file, and the terminal model simulates the sending and receiving behavior of various types of data frames by reading the simulation configuration file.

[0006] The beneficial effects of the present invention are:

[0007] 1. For the first time, a simulation model system based on TTFC network data scheduling is proposed. The system can effectively simulate the sending, forwarding, and receiving behaviors of different message types of TTFC data, evaluate the performance characteristics of various types of data frames, and fill the gap in TTFC network simulation.

[0008] 2. The terminal model and switch model respectively designed the MAC layer model and forwarding scheduling model to simulate the sending, forwarding and receiving of data frames of different data types. At the same time, the network clock synchronization strategy was simulated to ensure the uniformity of network time. The TT data frame was simulated to send and receive according to the time window, the RC data frame was simulated to send and receive as much as possible, and the BE data frame was simulated to send and receive normally, which improved the accuracy of network simulation.

[0009] 3. The simulation model generates and simulates data according to the loaded configuration table, which increases the flexibility and diversity of network simulation. It can perform simulation modeling and analysis on different network topologies and message configurations under different configuration tables.

[0010] 4. This simulation model can effectively reduce the cost of hardware simulation. It plays a vital role in the current network configuration results and the design and verification of TTFC network products. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 Schematic diagram of TTFC basic cycle and matrix cycle.

[0012] Figure 2 Schematic diagram of TTFC network topology.

[0013] Figure 3 Schematic diagram of the switch model.

[0014] Figure 4 Schematic diagram of link model configuration information.

[0015] Figure 5 This is a schematic diagram of the terminal model.

[0016] Figure 6 Schematic diagram of the state machine implementation process of the switch forwarding scheduling model.

[0017] Figure 7 This is a schematic diagram of the state machine implementation process of the terminal MAC layer model. DETAILED DESCRIPTION

[0018] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0019] In order to support applications with different real-time and security requirements, the TTFC protocol divides traffic into four categories: protocol control frames (PCF), time-triggered (TT) traffic, rate-constrained (RC) traffic, and best-effort (BE) traffic. PCF data frames are used for network time synchronization, TT traffic is used for applications with high deterministic requirements such as delay and jitter, RC traffic is used for applications with slightly weaker deterministic requirements, and it is compatible with the transmission mode of virtual links (VL). BE traffic is a traditional Ethernet communication method with the lowest priority and no quality of service (QoS) guarantee is required.

[0020] like Figure 1 As shown in the figure, each node (terminal / switch) port in the TTFC network will have a TT scheduling table, in which the data frames of each TT flow are strictly sent from the terminal according to the periodicity. The time axis of the scheduling table is cycled in units of matrix cycles, and a matrix cycle is divided into several basic cycles. In order to ensure real-time requirements, the network will use PCF frames to synchronize the time of each node in the network. To ensure global time synchronization, each flow uses PCF frames as the relative time to start a cycle of message transmission.

[0021] The present embodiment provides a TTFC message scheduling simulation model system, which is implemented by OPNET software and can effectively simulate the sending, forwarding, and receiving behaviors of different message types of TTFC data, and evaluate the performance characteristics of various types of data frames, including switch models, terminal models, and link models. The input files of the TTFC network simulation model include: network simulation topology files and simulation configuration files. Before running the simulation, the OPNET software uses the link model to connect the terminal model and the switch model according to the imported simulation topology file, thereby constructing the TTFC network simulation model topology structure, such as Figure 2 When the simulation model is run, the switch model simulates the forwarding behavior of various types of data frames by reading the simulation configuration file, and the terminal model simulates the sending and receiving behavior of various types of data frames by reading the simulation configuration file.

[0022] Among them, the network simulation topology file and simulation configuration file are configured according to the real TTFC network. The simulation topology file contains the terminal and switch information in the TTFC network and the link relationship between the terminal and the switch; the simulation configuration file contains the message attributes generated by the terminal, the terminal port attributes, the routing information of the data frame in the switch, the clock synchronization attributes, etc. The network simulation topology file and simulation configuration file must be matched with the switch model, terminal model and link model to realize data generation, scheduling forwarding and reception, and the network clock synchronization strategy.

[0023] By setting the data frame types of the sending / receiving ports in the terminal model and the switch model to be consistent with the data frame types set in the link model, the transfer of data frames between the terminal model and the switch model is achieved.

[0024] The switch model and the terminal model are described in detail below.

[0025] I. Switch Model

[0026] To avoid the head-of-line blocking (HOL) phenomenon, the TTFC network switch adopts a Crossbar switching structure design based on virtual input queue (VOQ) caching. In the switch adopting this strategy, each receiving port allocates virtual output queues for all sending ports.

[0027] As Figure 3 shown, the TTFC network contains four message types (PCF, TT, RC, BE). Therefore, assuming a full-duplex 2-port switch, 8 VOQs can be allocated for each receiving port, and each VOQ corresponds to a sending port. The crossbar in the switch schedules the packet caching of the VOQs. Currently, the scheduling algorithm of the switch is iSLIP. The iSLIP algorithm is an iterative SLIP algorithm and an iterative matching algorithm that is easy to implement in hardware. In each time slot, iSLIP uses multiple iterations to quickly match the receiving port and the sending port of the arriving data in a receiving queue. When matching, it checks whether the receiving port and the sending port are idle, and data is sent only when both are idle.

[0028] The switch model includes a switch receiving port model, a switch MAC layer model, a switch forwarding scheduling model, and a switch sending port model.

[0029] Switch Receiving Port Model

[0030] In the switch receiving port model, the number of receiving ports of the switch is set to 48 to receive data frames. The port rate is set to 2.125 Gbps and supports configuration of 4.25 Gbps. Through the configuration of the link model, the terminal sending port model in the terminal model is connected to the switch receiving port model of the switch. As Figure 4 shown in the configuration of transmittera, receiver a, transmitter b, and receiver b. When the receiving port receives a data frame, it sends a receive data stream interruption message to the switch MAC layer model.

[0031] Switch Sending Port Model

[0032] In the switch sending port model, the number of the switch sending ports is set to 48 to achieve the sending of data frames. The port rate is 2.125Gbps and supports 4.25Gbps configurable. By configuring the link model, the terminal sending port model in the terminal model is connected to the switch receiving port model of the switch, such as Figure 4 The figure shows the configuration of transmitter a, receiver a, transmitter b, and receiver b. The data frames in each receiving queue are transferred to the link model through the sending port model.

[0033] Switch MAC layer model

[0034] The switch MAC layer model first reads the simulation configuration file to obtain the VLID information and data frame type information received by the switch model. When the switch MAC layer model receives the data flow interruption information from the "switch receiving port model", it receives the data frame and obtains the VLID of the data frame, and determines whether the VLID is in the VLID received by the switch. If not, an alarm is issued and the data frame is discarded; if so, the data frame is received, and then the data frame is sent to the "switch forwarding scheduling model" according to the transmission requirements of various data frames at the MAC layer, and the received data flow interruption information is sent to the "switch forwarding scheduling model".

[0035] For RC data frames, it is necessary to add an operation to determine the frame interval time, that is, extract the BAG parameter corresponding to the VLID, calculate the arrival time difference of two adjacent data frames with the same VLID, and if the difference is greater than or equal to the BAG parameter value of the VLID, then receive and send the data frame to the "switch forwarding scheduling model", and send the "forwarding scheduling model" a reception data flow interruption information; if the difference is less than the BAG parameter value of the VLID, then issue an alarm and discard the data frame. If the data frame is the first data frame received for the corresponding VLID, then directly receive the data frame and send the data frame to the "switch forwarding scheduling model", and send the "switch forwarding scheduling model" a reception data flow interruption information.

[0036] For TT, PCF and BE data frames, when it is determined that their VLID is in the VLID information received by the switch, there is no need to perform frame interval judgment. The data frame is directly received and sent to the "switch forwarding scheduling model", and the received data flow interruption information is sent to the "switch forwarding scheduling model".

[0037] Switch forwarding scheduling model

[0038] The switch forwarding scheduling model sets 1 PCF receiving queue, M*N TT receiving queues, M RC receiving queues, and M BE receiving queues for each receiving port, where M is the number of switch sending ports and N is the number of TT data frames. The design is designed according to the packet buffer scheduling of VOQ in the switch cross switch, and effectively realizes the scheduling of different sending ports to different receiving ports. For the design of M*N TT receiving queues, the independence of the TT sending window and TT receiving window settings in the switch is guaranteed, and the mutual influence of TT data frames of different VLIDs is avoided in the model.

[0039] PCF frame: After clock synchronization compression, a compressed PCF frame is generated and sent at the configured time.

[0040] TT frame: Determine whether the receiving time of the TT frame is within the receiving window of the switch. If so, store it in the corresponding TT receiving queue according to the VLID number and the sending port number; if not, an alarm is issued and the frame is discarded.

[0041] The calculation process of the receiving queue number of the TT frame is as follows: first read the simulation configuration file, extract all the VLID numbers received by the switch and sort them, the sorting number is q, if the sending port number required by the TT data frame is m, then q*m is the TT receiving queue number stored by the VLID.

[0042] RC frame and BE frame: Since the priority of the RC frame is greater than that of the BE frame, the data frame is forwarded and scheduled.

[0043] The switch forwarding scheduling model realizes the forwarding scheduling function of various data frames and the switch clock synchronization function.

[0044] The switch forwarding scheduling model is based on the state transition of the state machine, such as Figure 6 The specific process is as follows:

[0045] State 1: First, enter the initialization state: read in clock synchronization parameters, initialize the parameters required for data scheduling, and read the routing information of the data in the simulation configuration file. According to the computer system time, initialize the local_clock local clock parameters, and enter the waiting state after the initialization is completed.

[0046] State 2: After receiving the "receive data flow interruption" sent by the "switch MAC layer model", it enters the "receive data frame" state from the "wait" state, and returns to the "wait" state after execution. The functions of the "receive data frame" state are as follows:

[0047] 1) Determine "data stream interruption" and obtain data frames in the receiving stream according to the interruption information. And determine the data frame type.

[0048] 2) If the received data frame is a TT data frame, determine whether the TT data frame is in the receive window of the switch. If it is in the receive window, calculate the receive queue sequence number and put the TT data frame in the TT receive queue. If it is not in the receive window, delete the data frame and generate an error message.

[0049] 3) If the received data frame is an RC / BE data frame, the sending port of the data frame is searched in the routing information and placed in the RC / BE receiving queue corresponding to the sending port.

[0050] 4) If the received data frame is a PCF data frame, the timing preservation algorithm is performed, and the frame is placed in the PCF receiving queue. The compression algorithm is started at the time cm_permanence_pit (configuration table read in), the compression time point is calculated, and the clock correction value is calculated and stored in the global variable.

[0051] 5) Set the interrupt for sending the compressed PCF data frame, and set the time to "compression time point + delay time" (specified in the TTFC protocol).

[0052] State 3: Periodic interrupt triggers the state from "waiting" to "updating local clock". After execution, it returns to "waiting". The functions implemented in the "updating local clock" state are as follows:

[0053] 1) Update the local_clock local clock according to the trigger period and the local time and clock correction value stored in the global variable.

[0054] 2) Determine whether there is a TT sending window at the current moment, query the VLID and sending port of the data frame, check whether there is a data frame in the corresponding TT receiving queue, if there is a data frame, set the "TT data frame interrupt" and record the TT receiving queue number in the interrupt. If there is no data frame, check whether there is a data frame to be sent in the RC / BE receiving queue.

[0055] The RC / BE data frame sending process is as follows:

[0056] In the forwarding scheduling model, 48 RC receive queues and 48 BE receive queues are designed for each receive port. 48 is the number of the switch's send ports, that is, the switch has a total of 48*48 RC receive queues and 48*48 BE receive queues. Figure 3As shown. In the order of the number of sending ports 1 to 48 and the order of the number of receiving ports 1 to 48, check whether there are data frames in the RC receiving queue of r*m (r∈{1,2,…48}, m∈{1,2,…48}). If there are data frames, send them to the corresponding sending port model, and set the corresponding sending port flag sw_s_idle_flag to 1, and set the corresponding receiving port flag sw_r_idle_flag to 1. Calculate the sending time required for the data frame, and the sending time is the frame length / sending rate. After the sending time, set the sending port flag sw_s_idle_flag and the corresponding receiving port flag sw_r_idle_flag to 0.

[0057] After sending an RC data frame, end the RC data frame sending and search the BE receiving queue. The method of searching the data frame of the BE receiving queue is similar to that of checking the RC data frame, that is, check whether there is a data frame in the BE receiving queue of r*m (r∈{1,2,…48}, m∈{1,2,…48}) in turn. If there is a data frame, send it to the corresponding sending port model, and set the corresponding sending port flag sw_s_idle_flag to 1, and set the corresponding receiving port flag sw_r_idle_flag to 1. Calculate the sending time required for the data frame, and the sending time is the frame length / sending rate. After the sending time, set the sending port flag sw_s_idle_flag and the corresponding receiving port flag sw_r_idle_flag to 0.

[0058] After sending a BE data frame, the BE data frame transmission ends and the state machine jumps from the "update local clock" state to the "wait" state.

[0059] State 4: When receiving the "send compressed PCF interrupt", enter the "send PCF data frame" state from the "wait" state. Generate a new compressed PCF frame based on the routing information of the PCF data frame and send it to each sending port. After execution, return to the "wait" state.

[0060] State 5: When receiving the "send TT data frame interrupt", enter the "send TT data frame" state from the waiting state. Get the TT receiving queue number stored in the "send TT data frame interrupt". Send the data frames in the TT receiving queue to the corresponding port according to the routing information.

[0061] 2. Terminal Model

[0062] The terminal model includes the application layer model, COM port model, terminal MAC layer model, terminal sending port model and terminal receiving port model, such as Figure 5 shown.

[0063] During the sending process: the application layer model generates data frames and sends them to the COM port model. The COM port model performs sampling / queuing and traffic control functions on the data frames and sends them to the terminal MAC layer model. The terminal MAC layer model implements the data frame VL configuration and clock synchronization functions, sends the data frames to the terminal sending port, and sends them to the switch model through the link.

[0064] During the receiving process: the terminal receiving port model receives the link data frame, sends it to the terminal MAC layer model for data frame verification, sends it to the COM port model for data frame delay statistics, and sends it to the application layer model for data frame destruction.

[0065] Application layer model

[0066] Generate data frame: Because it is a simulation model of TTFC network, the data frame format is generated according to the TTFC protocol. The application layer model obtains the terminal ID number of this terminal node, and uses the terminal ID to find the ID number of the message frame sent by the terminal, the length and period of the message frame, the sending application, and the configuration information of the receiving terminal. The sending time is generated according to the Poisson distribution, and the message frame is generated and sent. The message ID number, sending time, and receiving terminal information are stored in the message frame. The maximum length of the generated message frame specified by the application layer model support protocol is 2096 bytes.

[0067] Destroy data frame: When the application layer model receives the receive data frame interrupt information sent by the COM port model, the application layer model receives the data frame and destroys the data frame in a function manner to release the memory space of the frame.

[0068] COM port model

[0069] The COM port model implements data frame shaping and delay statistics. The COM port model reads the terminal ID number of the terminal node and obtains the configuration information of the COM port number and port type.

[0070] Data frame shaping: For the sent message frames, according to the port configuration information, the message frames are fragmented according to the sampling or queue modes to generate the corresponding data frames. Through the message ID and terminal ID, the simulation configuration file is searched to find the VL configuration information of the data frame, and the BAG parameter period is obtained. If the current data frame is greater than or equal to the BAG of the previous data frame sent, the frame is sent to the terminal MAC layer. If it is less than the BAG, wait until the BAG time before sending it to the MAC layer. When sending the data frame to the terminal MAC layer model, the "application layer data flow interruption" is sent to the terminal MAC layer model.

[0071] Delay statistics: For received data frames, count the time when the data frames are received. Extract the sending time in the data frame, make a difference between the receiving time and the sending time, match the data frame with the message frame, and obtain the delay statistics of each message frame.

[0072] Terminal MAC layer model

[0073] The terminal MAC layer model implements the sending and receiving functions of MAC layer data frames, as well as the clock synchronization management function.

[0074] Synchronous clock management: Generate, send and receive PCF frames according to the matrix cycle, and update the local clock according to the synchronization mechanism.

[0075] MAC layer message sending:

[0076] 1) PCF message sending: PCF frames are generated periodically and stored in the queue. PCF frames are sent periodically. If TT frames are currently being sent, an alarm is triggered. When the current link is idle, it is sent directly.

[0077] 2) TT message sending: Receive the COM port data frame and determine whether it is within the sending window configured by the TT frame. If it is, send it; if not, store it in the TT frame sending queue and send the data frame when the sending window arrives.

[0078] 3) RC message: When there is no PCF or TT message to be sent on the link, data is directly taken from the RC queue and sent.

[0079] 4) BE message: sent continuously when the PCF / TT / RC queues are all idle.

[0080] MAC layer message reception:

[0081] 1) PCF frame: After receiving the PCF frame, determine whether the current time is in the receiving window of the PCF frame. If not, alarm and discard it. Otherwise, participate in the time synchronization process. Do not participate in redundancy management.

[0082] 2) TT frame: Participate in redundancy management and receive window judgment. According to the first-come-first-served policy, receive the first-arrived data frame and discard the later-arrived data frame. After receiving the TT frame, determine whether it is in the configured receive window. If the data frame in the window is no longer received, an alarm is triggered and it is discarded. Normal data frames are sent to the COM port model.

[0083] 3) RC, BE: Participate in redundancy management, receive the first-arrived data frames according to the first-come-first-served policy, and discard the later-arrived data frames. For the received data frames, determine whether there are TT frames currently sent to the COM port model. If there are, store them in the corresponding RC / BE receiving queue, otherwise send them directly to the COM port model.

[0084] The OPNET software implementation of the terminal MAC layer model is based on the state transition of the state machine, such as Figure 7 The specific process is as follows:

[0085] State 1: First, enter the initialization state: read the clock synchronization parameters, initialize the MAC layer data transmission and data reception parameters. According to the computer system time, initialize the local_clock local clock parameters, and enter the waiting state after the initialization is completed.

[0086] State 2, MAC layer model designs four types of sending queues: PCF, TT, RC and BE. There is one PCF, RC and BE sending queue each, and the number of TT sending queues is N (N is the number of data frames sent by TT). After execution, it returns to the "waiting" state. After receiving the "application layer data flow interruption" given by the COM port model, it enters the "receiving application layer data frame" state from the "waiting" state. This state first performs data frame judgment, and then puts different types of data frames into the sending queue of each message type. When PCF, RC and BE data frames are received, they are directly placed in the corresponding type of sending queue. If a TT data frame is received, the VLID is obtained and stored in the corresponding TT frame sending queue.

[0087] The design of a PCF transmission queue, an RC transmission queue, a BE transmission queue, and N TT transmission queues (N is the number of TT frames) effectively implements the transmission of data frames with priority PCF>TT>RC>BE. The design of N TT transmission queues implements independent transmission of TT data frames of different VLIDs in different transmission time windows, with complementary interference.

[0088] State 3: After receiving the "Link Data Flow Interruption" sent by the terminal receiving port model, it enters the "Receiving Link Data Frame" state from the "Waiting" state, and returns to the "Waiting" state after execution. The functions of the "Receiving Link Data Frame" state are as follows:

[0089] 1) Determine whether the TT data frame is in the receiving window. If it is in the receiving window, put it into the TT receiving queue. If it is not in the receiving window, delete the data frame and generate an error message.

[0090] 2) Execute placing the RC / BE type data frames into the receiving queue of each message type.

[0091] 3) The terminal MAC layer model receives the PCF frame, performs the timing maintenance algorithm, completes the PCF frame collection at time smc_permanence_pit (configuration table read), selects the clock synchronization PCF frame according to the membership_new (configuration table read) field of the PCF data frame, calculates the clock synchronization deviation value, and stores it in the global variable smc_clock_corr_value.

[0092] State 4: Periodic interrupt triggers the state from "waiting" to "updating local clock". After execution, it returns to "waiting". The functions implemented in the "updating local clock" state are as follows:

[0093] 1) Update the local_clock local clock according to the interrupt trigger cycle and the deviation between the local time stored in the global variable and the synchronization time.

[0094] 2) At the time sm_dispatch_pit, sm_send_pit (configuration table read), the sending of the PCF frame is completed. This parameter is read from the configuration file.

[0095] 3) At time smc_clock_corr_pit (configuration table read), add local_clock local clock and smc_clock_corr_value to complete clock correction.

[0096] 4) When entering this state, all types of data frames must be sent / received according to the priority PCF>TT>RC>BE. First, determine whether the current moment is a TT send window, and whether the TT send queue of the VLID corresponding to the TT send window has data frames. If both are available, the data frames in the queue are sent to the send port model, and data flow interruption information is sent at the same time; then, determine whether the current moment is a TT receive window, and whether the TT receive queue of the VLID corresponding to the TT receive window has data frames. If both are available, the data frames in the queue are sent to the COM port model, and data flow interruption information is sent at the same time. If there is no schedulable TT send / receive data frame, schedule the data frames in the RC / BE send or receive queue.

[0097] Terminal send / receive port model

[0098] The model provides two redundant communication ports, each with a rate of 2.125 Gbps; it can be expanded to 4.25 Gbps.

[0099] It is understandable that those skilled in the art can make equivalent substitutions or changes based on the technical solution and inventive concept of the present invention, and all these changes or substitutions should fall within the protection scope of the claims attached to the present invention.

Claims

1. A simulation model system for TTFC message scheduling, including a switch model, a terminal model and a link model, and input files including a network simulation topology file and a simulation configuration file, in, The network simulation topology file and simulation configuration file are configured according to the real TTFC network. The simulation topology file contains the information of the terminal and the switch in the TTFC network and the link relationship between the terminal and the switch; the simulation configuration file contains the message attributes generated by the terminal, the terminal port attributes, the routing information of the data frame in the switch, and the clock synchronization attributes. The characteristic is that before running the simulation, according to the imported simulation topology file, the link model is used to connect the terminal model and the switch model, so as to construct the topology structure of the TTFC network simulation model; when running the simulation model, the switch model simulates the forwarding behavior of various types of data frames by reading the simulation configuration file, and the terminal model simulates the sending and receiving behavior of various types of data frames by reading the simulation configuration file; The switch model includes a switch receiving port model, a switch MAC layer model, a switch forwarding scheduling model and a switch sending port model; The number of receiving ports of the switch is set in the switch receiving port model. When the receiving port receives a data frame, a receiving data flow interruption message is sent to the switch MAC layer model. The switch MAC layer model first reads the simulation configuration file to obtain the VLID information and frame type information received by the switch model; when the switch MAC layer model receives the data flow interruption information from the "switch receiving port model", it receives the data frame and obtains the VLID of the data frame, and determines whether the VLID is in the obtained VLID received by the switch. If not, an alarm is issued and the data frame is discarded; if so, the data frame is received, and then the data frame is sent to the "forwarding scheduling model" according to the transmission requirements of various data frames at the MAC layer, and the received data flow interruption information is sent to the "switch forwarding scheduling model"; for the RC data frame, the RC is extracted The BAG parameter corresponding to the VLID of the data frame calculates the arrival time difference of two adjacent data frames with the same VLID. If the difference is greater than or equal to the BAG parameter value of the VLID, the data frame is received and sent to the "switch forwarding scheduling model", and the received data flow interruption information is sent to the "switch forwarding scheduling model"; if the difference is less than the BAG parameter value of the VLID, an alarm is issued and the data frame is discarded; if the data frame is the first data frame received for the corresponding VLID, the data frame is directly received and sent to the "switch forwarding scheduling model", and the received data flow interruption information is sent to the "switch forwarding scheduling model"; The switch forwarding scheduling model sets 1 PCF receiving queue, M*N TT receiving queues, M RC receiving queues, and M BE receiving queues for each receiving port, where M is the number of switch sending ports and N is the number of TT data frames; after receiving the receiving data flow interruption information of the "switch forwarding scheduling model", the data frame is placed in the corresponding receiving queue; the switch forwarding scheduling model is implemented based on the state transition of the state machine, and the specific process is as follows: State 1: First, enter the initialization state: read in the clock synchronization parameters, initialize the parameters required for data scheduling, read the routing information of the data in the simulation configuration file, initialize the local clock parameters of local_clock according to the computer system time, and enter the waiting state after the initialization is completed; State 2: After receiving the "receive data flow interruption" sent by the "switch MAC layer model", it enters the "receive data frame" state from the "wait" state, and returns to the "wait" state after execution; the functions of the "receive data frame" state are as follows: Determine "data stream interruption", obtain data frames in the receiving stream according to the interruption information, and determine the data frame type: If the received data frame is a TT data frame, determine whether the TT data frame is in the receiving window of the switch. If it is in the receiving window, calculate the receiving queue number and put the TT data frame in the TT receiving queue. If it is not in the receiving window, delete the data frame and generate an error message. If the received data frame is an RC / BE data frame, the sending port of the data frame is searched in the routing information and placed in the RC / BE receiving queue corresponding to the sending port; If the received data frame is a PCF data frame, the timing preservation algorithm is performed, and the frame is placed in the PCF receiving queue. The compression algorithm is started at the time cm_permanence_pit, and the compression time point is calculated. The clock correction value is calculated and stored in the global variable; the compressed PCF data frame sending interrupt is set, and the time is set to "compression time point + delay time"; State 3, periodic interrupt triggers the state from "waiting" to "updating local clock", and returns to "waiting" after execution; the functions implemented in the "updating local clock" state are as follows: 1) Update the local_clock local clock according to the trigger period and the local time and clock correction value stored in the global variable; 2) Determine whether there is a TT sending window at the current moment, query the VLID and sending port of the data frame, check whether there is a data frame in the corresponding TT receiving queue, if there is a data frame, set "TT data frame interrupt" and record the TT receiving queue number in the interrupt; if there is no data frame, check whether the RC / BE receiving queue has a data frame to be sent; The RC / BE data frame sending process is as follows: Check whether there is a data frame in each RC receiving queue. If there is a data frame, send it to the corresponding sending port model, and set the corresponding sending port flag sw_s_idle_flag to 1, and set the corresponding receiving port flag sw_r_idle_flag to 1; calculate the sending time required for the data frame, and set the sending port flag sw_s_idle_flag and the corresponding receiving port flag sw_r_idle_flag to 0 after the sending time; After sending an RC data frame, the RC data frame sending is terminated, and each BE receiving queue is checked for data frames. If there are data frames, they are sent to the corresponding sending port model, and the corresponding sending port flag sw_s_idle_flag is set to 1, and the corresponding receiving port flag sw_r_idle_flag is set to 1; the sending time required for the data frame is calculated, and after the sending time has passed, the sending port flag sw_s_idle_flag and the corresponding receiving port flag sw_r_idle_flag are set to 0; After sending a BE data frame, the BE data frame sending ends, and the state machine jumps from "update local clock" to "wait" state; State 4: When receiving the "send compressed PCF interrupt", it enters the "send PCF data frame" state from the "wait" state; generates a new compressed PCF frame according to the routing information of the PCF data frame, and sends it to each sending port, and returns to the "wait" state after execution; State 5: When receiving the "send TT data frame interrupt", enter the "send TT data frame" state from the waiting state; obtain the TT receiving queue number stored in the "send TT data frame interrupt"; send the data frame in the TT receiving queue to the corresponding port according to the routing information; The number of the switch's sending ports is set in the switch's sending port model, and the data frames in each receiving queue are transmitted to the link model through the sending port model.

2. A simulation model system for TTFC message scheduling according to claim 1, Features By setting the data frame types of the sending / receiving ports in the terminal model and the switch model to be consistent with the data frame types in the link model, the data frame can be transferred between the terminal model and the switch model.

3. A simulation model system for TTFC message scheduling according to claim 1, Features The terminal model includes the application layer model, the COM port model, the terminal MAC layer model, the terminal sending port model and the terminal receiving port model; In the sending process: the application layer model generates data frames and sends them to the COM port model. The COM port model performs sampling / queuing and traffic control functions on the data frames and sends them to the terminal MAC layer model. The terminal MAC layer model implements the data frame VL configuration and clock synchronization functions, sends the data frames to the terminal sending port, and sends them to the switch model through the link. During the receiving process: the terminal receiving port model receives the link data frame, sends it to the terminal MAC layer model for data frame verification, sends it to the COM port model for data frame delay statistics, and sends it to the application layer model for data frame destruction.

4. A simulation model system for TTFC message scheduling according to claim 3, Features When the application layer model generates a data frame, the application layer model obtains the terminal ID number of the terminal node, searches for the ID number of the message frame sent by the terminal, the length and period of the message frame, the sending application, and the configuration information of the receiving terminal through the terminal ID, generates the sending time according to the Poisson distribution, generates and sends the message frame; stores the message ID number, sending time, and receiving terminal information in the message frame; When destroying a data frame, after the application layer model receives the data frame receiving interrupt information sent by the COM port model, the application layer model receives the data frame and destroys the data frame in a function manner to release the memory space of the frame.

5. A simulation model system for TTFC message scheduling according to claim 3, Features The COM port model reads the terminal ID number of the terminal node and obtains the configuration information of the COM port number and port type; When performing data frame shaping, for the sent message frame, according to the port configuration information, the message frame is fragmented according to the sampling or queue mode to generate the corresponding data frame; through the message ID and terminal ID, the simulation configuration file is searched to find the VL configuration information of the data frame, and the BAG parameter period is obtained. If the current data frame is greater than or equal to the BAG of the previously sent data frame, the frame is sent to the terminal MAC layer model. If it is less than the BAG, wait until the BAG time before sending it to the MAC layer model; when sending the data frame to the terminal MAC layer model, "application layer data flow interruption" is sent to the terminal MAC layer model; When performing delay statistics, for the received data frames, the time of receiving the data frames is counted, the sending time in the data frames is extracted, the difference between the receiving time and the sending time is made, the data frames are matched with the message frames, and the delay statistics of each message frame are obtained.

6. A simulation model system for TTFC message scheduling according to claim 3, Features The terminal MAC layer model is implemented based on the state transition of the state machine. The specific process is as follows: State 1: First, enter the initialization state: read the clock synchronization parameters, initialize the MAC layer data transmission and data reception parameters; initialize the local clock parameters of local_clock according to the computer system time, and enter the waiting state after the initialization is completed; State 2: Design one PCF, RC and BE sending queue each, and the number of TT sending queues is N, where N is the number of TT sending data frames; after receiving the "application layer data flow interruption" given by the COM port model, enter the "receiving application layer data frame" state from the "waiting" state. This state first performs data frame judgment, and then puts different types of data frames into the sending queues of each message type; when PCF, RC and BE data frames are received, they are directly put into the corresponding type of sending queue. If a TT data frame is received, the VLID of the TT data frame is obtained and stored in the corresponding TT frame sending queue; State 3: After receiving the "link data flow interruption" sent by the terminal receiving port model, it enters the "receiving link data frame" state from the "waiting" state, and returns to the "waiting" state after execution; the functions of the "receiving link data frame" state are as follows: 1) Determine whether the TT data frame is in the receiving window. If it is in the receiving window, put it into the TT receiving queue. If it is not in the receiving window, delete the data frame and generate an error message; 2) Put the RC / BE type data frame into the receiving queue of each message type; 3) The terminal MAC layer model receives the PCF frame, performs the timing maintenance algorithm, completes the PCF frame collection at time smc_permanence_pit, selects the clock synchronization PCF frame according to the membership_new field of the PCF data frame, calculates the clock synchronization deviation value, and stores it in the global variable smc_clock_corr_value; State 4: Periodic interrupt triggers the state from "waiting" to "updating local clock", and returns to "waiting" after execution; the functions implemented in the "updating local clock" state are as follows: 1) Update the local_clock local clock according to the interrupt trigger cycle and the deviation between the local time stored in the global variable and the synchronization time; 2) At time sm_dispatch_pit and sm_send_pit, the sending of the PCF frame is completed. This parameter is read from the simulation configuration file; 3) At time smc_clock_corr_pit, add local_clock to smc_clock_corr_value to complete clock correction; 4) According to the priority PCF>TT>RC>BE, execute sending / receiving of various data frames; first, determine whether the current moment is the TT sending window, and whether the TT sending queue of the VLID corresponding to the TT sending window has data frames. If both are met, the data frames in the queue are sent to the sending port model, and the data flow interruption information is sent at the same time; then, determine whether the current moment is the TT receiving window, and whether the TT receiving queue of the VLID corresponding to the TT receiving window has data frames. If both are met, the data frames in the queue are sent to the COM port model, and the data flow interruption information is sent at the same time. If there is no schedulable TT sending / receiving data frame, schedule the data frames of the RC / BE sending or receiving queue.

Citation Information

Patent Citations

  • Time-triggered Ethernet simulation system

    CN109150559A

  • Task scheduling model of TTFC network and message scheduling table generation method

    CN111030835A