Virtual flow generator device oriented to network switching unit

By designing a virtual traffic generator device for network switching units, the integration problems and insufficient timing control capabilities in the ESL simulation environment are solved, efficient and accurate network traffic simulation is achieved, and the authenticity and effectiveness of simulation tests are improved.

CN120075104AActive Publication Date: 2025-05-30XIDIAN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510156223.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-05-30
Estimated Expiration
2045-02-12

AI Technical Summary

Technical Problem

The prior art is difficult to effectively integrate in the ESL simulation environment, lacks precise timing control capabilities, and it is difficult to simulate packet burst traffic and precise bandwidth requirements in specific network scenarios, which limits the testing capabilities of network switching units in complex network environments.

Method used

A virtual traffic generator device for network switching units is designed, including a clock-driven scheduler, an XML configuration parsing module, a traffic generation module, a queue management module and a statistical module, which supports real excitation mode and a generative excitation mode, and accurately realizes traffic simulation through timestamp management and rate control mechanisms (such as token bucket algorithm).

Benefits of technology

Efficiently and accurately simulate various complex network traffic scenarios in the ESL simulation environment, improve the authenticity and effectiveness of simulation tests, can simulate packet burst traffic and precise bandwidth requirements in specific network scenarios, and support a variety of network protocols and traffic modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075104A_ABST
    Figure CN120075104A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual flow generator device oriented to a network switching unit. The virtual flow generator device comprises a clock driving scheduler, an XML (Extensible Markup Language) configuration analysis module, a flow generation module, a queue management module and a statistics module, the method has the capabilities of analyzing real network data packets and generating random data packets conforming to various network protocol specifications, and has high flexibility. In this way, various complex network traffic scenes can be efficiently and accurately simulated in the ESL simulation environment, and the authenticity and effectiveness of simulation testing are improved. Meanwhile, through a timestamp management and rate control mechanism, data packet burst flow and accurate bandwidth requirements in a specific network scene can be simulated. The method supports two modes: in a real excitation mode, a data packet captured by an actual network can be reproduced, and the method is suitable for regression testing and reproduction of a specific scene; and in the generative excitation mode, a user can customize a flow model according to requirements, and pressure testing, boundary condition testing and the like can be carried out.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of electronic design automation, and particularly relates to a virtual traffic generator device for a network switching unit. Background Art

[0002] With the increasing complexity and functional requirements of network switching units, the requirements for performance and reliability are also getting higher and higher. With the continuous increase in throughput requirements, the architecture design of network switching chips is becoming more and more complex. The continuous optimization of the power consumption performance and area (PPA) indicators of the chips poses a strict challenge to the design and development cycle. More and more PPA indicators need to be analyzed, verified, and optimized in the early stage of design, such as the ESL design stage. This requires that in the architecture-level design and verification stage of network switching processors, tests of packet types and different packet characteristics as close as possible to the real working scenario need to be carried out to verify their performance indicators and power consumption characteristics. Currently, there is still a lack of tools for analyzing packet flow characteristics in the architecture-level design stage. Traditional traffic analysis devices based on hardware equipment are costly, complex to configure, lack flexibility, and are difficult to be seamlessly integrated with the ESL simulation environment.

[0003] In architecture-level design, as the core upstream module of a network switching unit, the traffic generator undertakes the key task of generating and scheduling data streams to simulate real network traffic and load conditions. The existing traffic generator technologies mainly focus on the following aspects:

[0004] 1. Hardware solutions:

[0005] Hardware traffic generators usually use dedicated hardware devices to generate and send high-speed data packets through high-performance network interface cards (NICs) and dedicated circuits. Devices such as Spirent TestCenter and IXIA IxNetwork, based on hardware-level parallel processing, can efficiently generate large-scale and complex network traffic through pre-configured traffic templates and protocol stacks, supporting multiple protocols and traffic patterns. As a leading traffic generation and testing platform in the industry, Spirent TestCenter supports multiple network protocols, can generate various traffic patterns in a real network environment, supports multiple speeds (1Gbps to 400Gbps), and is widely used in the performance testing and verification of network devices. The IxNetwork platform provided by IXIA also has powerful traffic generation and analysis capabilities, supports multiple network protocols and complex traffic patterns, and is suitable for the performance evaluation and verification of network switching devices. However, the cost of hardware traffic generators is relatively high, mainly used for the performance testing of physical network devices, and it is difficult to be applied in the early architecture-level simulation stage. Existing hardware traffic generators such as Spirent TestCenter and IXIA IxNetwork are expensive, resulting in limited applications in the early design stage. Their dedicated hardware also makes it difficult to seamlessly integrate with the ESL simulation environment, increasing the complexity and time cost of system integration and restricting their flexible application in architecture-level design and verification.

[0006] 2. Software solutions:

[0007] Software traffic generators usually rely on general computing platforms to generate and send network traffic through software algorithms on operating systems. These tools utilize multi-threaded or distributed architectures to fully utilize the bandwidth of multi-core processors and network interfaces, enabling parallel generation and sending of traffic. Typical software traffic generators include iperf, Ostinato, and Mausezahn, etc. These tools usually have high flexibility and configurability, allowing users to customize traffic patterns and protocol types according to their needs.

[0008] iperf is an open-source network performance testing tool mainly used to measure network bandwidth performance under TCP and UDP protocols. By establishing a connection between the client and the server, iperf generates continuous data streams to evaluate network throughput, latency, and packet loss rate, and is suitable for basic bandwidth testing and network performance diagnosis. However, iperf is relatively limited in generating complex traffic patterns and supporting multiple protocols, mainly focusing on simple transmission performance evaluation.

[0009] Ostinato provides a powerful graphical user interface (GUI) that allows users to customize and configure traffic templates for various protocols through intuitive operations. Users can combine multi-layer protocols such as Ethernet, IPv4 / IPv6, TCP / UDP, etc. in Ostinato to flexibly generate network packets that meet their requirements, which is suitable for functional testing of network devices and protocol verification. It supports scripting functions, and users can implement automated traffic generation and control through languages such as Python, greatly improving the efficiency and flexibility of testing. However, the traffic generation rate of Ostinato depends on the hardware performance of the running host and may be limited in high-throughput scenarios.

[0010] As a traffic generation tool with a command-line interface, Mausezahn is known for its high flexibility and powerful customization capabilities. Through command-line parameters and configuration files, Mausezahn allows users to precisely control the attributes of the generated packets, including protocol type, packet length, sending rate, etc., which is suitable for network security testing, protocol vulnerability scanning, and in-depth protocol analysis. It supports the generation of packets for multiple protocols and can generate complex and customized traffic patterns, which is suitable for advanced network testing and security research. However, as a command-line tool, Mausezahn has relatively high requirements for users' operations and a relatively high usage threshold, and is not as intuitive and friendly as Ostinato.

[0011] Although iperf, Ostinato, and Mausezahn perform well in terms of flexibility and configurability, they still have certain limitations in high-throughput, low-latency requirements, and integration with electronic system level (ESL) simulation environments. When dealing with complex traffic patterns and multi-protocol support, these tools often rely on powerful host hardware performance and lack targeted optimization for seamless integration with the simulation environment. Existing software traffic generators such as iperf, Ostinato, and Mausezahn, although performing well in terms of flexibility and configurability, have significant deficiencies in meeting high-precision and high-performance simulation environments. First of all, these tools are difficult to maintain a stable traffic generation rate in high-throughput and low-latency scenarios, resulting in the inability to accurately simulate the real performance of network switching units under high-load conditions. In addition, these software tools lack in-depth optimization integration with the ESL simulation environment and cannot achieve precise synchronization with the ESL simulation clock and coordination of the event trigger mechanism. This lack of optimized integration method not only affects the efficiency and accuracy of simulation testing but also limits its application in complex simulation scenarios such as multi-protocol support and high-concurrency traffic simulation, and cannot meet the requirements of precise timing control and multi-mode traffic generation.

[0012] 3. Virtualization-based packet sending solution:

[0013] With the development of network function virtualization (NFV), traffic generation solutions based on virtual machines or containers have gradually emerged. Such solutions use high-performance data plane acceleration libraries (such as DPDK) to achieve high-speed packet generation and processing, and are suitable for emulating large-scale network traffic. For example, Spirent TestCenter Virtual (STCv) extends the powerful capabilities of the Spirent TestCenter physical test platform to virtualized and cloud environments. STCv can generate and analyze various types of network traffic at L2-7 layers, and use technologies such as DPDK to achieve high-precision and high-performance traffic simulation, with a latency measurement accuracy of up to 2.5 nanoseconds. STCv can be tightly integrated with EDA simulators (such as Synopsys Zebu, Cadence Palladium, and Siemens Veloce). In this integrated mode, STCv acts as a virtual traffic generator, synchronized with the EDA simulation clock, provides accurate and realistic stimulus for the chip design under test, and analyzes its response in real time.

[0014] However, although STCv can be tightly integrated with EDA simulators, there are some gaps between it and the more abstract ESL simulation environment. This is mainly reflected in the following aspects: first, STCv is mainly optimized for specific EDA simulators, and its interfaces and communication protocols may be incompatible with other ESL simulation tools, resulting in complex and costly integration between different simulation platforms. Second, when dealing with large-scale and diverse traffic scenarios, STCv's configuration and management methods are relatively rigid and lack flexibility, making it difficult to meet rapidly changing simulation requirements. In addition, although STCv has high-precision delay measurement capabilities, there are still certain delays and errors in the clock synchronization and event triggering mechanism with the ESL simulation environment, which affects the accuracy and real-time performance of the simulation results. These limitations make it difficult for existing traffic generation solutions based on virtual machines or containers to fully meet the simulation requirements of network switching units in complex traffic and high concurrency scenarios. Virtualization-based traffic generation solutions such as SpirentTestCenter Virtual are insufficient in terms of compatibility and flexibility. These solutions are usually optimized for specific EDA simulators and are difficult to be compatible with other ESL tools, increasing integration complexity and cost.

[0015] As can be seen from the above analysis, the existing virtual traffic generator technology has significant limitations in the ESL-level simulation environment. Specifically, the existing hardware and software traffic generators are difficult to achieve seamless integration with the ESL simulation environment, resulting in low efficiency when conducting simulation tests on network switching units. In addition, current traffic generators generally lack precise timing control capabilities and are difficult to simulate packet burst traffic and precise bandwidth requirements in specific network scenarios, thus directly affecting the accuracy and authenticity of simulation results. Although software packet sending tools have improved in flexibility, they still have deficiencies in generating traffic that meets actual network conditions, restricting the testing capabilities of network switching units in complex network environments. The virtualization-based packet sending solution, although achieving high-speed packet generation and processing, still has significant integration problems in interface development, data format conversion, and the packet sending process, and is difficult to effectively integrate with the ESL simulation environment. Summary of the Invention

[0016] To solve the above problems existing in the prior art, the present invention provides a virtual traffic generator device for a network switching unit. The technical problems to be solved by the present invention are realized through the following technical solutions:

[0017] The present invention provides a virtual traffic generator device for a network switching unit, including:

[0018] A clock-driven scheduler, an XML configuration parsing module, a traffic generation module, a queue management module, and a statistics module; wherein,

[0019] The clock-driven scheduler is used to control the working order of each module in the virtual traffic generator device;

[0020] The XML configuration parsing module is used to read and parse an external XML configuration file under the control of the clock-driven scheduler, obtain the configuration information corresponding to each module, and send the obtained configuration information to the corresponding modules;

[0021] The traffic generation module includes two traffic generation modes, and is used to select the corresponding traffic generation mode according to the received configuration information under the control of the clock-driven scheduler, generate network packets that meet the characteristics based on an external stimulus source file, and add the network packets to the send queue of the target port; wherein, the traffic generation modes include: a real stimulus mode and a generative stimulus mode;

[0022] The queue management module is used to send network packets to an external ESL model through the target port based on the token bucket algorithm of the negative token mechanism according to the received configuration information under the control of the clock-driven scheduler;

[0023] The statistical module is used to control the output level, storage path, and recording period of the logs of the virtual traffic generator device according to the configuration information received by itself under the control of the clock-driven scheduler.

[0024] In an embodiment of the present invention, the configuration information corresponding to each module includes:

[0025] Global configuration information, port configuration information, real incentive mode configuration information, generative incentive mode configuration information, and log configuration information.

[0026] In an embodiment of the present invention, the XML configuration parsing module reads and parses an external XML configuration file to obtain the configuration information corresponding to each module, and sends the obtained configuration information to the corresponding modules, including:

[0027] The XML configuration parsing module reads the external XML configuration file from the specified path, and obtains and stores all the content of the XML configuration file;

[0028] Parse the global configuration information in the XML configuration file to initialize the simulation environment;

[0029] Parse the port configuration information in the XML configuration file, and send the port configuration information to the queue management module;

[0030] According to the port configuration information corresponding to each port, parse the real incentive mode configuration information and / or generative incentive mode configuration information as traffic configuration information, and send the traffic configuration information to the traffic generation module;

[0031] Parse the log configuration information in the XML configuration file, and send the log configuration information to the statistical module.

[0032] In an embodiment of the present invention, the traffic generation module includes a real incentive module and a generative incentive module.

[0033] In an embodiment of the present invention, the traffic generation module selects a corresponding traffic generation mode according to the configuration information received by itself, generates network data packets that conform to the characteristics based on an external incentive source file, and adds the network data packets to the send queue of the target port, including:

[0034] The traffic generation module judges the configuration information received by itself:

[0035] If the configuration information received by itself is the real incentive mode configuration information, select the real incentive mode, generate network data packets that conform to the characteristics of the real incentive mode based on the external incentive source file, and add the network data packets to the send queue of the target port;

[0036] If the received configuration information is generative incentive mode configuration information, select the generative incentive mode, generate network data packets conforming to the characteristics of the generative incentive mode according to the generative incentive mode configuration information, and add the network data packets to the transmission queue of the target port.

[0037] In an embodiment of the present invention, the traffic generation module selects the real incentive mode according to the real incentive mode configuration information, generates network data packets conforming to the characteristics of the real incentive mode based on an external incentive source file, and adds the network data packets to the transmission queue of the target port, including:

[0038] The traffic generation module reads an external incentive source file according to the real incentive mode configuration information; the incentive source file includes original data frames captured in the network, where each original data frame includes header information of the network protocol stack and payload data; each original data frame also includes a timestamp;

[0039] When reading a frame of original data frame from the incentive source file, the traffic generation module creates a new packet object of the Packet class;

[0040] Send the read original data frame to the XML configuration parsing module for parsing, and layer by layer extract the header information and payload data of each layer protocol;

[0041] Read the timestamp of the original data frame from the incentive source file and store the timestamp in the packet object;

[0042] The traffic generation module stores the parsed header information, payload, and timestamp information of each layer protocol in the packet object to obtain network data packets conforming to the characteristics of the real incentive mode;

[0043] The traffic generation module adds the network data packets conforming to the characteristics of the real incentive mode to the transmission queue corresponding to the target port.

[0044] In an embodiment of the present invention, sending the read original data frame to the XML configuration parsing module for parsing, and layer by layer extracting the header information and payload data of each layer protocol, includes:

[0045] The XML configuration parsing module parses the Ethernet header, network layer header, and transport layer header in the original data frame, and layer by layer extracts the header information and payload data of each layer protocol.

[0046] In one embodiment of the present invention, the traffic generation module selects a generative incentive mode according to the generative incentive mode configuration information, generates network data packets conforming to the characteristics of the generative incentive mode according to the generative incentive mode configuration information, and adds the network data packets to the transmission queue of the target port, including:

[0047] The traffic generation module extracts user-defined flow template attributes according to the generative incentive mode configuration information;

[0048] Instantiate a data packet object according to the flow template attributes;

[0049] Dynamically generate the length of the current data packet according to the packet length distribution strategy in the flow template attributes;

[0050] Based on the transmission rate in the flow template attributes, perform rate control using the token bucket algorithm;

[0051] Set the transmission delay of the current data packet according to the transmission delay type in the flow template attributes;

[0052] According to the protocol type in the generative incentive mode configuration information, sequentially generate the field parameters of the protocol headers of each layer;

[0053] Generate the payload content of the data packet according to the payload type set in the flow template attributes;

[0054] Encapsulate the field parameters of the protocol headers of each layer and the payload content of the data packet according to the preset protocol type and specifications;

[0055] Write the encapsulated protocol headers, payload content, and generated timestamp information into the data packet object to obtain a network data packet conforming to the characteristics of the generative incentive mode;

[0056] Add the network data packet conforming to the characteristics of the generative incentive mode to the transmission queue of the target port.

[0057] In one embodiment of the present invention, the field parameters of the protocol headers of each layer include:

[0058] MAC address, IP address, port number, and TCP flag bits.

[0059] In one embodiment of the present invention, the queue management module sends network data packets to an external ESL model through a target port based on the token bucket algorithm of the negative token mechanism according to the configuration information received by itself, including:

[0060] Under the control of the clock-driven scheduler, the queue management module caches network data packets to be sent, and controls the sending rate of each network data packet based on the token bucket algorithm of the negative token mechanism according to the configuration information received by itself, and sends the network data packets to the external ESL model through the target port.

[0061] Advantages of the present invention:

[0062] In the solution provided by the present invention, the virtual traffic generator device has the ability to parse real network data packets and generate random data packets that conform to various network protocol specifications, and has a high degree of flexibility. This enables efficient and accurate simulation of various complex network traffic scenarios in the ESL simulation environment, improving the authenticity and effectiveness of simulation tests. At the same time, through the timestamp management and rate control mechanism (such as the token bucket algorithm), it is possible to simulate the burst traffic of data packets and the precise bandwidth requirements in a specific network scenario. The present invention supports the real incentive mode and the generative incentive mode. In the real incentive mode, the data packets captured in the actual network can be reproduced, which is suitable for regression testing and the reproduction of specific scenarios; while in the generative incentive mode, users can customize the traffic model according to their needs for stress testing, boundary condition testing, etc. This multi-mode incentive generation method enables users to flexibly select the appropriate incentive source and efficiently complete the simulation of various test scenarios. Description of the drawings

[0063] Figure 1 It is a schematic structural diagram of a virtual traffic generator device for a network switching unit provided by an embodiment of the present invention;

[0064] Figure 2 It is a schematic configuration process diagram of a virtual traffic generator device provided by an embodiment of the present invention;

[0065] Figure 3 It is a schematic structural diagram of a traffic generation module of a virtual traffic generator device provided by an embodiment of the present invention;

[0066] Figure 4 It is a schematic working process diagram of a virtual traffic generator device in the real incentive mode provided by an embodiment of the present invention;

[0067] Figure 5 It is a schematic working process diagram of a virtual traffic generator device in the generative incentive mode provided by an embodiment of the present invention;

[0068] Figure 6 It is a schematic structural diagram of a queue management module of a virtual traffic generator device provided by an embodiment of the present invention;

[0069] Figure 7Flowchart of the token bucket algorithm based on the negative token mechanism in a virtual traffic generator device provided by an embodiment of the present invention;

[0070] Figure 8 Simulation architecture diagram of a traffic generator of a four-port cross-node routing module provided by an embodiment of the present invention. Specific embodiments

[0071] The following further describes the present invention in detail with specific embodiments, but the implementation manners of the present invention are not limited thereto.

[0072] Embodiment 1

[0073] An embodiment of the present invention provides a virtual traffic generator device for a network switching unit, as Figure 1 shown, which may include:

[0074] A clock-driven scheduler, an XML configuration parsing module, a traffic generation module, a queue management module, and a statistics module; wherein,

[0075] The clock-driven scheduler is used to control the working order of each module in the virtual traffic generator device;

[0076] The XML configuration parsing module is used to read and parse an external XML configuration file under the control of the clock-driven scheduler to obtain the configuration information corresponding to each module, and send the obtained configuration information to the corresponding modules;

[0077] The traffic generation module includes two traffic generation modes, and is used to select a corresponding traffic generation mode according to the configuration information received by itself under the control of the clock-driven scheduler, generate network data packets that meet the characteristics based on an external excitation source file, and add the network data packets to the send queue of the target port; wherein, the traffic generation modes include: a real excitation mode and a generative excitation mode;

[0078] The queue management module is used to send the network data packets to an external ESL model through the target port based on the token bucket algorithm based on the negative token mechanism according to the configuration information received by itself under the control of the clock-driven scheduler;

[0079] The statistics module is used to control the output level, storage path, and recording period of the log of the virtual traffic generator device according to the configuration information received by itself under the control of the clock-driven scheduler.

[0080] The virtual traffic generator device proposed in the embodiments of the present invention aims to provide flexible, efficient, and realistic traffic input for the architecture-level simulation of network switching units. The device is developed based on the C++ / SystemC language and consists of multiple collaborating modules that work together under the control of a clock-driven scheduler and coordinate the execution order of each module:

[0081] First, after the XML configuration parsing module reads and parses the configuration information from an external XML configuration file, it passes the running parameters to each module, and the traffic generation process officially begins. The traffic generation module generates network data packets that meet the characteristics according to the configuration information. This module includes a real incentive module and a generative incentive module, which are responsible for parsing the real incentive source file and generating custom traffic respectively, and adding the data packets to the send queue of the target port. Finally, the queue management module is responsible for managing the send queue of each port, caching the data packets to be sent, and controlling the sending rate of the data packets through the token bucket algorithm based on the negative token mechanism according to the configured rate, and sending the data packets to the target port for forwarding to the external ESL model.

[0082] Through the collaborative work of these modules, various network traffic scenarios are simulated efficiently, flexibly, and realistically, thereby providing traffic support for the architecture-level simulation of network switching units.

[0083] For ease of understanding, each module of the virtual traffic generator device proposed in the embodiments of the present invention will be introduced separately below.

[0084] Clock-driven scheduler

[0085] As the core of the entire system, the clock-driven scheduler uses the sc_clock and sc_event mechanisms of SystemC and combines the scheduling method declared by SC_METHOD to provide a unified simulation time reference for the operation of all modules and coordinate the execution order of each module. It realizes clock synchronization and event triggering with the ESL simulation environment through the SystemC interface, ensures the accurate timestamp of data packet forwarding, and is applicable to the traffic input requirements of various network switching units in architecture-level verification.

[0086] XML configuration parsing module

[0087] Under the control of the clock-driven scheduler, the XML configuration parsing module reads and parses the external XML configuration file to obtain the configuration information corresponding to each module, and sends the obtained configuration information to the corresponding modules.

[0088] Specifically, in order to achieve flexible control of the network traffic generation process and meet various simulation requirements, the traffic generator device of the present invention adopts an external XML configuration file. This configuration file not only clearly defines the various operating parameters of the traffic generator, but also allows the user to flexibly adjust these parameters according to different simulation scenarios. In order to efficiently utilize this configuration information, a special configuration parsing module is designed. The main task of this module is to read, parse and manage external XML configuration files, and accurately pass the configuration information to various modules of the traffic generator.

[0089] The core function of the configuration parsing module is to convert the structured information in the XML configuration file into a format that can be understood and used by various modules inside the traffic generator. This module parses the configuration items of the XML file item by item and stores them into a data structure in memory for subsequent use.

[0090] Table 1 is a parameter description table of the traffic generator XML configuration file. To ensure the correctness and stability of the simulation environment, the XML configuration file defines the global parameters of the simulation and contains the parameter configuration of each port to achieve directional traffic transmission and support multiple port modes. In addition, to meet the traffic generation requirements of different simulation scenarios, the configuration file also defines the parameters of real stimulus and generative stimulus, and sets the properties of the generated data packets in detail through the flow template to achieve flexible traffic configuration. Finally, the XML configuration file contains log output parameters to control the output level, storage path and recording period of the log, so as to facilitate the analysis of the results during the simulation process.

[0091] Table 1 is a parameter description table of the traffic generator XML configuration file

[0092]

[0093] When configuring the virtual traffic generator device, the configuration flow chart is as follows: Figure 2 The steps shown below are carried out to ensure that the modules can cooperate in an orderly manner:

[0094] The XML configuration parsing module reads and parses the external XML configuration file to obtain the configuration information corresponding to each module, and sends the obtained configuration information to the corresponding modules, which may include:

[0095] S01, the XML configuration parsing module reads an external XML configuration file from a specified path, obtains and stores the entire content of the XML configuration file;

[0096] S02, parsing the global configuration information in the XML configuration file and initializing the simulation environment;

[0097] S03, parsing the port configuration information in the XML configuration file, and sending the port configuration information to the queue management module;

[0098] S04. According to the port configuration information corresponding to each port, parse the real incentive mode configuration information and / or the generative incentive mode configuration information as traffic configuration information, and send the traffic configuration information to the traffic generation module;

[0099] S05. Parse the log configuration information in the XML configuration file and send the log configuration information to the statistics module to control the log output ability.

[0100] Regarding S03, it can be understood that since the incentive mode selection for each port is independent and directly affects the subsequent incentive configuration process, after the global configuration is parsed, the port configuration information in the XML configuration file will be preferentially read and parsed. The configuration parsing module will pass parameters such as the port mode and flow template binding to the queue management module, thereby configuring the working mode of the port and traffic binding.

[0101] Regarding S04, after the port configuration is parsed, the configuration parsing module will specifically read and parse the real incentive configuration or the generative incentive configuration according to the configuration information of each port. It supports independent and hybrid incentive modes and passes this information to the traffic generation module.

[0102] Through the above steps S01 - S05, the XML configuration parsing module realizes the accurate reading, parsing, and distribution of the configuration information, and ensures the transmission order and dependency relationship of the configuration information. Based on the flexible parameter management and dynamic configuration method of the external XML configuration file, the configuration is decoupled from the core code, supporting the dynamic update of parameters and user customization, including but not limited to the number of ports, simulation clock frequency, port mode, real / generative incentive mode configuration, log level, etc.

[0103] Traffic generation module

[0104] The traffic generation module is one of the core components of the virtual traffic generator device proposed in the embodiment of the present invention, responsible for generating network data packets that meet the characteristics according to the user configuration and adding them to the send queue of the target port. The traffic generation module is as Figure 3 shown and may include: a real incentive module and a generative incentive module, corresponding to two different traffic generation modes respectively. The former restores the traffic characteristics of the real network, and the latter endows the user with the ability to freely define the traffic model, thereby providing support for the architecture-level simulation test of various network switching units.

[0105] The traffic generation module proposed in the embodiments of the present invention supports a dual-mode traffic generation technology that combines the real incentive mode and the generative incentive mode, taking into account the restoration of real network traffic and the flexibility of custom traffic. By parsing real network traffic and generating custom traffic according to user configurations, it meets the traffic requirements of different simulation scenarios.

[0106] The traffic generation module selects the corresponding traffic generation mode according to the configuration information it receives, generates network data packets that conform to the characteristics based on an external incentive source file, and adds the network data packets to the send queue of the target port, which may include:

[0107] The traffic generation module judges the configuration information it receives:

[0108] If the configuration information received by itself is real incentive mode configuration information, it selects the real incentive mode, generates network data packets that conform to the characteristics of the real incentive mode based on an external incentive source file, and adds the network data packets to the send queue of the target port;

[0109] If the configuration information received by itself is generative incentive mode configuration information, it selects the generative incentive mode, generates network data packets that conform to the characteristics of the generative incentive mode according to the generative incentive mode configuration information, and adds the network data packets to the send queue of the target port.

[0110] Real Incentive Module

[0111] In a real network environment, traffic usually exhibits complex characteristics and patterns. To accurately reproduce these characteristics in a simulation environment, a real incentive mode is proposed, aiming to restore the characteristics of real network traffic to the greatest extent. This mode reads a pre-captured real network traffic data file (such as a pcap file), uses a protocol parsing module to extract key information, and sends it to the simulation environment in sequence according to the timestamp information. This mode is applicable to simulation tasks that require high-fidelity traffic input, such as simulating specific network scenarios, conducting regression tests, or reproducing faults.

[0112] The traffic generation module selects the real incentive mode according to the real incentive mode configuration information, generates network data packets that conform to the characteristics of the real incentive mode based on an external incentive source file, and adds the network data packets to the send queue of the target port, as Figure 4 shown, which may include:

[0113] S11. The traffic generation module reads the external incentive source file according to the real incentive mode configuration information. The incentive source file includes the original data frames captured in the network. Each original data frame includes the header information of the network protocol stack and the payload data. Each original data frame also includes a timestamp. When the external incentive source file is a pcap file, the pcap format specification needs to be followed during the reading process, and the timestamp represents the capture moment.

[0114] S12. When reading a frame of original data frame from the incentive source file, the traffic generation module creates a new packet object of the Packet class. The created packet object of the Packet class can be used to store the information parsed from the data frame.

[0115] S13. Send the read original data frame to the XML configuration parsing module for parsing, and layer by layer extract the header information and payload data of each layer protocol, which may include:

[0116] The XML configuration parsing module parses the Ethernet header, network layer header, and transport layer header in the original data frame, and layer by layer extracts the header information and payload data of each layer protocol.

[0117] Among them, the Ethernet header may include: destination MAC address, source MAC address, and EtherType field. The network layer header may include: source / destination IP address and protocol type of IPv4 or IPv6 protocol. The transport layer header may include: source / destination port, sequence number of TCP or UDP protocol.

[0118] S14. Read the timestamp of the original data frame from the incentive source file and store the timestamp in the packet object.

[0119] S15. The traffic generation module stores the parsed header information of each layer protocol, payload, and timestamp information into the packet object to obtain a network packet that conforms to the characteristics of the real incentive mode.

[0120] S16. The traffic generation module adds the network packet that conforms to the characteristics of the real incentive mode to the send queue corresponding to the target port and waits for send scheduling.

[0121] It can be understood that the generation process of the real incentive mode in the embodiment of the present invention further includes reading the capture file from the specified path and performing basic verification, hierarchically parsing the headers of each protocol layer, aligning and sending scheduling based on the original timestamp and the SystemC simulation clock, and discarding or alarming when parsing abnormal data. By decoding the captured data in multiple layers and retaining the time information, the simulation environment can reproduce the real network load situation according to the capture order and rate, ensuring the accuracy and consistency of the test.

[0122] Generative Incentive Mode

[0123] In the architecture-level design phase of network switching units, it is crucial to use ESL models for rapid verification. To efficiently verify the correctness and performance of ESL models and cover various possible scenarios, the present invention introduces a generative incentive mode. Different from the real incentive mode that relies on pre-captured traffic data, the generative incentive mode allows users to flexibly define flow templates according to the verification requirements of ESL models, thereby quickly generating various types of network traffic.

[0124] The traffic generation module selects the generative incentive mode according to the generative incentive mode configuration information, generates network data packets that conform to the characteristics of the generative incentive mode according to the generative incentive mode configuration information, and adds the network data packets to the transmission queue of the target port. As Figure 5 shown, it may include:

[0125] S21, the traffic generation module extracts the user-defined flow template attributes according to the generative incentive mode configuration information;

[0126] S22, instantiate a data packet object according to the flow template attributes; the obtained data packet object can be used to store the protocol headers, payloads, and timestamps of the data packets to be generated at each layer.

[0127] S23, dynamically generate the length of the current data packet according to the packet length distribution strategy in the flow template attributes; to ensure that the traffic characteristics meet the configuration requirements.

[0128] S24, perform rate control using the token bucket algorithm based on the transmission rate in the flow template attributes; this process is responsible for the queue management module to achieve precise traffic regulation.

[0129] S25, set the transmission delay of the current data packet according to the transmission delay type in the flow template attributes; to simulate the transmission delay in the real network.

[0130] S26, sequentially generate the field parameters of the protocol headers at each layer according to the protocol type in the generative incentive mode configuration information; to ensure the integrity of the protocol stack of the data packet. Among them, the field parameters of the protocol headers at each layer may include: MAC address, IP address, port number, and TCP flag bits.

[0131] S27, generate the payload content of the data packet according to the payload type set in the flow template attributes; to meet different test requirements.

[0132] S28, encapsulate the field parameters of the protocol headers at each layer and the payload content of the data packet according to the preset protocol type and specifications;

[0133] S29. Write the encapsulated protocol header, payload content, and generated timestamp information into the data packet object to obtain a network data packet that conforms to the characteristics of the generative incentive mode.

[0134] S210. Add the network data packet that conforms to the characteristics of the generative incentive mode to the transmission queue of the target port and wait for transmission scheduling.

[0135] It can be understood that in the working process of the generative incentive mode of the present invention, a systematic randomization mechanism is adopted to randomly determine the data packet header or payload content within the limited range of configuration parameters. This includes reproducible random perturbations to IP addresses, port numbers, MAC addresses, TCP flag bits, transmission intervals, packet lengths, etc. By cooperating with specific distribution models (such as normal, Poisson, etc.), it can not only simulate the jitter and burst characteristics in high-speed data channels, but also provide a wider range of input scenarios for simulation, thereby more effectively evaluating the stability and performance of the network switching unit under complex traffic conditions.

[0136] In the generative incentive mode, the embodiment of the present invention combines the flow template with the randomization mechanism. Users can define various parameters such as protocol type, packet length distribution, transmission rate, delay characteristics, etc. in an external configuration file, and the virtual traffic generator device automatically constructs various network data packets according to the configuration, thereby simulating the diverse transmission characteristics under different network application scenarios. This mechanism can flexibly generate burst or stable traffic under clock scheduling, improving the test coverage of boundary and stress scenarios.

[0137] Queue management module

[0138] In the architecture-level simulation of the network switching unit, in order to truly simulate various characteristics of network traffic and accurately evaluate the performance of the device under test under different loads, the traffic generator needs to have refined traffic control capabilities. This requires the traffic generator to be able to not only generate data packets that conform to specific protocols and rates, but also simulate phenomena such as traffic bursts and congestion in the real network, and precisely control the bandwidth of each port. Traditional packet transmitters often use simple rate control methods, such as time-interval-based transmission or fixed-rate transmission. These methods are difficult to simulate the complexity and uncertainty of real network traffic and cannot precisely control the bandwidth utilization of ports. To solve this problem, the embodiment of the present invention introduces a token bucket algorithm based on the negative token mechanism in the queue management module of the packet transmitter to achieve fine control of the output rate of each port and support the simulation of burst traffic. As Figure 6 shown, the queue management module configures an independent storage queue for each forwarding port to buffer data packets to be sent. At the exit of each queue, an egress rate shaping mechanism is deployed, and this mechanism uses the token bucket algorithm to achieve precise rate control.

[0139] Based on the configuration information received by itself and the token bucket algorithm based on the negative token mechanism, the queue management module sends network data packets to the external ESL model via the target port, which may include:

[0140] Under the control of the clock-driven scheduler, the queue management module caches the network data packets to be sent, controls the sending rate of each network data packet according to the configuration information received by itself and the token bucket algorithm based on the negative token mechanism, and sends the network data packets to the external ESL model via the target port.

[0141] Specifically, as a technology widely applied to network traffic control and shaping, the token bucket algorithm restricts the sending rate of data packets by controlling the generation and consumption of tokens, and can effectively smooth traffic and prevent network congestion. The negative token mechanism proposed in the embodiments of the present invention further enhances the capabilities of the token bucket algorithm, enabling it to more flexibly handle traffic bursts and achieve more precise rate control on the premise of ensuring the integrity of data packets. The flowchart of the token bucket algorithm based on the negative token mechanism is as shown in Figure 7 shown, and it can be seen from Figure 7 that the token bucket algorithm based on the negative token mechanism may include:

[0142] S31. The user performs initialization settings, sets the initial token quantity C of the token bucket (usually set to 0 or a preset positive value); sets the upper limit B of the token bucket capacity, that is, the maximum number of tokens that the token bucket can hold; sets the token replenishment rate R, that is, the number of tokens added to the token bucket per unit time.

[0143] S32. According to the preset token replenishment rate R and the time interval ΔT since the last token replenishment, calculate the newly generated token quantity ΔC = R×ΔT. Add the newly generated tokens to the token bucket and update the token quantity: C = C + ΔC.

[0144] S33. Check whether the current token quantity C reaches or exceeds the upper limit B of the token bucket capacity. If C≥B, discard the excess tokens, set the token quantity to C = B, and continue to execute the next step; if C≤B, directly execute the next step.

[0145] S34. Check whether there are data packets waiting to be sent in the sending queue of the corresponding port. If there are data packets in the queue, execute the next step; if there are no data packets in the queue, return to S32 and wait for the token replenishment and data packet arrival judgment in the next cycle.

[0146] S35. Take out the head packet from the sending queue and obtain its length L.

[0147] S36. Check whether the number of tokens C in the current token bucket is greater than or equal to 0. If C ≤ 0, it means that the current is in the negative token state, and jump to S32 to wait for the number of tokens to resume to a non - negative value; if C ≥ 0, continue to execute the next step.

[0148] S37. Execute the negative token mechanism, which allows sending even if the number of tokens is not enough to send the data packet. Deduct from the token bucket the number of tokens equal to the length L of the data packet, and the number of tokens becomes negative: C = C - L. Send the data packet to the target port. After sending is completed, return to S32 to start the processing of the next cycle.

[0149] It can be understood that the token bucket algorithm based on the negative token mechanism is used to precisely control the data packet sending rate of each port; it allows short - term overdraft sending when the number of tokens is insufficient to simulate the instantaneous traffic burst scenario in the real network. Combined with SystemC event scheduling, it monitors the queue length and port sending rate in real time during queue management and bandwidth shaping; it realizes the accurate evaluation of elements such as the throughput performance and congestion control strategy of the network switching unit in the ESL simulation. In addition, the SystemC interface provided by the virtual traffic generator device can efficiently integrate the ESL model simulation environment and achieve precise control of the data packet forwarding timestamp.

[0150] Statistics module

[0151] Under the control of the clock - driven scheduler, the statistics module controls the output level, storage path, and recording period of the log of the virtual traffic generator device according to the configuration information it receives, so as to facilitate the result analysis during the simulation process.

[0152] Existing virtual traffic generator technologies have significant limitations in the ESL - level simulation environment. Specifically, existing hardware and software traffic generators are difficult to be seamlessly integrated with the ESL simulation environment, resulting in low efficiency when conducting simulation tests on network switching units. In addition, current traffic generators generally lack precise timing control capabilities and are difficult to simulate the data packet burst traffic and precise bandwidth requirements in specific network scenarios, thus directly affecting the accuracy and authenticity of the simulation results. Although software packet - sending tools have improved in flexibility, they are still insufficient in generating traffic that meets actual network conditions, restricting the test capabilities of network switching units in complex network environments. The virtualization - based packet - sending solution, although achieving high - speed data packet generation and processing, still has significant integration problems in interface development, data format conversion, and the packet - sending process, and is difficult to be effectively integrated with the ESL simulation environment.

[0153] In view of the current design and verification requirements of high-throughput network switching chips, there is an urgent need for a virtual traffic generator that can simulate real packet flow scenarios during the architecture-level design stage, is efficient, flexible, and has precise timing control capabilities, so as to overcome the deficiency of the lack of effective verification scenarios in the existing architecture-level design process. The virtual traffic generator device proposed in the embodiments of the present invention can adapt to the ESL design verification stage and support the ESL-level high-efficiency simulation process. It can mainly solve the following technical problems, including:

[0154] 1. Have the ability to support and expand various protocol packet structures in the actual network working scenario. It can support but is not limited to the traffic generation of typical and commonly used network protocol packets, including the generation of protocol packets such as Ethernet, IPv4, IPv6, TCP, UDP, ARP, ICMP, etc.

[0155] 2. Be able to simulate and generate high-precision traffic, have fine timing control, and ensure the accuracy of packet generation and sending. By precisely controlling parameters such as the packet generation rate, delay, and packet length distribution, high-fidelity simulation of various network traffic characteristics can be achieved, and various complex network congestion scenarios can be simulated.

[0156] 3. Be able to provide a flexible and configurable packet incentive generation method. The device of this patent simulates real network conditions by parsing real captured data frames and generating random packets that conform to multiple protocol specifications. It supports two modes: real traffic parsing and configurable generative incentives, and can perform fine-grained control of the generative incentives according to test requirements. Therefore, it should not only have the ability to handle large-scale simulation scenarios and improve simulation efficiency, but also reduce integration costs while maintaining high performance to meet the simulation requirements of network switching units in complex traffic and high-concurrency scenarios.

[0157] An embodiment of the present invention provides a virtual traffic generator device based on C++ / SystemC language for architecture-level simulation of network switching units. This virtual traffic generator device can simulate the process of packet generation and transmission in a multi-port network switching processor, and supports common network protocols and various complex network traffic scenarios. The virtual traffic generator device has the ability to parse real network packets and generate random packets that conform to various network protocol specifications, and has a high degree of flexibility. This enables efficient and accurate simulation of various complex network traffic scenarios in the ESL simulation environment, improving the authenticity and effectiveness of simulation tests. At the same time, through timestamp management and rate control mechanisms (such as the token bucket algorithm), it can simulate packet burst traffic and precise bandwidth requirements in specific network scenarios. The present invention supports real stimulus mode and generative stimulus mode. In the real stimulus mode, the packets captured in the actual network can be reproduced, which is suitable for regression testing and reproduction of specific scenarios; while in the generative stimulus mode, users can customize the traffic model according to their needs for stress testing, boundary condition testing, etc. This multi-mode stimulus generation method allows users to flexibly select the appropriate stimulus source and efficiently complete the simulation of various test scenarios. The embodiment of the present invention uses an external XML configuration file to implement a decoupled parameter management method, and uses the external XML configuration file to manage various operating parameters of the traffic generator, including protocol configuration, traffic model, port settings, etc., making the configuration clearer and more flexible.

[0158] Embodiment 2

[0159] An embodiment of the present invention provides a traffic generator device for architecture-level simulation of network switching units. Selecting the 4*4 cross-node routing module as the experimental object, the simulation architecture diagram of the traffic generator of the four-port cross-node routing module is obtained, as Figure 8 shown, which may include: 4 input ports and 4 output ports, and each port supports a transmission rate of 10 Gbps. The SystemC simulation environment is selected to build the simulation platform, and the C++ and SystemC programming languages are used to implement the virtual traffic generator. The simulation platform is built based on the SystemC simulation environment and is implemented using the C++ and SystemC programming languages. The configuration file is implemented in XML format. The traffic generator configuration information for the cross-node routing module simulation experiment is shown in Table 2, the configuration information table corresponding to the cross-node routing module.

[0160] Table 2 Configuration Information Table Corresponding to the Cross-Node Routing Module

[0161]

[0162] The traffic generator of the four-port cross-node routing module performs the following steps:

[0163] Step1: Write an XML configuration file. Write the XML configuration file np_config.xml according to the above scenario, and configure each parameter of the traffic generator, including protocol support, flow template, port mode, etc.

[0164] Step2: Compile and run the virtual traffic generator. Use the C++ / SystemC compiler to compile the code of the virtual traffic generator. Run the virtual traffic generator, specifying np_config.xml as the input parameter.

[0165] Step3: For Port 2 shown in Table 2, parse the real stimulus. The virtual traffic generator reads the pcap file specified in np_config.xml and uses the protocol parsing module to parse the data packets in it to extract the timestamp information.

[0166] Step4: For Port 1 and Port 3 shown in Table 2, generate simulation stimuli. The traffic generation module of the virtual traffic generator generates IPv4 / TCP and IPv6 / TCP traffic according to the flow template defined in np_config.xml.

[0167] Step5: The statistical module of the virtual traffic generator collects and outputs statistical information such as bandwidth utilization, packet delay, and packet loss rate, and records this information in a log file.

[0168] Step6: Analyze the test results. According to the collected statistical information, analyze the simulation performance metrics under different traffic patterns, such as throughput, delay, packet loss rate, etc., and verify whether these metrics meet the design requirements.

[0169] In the embodiment of the present invention, the traffic generator written in C++ and SystemC languages is efficiently integrated into the ESL simulation environment. The virtual traffic generator is developed using C++ and SystemC languages and has the ability to parse real network data packets and generate random data packets that conform to various network protocol specifications. This enables efficient and accurate simulation of various complex network traffic scenarios in the ESL simulation environment, improving the authenticity and effectiveness of simulation tests.

[0170] Implement precise generation and timing control of real and random data packets. This traffic generator supports parsing real network data packets and generating random data packets that conform to various protocol specifications, with high flexibility. At the same time, through timestamp management and rate control mechanisms (such as the token bucket algorithm), it can simulate the burst traffic of data packets and precise bandwidth requirements in specific network scenarios. A method that supports common network protocols and meets different simulation requirements through an extension mechanism. The present invention supports common network protocols including Ethernet, IPv4, IPv6, TCP, UDP, ARP, ICMP, etc., and has the ability to be extended to meet the simulation requirements in different network environments.

[0171] It should be noted that in the description of the present invention, it should be understood that the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, "a plurality" means two or more, unless otherwise specifically defined.

[0172] Each embodiment in this specification is described in a related manner. For the same or similar parts among the embodiments, reference can be made to each other. The differences between each embodiment and other embodiments are emphasized in each embodiment.

[0173] The above are only the preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A virtual traffic generator device for a network switching unit, characterized in that: include: Clock-driven scheduler, XML configuration parsing module, traffic generation module, queue management module and statistics module; among them, The clock-driven scheduler is used to control the working order of each module in the virtual traffic generator device; The XML configuration parsing module is used to read and parse the external XML configuration file under the control of the clock drive scheduler, obtain the configuration information corresponding to each module, and send the obtained configuration information to the corresponding modules; The traffic generation module includes two traffic generation modes, which are used to select the corresponding traffic generation mode according to the configuration information received by itself under the control of the clock-driven scheduler, generate a network data packet that meets the characteristics based on an external stimulus source file, and add the network data packet to the sending queue of the target port; wherein the traffic generation mode includes: a real stimulus mode and a generative stimulus mode; The queue management module is used to send the network data packet to the external ESL model through the target port based on the token bucket algorithm of the negative token mechanism according to the configuration information received by itself under the control of the clock-driven scheduler; The statistical module is used to control the output level, storage path and recording period of the log of the virtual traffic generator device according to the configuration information received by itself under the control of the clock-driven scheduler.

2. A virtual traffic generator device for a network switching unit according to claim 1, characterized in that: The configuration information corresponding to each module includes: Global configuration information, port configuration information, real incentive mode configuration information, generative incentive mode configuration information and log configuration information.

3. A virtual traffic generator device for a network switching unit according to claim 2, characterized in that: The XML configuration parsing module reads and parses the external XML configuration file to obtain the configuration information corresponding to each module, and sends the obtained configuration information to the corresponding modules, including: The XML configuration parsing module reads an external XML configuration file from a specified path, obtains and stores the entire content of the XML configuration file; Parse the global configuration information in the XML configuration file and initialize the simulation environment; Parsing the port configuration information in the XML configuration file, and sending the port configuration information to the queue management module; According to the port configuration information corresponding to each port, the real excitation mode configuration information and / or the generative excitation mode configuration information are parsed as traffic configuration information, and the traffic configuration information is sent to the traffic generation module; Parse the log configuration information in the XML configuration file, and send the log configuration information to the statistics module.

4. A virtual traffic generator device for a network switching unit according to claim 1, characterized in that: The traffic generation module includes a real incentive module and a generative incentive module.

5. A virtual traffic generator device for a network switching unit according to claim 1, characterized in that: The traffic generation module selects a corresponding traffic generation mode according to the configuration information received by itself, generates a network data packet that meets the characteristics based on an external stimulus source file, and adds the network data packet to the sending queue of the target port, including: The traffic generation module determines the configuration information received by itself: If the configuration information received by itself is the real excitation mode configuration information, the real excitation mode is selected, a network data packet conforming to the characteristics of the real excitation mode is generated based on the external excitation source file, and the network data packet is added to the sending queue of the target port; If the configuration information received is the generative incentive mode configuration information, the generative incentive mode is selected, a network data packet that meets the characteristics of the generative incentive mode is generated according to the generative incentive mode configuration information, and the network data packet is added to the sending queue of the target port.

6. A virtual traffic generator device for a network switching unit according to claim 5, characterized in that: The traffic generation module selects the real incentive mode according to the real incentive mode configuration information, generates a network data packet that meets the characteristics of the real incentive mode based on an external incentive source file, and adds the network data packet to the sending queue of the target port, including: The traffic generation module reads an external stimulus source file according to the real stimulus mode configuration information; the stimulus source file includes original data frames captured in the network, wherein each original data frame includes header information and payload data of a network protocol stack; each original data frame also includes a timestamp; When a frame of original data is read from the stimulus source file, the traffic generation module creates a new data packet object Packet class; The read raw data frame is sent to the XML configuration parsing module for parsing, and the header information and payload data of each layer of protocol are extracted layer by layer; Reading the timestamp of the original data frame from the stimulus source file, and storing the timestamp in a data packet object; The traffic generation module stores the protocol headers, payloads and timestamp information of each layer obtained by parsing into the data packet object to obtain a network data packet that meets the characteristics of the real incentive mode; The traffic generation module adds the network data packets that meet the characteristics of the real incentive mode to the sending queue corresponding to the target port.

7. A virtual traffic generator device for a network switching unit according to claim 6, characterized in that: The read original data frame is sent to the XML configuration parsing module for parsing, and the header information and payload data of each layer protocol are extracted layer by layer, including: The XML configuration parsing module parses the Ethernet header, the network layer header and the transport layer header in the original data frame, and extracts the header information and the effective load data of each layer protocol layer by layer.

8. A virtual traffic generator device for a network switching unit according to claim 5, characterized in that: The traffic generation module selects a generative incentive mode according to the generative incentive mode configuration information, generates a network data packet that meets the characteristics of the generative incentive mode according to the generative incentive mode configuration information, and adds the network data packet to a sending queue of a target port, including: The traffic generation module extracts user-defined flow template attributes according to the generative incentive mode configuration information; Instantiate a data packet object according to the flow template attributes; Dynamically generate the length of the current data packet according to the packet length distribution strategy in the flow template attribute; Based on the sending rate in the flow template attribute, a token bucket algorithm is used to control the rate; According to the transmission delay type in the flow template attribute, setting the transmission delay of the current data packet; Generate field parameters of each layer protocol header in sequence according to the protocol type in the generative incentive mode configuration information; Generate the payload content of the data packet according to the payload type set in the flow template attribute; Encapsulate the field parameters of each layer protocol header and the payload content of the data packet according to the preset protocol type and specifications; Write the encapsulated protocol header, payload content and generated timestamp information into the data packet object to obtain a network data packet that meets the characteristics of the generative incentive model; Add network packets that match the characteristics of the generative incentive pattern to the send queue of the target port.

9. A virtual traffic generator device for a network switching unit according to claim 8, characterized in that: The field parameters of the protocol headers of each layer include: MAC address, IP address, port number, and TCP flags.

10. A virtual traffic generator device for a network switching unit according to claim 1, characterized in that: The queue management module sends the network data packet to the external ESL model via the target port based on the configuration information received by itself and the token bucket algorithm of the negative token mechanism, including: Under the control of the clock-driven scheduler, the queue management module caches the network data packets to be sent, controls the sending rate of each network data packet based on the token bucket algorithm of the negative token mechanism according to the configuration information received by itself, and sends the network data packets to the external ESL model through the target port.

Citation Information

Patent Citations

  • Network scene simulation background flow generation and management method and device

    CN110289984A

  • System-level simulation modeling method for black box model

    CN116842902A

  • Design support program, design support device, and design support method

    JP2010039678A