A network switch unit oriented virtual traffic generator apparatus

By designing a virtual traffic generator device, the problem of integrating traffic generators with ESL simulation environments in existing technologies has been solved, achieving precise traffic control and multi-mode stimulus generation, and improving the accuracy and flexibility of network switching unit simulation testing.

CN120075104BActive Publication Date: 2026-04-07XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In existing network switching unit simulation environments, traffic generators are difficult to integrate seamlessly with electronic system-level (ESL) simulation environments, lack precise timing control capabilities, and cannot accurately simulate burst traffic and precise bandwidth requirements of data packets in specific network scenarios, resulting in insufficient accuracy and real-time performance of simulation results.

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 statistics module. Through a token bucket algorithm with a negative token mechanism and multi-mode incentive generation, it achieves efficient integration with the ESL simulation environment and precise traffic control.

Benefits of technology

The ESL simulation environment efficiently and accurately simulates various complex network traffic scenarios, improving the realism and effectiveness of simulation testing. It supports both real stimulus mode and generative stimulus mode to meet the testing needs of different simulation scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075104B_ABST
    Figure CN120075104B_ABST
Patent Text Reader

Abstract

This invention discloses a virtual traffic generator device for network switching units, comprising: a clock-driven scheduler, an XML configuration parsing module, a traffic generation module, a queue management module, and a statistics module. This invention possesses the ability to parse real network data packets and generate random data packets conforming to various network protocol specifications, exhibiting high flexibility. This enables efficient and accurate simulation of various complex network traffic scenarios in ESL simulation environments, improving the realism and effectiveness of simulation testing. Simultaneously, through timestamp management and rate control mechanisms, it can simulate burst traffic and precise bandwidth requirements under specific network scenarios. This invention supports two modes: in realistic stimulus mode, it can reproduce data packets captured in actual networks, suitable for regression testing and specific scenario reproduction; while in generative stimulus mode, users can customize traffic models according to their needs for stress testing, boundary condition testing, etc.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electronic design automation, and specifically relates to a virtual traffic generator device for network switching units. Background Technology

[0002] As network switching units become increasingly complex and functionally demanding, the requirements for performance and reliability are also rising. With the continuous increase in throughput requirements, the architecture design of network switching chips is becoming increasingly complex, and the constant optimization of chip power consumption performance and area (PPA) poses a severe challenge to the design and development cycle. More and more PPA metrics need to be analyzed, verified, and optimized early in the design process, such as during the ESL design phase. This necessitates conducting experiments with packet types and characteristics that closely resemble real-world operating scenarios during the architecture-level design and verification phases of network switching processors to verify their performance and power consumption characteristics. Currently, tools for packet traffic characteristic analysis at the architecture-level design phase are still lacking. Traditional hardware-based traffic analysis devices are costly, complex to configure, lack flexibility, and are difficult to integrate seamlessly with ESL simulation environments.

[0003] In architectural design, the traffic generator, as a core upstream module of the network switching unit, undertakes the critical task of generating and scheduling data flows to simulate real network traffic and load conditions. Existing traffic generator technologies mainly focus on the following aspects:

[0004] 1. Hardware Solution:

[0005] Hardware traffic generators typically employ dedicated hardware devices, utilizing high-performance network interface cards (NICs) and dedicated circuitry to generate and transmit high-speed data packets. Devices like Spirent TestCenter and IXIA IxNetwork are based on hardware-level parallel processing. Through pre-configured traffic templates and protocol stacks, they can efficiently generate large-scale, complex network traffic, supporting multiple protocols and traffic patterns. As an industry-leading traffic generation and testing platform, Spirent TestCenter supports multiple network protocols, can generate various traffic patterns in real-world network environments, and supports multiple speeds (1Gbps to 400Gbps), making it widely used for performance testing and verification of network devices. IXIA's IxNetwork platform also possesses powerful traffic generation and analysis capabilities, supporting multiple network protocols and complex traffic patterns, making it suitable for performance evaluation and verification of network switching equipment. However, hardware traffic generators are expensive, primarily used for performance testing of physical network devices, and are difficult to apply to early-stage architecture-level simulation. The high cost of existing hardware traffic generators such as Spirent TestCenter and IXIA IxNetwork limits their application in early design phases. Its dedicated hardware also makes it difficult to integrate seamlessly with ESL simulation environments, increasing the complexity and time cost of system integration and limiting its flexible application in architectural design and verification.

[0006] 2. Software Solution:

[0007] Software traffic generators are typically based on general-purpose computing platforms, using software algorithms to generate and send network traffic on the operating system. These tools utilize multi-threaded or distributed architectures to fully leverage the bandwidth of multi-core processors and network interfaces, enabling parallel traffic generation and transmission. Typical software traffic generators include iperf, Ostinato, and Mausezahn. These tools generally offer high flexibility and configurability, allowing users to customize traffic patterns and protocol types as needed.

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

[0009] Ostinato offers a powerful graphical user interface (GUI) that allows users to intuitively customize and configure traffic templates for various protocols. Users can combine multiple layers of protocols such as Ethernet, IPv4 / IPv6, and TCP / UDP within Ostinato to flexibly generate network packets that meet specific needs, suitable for functional testing and protocol verification of network devices. It supports scripting, allowing users to automate traffic generation and control using languages ​​such as Python, greatly improving testing efficiency and flexibility. However, Ostinato's traffic generation rate depends on the hardware performance of the host machine and may be limited in high-throughput scenarios.

[0010] Mausezahn, a command-line interface traffic generation tool, is renowned 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 data packets, including protocol type, packet length, and sending rate, making it suitable for network security testing, protocol vulnerability scanning, and in-depth protocol analysis. It supports the generation of data packets for multiple protocols and can generate complex and customized traffic patterns, making it suitable for advanced network testing and security research. However, as a command-line tool, Mausezahn requires a higher level of user skill and has a relatively high learning curve, making it less intuitive and user-friendly than Ostinato.

[0011] While iperf, Ostinato, and Mausezahn excel in flexibility and configurability, they still have limitations in meeting high throughput, low latency requirements, and integration with electronic system-level (ESL) simulation environments. These tools often rely on powerful host hardware to handle complex traffic patterns and multi-protocol support, and lack targeted optimization for seamless integration with simulation environments. Existing software traffic generators such as iperf, Ostinato, and Mausezahn, while performing well in flexibility and configurability, have significant shortcomings in meeting the demands of high-precision and high-performance simulation environments. First, these tools struggle to maintain a stable traffic generation rate in high-throughput and low-latency scenarios, resulting in an inability to accurately simulate the real-world performance of network switching units under high load conditions. Furthermore, these software tools lack deep optimization and integration with ESL simulation environments, failing to achieve precise synchronization with ESL simulation clocks and coordination of event triggering mechanisms. This lack of optimized integration 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 fails to meet the needs of precise timing control and multi-mode traffic generation.

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

[0013] With the development of Network Functions Virtualization (NFV), traffic generation solutions based on virtual machines or containers are emerging. These solutions utilize high-performance data plane acceleration libraries (such as DPDK) to achieve high-speed packet generation and processing, suitable for large-scale network traffic simulation. For example, Spirent TestCenter Virtual (STCv) extends the powerful capabilities of the SpirentTestCenter physical test platform to virtualization and cloud environments. STCv can generate and analyze various types of network traffic at layers L2-7, and achieve high-precision, high-performance traffic simulation with the help of technologies such as DPDK, achieving latency measurement accuracy 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, providing accurate and realistic stimuli for the chip under test and analyzing its response in real time.

[0014] However, while STCv can integrate tightly with EDA simulators, some barriers exist with the more abstract ESL simulation environment. Firstly, STCv is primarily optimized for specific EDA simulators, and its interfaces and communication protocols may be incompatible with other ESL simulation tools, leading to complex and costly integration across different simulation platforms. Secondly, STCv's configuration and management methods are relatively rigid and inflexible when handling large-scale, diverse traffic scenarios, making it difficult to meet rapidly changing simulation requirements. Furthermore, although STCv possesses high-precision latency measurement capabilities, there are still some delays and errors in clock synchronization and event triggering mechanisms with the ESL simulation environment, affecting the accuracy and real-time performance of simulation results. These limitations make existing traffic generation solutions based on virtual machines or containers insufficient to fully meet the simulation needs of network switching units in complex traffic and high-concurrency scenarios. Virtualization-based traffic generation solutions such as SpirentTestCenter Virtual suffer from insufficient compatibility and flexibility. These solutions are typically optimized for specific EDA simulators, making them incompatible with other ESL tools and increasing integration complexity and cost.

[0015] The above analysis reveals significant limitations of existing virtual traffic generator technology in ESL-level simulation environments. Specifically, existing hardware and software traffic generators struggle to integrate seamlessly with ESL simulation environments, resulting in inefficiency during network switching unit simulation testing. Furthermore, current traffic generators generally lack precise timing control capabilities, making it difficult to simulate burst traffic and precise bandwidth requirements in specific network scenarios, directly impacting the accuracy and realism of simulation results. While software packet generation tools offer improved flexibility, they still fall short in generating traffic that conforms to actual network conditions, limiting the testing capabilities of network switching units in complex network environments. Virtualized packet generation schemes, despite achieving high-speed packet generation and processing, still face significant integration challenges in interface development, data format conversion, and packet generation, making effective integration with ESL simulation environments difficult. Summary of the Invention

[0016] To address the aforementioned problems in the prior art, this invention provides a virtual traffic generator device for network switching units. The technical problem to be solved by this invention is achieved through the following technical solution:

[0017] This invention provides a virtual traffic generator device for network switching units, comprising:

[0018] The system includes a clock-driven scheduler, an XML configuration parsing module, a traffic generation module, a queue management module, and a statistics module; among them,

[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 external XML configuration files 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.

[0021] 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 network data packets that meet the characteristics based on the external incentive source file, and add the network data packets to the sending queue of the target port; wherein, the traffic generation mode includes: real incentive mode and generative incentive mode.

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

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

[0024] In one 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 one embodiment of the present invention, the XML configuration parsing module reads and parses an external XML configuration file to obtain configuration information corresponding to each module, and sends the obtained configuration information to the corresponding modules, including:

[0027] 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;

[0028] Parse the global configuration information in the XML configuration file and 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] Based on the port configuration information corresponding to each port, the real incentive mode configuration information and / or the generative incentive mode configuration information are parsed as traffic configuration information, and the traffic configuration information is sent to the traffic generation module.

[0031] The log configuration information in the XML configuration file is parsed and sent to the statistics module.

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

[0033] In one embodiment of the present invention, the traffic generation module selects a corresponding traffic generation mode based on 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 sending queue of the target port, including:

[0034] The traffic generation module determines the configuration information it receives:

[0035] If the configuration information received 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 sending queue of the target port.

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

[0037] In one embodiment of the present invention, the traffic generation module selects a 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 sending 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 raw data frames captured in the network, wherein each raw data frame includes the header information of the network protocol stack and the payload data; each raw data frame also includes a timestamp;

[0039] When reading a raw data frame from the stimulus source file, the traffic generation module creates a new packet object of class Packet.

[0040] The read raw data frame is sent to the XML configuration parsing module for parsing, and the header information and payload data of each protocol layer are extracted layer by layer;

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

[0042] The traffic generation module stores the parsed protocol headers, payloads, and timestamps into the data packet object to obtain network data packets that conform to the characteristics of the real incentive mode.

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

[0044] In one embodiment of the present invention, 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 the protocol are extracted layer by layer, including:

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

[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 sending queue of the target port, including:

[0047] The traffic generation module extracts user-defined flow template attributes based on the generative incentive mode configuration information.

[0048] Instantiate a data packet object based on the stream template attribute;

[0049] The length of the current data packet is dynamically generated based on the packet length distribution strategy in the flow template attributes;

[0050] Based on the sending rate in the stream template attribute, a token bucket algorithm is used for rate control;

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

[0052] Based on the protocol type in the generative incentive mode configuration information, the field parameters of each layer protocol header are generated sequentially.

[0053] Generate the payload content of the data packet based on the payload type set in the stream template attribute;

[0054] Based on the preset protocol type and specifications, the field parameters of each layer protocol header and the payload content of the data packet are encapsulated.

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

[0056] Add network packets that conform to the characteristics of the generative incentive pattern to the send queue of the target port.

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

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

[0059] In one embodiment of the present invention, the queue management module, based on the configuration information it receives, uses a token bucket algorithm with a negative token mechanism to send network data packets to an external ESL model via a target port, including:

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

[0061] The beneficial effects of this invention are:

[0062] The virtual traffic generator device provided by this invention possesses the ability to parse real network data packets and generate random data packets conforming to various network protocol specifications, exhibiting high flexibility. This enables efficient and accurate simulation of various complex network traffic scenarios in the ESL simulation environment, improving the realism and effectiveness of simulation testing. Simultaneously, through timestamp management and rate control mechanisms (such as the token bucket algorithm), it can simulate burst traffic and precise bandwidth requirements under specific network scenarios. This invention supports both realistic and generative incentive modes. In realistic incentive mode, data packets captured in actual networks can be reproduced, suitable for regression testing and specific scenario reproduction; while in generative incentive mode, users can customize traffic models according to their needs, performing stress tests, boundary condition tests, etc. This multi-mode incentive generation method allows users to flexibly select appropriate incentive sources and efficiently complete the simulation of various test scenarios. Attached Figure Description

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

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

[0065] Figure 3 This is a schematic diagram of the structure of a traffic generation module of a virtual traffic generator device provided in an embodiment of the present invention;

[0066] Figure 4 A schematic diagram illustrating the workflow of a virtual traffic generator device in real excitation mode, provided in an embodiment of the present invention;

[0067] Figure 5 A schematic diagram illustrating the workflow of a virtual traffic generator device in a generative excitation mode, provided in an embodiment of the present invention;

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

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

[0070] Figure 8 This is a simulation architecture diagram of a traffic generator for a four-port cross-node routing module provided in an embodiment of the present invention. Detailed Implementation

[0071] The present invention will be further described in detail below with reference to specific embodiments, but the implementation of the present invention is not limited thereto.

[0072] Example 1

[0073] This invention provides a virtual traffic generator device for network switching units, such as... Figure 1 As shown, it may include:

[0074] The system includes a clock-driven scheduler, an XML configuration parsing module, a traffic generation module, a queue management module, and a statistics module; among them,

[0075] A clock-driven scheduler is used to control the working order of various modules in the virtual flow generator device;

[0076] The XML configuration parsing module is used to read and parse external XML configuration files 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.

[0077] The traffic generation module includes two traffic generation modes. Under the control of the clock-driven scheduler, it selects the corresponding traffic generation mode based on the configuration information it receives, generates network data packets that meet the characteristics based on the external stimulus source file, and adds the network data packets to the sending queue of the target port. The traffic generation modes include: real stimulus mode and generative stimulus mode.

[0078] The queue management module, under the control of the clock-driven scheduler, uses the token bucket algorithm based on the negative token mechanism to send network data packets to the external ESL model via the target port according to the configuration information it receives.

[0079] The statistics module, under the control of the clock-driven scheduler, controls the output level, storage path, and recording period of the virtual traffic generator device's logs based on the configuration information it receives.

[0080] The virtual traffic generator device proposed in this invention aims to provide flexible, efficient, and realistic traffic input for architecture-level simulation of network switching units. Developed in C++ / SystemC, the device consists of multiple cooperating modules that work together under the control of a clock-driven scheduler, coordinating the execution order of each module.

[0081] First, the XML configuration parsing module reads and parses the configuration information from the external XML configuration file, then passes the runtime parameters to each module, officially commencing the traffic generation process. The traffic generation module generates network packets that conform to the specified characteristics based on the configuration information. This module includes a real incentive module and a generative incentive module, responsible for parsing the real incentive source file and generating custom traffic, respectively, and adding the packets to the target port's sending queue. Finally, the queue management module manages the sending queue for each port, buffers packets to be sent, and controls the packet sending rate according to the configured rate using a token bucket algorithm based on a negative token mechanism, sending the packets to the target port for forwarding to the external ESL model.

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

[0083] For ease of understanding, the various modules of the virtual traffic generator device proposed in the embodiments of the present invention will be described below.

[0084] Clock-driven scheduler

[0085] The clock-driven scheduler, as the core of the entire system, utilizes SystemC's `sc_clock` and `sc_event` mechanisms, combined with the scheduling methods declared by `SC_METHOD`, to provide a unified simulation time base for the operation of all modules and coordinate the execution order of each module. It achieves clock synchronization and event triggering through the SystemC interface and the ESL simulation environment, ensuring accurate timestamps for packet forwarding, and is suitable for 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 external XML configuration files to obtain the configuration information corresponding to each module, and then sends the obtained configuration information to the corresponding modules.

[0088] Specifically, to achieve flexible control over the network traffic generation process and meet various simulation requirements, the traffic generator device of this invention employs an external XML configuration file. This configuration file not only clearly defines various operating parameters of the traffic generator but also allows users to flexibly adjust these parameters according to different simulation scenarios. To efficiently utilize this configuration information, a dedicated configuration parsing module was designed. The main task of this module is to read, parse, and manage the external XML configuration file and accurately transmit the configuration information to each module 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 the various modules within the traffic generator. This module parses the configuration items in the XML file item by item and stores them in an in-memory data structure for later use.

[0090] Table 1 shows the parameter descriptions for the traffic generator's XML configuration file. To ensure the correctness and stability of the simulation environment, the XML configuration file defines global simulation parameters and includes parameter configurations for each port to enable targeted traffic transmission and support multiple port modes. Furthermore, to meet the traffic generation needs of different simulation scenarios, the configuration file also defines parameters for realistic and generative stimuli, and allows for detailed setting of generated data packet attributes through flow templates, enabling flexible traffic configuration. Finally, the XML configuration file includes log output parameters, controlling the log output level, storage path, and recording period to facilitate result analysis during the simulation process.

[0091] Table 1 is a parameter description table for the flow generator XML configuration file.

[0092]

[0093] When configuring a virtual traffic generator device, the configuration process diagram follows as follows: Figure 2 The steps shown are performed to ensure that the modules can work together in an orderly manner:

[0094] The XML configuration parsing module reads and parses external XML configuration files to obtain configuration information for each module, and then sends the obtained configuration information to the corresponding modules. This may include:

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

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

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

[0098] S04. Based on 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 log output capabilities.

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

[0101] For S04, after completing port configuration parsing, the configuration parsing module will selectively read and parse the actual incentive configuration or the generated incentive configuration based on the configuration information of each port. It supports independent and hybrid incentive modes and then passes this information to the traffic generation module.

[0102] Through steps S01-S05 above, the XML configuration parsing module accurately reads, parses, and distributes configuration information, ensuring the transmission order and dependencies of the configuration information. Based on an external XML configuration file, the flexible parameter management and dynamic configuration method decouples configuration from the core code, supporting dynamic updates and user-defined parameters, including but not limited to the number of ports, simulation clock frequency, port mode, real / generative stimulus mode configuration, and log level.

[0103] Traffic generation module

[0104] The traffic generation module is one of the core components of the virtual traffic generator device proposed in this embodiment of the invention. It is responsible for generating network data packets that conform to user configuration characteristics and adding them to the sending queue of the target port. The traffic generation module is as follows: Figure 3 As shown, it can include: a real stimulus module and a generative stimulus module, which correspond to two different traffic generation modes. The former restores the traffic characteristics of the real network, while the latter gives users the ability to freely define traffic models, thereby providing support for the architecture-level simulation testing of various network switching units.

[0105] The traffic generation module proposed in this embodiment of the invention supports a dual-mode traffic generation technology that combines real-mode incentive and generative incentive modes. It balances the restoration of real network traffic with the flexibility of custom traffic. By parsing real network traffic and generating custom traffic according to user configuration, it meets the traffic requirements of different simulation scenarios.

[0106] The traffic generation module selects the corresponding traffic generation mode based on the configuration information it receives, generates network packets that meet the characteristics based on the external stimulus source file, and adds the network packets to the sending queue of the target port. This can include:

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

[0108] If the configuration information received 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 sending queue of the target port.

[0109] If the configuration information received is generative incentive mode configuration information, select generative incentive mode, generate network data packets that conform to the characteristics of generative incentive mode according to the generative incentive mode configuration information, and add the network data packets to the sending queue of the target port.

[0110] Real Incentive Module

[0111] In real-world network environments, traffic typically exhibits complex characteristics and patterns. To accurately reproduce these characteristics in simulation environments, a realistic stimulus mode is proposed, aiming to reproduce the features of real network traffic to the greatest extent possible. This mode reads pre-captured real network traffic data files (e.g., pcap files), extracts key information using a protocol parsing module, and sends the data sequentially to the simulation environment based on timestamp information. This mode is suitable for simulation tasks requiring high-fidelity traffic input, such as simulating specific network scenarios, performing regression testing, or reproducing faults.

[0112] The traffic generation module selects the true incentive mode based on the configuration information, generates network packets that conform to the characteristics of the true incentive mode based on the external incentive source file, and adds the network packets to the sending queue of the target port, such as... Figure 4 As shown, it may include:

[0113] S11, the traffic generation module reads the external stimulus source file according to the real stimulus mode configuration information; the stimulus source file includes the raw data frames captured in the network, wherein each raw data frame includes the header information of the network protocol stack and the payload data; each raw data frame also includes a timestamp; when the external stimulus source file is a pcap file, the pcap format specification must be followed during the reading process, and the timestamp indicates the capture time.

[0114] S12, when reading a raw data frame from the excitation source file, the traffic generation module creates a new packet object (Packet class); the created packet object (Packet class) can be used to store the information parsed from the data frame.

[0115] S13, the read raw data frame is sent to the XML configuration parsing module for parsing, extracting the header information and payload data of each protocol layer by layer, 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, extracting the header information and payload data of each protocol layer by layer.

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

[0118] S14, Read the timestamp of the raw data frame from the stimulus source file and store the timestamp in the packet object;

[0119] S15, the traffic generation module stores the parsed protocol headers, payloads and timestamps of each layer into the data packet object to obtain network data packets that conform to the characteristics of the real incentive mode;

[0120] S16, the traffic generation module adds network data packets that conform to the characteristics of the real incentive mode to the sending queue corresponding to the target port. It then waits for sending scheduling.

[0121] As is understandable, the generation process for the real stimulus mode in this embodiment of the invention also includes reading the capture file from a specified path and performing basic verification, performing layered parsing of the headers of each protocol layer, aligning and scheduling transmission based on the original timestamp and SystemC simulation clock, and discarding or alarming abnormal data during parsing. By decoding the captured data in multiple layers and retaining time information, the simulation environment can reproduce the real network load according to the capture order and rate, ensuring the accuracy and consistency of the test.

[0122] Generative incentive model

[0123] In the architectural design phase of network switching units, rapid verification using ESL models is crucial. To efficiently verify the correctness and performance of ESL models and cover various possible scenarios, this invention introduces a generative incentive pattern. Unlike the real incentive pattern, which relies on pre-captured traffic data, the generative incentive pattern allows users to flexibly define flow templates according to the verification requirements of the ESL model, thereby quickly generating various types of network traffic.

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

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

[0126] S22, Instantiate a packet object based on the stream template attribute; the obtained packet object can be used to store the protocol headers, payloads and timestamps of each layer of the packet to be generated.

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

[0128] S24, based on the sending rate in the stream template attribute, uses the token bucket algorithm for rate control; this process is handled by the queue management module to achieve precise flow regulation.

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

[0130] S26. Based on the protocol type in the generative stimulus mode configuration information, generate the field parameters of each layer's protocol header sequentially to ensure the integrity of the data packet's protocol stack. The field parameters of each layer's protocol header may include: MAC address, IP address, port number, and TCP flags.

[0131] S27. Generate the payload content of the data packet according to the payload type set in the flow template attribute to meet different testing requirements.

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

[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 network packets conforming to the generative incentive mode characteristics to the send queue of the target port. Await send scheduling.

[0135] Understandably, embodiments of the present invention employ a systematic randomization mechanism during the operation of the generative excitation mode to randomly determine the packet header or payload content within a limited range of configuration parameters. This includes reproducible random perturbations to IP addresses, port numbers, MAC addresses, TCP flags, transmission intervals, packet lengths, etc. By combining this with specific distribution models (such as normal, Poisson, etc.), it can not only simulate 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 network switching units under complex traffic conditions.

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

[0137] Queue Management Module

[0138] In the architecture-level simulation of network switching units, to realistically simulate various characteristics of network traffic and accurately evaluate the performance of the device under test under different loads, the traffic generator needs to possess fine-grained traffic control capabilities. This requires the traffic generator not only to generate data packets conforming to specific protocols and rates, but also to simulate phenomena such as traffic bursts and congestion in real networks, and to precisely control the bandwidth of each port. Traditional packet senders often employ simple rate control methods, such as time-interval-based or fixed-rate sending. These methods struggle to simulate the complexity and uncertainty of real network traffic and cannot precisely control port bandwidth utilization. To address this issue, this invention introduces a token bucket algorithm based on a negative token mechanism into the packet sender's queue management module to achieve fine-grained control of the output rate of each port and support the simulation of burst traffic. Figure 6 As 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 exit rate shaping mechanism is deployed, which uses the token bucket algorithm to achieve precise rate control.

[0139] The queue management module, based on the configuration information it receives, uses a token bucket algorithm with a negative token mechanism to send network packets to the external ESL model via the target port. This can include:

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

[0141] Specifically, the token bucket algorithm, a widely used technique for network traffic control and shaping, limits the data packet transmission rate by controlling the generation and consumption of tokens, effectively smoothing traffic and preventing network congestion. The negative token mechanism proposed in this invention further enhances the token bucket algorithm's capabilities, enabling it to respond more flexibly to traffic bursts and achieve more precise rate control while ensuring data packet integrity. A flowchart of the token bucket algorithm based on the negative token mechanism is shown below. Figure 7 As shown, from Figure 7 As can be seen from this, the token bucket algorithm based on the negative token mechanism can include:

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

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

[0144] S33, check if the current token quantity C has reached or exceeded the token bucket's capacity limit B. If C ≥ B, discard the excess tokens, set the token quantity to C = B, and continue to the next step; if C ≤ B, proceed directly to the next step.

[0145] S34, check if there are any data packets waiting to be sent in the send queue of the corresponding port. If there are data packets in the queue, proceed to 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 determination in the next cycle.

[0146] S35, retrieve the first data packet from the sending queue and obtain its length L.

[0147] S36, check if the current token count C in the token bucket is greater than or equal to 0. If C ≤ 0, it means that the current token count is negative, so jump to S32 and wait for the token count to return to a non-negative value; if C ≥ 0, continue to the next step.

[0148] S37: Implement the negative token mechanism, allowing transmission even if the token count is insufficient. Deduct an amount of tokens equal to the packet length L from the token bucket, making the token count negative: C = CL. Send the packet to the target port. After transmission, return to S32 to begin the next cycle.

[0149] Understandably, the token bucket algorithm based on the negative token mechanism is used to precisely control the packet sending rate of each port; it allows short-term overdraft sending when the number of tokens is insufficient, to simulate instantaneous traffic bursts in real networks. Combined with SystemC event scheduling, queue length and port sending rate are monitored in real time during queue management and bandwidth shaping; this enables accurate evaluation of network switching unit throughput performance, congestion control strategies, and other elements in ESL simulation. Furthermore, the SystemC interface provided by the virtual traffic generator device can efficiently integrate with the ESL model simulation environment, achieving precise control over packet forwarding timestamps.

[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 virtual traffic generator device's logs based on 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 ESL-level simulation environments. Specifically, existing hardware and software traffic generators are difficult to integrate seamlessly with ESL simulation environments, resulting in low efficiency when simulating network switching units. Furthermore, current traffic generators generally lack precise timing control capabilities, making it difficult to simulate burst traffic and precise bandwidth requirements in specific network scenarios, directly impacting the accuracy and realism of simulation results. While software packet generation tools have improved in flexibility, they still fall short in generating traffic that conforms to actual network conditions, limiting the testing capabilities of network switching units in complex network environments. Virtualized packet generation schemes, although achieving high-speed packet generation and processing, still face significant integration challenges in interface development, data format conversion, and packet generation, making effective integration with ESL simulation environments difficult.

[0153] To address the current design and verification requirements of high-throughput network switching chips, there is an urgent need for a highly efficient, flexible virtual traffic generator capable of simulating real data packet flow scenarios at the architecture-level design stage, with precise timing control capabilities. This would overcome the lack of effective verification scenarios in existing architecture-level design processes. The virtual traffic generator device proposed in this invention is adaptable to the ESL design verification stage, supports efficient ESL-level simulation processes, and primarily solves the following technical problems:

[0154] 1. Possesses the ability to support and expand various protocol packet structures in real-world network scenarios. It can support, but is not limited to, the generation of traffic from typical and commonly used network protocol packets, including Ethernet, IPv4, IPv6, TCP, UDP, ARP, ICMP, and other protocol packets.

[0155] 2. Capable of simulating high-precision traffic with fine-grained timing control, ensuring the accuracy of data packet generation and transmission. By precisely controlling parameters such as data packet generation rate, latency, and packet length distribution, it achieves high-fidelity simulation of various network traffic characteristics and can simulate various complex network congestion scenarios.

[0156] 3. It provides a flexible and configurable method for generating data packet incentives. This patented device simulates real network conditions by parsing real captured data frames and generating random data packets conforming to various protocol specifications. It supports both real traffic parsing and configurable generative incentive modes, and can finely control the generative incentives according to test requirements. Therefore, it should not only be able to handle large-scale simulation scenarios and improve simulation efficiency, but also reduce integration costs while maintaining high performance, in order to meet the simulation needs of network switching units under complex traffic and high concurrency scenarios.

[0157] This invention proposes a virtual traffic generator device built using C++ / SystemC, designed for network switching unit architecture-level simulation. This virtual traffic generator can simulate the packet generation and transmission process in a multi-port network switch processor and supports common network protocols and various complex network traffic scenarios. It possesses the ability to parse real network packets and generate random packets conforming to multiple network protocol specifications, exhibiting high flexibility. This enables efficient and accurate simulation of various complex network traffic scenarios in an ESL simulation environment, improving the realism and effectiveness of simulation testing. Simultaneously, through timestamp management and rate control mechanisms (such as the token bucket algorithm), it can simulate burst traffic and precise bandwidth requirements under specific network scenarios. This invention supports both realistic and generative stimulus modes. In realistic stimulus mode, packets captured in actual networks can be reproduced, suitable for regression testing and specific scenario reproduction; while in generative stimulus mode, users can customize traffic models according to their needs for stress testing, boundary condition testing, etc. This multi-mode stimulus generation method allows users to flexibly select appropriate stimulus sources and efficiently complete the simulation of various test scenarios. This invention utilizes an external XML configuration file to implement a decoupled parameter management method. The external XML configuration file is used 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] Example 2

[0159] This invention provides a traffic generator device for network switching unit architecture-level simulation. A 4x4 cross-connect routing module is selected as the experimental object, and the simulation architecture diagram of the traffic generator for the four-port cross-connect routing module is shown below. Figure 8 As shown, it can include 4 input ports and 4 output ports, each supporting a transmission rate of 10Gbps. The simulation platform is built using the SystemC simulation environment, and the virtual traffic generator is implemented using the C++ and SystemC programming languages. The configuration file uses XML format. The traffic generator configuration information for the cross-node routing module simulation experiment is shown in Table 2.

[0160] Table 2 Configuration information for the cross-node routing module

[0161]

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

[0163] Step 1: Write the XML configuration file. Based on the above scenario, write the XML configuration file np_config.xml to configure various parameters of the traffic generator, including protocol support, stream template, port mode, etc.

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

[0165] Step 3: For port 2 as shown in Table 2, the real stimulus is parsed. 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 and extract the timestamp information.

[0166] Step 4: For ports 1 and 3 as 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] Step 5: The statistics module of the virtual traffic generator collects and outputs statistical information such as bandwidth utilization, packet latency, and packet loss rate, and records this information to the log file.

[0168] Step 6: Test result analysis. Based on the collected statistical information, analyze the simulation performance indicators under different traffic modes, such as throughput, latency, packet loss rate, etc., and verify whether these indicators meet the design requirements.

[0169] This invention utilizes a traffic generator written in C++ and SystemC, efficiently integrated into an ESL simulation environment. This virtual traffic generator, developed in C++ and SystemC, possesses the ability to parse real network data packets and generate random data packets conforming to various network protocol specifications. This enables the efficient and accurate simulation of various complex network traffic scenarios within the ESL simulation environment, enhancing the realism and effectiveness of simulation testing.

[0170] This traffic generator implements precise generation and timing control of both real and random data packets. It supports parsing real network data packets and generating random data packets conforming to various protocol specifications, offering high flexibility. Simultaneously, through timestamp management and rate control mechanisms (such as the token bucket algorithm), it can simulate burst traffic and precise bandwidth requirements under specific network scenarios. It supports common network protocols and uses extension mechanisms to meet different simulation needs. This invention supports common network protocols including Ethernet, IPv4, IPv6, TCP, UDP, ARP, and ICMP, and has extensibility capabilities to meet simulation needs in different network environments.

[0171] It should be noted that, in the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0172] The various embodiments in this specification are described in a related manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0173] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A virtual traffic generator device for network switching units, characterized in that, include: The system includes a clock-driven scheduler, an XML configuration parsing module, a traffic generation module, a queue management module, and a 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 external XML configuration files 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 network data packets that meet the characteristics based on the external incentive source file, and add the network data packets to the sending queue of the target port; wherein, the traffic generation mode includes: real incentive mode and generative incentive mode. The queue management module is used, under the control of the clock-driven scheduler, to send network data packets to the external ESL model via the target port based on the token bucket algorithm with negative token mechanism, according to the configuration information it receives; The statistics module is used, under the control of the clock-driven scheduler, to control the output level, storage path, and recording period of the logs of the virtual traffic generator device according to the configuration information it receives.

2. The virtual traffic generator device for network switching units 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 network switching units according to claim 2, characterized in that, The XML configuration parsing module reads and parses external XML configuration files to obtain configuration information for each module, and then 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; Parse the port configuration information in the XML configuration file and send the port configuration information to the queue management module; Based on the port configuration information corresponding to each port, the real incentive mode configuration information and / or the generative incentive mode configuration information are parsed as traffic configuration information, and the traffic configuration information is sent to the traffic generation module. The log configuration information in the XML configuration file is parsed and sent to the statistics module.

4. The virtual traffic generator device for network switching units 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 network switching units according to claim 1, characterized in that, The traffic generation module selects the corresponding traffic generation mode based on the configuration information it receives, generates network data packets that meet the characteristics based on the external stimulus source file, and adds the network data packets to the sending queue of the target port, including: The traffic generation module determines the configuration information it receives: If the configuration information received 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 sending queue of the target port. If the configuration information received is generative incentive mode configuration information, select generative incentive mode, generate network data packets that conform to the characteristics of generative incentive mode according to the generative incentive mode configuration information, and add the network data packets 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 true incentive mode based on the true incentive mode configuration information, generates network data packets that conform to the characteristics of the true incentive mode based on the external incentive source file, and adds the network data packets to the sending queue of the target port, including: The traffic generation module reads an external incentive source file according to the real incentive mode configuration information; the incentive source file includes raw data frames captured in the network, wherein each raw data frame includes the header information of the network protocol stack and the payload data; each raw data frame also includes a timestamp; When reading a raw data frame from the stimulus source file, the traffic generation module creates a new packet object of class Packet. The read raw data frame is sent to the XML configuration parsing module for parsing, and the header information and payload data of each protocol layer are extracted layer by layer; Read the timestamp of the raw data frame from the stimulus source file and store the timestamp in the data packet object; The traffic generation module stores the parsed protocol headers, payloads, and timestamps into the data packet object to obtain network data packets that conform to the characteristics of the real incentive mode. The traffic generation module adds network data packets that conform to 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 process involves sending the read raw data frame to the XML configuration parsing module for parsing, extracting the header information and payload data of each protocol layer by layer, including: The XML configuration parsing module parses the Ethernet header, network layer header, and transport layer header in the original data frame, extracting the header information and payload data of each 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 based on the generative incentive mode configuration information, generates network data packets that conform to the characteristics of the generative incentive mode based on the generative incentive mode configuration information, and adds the network data packets to the sending queue of the target port, including: The traffic generation module extracts user-defined flow template attributes based on the generative incentive mode configuration information. Instantiate a data packet object based on the stream template attribute; The length of the current data packet is dynamically generated based on the packet length distribution strategy in the flow template attributes; Based on the sending rate in the stream template attribute, a token bucket algorithm is used for rate control; Set the transmission delay of the current data packet according to the transmission delay type in the stream template attribute; Based on the protocol type in the generative incentive mode configuration information, the field parameters of each layer protocol header are generated sequentially. Generate the payload content of the data packet based on the payload type set in the stream template attribute; Based on the preset protocol type and specifications, the field parameters of each layer protocol header and the payload content of the data packet are encapsulated. The encapsulated protocol header, payload content, and generated timestamp information are written into the data packet object to obtain a network data packet that conforms to the characteristics of the generative incentive mode. Add network packets that conform to 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 in the header of each protocol 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, based on the configuration information it receives, uses a token bucket algorithm with a negative token mechanism to send network data packets to an external ESL model via the target port, including: Under the control of the clock-driven scheduler, the queue management module buffers network data packets to be sent, controls the sending rate of each network data packet based on the token bucket algorithm with a negative token mechanism according to the configuration information it receives, and sends the network data packets to the external ESL model through the target port.

Citation Information

Patent Citations

  • System-level simulation modeling method for black box model

    CN116842902A

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

    JP2010039678A