Simulation method for message deduplication in VRA mode and related device

By judging the difference between the current message serial number and the maximum serial number of the sent message, combining the acceptable window and sliding window size, determining the processing method and updating the lookup table, the problem of message deduplication in VRA mode in FRER is solved, and fast and resource-saving verification is achieved.

CN120342891APending Publication Date: 2025-07-18SUZHOU CENTEC COMM CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510641049.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The prior art is difficult to effectively verify the packet deduplication function in VRA mode in FRER, and lacks a fast and resource-saving simulation model.

Method used

By determining the difference between the current message serial number and the maximum serial number of the sent message, combining the acceptable window and sliding window size, the processing method is determined and the lookup table is updated, so as to realize message deduplication simulation in VRA mode.

Benefits of technology

It provides a fast and resource-saving simulation method, which can effectively verify the packet deduplication function of the design to be tested, and simplifies the verification process of VRA mode in FRER.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120342891A_ABST
    Figure CN120342891A_ABST
Patent Text Reader

Abstract

The invention provides a simulation method for message deduplication in a VRA mode and a related device, and relates to the technical field of chip verification. The method comprises the steps that whether a first serial number of a current message is larger than a second serial number or not is judged, the second serial number is the maximum serial number of a sent message in a target table item, the target table item is a table item corresponding to a target flow to which the current message belongs in a lookup table, and the table item of the lookup table further comprises a message record corresponding to the flow; the message record is used for indicating that the processing state corresponding to the serial number of the sent message is sent; if yes, calculating to obtain a difference value between the first serial number and the second serial number; according to the size of the acceptable window, the size of the sliding window and the difference value, a target processing mode of the current message is determined, the lookup table is updated, and the target processing mode indicates that the current message is discarded or sent. Therefore, simulation of message sliding window de-duplication in the VRA mode in FERE can be realized, and function verification of the to-be-tested design can be quickly carried out.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of chip verification technology. Specifically, it relates to a simulation method for packet deduplication in the VRA mode and related devices. Background Technique

[0002] In many fields (such as the vehicle-mounted communication field), in order to avoid data loss, a redundant transmission mechanism is usually adopted. In the 802.1CB protocol, frame replication and elimination technology (Frame Replication and Elimiation for Reliablity, FRER) is defined. The working principle of FRER is to replicate data frames in the network and eliminate redundant frames at the receiving end to provide higher reliability and fault tolerance. For packets enabling FRER in a network switch, packet deduplication judgment and window sliding operations are performed according to the window configuration of the current flow and the input SN. When performing deduplication judgment in the receiving direction, two modes are supported, namely MRA (Match Recovery Algorithm) and VRA (Vector Recovery Algorithm). Among them, window sliding is supported in the VRA mode. A vector is constructed to store the maximum SN that can be forwarded, and a historical record of the SNs that have been forwarded in the past period of time is saved (the length of the record needs to be configured). If the SN of a packet is not within the range maintained by this vector, it is considered that the packet is too old or too far ahead, out of order, and should be discarded.

[0003] Currently, there are some designs that support the VRA mode in FRER. Therefore, there is a need for a reference model (i.e., a simulation model) that can check whether the design under test can correctly deduplicate in the VRA mode of FRER. Summary of the Invention

[0004] The embodiments of this application provide a simulation method for packet deduplication in the VRA mode and related devices, which can use very few resources and a relatively simple lookup table structure to implement the simulation of packet sliding window deduplication in the VRA mode of FERE, and quickly verify the functions of the design under test.

[0005] The embodiments of this application can be implemented as follows:

[0006] In a first aspect, the embodiments of this application provide a simulation method for packet deduplication in the vector recovery method VMA mode, which is used to output simulation results to verify the design under test. The method includes:

[0007] Determine whether the first sequence number of the current message is greater than the second sequence number, where the second sequence number is the maximum sequence number of the sent messages in the target entry, the target entry is the entry in the lookup table corresponding to the target flow to which the current message belongs, and the entries in the lookup table also include message records corresponding to the flow, and the message records are used to indicate that the processing status corresponding to the sequence number of the sent message is sent;

[0008] In the case where the first sequence number is greater than the second sequence number, calculate the difference between the first sequence number and the second sequence number;

[0009] According to the acceptable window size, the sliding window size and the difference, determine the target processing mode of the current message and update the lookup table, where the target processing mode indicates discarding or sending the current message.

[0010] In a second aspect, an embodiment of the present application provides a simulation device for message deduplication in the VRA mode, which is used to output simulation results to verify the design under test. The device includes:

[0011] A judgment module, which is used to judge whether the first sequence number of the current message is greater than the second sequence number, where the second sequence number is the maximum sequence number of the sent messages in the target entry, the target entry is the entry in the lookup table corresponding to the target flow to which the current message belongs, and the entries in the lookup table also include message records corresponding to the flow, and the message records are used to indicate that the processing status corresponding to the sequence number of the sent message is sent;

[0012] A calculation module, which is used to calculate the difference between the first sequence number and the second sequence number in the case where the first sequence number is greater than the second sequence number;

[0013] A processing module, which is used to determine the target processing mode of the current message and update the lookup table according to the acceptable window size, the sliding window size and the difference, where the target processing mode indicates discarding or sending the current message.

[0014] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory stores machine-executable instructions that can be executed by the processor, and the processor can execute the machine-executable instructions to implement the simulation method for message deduplication in the VRA mode described in the foregoing embodiments.

[0015] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the simulation method for message deduplication in the VRA mode as described in the foregoing embodiments.

[0016] The simulation method and related device for packet deduplication in the VRA mode provided by the embodiments of the present application determine whether the first sequence number of the current packet is greater than the second sequence number. If it is greater, the difference between the first sequence number and the second sequence number is calculated. Then, according to the acceptable window size, the sliding window size, and the difference, the target processing method of the current packet is determined, and the lookup table is updated. Thus, the simulation result for verifying the design under test can be obtained. Among them, the second sequence number is the maximum sequence number of the sent packets in the target entry, the target entry is the entry in the lookup table corresponding to the target flow to which the current packet belongs, the entry of the lookup table also includes the packet record corresponding to the flow, the packet record is used to indicate that the processing status corresponding to the sequence number of the sent packet is sent, and the target processing method indicates discarding or sending the current packet. In this way, the simulation of packet sliding window deduplication in the VRA mode in FERE can be realized with very few resources and a relatively simple structure of the lookup table, and the function verification of the design under test can be quickly carried out. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the accompanying drawings required for the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0018] Figure 1 Schematic diagram of the verification system provided by the embodiments of the present application;

[0019] Figure 2 Schematic diagram of the principle provided by the embodiments of the present application;

[0020] Figure 3 Block diagram of the electronic device provided by the embodiments of the present application;

[0021] Figure 4 Flowchart of the simulation method for packet deduplication in the VRA mode provided by the embodiments of the present application;

[0022] Figure 5 For Figure 4 Flowchart of the sub-steps included in step S130 in

[0023] Figure 6 Data structure diagram of the lookup table provided by the embodiments of the present application;

[0024] Figure 7 Schematic diagram of a simulation process for packet deduplication in the VRA mode provided by this embodiment;

[0025] Figure 8This is a block diagram of the simulation device provided by the embodiments of the present application.

[0026] Icons: 100 - electronic device; 110 - memory; 120 - processor; 130 - communication unit; 200 - simulation device; 210 - judgment module; 220 - calculation module; 230 - processing module. Detailed implementation manners

[0027] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some but not all of the embodiments of the present application. Usually, the components of the embodiments of the present application described and illustrated herein can be arranged and designed in various different configurations.

[0028] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application claimed, but merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative efforts fall within the scope of protection of the present application.

[0029] It should be noted that relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.

[0030] The following will describe some implementation manners of the present application in detail with reference to the accompanying drawings. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.

[0031] Please refer to Figure 1 , Figure 1 This is a schematic diagram of the verification system provided by the embodiments of the present application. The verification system is used to verify the RTL (Register Transition Level) design of FRER. The verification system includes an incentive generator Driver, a module under test (i.e., Figure 1The FRER DUT), reference model (which can also be called a simulation model, i.e., Figure 1 the Simulation Model in Figure 1 ), and the result checker (i.e.,

[0032] Among them, Figure 1 the implementation principle of the reference model in Figure 2 is as shown. Please refer to Figure 2 . In the VRA mode, according to the window configuration of the current flow, the flow is matched to the corresponding window area, and different operations are performed accordingly. In window 1, it is an overdue packet, that is, a packet with an SN (Sequence Number) greater than the SN of the current packet has been output before this packet. At this time, a deduplication operation is performed; in window 2, it is a new packet, that is, the first-arriving SN and within the acceptable window range, then it is normally forwarded and output, and the window is slid to the corresponding step size; if in window 3, it means that the packet is too far ahead, and it is decided whether to discard the packet according to the configuration.

[0033] Among them, window 1 can be called the sent window, window 2 can be called the acceptable window, and window 3 can be called the ahead window. Figure 2 Start Point in

[0034] represents the starting point of the SN; slidingSize represents the sliding window size; lastSn represents the maximum SN of the sent packets; acceptSize represents the acceptable size after an ahead packet appears. The acceptable range of ahead packets is generally set according to 512 / 1024 / 2048 / 4096 / 8192 / 16384 / 32768 / 65536. The latest SN (lastSn) can be obtained by looking up the table entry according to the flow identifier Flow Id of the input packet, and at the same time, slidingSize and acceptSize in the configuration table entry are obtained. The optional range of slidingSize is generally set according to 64 / 128 / 256 / 512 / 1024.

[0035] Please refer toFigure 3 , Figure 3 is a block diagram of the electronic device 100 provided in the embodiments of the present application. The electronic device 100 may be, but is not limited to, a computer, a server, etc. The electronic device 100 may include a memory 110, a processor 120, and a communication unit 130. The elements of the memory 110, the processor 120, and the communication unit 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these elements may be electrically connected to each other through one or more communication buses or signal lines.

[0036] Among them, the memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.

[0037] The processor 120 is used to read / write the data or programs stored in the memory 110 and execute corresponding functions. For example, a simulation device 200 for packet deduplication in the VRA mode is stored in the memory 110. The simulation device 200 includes at least one software function module that can be stored in the memory 110 in the form of software or firmware. The processor 120 executes various functional applications and data processing by running the software programs and modules stored in the memory 110, such as the simulation device 200 in the embodiments of the present application, that is, implements the simulation method for packet deduplication in the VRA mode in the embodiments of the present application.

[0038] The communication unit 130 is used to establish a communication connection between the electronic device 100 and other communication terminals through a network and is used to send and receive data through the network.

[0039] It should be understood that Figure 3 the structure shown is only a schematic diagram of the structure of the electronic device 100, and the electronic device 100 may further include more or fewer components than those shown in Figure 3 or have a different configuration from that shown in Figure 3 . Figure 3 Each component shown in

[0040] Please refer to Figure 4 , Figure 4 which is a schematic flowchart of the simulation method for packet deduplication in the VRA mode provided by the embodiment of this application. The method can be applied to the above-mentioned electronic device. The following elaborates in detail on the specific process of the simulation method for packet deduplication in the VRA mode. In this embodiment, the method may include steps S110 to S130.

[0041] Step S110: Determine whether the first sequence number of the current packet is greater than the second sequence number.

[0042] In this embodiment, the current packet is the packet that needs to be processed for packet deduplication and is currently received. The saved lookup table may include entries corresponding to each flow. An entry corresponding to a flow may include the maximum sequence number of the packets that have been sent corresponding to the flow, and the packet record corresponding to the flow, where the packet record is used to indicate that the processing status of the packets with the corresponding sequence numbers has been sent, that is, it can be determined from a packet record which packets with which sequence numbers have been sent. The specific form of the packet record can be determined in combination with actual requirements.

[0043] The sequence number of the current packet is the first sequence number. The target entry corresponding to the target flow to which the current packet belongs can be determined from the lookup table, and then the second sequence number can be obtained from the target entry. The second sequence number is the maximum sequence number of the packets that have been sent corresponding to the target flow included in the target entry. By comparison, it can be determined whether the first sequence number is greater than the second sequence number.

[0044] Step S120: When the first sequence number is greater than the second sequence number, calculate the difference between the first sequence number and the second sequence number.

[0045] When it is determined that the first sequence number is greater than the second sequence number, the absolute value of the difference between the first sequence number and the second sequence number can be calculated as the difference between the first sequence number and the second sequence number.

[0046] Step S130: Determine the target processing method of the current packet according to the acceptable window size, the sliding window size, and the difference, and update the lookup table.

[0047] The acceptable window size is the size of the set acceptable window, and the sliding window size is the size of the set sent window. Based on the size relationships between the acceptable window size, the sliding window size, and the difference respectively, it can be determined which window the current packet is in, so as to determine that the target processing method for the current packet is to discard the current packet or send the current packet, and update the lookup table based on this target processing method, making the updated lookup table conform to the actual situation, which is convenient for subsequent packet deduplication.

[0048] In this way, the simulation of packet sliding window deduplication in the VRA mode in FERE can be implemented with very few resources and a relatively simple lookup table structure, and the functional verification of the design under test can be quickly carried out.

[0049] In this embodiment, the target processing method and the update of the lookup table can be determined by Figure 5 the method shown. Please refer to Figure 5 , Figure 5 which Figure 4 is a schematic flowchart of the sub-steps included in step S130 in

[0050] Sub-step S131: Determine whether the difference is less than the acceptable window size.

[0051] If the difference is not less than the acceptable window size, then execute sub-step S132.

[0052] Sub-step S132: Determine that the current packet is in the leading window, determine the target processing method for the current packet according to the preset configuration, and directly use the current lookup table as the updated lookup table.

[0053] In this embodiment, the difference can be compared with the receivable window size to determine whether the difference is less than the acceptable window size. If the difference is not less than the acceptable window size, that is, if the difference is greater than or equal to the acceptable window size, it can be determined that the current packet is in the leading window, that is, located in Figure 2 the window 3 shown.

[0054] When the current message is within the leading window, the target processing method of the current message can be determined to be discarded or sent based on a preset configuration, that is, it is decided whether to discard the current message according to the preset configuration. For example, if the preset configuration is to discard leading messages, the determined target processing method at this time is to discard the current message; if the preset configuration is to send leading messages, the determined target processing method at this time is to send the current message. When the current message is within the leading window, it is also possible to determine not to update the content in the lookup table, that is, directly use the current lookup table as the updated lookup table.

[0055] Please refer to again Figure 5 , after sub-step S131, step S130 may further include sub-steps S133 to S134.

[0056] If the difference is less than the acceptable window size, execute sub-step S133.

[0057] Sub-step S133, determine whether the difference is less than the sliding window size.

[0058] If the difference is not less than the sliding window size, execute sub-step S134.

[0059] Sub-step S134, determine that the current message is within the acceptable window, determine the target processing method as sending the current message, and update the second sequence number in the target entry to the first sequence number, and update the target message record in the first way.

[0060] In this embodiment, when the difference is less than the acceptable window size, the difference can be compared with the sliding window size to determine whether the difference is less than the sliding window size. If the difference is not less than the sliding window size, that is, if the difference is greater than or equal to the sliding window size, it is determined that the current message is within the acceptable window, that is, within Figure 2 the window 2 shown.

[0061] When the current message is within the acceptable window, it can be determined that the target processing method of the current message is to send the current message, and moreover, update the second sequence number in the target entry to the first sequence number (that is, the sequence number of the current message), that is, update the maximum sequence number of the sent messages recorded in the target entry to the sequence number of the current message, and update the target message record in the target entry based on the first way. Wherein, the first way includes modifying the overall content in the target message record.

[0062] In this embodiment, the target packet record includes records of whether packets with consecutive multiple sequence numbers have been sent, and the number of sequence numbers corresponding to the target packet record is equal to the sliding window size. When the packet record is set as above, if the current packet is within the acceptable window and the difference is not less than the sliding window size, it means that the overall content in the current target packet record needs to be modified. Therefore, the first method can be used to update the lookup table.

[0063] As a possible implementation, a bitmap is used to represent the packet record. The bitmap is used to indicate whether the packets with corresponding consecutive multiple sequence numbers have been sent respectively. One of the consecutive multiple sequence numbers corresponding to the bitmap is the maximum sequence number of the sent packets corresponding to the flow corresponding to the bitmap. When updating the lookup table using the first method, the first element in the target bitmap, which is the target packet record, can be set to a first value, and the other elements in the target bitmap can be set to a second value. Wherein, the first value is used to represent the processing status as sent, and the second value is used to represent the processing status as not sent.

[0064] The first value and the second value can be specifically determined according to actual requirements. For example, set the first value to 1 and the second value to 0; if an element of the bitmap is 1, it means that the packet with the sequence number corresponding to the bitmap has been sent; if an element of the bitmap is 0, it means that the packet with the sequence number corresponding to the bitmap has not been sent.

[0065] Optionally, when using a bitmap to represent the packet record, the structure of the lookup table can be as Figure 6 shown. Each entry in the lookup table corresponds to a flow respectively. An entry can include the maximum sequence number lastSn of the sent packets of the flow and the bitmap. Optionally, each entry can also include the flow identifier FlowId of the corresponding flow to facilitate determining the required entry based on the flow identifier.

[0066] Please refer to Figure 5 again. After sub-step S133, step S130 may further include sub-step S135.

[0067] If the difference is less than the sliding window size, sub-step S135 is executed.

[0068] That is, when the difference is less than the acceptable window size and less than the sliding window size, sub-step S135 is executed.

[0069] In sub-step S135, it is determined that the current packet is within the acceptable window, and it is determined that the target processing method is to send the current packet, and the second sequence number in the target entry is updated to the first sequence number, and the target packet record is updated using the second method.

[0070] When the difference is less than the acceptable window size and less than the sliding window size, it can be determined that the current message is within the acceptable window. At this time, the target processing method for the current message can be determined as sending the current message. And, update the second sequence number in the target entry to the first sequence number (i.e., the sequence number of the current message). Also, update the target message record in the target entry by the second method. The second method includes deleting some information in the target message record and adding information.

[0071] In this embodiment, the target message record includes records of whether messages with consecutive multiple sequence numbers have been sent, and the number of sequence numbers corresponding to the target message record is equal to the sliding window size. When the message record is set as above, if the current message is within the acceptable window and the difference is less than the acceptable window size and less than the sliding window size, it means that some content in the current target message record needs to be modified. Therefore, the lookup table can be updated by the second method.

[0072] As a possible implementation, a bitmap is used to represent the message record. The bitmap is used to indicate whether messages with corresponding consecutive multiple sequence numbers have been sent respectively, and one of the consecutive multiple sequence numbers corresponding to the bitmap is the maximum sequence number of the sent messages corresponding to the stream corresponding to the bitmap. When updating the lookup table by the second method, a left shift operation of the target number of bits can be performed on the target bitmap serving as the target message record, and the first element in the shifted target bitmap is set to the first value. The target number of bits is equal to the difference.

[0073] In this embodiment, when the first sequence number is not greater than the second sequence number, if the target message record of the target entry indicates that a message with the first sequence number has been sent, it is determined that the current message is within the sent window, and the target processing method is determined as discarding the current message, and directly using the current lookup table as the updated lookup table.

[0074] When the first sequence number is not greater than the second sequence number, if the target message record of the target entry indicates that a message with the first sequence number has not been sent, it is determined that the current message is within the sent window, and the target processing method is determined as sending the current message, and the target message record is updated to indicate that a message with the first sequence number has been sent. For example, when the message record is represented by the above bitmap, the element corresponding to the second sequence number in the target message record can be set to the first value used to represent sent.

[0075] When the current message is the first message of a flow, it can be directly determined that the current message is within the sent window, and the current message is sent. The second sequence number is updated to the sequence number of the current message in the corresponding target entry of the lookup table, and the processing status corresponding to the sequence number of the current message is recorded as "sent" in the target message record of the target entry.

[0076] The following combines Figure 2 and Figure 7 to illustrate the above simulation method by way of example.

[0077] A lookup table for recording the attributes of the sliding window is set up. The lookup table is mainly used to record the latest SN (lastSn) of each flow and the record of the SN of the output messages. The data structure of the lookup table is as Figure 6 shown. Among them, an element of the bitmap being 1 indicates the sent state, and being 0 indicates the unsent state. The width of the bitmap for recording the SN of the output messages is consistent with the sliding window size slidingSize.

[0078] The window where the input message is located is judged, and the operations of sliding the window and updating the lookup table are performed. The specific process is as Figure 7 shown.

[0079] a) After the first message of a certain flow is input, since it is the first message, it is determined to be in window 1. Assuming that the pktSn (SN of the message) is n, then the message is sent, lastSn is updated to n, and at the same time bitmap[n] is set to 1. At this time, the window does not slide, that is, window 2 does not slide.

[0080] b) Starting from the second message of this flow, each incoming message is compared with lastSn using the pktSn of the newly input message. There are the following situations.

[0081] i. pktSn > lastSn and pktSn - lastSn < acceptSize, then it is determined to be in window 2.

[0082] 1. If pktSn - lastSn < slidingSize at this time, then the message is sent, the current lastSn = pktSn is updated, and the bitmap is shifted left by (pktSn - lastSn), and at the same time bitmap[0] = 1.

[0083] 2. If pktSn - lastSn ≥ slidingSize at this time, send the packet, set the first element of the bitmap to 1, and other elements to 0, but do not slide the window, and update lastSn = pktSn. For example, if the bitmap has 64 bits, then set bitmap[0] = 1 and clear bitmap[63:1].

[0084] ii. If pktSn > lastSn and pktSn - lastSn ≥ acceptSize, it is determined that it is in window 3. At this time, it is decided whether to discard the packet according to the configuration, and lastSn and the bitmap are not updated. If the configuration indicates discarding, then discard the packet.

[0085] iii. If pktSn ≤ lastSn, it is determined that it is in window 1. At this time, it is necessary to check whether bitmap[pktSn] is 1. If it is 1, it means that the packet with pktSn has been normally forwarded, and this packet is a repeatedly input packet, so duplicate removal operation is performed to discard it, and neither lastSn nor the bitmap is updated. If it is not 1, send the packet and update the element corresponding to pktSn in the bitmap to 1.

[0086] In this way, it can provide a simulation model for the design of the sliding window for FRER frame replication and frame duplicate removal elimination, which is difficult to verify, and is implemented using very few resources and a relatively simple lookup table structure, facilitating the rapid functional verification of the DUT to be tested. The above description is the process description of how a simulation model of a sliding window lookup table performs packet duplicate removal.

[0087] To execute the corresponding steps in the above embodiments and each possible manner, the following gives an implementation manner of a simulation device 200 for packet duplicate removal in the VRA mode. Optionally, the simulation device 200 may adopt the device structure of the above Figure 3 shown electronic device 100. Further, please refer to Figure 8 , Figure 8 which is a block diagram of the simulation device 200 provided by the embodiment of the present application. It should be noted that the basic principle and the technical effects generated by the simulation device 200 provided in this embodiment are the same as those in the above embodiments. For a brief description, for the parts not mentioned in this embodiment, reference may be made to the corresponding content in the above embodiments. In this embodiment, the simulation device 200 may include: a judgment module 210, a calculation module 220, and a processing module 230.

[0088] The judging module 210 is used to judge whether the first sequence number of the current message is greater than the second sequence number. The second sequence number is the maximum sequence number of the sent message in the target table entry, the target table entry is the table entry corresponding to the target flow to which the current message belongs in the lookup table, the table entry of the lookup table also includes a message record corresponding to the flow, and the message record is used to indicate that the processing status corresponding to the sequence number of the sent message is sent.

[0089] The calculation module 220 is used to calculate the difference between the first sequence number and the second sequence number when the first sequence number is greater than the second sequence number.

[0090] The processing module 230 is used to determine a target processing method for the current message according to the acceptable window size, the sliding window size and the difference, and to update the lookup table, wherein the target processing method indicates discarding or sending the current message.

[0091] In this embodiment, the processing module 230 is also used for: when the first sequence number is not greater than the second sequence number, if the target message record of the target table item indicates that a message with the first sequence number has been sent, then it is determined that the current message is in the sent window, and the target processing method is determined to be discarding the current message, and the current lookup table is directly used as the updated lookup table; when the first sequence number is not greater than the second sequence number, if the target message record of the target table item indicates that a message with the first sequence number has not been sent, then it is determined that the current message is in the sent window, and the target processing method is determined to be discarding the current message, and the target message record is updated to indicate that a message with the first sequence number has been sent.

[0092] Optionally, the above modules can be stored in the form of software or firmware. Figure 3 The memory 110 shown in the figure may be fixed in the operating system (OS) of the electronic device 100 and may be Figure 3 Meanwhile, the data and program codes required for executing the above modules may be stored in the memory 110.

[0093] An embodiment of the present application also provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the simulation method for deduplication of messages in the VRA mode is implemented.

[0094] In summary, the embodiments of the present application provide a simulation method and related device for packet deduplication in the VRA mode. It is determined whether the first sequence number of the current packet is greater than the second sequence number. If it is greater, the difference between the first sequence number and the second sequence number is calculated. Then, based on the acceptable window size, the sliding window size, and the difference, the target processing method of the current packet is determined, and the lookup table is updated. Thus, a simulation result for verifying the design under test can be obtained. Among them, the second sequence number is the maximum sequence number of the packets that have been sent in the target entry, the target entry is the entry in the lookup table corresponding to the target flow to which the current packet belongs, and the entry of the lookup table also includes the packet record corresponding to the flow. The packet record is used to indicate that the processing status corresponding to the sequence number of the packet that has been sent is "sent". The target processing method indicates discarding or sending the current packet. In this way, the simulation of packet sliding window deduplication in the VRA mode in FERE can be implemented with very few resources and a relatively simple structure of the lookup table, and the functional verification of the design under test can be quickly performed.

[0095] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are only illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0096] In addition, the functional modules in each embodiment of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0097] When the above-mentioned functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art or a part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0098] The above are only optional embodiments of this application and are not used to limit this application. For those skilled in the art, this application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included within the protection scope of this application.

Claims

1. A simulation method for message deduplication in the VRA mode of a vector recovery method, characterized in that, Output the simulation results to verify the design under test. The method includes: Determine whether the first sequence number of the current packet is greater than the second sequence number. Here, the second sequence number is the maximum sequence number of the packets that have been sent in the target entry, the target entry is the entry in the lookup table corresponding to the target flow to which the current packet belongs, and the entry of the lookup table further includes a packet record corresponding to the flow, and the packet record is used to indicate that the processing status corresponding to the sequence number of the packet that has been sent is sent; When the first sequence number is greater than the second sequence number, calculate the difference between the first sequence number and the second sequence number; Determine the target processing method of the current packet according to the acceptable window size, the sliding window size and the difference, and update the lookup table, where the target processing method indicates discarding or sending the current packet.

2. The method according to claim 1, characterized in that, The determining the target processing method of the current packet according to the acceptable window size, the sliding window size and the difference, and updating the lookup table includes: Determine whether the difference is less than the acceptable window size; If the difference is not less than the acceptable window size, determine that the current packet is in the advance window, determine the target processing method of the current packet according to the preset configuration, and directly use the current lookup table as the updated lookup table.

3. The method according to claim 2, wherein The target packet record in the target entry includes records of whether packets with consecutive multiple sequence numbers have been sent, and the number of sequence numbers corresponding to the target packet record is equal to the sliding window size. The determining the target processing method of the current packet according to the acceptable window size, the sliding window size and the difference, and updating the lookup table further includes: If the difference is less than the acceptable window size, determine whether the difference is less than the sliding window size; If the difference is not less than the sliding window size, determine that the current packet is in the acceptable window, determine that the target processing method is to send the current packet, and update the second sequence number in the target entry to the first sequence number, and update the target packet record in the first manner, where the first manner includes modifying the overall content in the target packet record.

4. The method according to claim 3, characterized in that, The updating the target packet record in the target entry in the first manner includes: Set the first element in the target bitmap serving as the target packet record to the first value, where the target bitmap is used to indicate whether the packets with corresponding consecutive multiple sequence numbers have been sent respectively, and the first value is used to represent the processing status as sent; Set all other elements in the target bitmap to the second value, where the second value is used to represent the processing status as not sent.

5. The method according to claim 3, wherein The determining the target processing method of the current packet according to the acceptable window size, the sliding window size and the difference, and updating the lookup table further includes: If the difference is less than the size of the sliding window, determine that the current packet is within the acceptable window, determine that the target processing method is to send the current packet, and update the second sequence number in the target entry to the first sequence number, and update the target packet record in the second way, where the second way includes deleting some information in the target packet record and adding information.

6. The method according to claim 5, wherein The updating of the target packet record in the target entry in the second way includes: Performing a shift process of shifting the target bitmap serving as the target packet record to the left by the target number of bits, and setting the first element in the shifted target bitmap to the first value, where the target bitmap is used to indicate whether the packets with corresponding consecutive multiple sequence numbers have been sent respectively, the target number of bits is equal to the difference, and the first value is used to represent that the processing status is sent.

7. The method according to any one of claims 1-6, characterized in that The method further includes: In the case where the first sequence number is not greater than the second sequence number, if the target packet record of the target entry indicates that a packet with the first sequence number has been sent, determine that the current packet is within the sent window, determine that the target processing method is to discard the current packet, and directly use the current lookup table as the updated lookup table; In the case where the first sequence number is not greater than the second sequence number, if the target packet record of the target entry indicates that a packet with the first sequence number has not been sent, determine that the current packet is within the sent window, determine that the target processing method is to send the current packet, and update the target packet record to indicate that a packet with the first sequence number has been sent.

8. A simulation device for message deduplication in VRA mode, characterized in that, For outputting simulation results to verify the design under test, the device includes: A judgment module, configured to judge whether the first sequence number of the current packet is greater than the second sequence number, where the second sequence number is the maximum sequence number of the sent packets in the target entry, the target entry is the entry in the lookup table corresponding to the target flow to which the current packet belongs, and the entry of the lookup table further includes a packet record corresponding to the flow, and the packet record is used to indicate that the processing status corresponding to the sequence number of the sent packet is sent; A calculation module, configured to calculate the difference between the first sequence number and the second sequence number in the case where the first sequence number is greater than the second sequence number; A processing module, configured to determine the target processing method of the current packet according to the acceptable window size, the sliding window size and the difference, and update the lookup table, where the target processing method indicates discarding or sending the current packet.

9. An electronic device, characterized in that, It includes a processor and a memory, the memory stores machine-executable instructions that can be executed by the processor, and the processor can execute the machine-executable instructions to implement the simulation method for packet deduplication in the VRA mode described in any one of claims 1-7.

10. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the simulation method for packet deduplication in the VRA mode described in any one of claims 1-7.

Citation Information

Cited By

  • Data processing method and device, computer, storage medium and program product

    CN120953408A

  • Data processing method and device, computer, storage medium and program product

    CN120953408B