A dual-mode fused hardware-software collaborative network test service generation method

By using FPGA off-chip DDR storage and dual-partition multi-queue management, combined with alternating read/write and dual-mode scheduling, the problem of limited cache capacity and concurrent memory access conflicts in large-scale ad hoc network scenarios of traditional traffic generators is solved. High-fidelity service flow generation and flexible scheduling are achieved, which is suitable for network testing of large-scale ad hoc networks.

CN123164031APending Publication Date: 2026-11-24ARMY ENG UNIV OF PLA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611317480.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-28
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Traditional traffic generators struggle to meet the high-fidelity network testing requirements in large-scale self-organizing network scenarios, especially in the face of limited cache capacity, concurrent memory access conflicts, and a single scheduling mode.

Method used

By adopting a hardware and software co-design, and through FPGA off-chip DDR storage and dual-partition multi-queue management, combined with alternating time window read and write and dual-mode scheduling, high-fidelity generation and flexible scheduling of service flows in large-scale self-organizing network scenarios can be achieved.

Benefits of technology

It breaks through the cache capacity bottleneck and concurrent memory access conflicts of traditional solutions, realizes the concurrent generation and management of multi-node business flows, supports high-fidelity reproduction of business flow time correlation and flexible adaptation to different testing needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123164031A_ABST
    Figure CN123164031A_ABST
Patent Text Reader

Abstract

This invention discloses a dual-mode fusion software and hardware collaborative network test service generation method, relating to the field of electronic technology. The core of the method is a software and hardware collaborative architecture, which involves issuing traffic parameters and mode configuration instructions from a host computer; performing alternating read and write operations on an off-chip DDR based on a preset time window. The DDR contains first and second partitions, each containing multiple logical queues corresponding to different nodes. During the current window, new parameters are written to the first partition while historical parameters are read from the second partition. After the window ends, the partition roles are switched; scheduling is performed according to the mode configuration instructions. In the time-driven mode, the current timestamp is compared with the expected sending timestamp; in the parameter-driven mode, the credit value is compared with the data packet length. After scheduling and allowing the data to pass, it is parsed and assembled into a test data packet. This invention overcomes the shortcomings of limited cache capacity, concurrent memory access conflicts, and a single scheduling mode, achieving high-fidelity generation and flexible scheduling of service flows in large-scale self-organizing network scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a dual-mode fusion method for generating software and hardware collaborative network test services, belonging to the field of electronic technology. Background Technology

[0002] In network testing for large-scale ad hoc networks, existing traffic generators can produce basic test traffic and are relatively simple to deploy. However, in complex application scenarios such as large-scale ad hoc network simulation, extremely high network concurrency, and highly bursty service flows, traditional traffic generation architectures are insufficient to meet the requirements of high-fidelity network testing. Traditional traffic generation mechanisms aim to increase the transmission rate of a single data stream. While they can meet the throughput testing requirements in simple scenarios, they focus more on the stateless, periodic, and predictable traffic generation problem. The traffic generation and scheduling problems under extreme conditions such as extremely complex large-scale ad hoc network topologies, massive node concurrency, and strong historical time correlation of service flows urgently require the research of new solutions.

[0003] Existing network traffic generators suffer from limited cache capacity, concurrent memory access conflicts, and simplistic traffic model scheduling. Caching mechanisms and scheduling strategies directly impact critical performance aspects such as traffic burst reproducibility and end-to-end latency control, and are closely related to key technologies in the underlying hardware, including storage resource allocation, memory management, and transmit / receive scheduling. Therefore, introducing off-chip DDR and flexible scheduling technologies in network test service generation can meet the needs of large-scale ad hoc networks for service flow generation control in multi-node concurrency and high burst scenarios. This invention adopts a hardware-software co-design approach. Through a customized "dual-partition, multi-queue" storage management architecture, it implements large-capacity data caching, concurrent node physical isolation, and traffic shaping functions in test service generation using FPGA hardware circuits, while implementing application scenario awareness and scheduling mode selection (time-driven / parameter-driven) functions in upper-layer software. By effectively combining the advantages of hardware and software, the realism and concurrency of ad hoc network node test service generation are improved. Summary of the Invention

[0004] The purpose of this invention is to provide a dual-mode fusion hardware and software collaborative network test service generation method. By storing large-scale traffic parameters on the FPGA off-chip DDR and using dual-partition multi-queue management, combined with alternating time window read and write and dual-mode switchable scheduling, it overcomes the defects of traditional traffic generators such as limited cache capacity, concurrent memory access conflicts and single scheduling mode, and achieves the goal of high-fidelity generation and flexible scheduling of service flows in large-scale self-organizing network scenarios.

[0005] To achieve the above objectives, the present invention is implemented using the following technical solution.

[0006] On one hand, this invention provides a dual-mode fusion software and hardware collaborative network test service generation method, applied to an FPGA platform, including:

[0007] Obtain the traffic parameters and mode configuration instructions issued by the host computer; the traffic parameters include the node identifier of each node, the expected transmission timestamp, the flow identifier, and the data packet length; the mode configuration instructions are used to specify the time-driven mode or the parameter-driven mode.

[0008] Based on the node identifier, the flow parameters are written into the corresponding logical queue in the FPGA off-chip DDR; the off-chip DDR includes a first partition and a second partition, and each partition includes multiple logical queues corresponding to different nodes;

[0009] According to a preset time window, alternating read and write operations are performed on the off-chip DDR. The off-chip DDR includes a first partition and a second partition, each partition including multiple logical queues corresponding to different nodes. Within the current time window, according to the node identifier, newly arriving traffic parameters are written to the corresponding logical queue in the first partition, and traffic parameters stored in the previous time window are read from the corresponding logical queue in the second partition. When the current time window ends, the read and write operations of the first partition and the second partition are switched to realize an alternating access closed loop that couples current parameters and historical parameters.

[0010] The traffic parameters read from the external DDR are scheduled and controlled according to the mode configuration instructions. If time-driven mode is specified, the current system timestamp is compared with the expected transmission timestamp read from the external DDR. If the preset conditions are met, the scheduling is performed and the data is released. If parameter-driven mode is specified, the corresponding credit counter is retrieved according to the flow identifier, the current credit value is compared with the data packet length, and the release is determined according to the comparison result.

[0011] The traffic parameters after the scheduling is approved are parsed and assembled into test data packets.

[0012] Furthermore, the host computer is upper-layer software running on the host, used to issue the traffic parameters and mode configuration instructions according to the current test scenario requirements, and configure them to the FPGA platform through a dedicated communication interface.

[0013] Furthermore, after the flow parameters are sent to the FPGA platform, a flow identifier allocation step is also included:

[0014] Query the hash list maintained on-chip by the FPGA;

[0015] If a match is not found, a unique flow identifier is assigned to the flow parameter based on the order in which the flow parameter arrives, using a combination of source IP address and arrival sequence number. The flow identifier is then recorded in the hash chain and written into the flow parameter.

[0016] If a match is found, the flow identifier retrieved from the hash chain will be written into the flow parameters.

[0017] Furthermore, the step of performing alternating read / write operations on the off-chip DDR according to a preset time window specifically includes:

[0018] The FPGA internally maintains a control signal with an initial state value of 0;

[0019] Within the initial time window, when the control signal is 0, a write operation is performed on the newly arrived flow parameters to the first partition, and a read operation is performed on the flow parameters that have been written to the second partition in the previous time window.

[0020] After a time window period, the control signal flips to 1, switching the read / write roles of the first and second partitions.

[0021] After each time window period, the control signal flips once to perform a partition switching operation, thereby forming an alternating access closed loop.

[0022] Furthermore, the node identifier is the source IP address;

[0023] The write operation of executing the newly arrived traffic parameters to the first partition includes:

[0024] The node mapping table of the first partition is retrieved based on the source IP address in the newly arrived traffic parameters, and it is checked whether the logical queue corresponding to the source IP address is not full. If it is not full, the off-chip DDR is accessed to write the traffic parameters into the corresponding logical queue. If it is full, the writing is paused and the operation is awaited.

[0025] Furthermore, when time-driven mode is specified, if the preset condition is met, i.e. the previous system timestamp is not less than the expected transmission timestamp read from the off-chip DDR, the data packet transmission is allowed to be scheduled and released after the preset condition is met; if the preset condition is not met, the processing flow of the current traffic parameters is blocked and rescheduling is performed after the preset condition is met.

[0026] Furthermore, the comparison of the current credit value with the data packet length, and the determination of whether to allow passage based on the comparison result, specifically includes:

[0027] When specified as parameter-driven mode, hardware traffic shaping control based on a credit mechanism is executed: if the current credit value is greater than or equal to the data packet length, passage is allowed, and a credit value equal to the data packet length is deducted from the dedicated credit counter; if the current credit value is less than the data packet length, the current processing flow is aborted and the current credit value remains unchanged, waiting for the next scheduling.

[0028] Furthermore, the step of parsing and assembling the traffic parameters after scheduling and allowing passage into test data packets specifically includes:

[0029] The obtained traffic parameters after the scheduling is released are parsed, and the feature parameters of the traffic parameters after the scheduling is released are extracted;

[0030] Based on the characteristic parameters, perform data packet assembly and network protocol encapsulation to generate test data packets;

[0031] The test data packet is output to the network device under test.

[0032] Furthermore, during the continuous generation and transmission of test data packets by the system, the host computer concurrently writes new traffic parameters. After receiving these parameters, the FPGA platform performs dynamic reconfiguration without interrupting the current communication link, and generates and outputs data packet streams that conform to the new characteristics in real time.

[0033] On the other hand, the present invention also provides a dual-mode fusion hardware and software collaborative network testing service generation system, comprising:

[0034] The host computer software configuration module is configured to: obtain the traffic parameters and mode configuration instructions issued by the host computer; the traffic parameters include the node identifier of each node, the expected sending timestamp, the flow identifier and the data packet length; the mode configuration instructions are used to specify the time-driven mode or the parameter-driven mode.

[0035] The alternating transmit / receive queue manager module is configured to: perform alternating read / write operations on off-chip DDR according to a preset time window; wherein, the off-chip DDR includes a first partition and a second partition, each partition including multiple logical queues corresponding to different nodes; within the current time window, according to the node identifier, newly arriving traffic parameters are written to the corresponding logical queue in the first partition, and traffic parameters stored in the previous time window are read from the corresponding logical queue in the second partition; when the current time window ends, the read / write operations of the first partition and the second partition are switched to realize an alternating access closed loop coupled with current parameters and historical parameters;

[0036] The dual-mode traffic scheduling module is configured to: perform scheduling control on the traffic parameters read from the external DDR according to the mode configuration instruction; if time-driven mode is specified, compare the current system timestamp with the expected transmission timestamp read from the external DDR, and if the preset conditions are met, perform scheduling and release; if parameter-driven mode is specified, retrieve the corresponding credit counter according to the flow identifier, compare the current credit value with the data packet length, and determine whether to release based on the comparison result;

[0037] The traffic generation module is configured to parse and assemble the traffic parameters after scheduling and approval into test data packets.

[0038] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:

[0039] 1. This invention overcomes the capacity bottleneck of on-chip storage resources by storing traffic parameters in the FPGA's off-chip DDR, instead of storing them in the FPGA's on-chip memory as in existing technologies. Furthermore, it adopts a "dual-partition, multi-queue" storage management structure. The dual-partition approach divides the DDR into two logically independent regions to achieve read-write separation, ensuring that each self-organizing network node has its own dedicated fixed-size physical storage area. This avoids the additional hardware overhead and access contention caused by dynamic memory allocation. As a result, the system can simultaneously cache and process traffic parameters from dozens to hundreds of nodes on a single FPGA platform, realizing the concurrent generation and management of multi-node service flows in large-scale self-organizing network scenarios. This effectively overcomes the technical shortcomings of traditional solutions, such as limited cache capacity and concurrent memory access conflicts.

[0040] 2. This invention achieves coupling of each currently transmitted data packet with the service flow parameters of its previous time window through alternating read and write operations with different time window periods. That is, write and read operations can be executed in parallel within the same time window. The sending queue writes the new parameters of the current window to the first partition, while the receiving queue reads the historical parameters of the previous time window from the second partition. When the next time window period arrives, the read and write roles of the two partitions switch. Compared with traditional solutions that only focus on the transmission rate of a single data stream, this invention achieves high-fidelity reproduction of the time correlation of service flows.

[0041] 3. This invention implements both time-driven and parameter-driven scheduling logic in FPGA hardware. The time-driven mode achieves precise time-domain control of data packets by comparing the current system timestamp with the expected transmission timestamp in the traffic parameters, which is suitable for test scenarios that require precise reproduction of specific transmission time sequences. The parameter-driven mode achieves hardware-level traffic shaping control by retrieving the corresponding dedicated credit counter through the flow identifier and comparing the credit value with the data packet length, which is suitable for test scenarios that require simulation of multi-service flow rate limits. The two modes can be switched as needed according to the configuration instructions issued by the host computer software, so that the same hardware platform can flexibly adapt to different test requirements from precise timing simulation to traffic shaping verification without replacing or reconfiguring the hardware. Attached Figure Description

[0042] Figure 1 The diagram shown is a flowchart illustrating a dual-mode fusion software and hardware collaborative network test service generation method provided in this embodiment. Detailed Implementation

[0043] It should be noted that the technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations on the technical solution of the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.

[0044] The term "and / or" simply describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0045] Example 1

[0046] This embodiment provides a dual-mode fusion software and hardware collaborative network test service generation method, which is applied to the Field Programmable Gate Array (FPGA) platform.

[0047] See Figure 1 The method provided in this embodiment is based on the architecture of a dual-mode fusion hardware and software collaborative network test service generation system. This system includes a host computer software configuration module, a preprocessing module, an alternating transmit / receive queue manager module, a DDR-based dual-partition multi-queue buffer circuit module, a dual-mode traffic scheduling module, and a traffic generation module. The host computer software configuration module is upper-layer software running on the host machine, while the remaining modules are all implemented using hardware circuits on an FPGA platform.

[0048] The host computer software configuration module is used to generate traffic parameters for all nodes in the ad hoc network according to the requirements of the current test scenario, and to send mode configuration commands and traffic parameters to the FPGA platform through a dedicated communication interface. The dedicated communication interface includes Ethernet and a serial bus.

[0049] The preprocessing module receives traffic parameters from the host computer software configuration module and allocates and manages flow identifiers based on an internally maintained hash list. Specifically, after the traffic parameters are sent to the FPGA platform, this module first queries the hash list; if no match is found, it assigns a unique flow identifier based on the order of arrival of the parameters, using a combination of the source IP address and the arrival sequence number. This flow identifier is recorded in the hash list and written to the traffic parameter; if a match is found, the retrieved flow identifier is directly written to the traffic parameter. Subsequently, the traffic parameters carrying the flow identifiers are output to the alternating transceiver queue manager module.

[0050] The alternating transmit and receive queue manager module is implemented based on state machine and hardware combinational logic. It is used to control the transmit queue and receive queue to perform dynamic alternating read and write operations on the off-chip double data rate synchronous dynamic random access memory (DDR) within a set time window period. At the same time, it configures traffic parameters and schedules the output of traffic parameters to realize the continuous dynamic generation of test service flows and the reproduction of historical time correlations.

[0051] The DDR-based dual-partition multi-queue buffer circuit module is implemented using off-chip DDR memory, serving as a data transfer and buffer between on-chip logic and off-chip storage. It employs a "dual-partition, multi-queue" storage management structure to store and isolate traffic parameters from different nodes. The dual-partition structure simultaneously supports traffic parameter configuration and output scheduling, enabling seamless switching and dynamic updates of traffic parameters. Within each partition, a block mapping mechanism further divides the DDR physical space into independent storage blocks equal to the number of self-organizing network nodes. Each self-organizing network node is allocated a fixed-size physical storage area, thus forming a multi-queue structure. DDR is SDRAM with double the data transfer rate, its data transfer speed being twice the system clock frequency. Due to the increased speed, its transmission performance is superior to traditional SDRAM. The large-capacity off-chip DDR solves the bottleneck of limited on-chip storage resources in the FPGA, supporting parallel traffic parameter caching for large-scale self-organizing network nodes. The multi-queue structure achieves physical isolation and independent management of traffic parameters from different nodes, avoiding memory access conflicts during multi-node concurrent simulation.

[0052] The dual-mode traffic scheduling module supports both time-driven and parameter-driven business traffic models, meeting the testing needs of different scenarios. Under different testing requirements, based on the instructions issued by the host computer software configuration module, it adopts either time-driven or parameter-driven mode to schedule the output of traffic parameters.

[0053] The traffic generation module is used to parse the scheduled traffic parameters, assemble and encapsulate data packets based on the extracted feature parameters, generate corresponding test data packets, and output them to the network device under test.

[0054] By effectively combining the advantages of hardware and software, without changing the underlying hardware resources, the scheduling mode can be dynamically switched through software commands according to the needs of network testing scenarios. The scheduling logic for microsecond-level timestamp comparison or concurrent credit counting can be flexibly configured to meet the testing needs of different testing environments.

[0055] Based on the above modules, the method provided in this embodiment specifically includes the following steps:

[0056] Step S1: Obtain the flow parameters and mode configuration instructions issued by the host computer.

[0057] Based on the requirements of the current network testing scenario, such as simulating concurrent communication of multiple nodes in a large-scale ad hoc network, the host computer generates traffic parameters for all nodes to be simulated in the ad hoc network. The traffic parameters include information such as the node identifier, expected sending timestamp, flow identifier, and data packet length of each node to be simulated.

[0058] The host computer also generates mode configuration instructions based on the current network testing scenario requirements, specifying whether the test will use a time-driven or parameter-driven mode. Subsequently, the host computer sends the aforementioned traffic parameters and mode configuration instructions to the FPGA platform via a dedicated communication interface.

[0059] Step S2: After the host computer software configuration module sends the traffic parameters to the FPGA platform, they are received by the FPGA's internal preprocessing module. This module first queries its internally maintained hash list using the five-tuple index of the traffic parameters. If no match is found, it assigns a unique flow identifier to the traffic parameters based on the order of their arrival, using a combination of the source IP address and the arrival sequence number. This flow identifier is recorded in the hash list and written into the traffic parameters. If a match is found, the retrieved flow identifier is directly written into the traffic parameters. Subsequently, the traffic parameters carrying the flow identifier are output to the subsequent process, namely the alternating transmit / receive queue manager module.

[0060] Step S3: Perform alternating read / write operations on the off-chip DDR according to a preset time window; wherein the off-chip DDR includes a first partition and a second partition, and each partition includes multiple logical queues corresponding to different nodes; within the current time window, according to the node identifier, newly arrived traffic parameters are written into the corresponding logical queue in the first partition, and traffic parameters stored in the previous time window are read from the corresponding logical queue in the second partition; after the current time window ends, switch the read / write operations of the first partition and the second partition to realize an alternating access closed loop that couples current parameters and historical parameters.

[0061] After receiving the flow parameters from the host computer, the FPGA platform first temporarily stores the flow parameters in the FPGA's on-chip cache. Then, it extracts the source IP address from the flow parameters as a node identifier, uses the source IP address to look up the node mapping table, and locates the corresponding logical storage queue in the external DDR.

[0062] The write operation to the first partition with newly arrived traffic parameters includes: retrieving the node mapping table of the first partition based on the source IP address in the newly arrived traffic parameters, and checking whether the logical queue corresponding to the source IP address is not full; if it is not full, accessing the off-chip DDR to write the traffic parameters to the corresponding logical queue; if it is full, pausing the write operation and waiting for subsequent operations.

[0063] In one specific implementation, the total off-chip DDR storage capacity is divided into two logically independent partitions of equal capacity—DDR_0 and DDR_1—serving as a dual buffer. DDR_0 serves as the first partition, and DDR_1 as the second. Multiple logical queues within DDR_0 and DDR_1 correspond one-to-one with each node in the ad hoc network, and each logical queue has an independent physical storage area. This logical isolation allows for the concurrent generation of multiple service flows within a single buffer, while avoiding the additional hardware overhead and access contention caused by dynamic memory allocation.

[0064] The alternating transmit / receive queue manager module switches read / write partitions periodically according to a set time window period, enabling parallel operations of writing current traffic parameters and reading traffic parameters from the previous time window. The specific operations include:

[0065] Step S3A1: Assume the system's preset time window switching period is T, and the total capacity of the off-chip DDR memory has been divided into DDR_0 and DDR_1. The FPGA internally maintains a control signal with an initial state value of 0.

[0066] Step S3A2: Within the initial time window (control signal set to 0), firstly, the sending queue manager writes the newly received traffic parameters into the logical queue corresponding to DDR_0 according to the source IP mapping relationship; at the same time, the receiving queue manager reads the historical state data cached in the previous time window from DDR_1 to realize parallel read and write operations.

[0067] Step S3A3: After time window T, the control signal state flips to 1, and the system performs dynamic switching of storage partitions. At this time, the transmit queue manager starts writing new traffic parameters to DDR_1, and the receive queue manager starts reading historical data from DDR_0; thereafter, the system performs storage partition switching operations every cycle T.

[0068] Through the aforementioned alternating read / write mechanism, the system achieves an alternating access closed loop coupling the generation of current business flow parameters with the historical cache of the previous window. Traffic parameters written within the current time window will be read out in the next time window, thus realistically reproducing the historical state dependencies and bursty characteristics of the business flow. Compared to traditional single-caching mechanisms, this embodiment effectively overcomes the aforementioned shortcomings, faithfully reproducing the historical state dependencies and true burstiness of the business flow.

[0069] It should be noted that during the continuous generation and transmission of data streams by the system, the host computer software can concurrently write new traffic parameter commands. After receiving these commands, the underlying FPGA hardware can perform dynamic reconfiguration without interrupting the current communication link, generating and outputting data packet streams that conform to the new characteristics in real time and seamlessly.

[0070] Step S4: Perform scheduling control on the traffic parameters read from the external DDR according to the mode configuration instruction; if time-driven mode is specified, compare the current system timestamp with the expected transmission timestamp read from the external DDR, and if the preset conditions are met, execute scheduling to allow passage; if parameter-driven mode is specified, retrieve the corresponding credit counter according to the flow identifier, compare the current credit value with the data packet length, and determine whether to allow passage based on the comparison result.

[0071] As a specific implementation, this embodiment first parses the expected transmission timestamp, data packet length, and flow identifier, among other information, from the traffic parameters to be processed read from the off-chip DDR for scheduling control. Subsequently, after obtaining the flow identifier, the dual-mode traffic scheduling module executes the corresponding scheduling logic based on the mode configuration instructions issued by the host computer.

[0072] If configured in "time-driven" mode, time-based scheduling control is executed. The system obtains the current system timestamp T. cur (Maintained by a high-precision timer inside the FPGA), and the expected transmission timestamp T read from the flow parameters. pkt Compare them. If Tcur ≥ T pkt If the condition is met, the traffic parameter is allowed to be sent to the subsequent processing module; otherwise, the processing flow of the current traffic parameter is blocked, and rescheduling is carried out after the condition is met. Through this precise time-domain control, specific transmission time sequence requirements can be met, and the time correlation and sudden moments of the business flow can be reproduced.

[0073] If configured in "parameter-driven" mode, hardware traffic shaping control based on a credit mechanism is executed. The system addresses the corresponding dedicated credit counter (an independent credit counter is maintained for each flow on the FPGA chip) based on the flow identifier in the traffic parameters. The current credit value of this dedicated credit counter is obtained, and it is checked whether the credit value is greater than or equal to the data packet length. If it is greater than or equal to the data packet length, the control condition is met, allowing the traffic parameters to be sent to the subsequent processing module, and a credit value equal to the data packet length is deducted from the dedicated credit counter. If it is less than the data packet length, the current processing flow is terminated, and the current credit value remains unchanged, waiting for the next scheduling.

[0074] Step S5: Parse the traffic parameters after scheduling and assemble them into test data packets.

[0075] The traffic generation module receives traffic parameters after they have been scheduled and released by the dual-mode traffic scheduling module, parses and extracts their internal characteristic parameters, including source IP address, destination IP address, packet length, and protocol type. Based on these characteristic parameters, it performs data packet assembly and network protocol encapsulation, such as Ethernet frame encapsulation, IP packet encapsulation, and UDP / TCP protocol encapsulation, to generate corresponding network test data packets. Finally, the generated test data packets are output to the network device under test, completing the entire process of generating and sending the test service flow.

[0076] During the continuous generation and transmission of data streams by the system, the host computer software can concurrently write new traffic parameter commands. Upon receiving these commands, the underlying FPGA hardware can perform dynamic reconfiguration without interrupting the current communication link, generating and outputting data packet streams conforming to the new characteristics in real time and seamlessly. This feature allows for adjustment of test parameters without system downtime, significantly improving testing efficiency and flexibility.

[0077] Example 2

[0078] This embodiment proposes a dual-mode fusion hardware and software collaborative network testing service generation system based on Embodiment 1, including:

[0079] The host computer software configuration module is configured to: obtain the traffic parameters and mode configuration instructions issued by the host computer; the traffic parameters include the node identifier of each node, the expected sending timestamp, the flow identifier and the data packet length; the mode configuration instructions are used to specify the time-driven mode or the parameter-driven mode.

[0080] The alternating transmit / receive queue manager module is configured to perform alternating read / write operations on the off-chip DDR according to a preset time window. The off-chip DDR includes a first partition and a second partition, each of which includes multiple logical queues corresponding to different nodes. Within the current time window, based on the node identifier, newly arriving traffic parameters are written to the corresponding logical queue in the first partition, and traffic parameters stored in the previous time window are read from the corresponding logical queue in the second partition. When the current time window ends, the read / write operations of the first partition and the second partition are switched to achieve an alternating access closed loop that couples current parameters with historical parameters.

[0081] The dual-mode traffic scheduling module is configured to: control the traffic parameters read from the external DDR according to the mode configuration instruction; if time-driven mode is specified, compare the current system timestamp with the expected transmission timestamp read from the external DDR, and if the preset conditions are met, execute the scheduling and release; if parameter-driven mode is specified, retrieve the corresponding credit counter according to the flow identifier, compare the current credit value with the data packet length, and determine whether to release based on the comparison result.

[0082] The traffic generation module is configured to parse and assemble the traffic parameters after scheduling and approval into test data packets.

[0083] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0084] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0085] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0086] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0087] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A dual-mode fusion software and hardware collaborative network test service generation method, applied to an FPGA platform, characterized in that, include: Obtain the flow parameters and mode configuration commands issued by the host computer; The traffic parameters include the node identifier, expected transmission timestamp, flow identifier, and data packet length of each node. The mode configuration instruction is used to specify the time-driven mode or the parameter-driven mode. According to a preset time window, alternating read and write operations are performed on the off-chip DDR. The off-chip DDR includes a first partition and a second partition, each partition including multiple logical queues corresponding to different nodes. Within the current time window, according to the node identifier, newly arriving traffic parameters are written to the corresponding logical queue in the first partition, and traffic parameters stored in the previous time window are read from the corresponding logical queue in the second partition. When the current time window ends, the read and write operations of the first partition and the second partition are switched to realize an alternating access closed loop that couples current parameters and historical parameters. The traffic parameters read from the external DDR are scheduled and controlled according to the mode configuration instructions. If time-driven mode is specified, the current system timestamp is compared with the expected transmission timestamp read from the external DDR. If the preset conditions are met, the scheduling is performed and the data is released. If parameter-driven mode is specified, the corresponding credit counter is retrieved according to the flow identifier, the current credit value is compared with the data packet length, and the release is determined according to the comparison result. The traffic parameters after the scheduling is approved are parsed and assembled into test data packets.

2. The dual-mode fusion software and hardware collaborative network test service generation method according to claim 1, characterized in that, The host computer is upper-layer software running on the host machine, used to issue the traffic parameters and mode configuration instructions according to the current test scenario requirements, and configure them to the FPGA platform through a dedicated communication interface.

3. The dual-mode fusion software and hardware collaborative network test service generation method according to claim 1, characterized in that, After the flow parameters are sent to the FPGA platform, the process also includes a flow identifier allocation step: Query the hash list maintained on-chip by the FPGA; If a match is not found, a unique flow identifier is assigned to the flow parameter based on the order in which the flow parameter arrives, using a combination of source IP address and arrival sequence number. The flow identifier is then recorded in the hash chain and written into the flow parameter. If a match is found, the flow identifier retrieved from the hash chain will be written into the flow parameters.

4. The dual-mode fusion software and hardware collaborative network test service generation method according to claim 1, characterized in that, The step of performing alternating read / write operations on the off-chip DDR according to a preset time window specifically includes: The FPGA internally maintains a control signal with an initial state value of 0; Within the initial time window, when the control signal is 0, a write operation is performed on the newly arrived flow parameters to the first partition, and a read operation is performed on the flow parameters that have been written to the second partition in the previous time window. After a time window period, the control signal flips to 1, switching the read / write roles of the first and second partitions. After each time window period, the control signal flips once to perform a partition switching operation, thereby forming an alternating access closed loop.

5. The dual-mode fusion software and hardware collaborative network test service generation method according to claim 1, characterized in that, The node identifier is the source IP address; The write operation of executing the newly arrived traffic parameters to the first partition includes: The node mapping table of the first partition is retrieved based on the source IP address in the newly arrived traffic parameters, and it is checked whether the logical queue corresponding to the source IP address is not full. If it is not full, the off-chip DDR is accessed to write the traffic parameters into the corresponding logical queue. If it is full, the writing is paused and the operation is awaited.

6. The method for generating software and hardware collaborative network testing services with dual-mode fusion according to claim 1, characterized in that, When time-driven mode is specified, if the preset condition is met, i.e. the previous system timestamp is not less than the expected transmission timestamp read from the off-chip DDR, the data packet transmission is allowed to be scheduled and released after the preset condition is met; if the preset condition is not met, the current traffic parameter processing flow is blocked and rescheduling is performed after the preset condition is met.

7. The dual-mode fusion software and hardware collaborative network test service generation method according to claim 1, characterized in that, The comparison of the current credit value with the data packet length, and the determination of whether to allow passage based on the comparison result, specifically includes: When specified as parameter-driven mode, hardware traffic shaping control based on a credit mechanism is executed: if the current credit value is greater than or equal to the data packet length, passage is allowed, and a credit value equal to the data packet length is deducted from the dedicated credit counter; if the current credit value is less than the data packet length, the current processing flow is aborted and the current credit value remains unchanged, waiting for the next scheduling.

8. The method for generating software and hardware collaborative network test services with dual-mode fusion according to claim 1, characterized in that, The step of parsing and assembling the traffic parameters after scheduling and allowing access into test data packets specifically includes: The obtained traffic parameters after the scheduling is released are parsed, and the feature parameters of the traffic parameters after the scheduling is released are extracted; Based on the characteristic parameters, perform data packet assembly and network protocol encapsulation to generate test data packets; The test data packet is output to the network device under test.

9. The dual-mode fusion software and hardware collaborative network test service generation method according to claim 1, characterized in that, During the continuous generation and transmission of test data packets by the system, the host computer concurrently writes new traffic parameters. After receiving these parameters, the FPGA platform performs dynamic reconfiguration without interrupting the current communication link, and generates and outputs data packet streams that conform to the new characteristics in real time.

10. A dual-mode integrated hardware and software collaborative network testing service generation system, characterized in that, include: The host computer software configuration module is configured to: obtain the traffic parameters and mode configuration instructions issued by the host computer; the traffic parameters include the node identifier of each node, the expected sending timestamp, the flow identifier and the data packet length; the mode configuration instructions are used to specify the time-driven mode or the parameter-driven mode. The alternating transmit / receive queue manager module is configured to: perform alternating read / write operations on off-chip DDR according to a preset time window; wherein, the off-chip DDR includes a first partition and a second partition, each partition including multiple logical queues corresponding to different nodes; within the current time window, according to the node identifier, newly arriving traffic parameters are written to the corresponding logical queue in the first partition, and traffic parameters stored in the previous time window are read from the corresponding logical queue in the second partition; when the current time window ends, the read / write operations of the first partition and the second partition are switched to realize an alternating access closed loop coupled with current parameters and historical parameters; The dual-mode traffic scheduling module is configured to: perform scheduling control on the traffic parameters read from the external DDR according to the mode configuration instruction; if time-driven mode is specified, compare the current system timestamp with the expected transmission timestamp read from the external DDR, and if the preset conditions are met, perform scheduling and release; if parameter-driven mode is specified, retrieve the corresponding credit counter according to the flow identifier, compare the current credit value with the data packet length, and determine whether to release based on the comparison result; The traffic generation module is configured to parse and assemble the traffic parameters after scheduling and approval into test data packets.