Verification method, device, electronic device and computer-readable storage medium
By collecting and summarizing the forwarding information of data packets in NOC and verifying the consistency of the path, the problem of data packet forwarding path verification in complex on-chip networks is solved, the verification efficiency is improved and the risk of deadlock is reduced.
Patent Information
- Application Number
- CN202310080099.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-19
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2043-01-19
AI Technical Summary
It is difficult to effectively verify the forwarding path of data packets in complex network-on-chip (NOC) with existing technology, resulting in deadlock risk and low verification efficiency.
By collecting data packet information forwarded by multiple routing units, the actual forwarding characteristics and expected forwarding characteristics of the target data packet are summarized, the consistency of the path is verified, and unified processing is performed on the global scoreboard to improve efficiency.
It realizes the inspection and verification of the overall forwarding situation of the NOC, quickly locates the problem router, improves the verification efficiency and reduces the risk of deadlock.
Smart Images

Figure CN116095024B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to a verification method for interconnected devices, a verification device for interconnected devices, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the development of artificial intelligence technology, users have higher and higher requirements for chip processing capabilities. Due to the limited processing power of single-core chips, multi-core chips are increasingly used. In chips such as GPUs, NOC (Network On Chip) can be used for communication between processor cores and components such as memory and peripherals. As the number of cores increases, NOC becomes more and more complex, and the verification of NOC also poses a greater challenge. Summary of the invention
[0003] At least one embodiment of the present disclosure provides a verification method for an interconnected device, wherein the interconnected device includes multiple routing units that are communicatively connected, and the verification method includes: collecting information of data packets respectively forwarded by the multiple routing units; summarizing forwarding information of a target data packet in the interconnected device based on the information of the data packets respectively forwarded by the multiple routing units to obtain actual forwarding characteristics of the target data packet in the interconnected device; obtaining expected forwarding characteristics corresponding to the target data packet; and verifying the interconnected device based on the actual forwarding characteristics and the expected forwarding characteristics of the target data packet.
[0004] For example, in a verification method provided in an embodiment of the present disclosure, forwarding information of a target data packet in the interconnected device is summarized to obtain actual forwarding characteristics of the target data packet in the interconnected device, including: summarizing the routing units that the target data packet passes through successively in the interconnected device to obtain an actual forwarding path of the target data packet in the interconnected device; obtaining an expected forwarding characteristic corresponding to the target data packet, including: obtaining an expected forwarding path of the target data packet in the interconnected device obtained by calculation according to a routing table, and verifying the interconnected device based on the actual forwarding characteristics of the target data packet and the expected forwarding characteristics, including: in response to the target data packet passing through at least one routing unit, verifying whether the actual forwarding path is consistent with at least part of the expected forwarding path.
[0005] For example, in a verification method provided in an embodiment of the present disclosure, at least one initiating device sends a data packet to at least one receiving device through the interconnected device, and the verification method also includes: forming a first queue, wherein the first queue includes a data packet information set formed by recording each data packet sent by the at least one initiating device to the interconnected device; wherein each of the data packet information sets includes at least one information item for the corresponding data packet, and the at least one information item is used to record at least one of an initiating device identifier, a receiving device identifier, a data packet label, an expected forwarding path, and an actual forwarding path, wherein the data packet label is used to distinguish different data packets sent by the same initiating device.
[0006] For example, in a verification method provided in an embodiment of the present disclosure, the first queue includes a target data packet information set corresponding to the target data packet, and the multiple routing units include a first routing unit; the routing units that the target data packet passes through in the interconnected device are summarized to obtain an actual forwarding path of the target data packet in the interconnected device, including: when the first routing unit forwards the target data packet, based on the information of the target data packet collected from the first routing unit, adding the unit identifier of the first routing unit to the actual forwarding path information item in the target data packet information set, so as to update the actual forwarding path corresponding to the target data packet using the unit identifier of the first routing unit.
[0007] For example, in a verification method provided in an embodiment of the present disclosure, in response to the target data packet passing through at least one routing unit, verifying whether the actual forwarding path is consistent with at least a portion of the expected forwarding path includes: in response to each time the target data packet passes through a routing unit, updating the actual forwarding path corresponding to the target data packet; after each update of the actual forwarding path corresponding to the target data packet, verifying whether the updated actual forwarding path is consistent with at least a portion of the expected forwarding path.
[0008] For example, in the verification method provided in an embodiment of the present disclosure, based on the information of the target data packet collected from the first routing unit, the unit identifier of the first routing unit is added to the actual forwarding path information item in the target data packet information set, including: extracting the initiating device identifier and the data packet label of the target data packet from the collected information of the target data packet; searching the target data packet information set corresponding to the target data packet from the first queue according to the extracted initiating device identifier and the data packet label of the target data packet; adding the unit identifier of the first routing unit to the actual forwarding path information item in the target data packet information set.
[0009] For example, in a verification method provided in an embodiment of the present disclosure, forming a first queue includes: in response to an interconnected device receiving the target data packet from an initiator of the target data packet, forming a target data packet information set corresponding to the target data packet.
[0010] For example, in a verification method provided in an embodiment of the present disclosure, actual forwarding characteristics of the target data packet in the interconnected device include: actual arrival time of the target data packet from the interconnected device to the corresponding receiving device; the verification method further includes: in response to the target data packet arriving at the corresponding receiving device, determining at least one associated data packet sent by the initiating device of the target data packet; based on the actual arrival time of the target data packet, verifying whether the order in which the target data packet and the at least one associated data packet arrive at the corresponding receiving device meets a first order requirement.
[0011] For example, in a verification method provided by an embodiment of the present disclosure, the target data packet has a sequence tag, wherein the sequence tag indicates that the target data packet and other data packets with the sequence tag sent by the initiator of the target data packet need to meet a set sequence requirement. In response to the target data packet arriving at a corresponding receiving device, determining at least one associated data packet sent by the initiator of the target data packet includes: determining at least one data packet with the sequence tag from a plurality of data packets sent by the initiator of the target data packet as the at least one associated data packet.
[0012] For example, in a verification method provided in an embodiment of the present disclosure, whether the order in which the target data packet and the at least one associated data packet arrive at the corresponding receiving device satisfies the first order requirement is determined based on the actual arrival time of the target data packet, including: when the sending time of the target data packet is earlier than the sending time of the at least one associated data packet, if the actual arrival time of the target data packet is earlier than the actual arrival time of the at least one associated data packet, then it is considered that the target data packet and the at least one associated data packet meet the first order requirement.
[0013] For example, in a verification method provided in an embodiment of the present disclosure, the target data packet is a broadcast type data packet, and the target data packet is expected to be sent to at least a first receiving device and a second receiving device through the interconnected device, and the expected forwarding characteristics corresponding to the target data packet are obtained, including: for the target data packet, obtaining a first expected forwarding path corresponding to the first receiving device and a second expected forwarding path corresponding to the second receiving device obtained by calculation according to a routing table; the actual forwarding characteristics of the target data packet in the interconnected device include: the first actual forwarding path of the target data packet corresponding to the first receiving device and the second actual forwarding path of the target data packet corresponding to the second receiving device; based on the actual forwarding characteristics and the expected forwarding characteristics of the target data packet, the interconnected device is verified, including: verifying whether the first actual forwarding path is consistent with at least a portion of the first expected forwarding path; and verifying whether the second actual forwarding path is consistent with at least a portion of the second expected forwarding path.
[0014] For example, in a verification method provided in an embodiment of the present disclosure, the multiple routing units include a second routing unit, which receives the target data packet and forwards a first broadcast data packet and a second broadcast data packet based on the target data packet to the first receiving device and the second receiving device respectively; the forwarding information of the target data packet in the interconnected device is summarized to obtain the actual forwarding characteristics of the target data packet in the interconnected device, including: summarizing the routing units that the target data packet passes through successively from the initiating device to the second routing unit to obtain a first partial path; on the basis of the first partial path, adding the routing units that the first broadcast data packet passes through in sequence starting from the second routing unit to obtain the first actual forwarding path; and on the basis of the first partial path, adding the routing units that the second broadcast data packet passes through in sequence starting from the second routing unit to obtain the second actual forwarding path.
[0015] At least one embodiment of the present disclosure provides a verification device for an interconnected device, wherein the interconnected device includes a plurality of routing units that are communicatively connected, and the verification device includes a collection module and an evaluation module, the evaluation module includes a summarizing unit, an acquisition unit, and a verification unit, the collection module is configured to collect information of data packets respectively forwarded by the plurality of routing units; the summarizing unit is configured to summarize forwarding information of a target data packet in the interconnected device based on the information of the data packets respectively forwarded by the plurality of routing units to obtain actual forwarding characteristics of the target data packet in the interconnected device; the acquisition unit is configured to acquire expected forwarding characteristics corresponding to the target data packet; and the verification unit is configured to verify the interconnected device based on the actual forwarding characteristics and the expected forwarding characteristics of the target data packet.
[0016] For example, in a verification device provided in an embodiment of the present disclosure, the aggregation unit is configured to aggregate the routing units that the target data packet passes through in the interconnected device in succession to obtain an actual forwarding path of the target data packet in the interconnected device; the acquisition unit is configured to obtain an expected forwarding path of the target data packet in the interconnected device calculated according to a routing table; and the verification unit is configured to verify whether the actual forwarding path is consistent with at least a portion of the expected forwarding path in response to the target data packet passing through at least one routing unit.
[0017] For example, in a verification device provided in an embodiment of the present disclosure, the verification unit is configured to: update an actual forwarding path corresponding to the target data packet once in response to each time the target data packet passes through a routing unit; and after each update of the actual forwarding path corresponding to the target data packet, verify whether the updated actual forwarding path is consistent with at least part of the expected forwarding path.
[0018] For example, in a verification device provided in an embodiment of the present disclosure, actual forwarding characteristics of the target data packet in the interconnected device include: actual arrival time of the target data packet from the interconnected device to the corresponding receiving device; the verification device also includes a sequence unit, and the sequence unit is configured to: in response to the target data packet arriving at the corresponding receiving device, determine at least one associated data packet sent by the initiator of the target data packet; and verify, based on the actual arrival time of the target data packet, whether the order in which the target data packet and the at least one associated data packet arrive at the corresponding receiving device meets a first sequence requirement.
[0019] For example, in the verification device provided by an embodiment of the present disclosure, the sequence unit is configured to, when the sending time of the target data packet is earlier than the sending time of the at least one associated data packet, if the actual arrival time of the target data packet is earlier than the actual arrival time of the at least one associated data packet, then it is considered that the target data packet and the at least one associated data packet meet the first sequence requirement.
[0020] For example, in a verification device provided in an embodiment of the present disclosure, the target data packet is a broadcast type data packet, and the target data packet is expected to be sent to at least a first receiving device and a second receiving device through the interconnected device, and the acquisition unit is configured to: for the target data packet, obtain a first expected forwarding path corresponding to the first receiving device and a second expected forwarding path corresponding to the second receiving device obtained by calculation according to a routing table; the actual forwarding characteristics of the target data packet in the interconnected device include: a first actual forwarding path of the target data packet corresponding to the first receiving device and a second actual forwarding path of the target data packet corresponding to the second receiving device; the verification unit is configured to: verify whether the first actual forwarding path is consistent with at least a portion of the first expected forwarding path; and verify whether the second actual forwarding path is consistent with at least a portion of the second expected forwarding path.
[0021] At least one embodiment of the present disclosure provides an electronic device, comprising a processor; a memory storing one or more computer program modules; wherein the one or more computer program modules are configured to be executed by the processor to implement the verification method provided by any embodiment of the present disclosure.
[0022] At least one embodiment of the present disclosure provides a computer-readable storage medium storing non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a computer, the verification method provided by any embodiment of the present disclosure can be implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings in the following description only relate to some embodiments of the present disclosure, but are not intended to limit the present disclosure.
[0024] Figure 1 A connection diagram of a NOC is shown;
[0025] Figure 2 A schematic structural diagram of a router is shown;
[0026] Figure 3 A flowchart of a verification method provided by at least one embodiment of the present disclosure is shown;
[0027] Figure 4 A schematic diagram of collecting data packet information provided by at least one embodiment of the present disclosure is shown;
[0028] Figure 5 A schematic diagram of a first queue provided by at least one embodiment of the present disclosure is shown;
[0029] Figure 6 A schematic diagram of a global routing table provided by at least one embodiment of the present disclosure is shown;
[0030] Figure 7 A schematic diagram of another first queue provided by at least one embodiment of the present disclosure is shown;
[0031] Figure 8 A schematic diagram of a broadcast data packet provided by at least one embodiment of the present disclosure is shown;
[0032] Fig. 9 A schematic block diagram of a verification device for interconnected devices provided by at least one embodiment of the present disclosure is shown;
[0033] Fig.10 A schematic block diagram of an electronic device provided by at least one embodiment of the present disclosure is shown;
[0034] Fig.11 A schematic block diagram showing another electronic device provided by at least one embodiment of the present disclosure; and
[0035] Fig.12 A schematic diagram of a computer-readable storage medium provided by at least one embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings of the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0037] Unless otherwise defined, the technical terms or scientific terms used in the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, similar words such as "one", "one" or "the" do not indicate quantity restrictions, but indicate that there is at least one. Similar words such as "include" or "comprise" mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Similar words such as "connect" or "connected" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0038] Figure 1 A connection diagram of a NOC is shown. Figure 2 A schematic diagram of the structure of a router is shown. Figure 1 and Figure 2 As shown in the figure, multiple routers are used inside the NOC network to forward data packets. All routers form a topology network. The topology network is the overall connection relationship after connecting various modules in the network. Each router has multiple ports, such as Figure 2 The router Router4 shown in the figure includes ports such as Port 0, Port 1 and Port 2, each of which can receive and send data packets. The router stores the data packets received by each port in the internal buffer, and obtains the port to output the data packet by querying the routing table according to the destination of the data packet. Once the output conditions are met, the data packet will be sent to the corresponding port for output.
[0039] In order to ensure that the NOC network can correctly forward each data packet, the NOC network needs to be verified. In one way, a local scoreboard can be mounted on each router. The scoreboard is a verification environment component that can check the actual value of the hardware circuit collected by the monitor and the predicted value generated by the software model. A monitor can be set at each port of the router. The monitor is a verification environment component that is used to collect signals on the hardware circuit interface. The monitor collects signals from each port of the router and packages them into data packets and sends them to the local scoreboard. The local scoreboard checks whether the data packet is output from the correct port according to the destination of the data packet through the routing table of this router. For example, if the data packet appears at the wrong port, the scoreboard can report an error.
[0040] However, the above verification method can only check whether the data packet is output from the correct port of a router, and cannot check the forwarding information of the data packet in the entire NOC network, such as whether the path of the data packet in the entire NOC network is correct. If the routing table is designed incorrectly, it is possible that although the data packet is sent to the correct receiving device (Slave), the transmission path is different from the correct path, resulting in a potential deadlock risk. If a deadlock occurs, each router needs to be analyzed one by one to find the problem.
[0041] At least one embodiment of the present disclosure provides a verification method for an interconnected device, a verification device for an interconnected device, an electronic device, and a computer-readable storage medium. The verification method for an interconnected device includes: collecting information of data packets forwarded by multiple routing units of the interconnected device; summarizing forwarding information of a target data packet in the interconnected device according to information of data packets forwarded by multiple routing units to obtain actual forwarding characteristics of the target data packet in the interconnected device; obtaining expected forwarding characteristics corresponding to the target data packet; and verifying the interconnected device according to the actual forwarding characteristics and expected forwarding characteristics of the target data packet.
[0042] According to the verification method, information of data packets forwarded by multiple routing units in an interconnected device is obtained, and forwarding information of at least part of the data packets in multiple routing units is tracked and summarized respectively, so as to check whether the overall forwarding situation of the data packets in the interconnected device is correct. Compared with the solution of checking each router separately, the verification method of the embodiment of the present disclosure can check and verify the overall situation of the interconnected device, and can merge the scattered data packets in the interconnected device for unified processing, thereby improving the efficiency of code operation, and can find out whether there is a deadlock in the interconnected device, and quickly locate the problematic router, saving the time spent on locating the problem during the verification process.
[0043] Figure 3 A flowchart of a verification method provided by at least one embodiment of the present disclosure is shown.
[0044] like Figure 3 As shown, the verification method may include steps S110 to S140.
[0045] Step S110: Collect information of data packets forwarded by multiple routing units respectively.
[0046] Step S120: According to the information of the data packets respectively forwarded by the plurality of routing units, the forwarding information of the target data packet in the interconnected device is summarized to obtain the actual forwarding characteristics of the target data packet in the interconnected device.
[0047] Step S130: Obtain the expected forwarding characteristics corresponding to the target data packet.
[0048] Step S140: verifying the interconnection device according to the actual forwarding characteristics and the expected forwarding characteristics of the target data packet.
[0049] For example, the verification method is used for interconnection devices, such as the above-mentioned NOC (Network-On-Chip), which is a network-based communication subsystem that can be used for communication between modules on a chip and is a major component of multi-core technology. The basic structural unit of the on-chip network can include a router, a resource node, a network interface, and a link. In addition, the interconnection device can also be other devices other than the NOC for connecting various functional modules in the chip.
[0050] like Figure 1 As shown, the interconnection device may include multiple routing units (Router) that are communicatively connected. In some of the following embodiments, the routing unit is also referred to as a router. The router is the core structural unit of the on-chip network and has the functions of receiving, storing and forwarding data packets. The interconnection device can be connected to devices such as the processor core (Core), memory (such as DDR (Double Data Rate, double-rate synchronous dynamic random access memory)). The processor core can send a data packet to the memory through the interconnection device. In this case, the processor core is the initiator of the data packet, and the memory is the receiver of the data packet.
[0051] For example, in step S110, if the interconnection device includes N routers, the information of the data packet forwarded by each of the N routers can be obtained. For example, a global verification device can be set for the interconnection device, and the global verification device is used to verify the interconnection device. The above verification method can be performed by the global verification device. The global verification device is, for example, a global scoreboard, which can be connected to a monitor at each port of each router, and can collect signals from each port of each router through the monitor and package them into data packets and send them to the global scoreboard.
[0052] Figure 4 FIG. 1 is a schematic diagram showing a method for collecting data packet information provided by at least one embodiment of the present disclosure. Figure 4As shown, taking Router 4 as an example, Router 4 has three ports: Port 0, Port 1 and Port 2. Each port can be connected to a monitor. For example, the monitor numbered monitor_4_0 is connected to port Port 0, the monitor numbered monitor_4_1 is connected to port Port 1, and the monitor numbered monitor_4_2 is connected to port Port 2. The monitors connected to each port of Router 4 can be connected to the global scoreboard. Monitor_4_0 can collect the signal of the data packet forwarded by port Port 0 and send it to the global scoreboard, and the same applies to monitor_4_1 and monitor_4_2.
[0053] For example, the information of a data packet may include identification information of the data packet, so as to use the identification information to locate a unique data packet, and then track the forwarding of the data packet in each router. Different data packets sent by each initiating device can be distinguished by different tags. For example, the tag of a data packet sent by the initiating device is 1, and the tag of another data packet sent by the initiating device is 2. In this way, the data packet can be located by the identification (master_id) and tag (tag) of the initiating device corresponding to the data packet. Therefore, the identification information of the data packet may include the identification (master_id) and tag (tag) of the initiating device corresponding to the data packet. In addition, other information may be used to identify the data packet, and, according to actual conditions, the information of the collected data packet may also include other information.
[0054] For example, after the monitor sends the information of the data packet to the global scoreboard, the global scoreboard can also obtain the information of the router that forwards the data packet (for example, the identifier of the router and the identifier of the collected port). In some embodiments, the monitor sends its own information to the global scoreboard while sending the information of the data packet to the global scoreboard. The global scoreboard can determine the information of the router that forwards the data packet based on the information of the monitor. For example, if monitor_4_0 collects the information of the target data packet from Port 0 of Router 4, monitor_4_0 sends the information of the target data packet and the identifier of the monitor itself to the global scoreboard. Since monitor_4_0 is set at Port 0 of Router 4, the global scoreboard can determine that the information of the target data packet comes from Port 0 of Router 4 based on monitor_4_0. In other embodiments, the monitor sends the information of the data packet to the global scoreboard while sending the information of the router corresponding to the monitor to the global scoreboard. For example, if monitor_4_0 collects information of the target data packet from Port 0 of Router 4, monitor_4_0 sends the information of the target data packet to the global scoreboard, and monitor_4_0 can send the router identifier of Router 4 and the port identifier of Port 0 to the global scoreboard, so that the global scoreboard determines that the information of the target data packet comes from Port 0 of Router 4.
[0055] For example, after the monitor sends the information of the data packet to the global scoreboard, the global scoreboard can also obtain the forwarding time of the data packet (for example, the time when the router sends the data packet from the port). For example, in some embodiments, the global scoreboard can use the time when the information of the data packet is received from the monitor as the forwarding time of the data packet. In other embodiments, when the monitor sends the information of the data packet to the global scoreboard, it can also send the acquisition time of the information of the data packet to the global scoreboard as the forwarding time of the data packet.
[0056] For example, in step S120, the forwarding information of the target data packet in the interconnected device may include at least one of the information of the router that forwards the data packet and the forwarding time of the data packet.
[0057] For example, in some embodiments, the target data packet can be any data packet in the interconnected device, that is, each data packet received by the interconnected device can be used as a target data packet, and steps S120 to S140 are performed for each data packet received by the interconnected device, so that it can be ensured that the interconnected device can accurately forward each data packet. In other embodiments, for some of the multiple data packets received by the interconnected device, for example, an importance level can be set for the data packet, and each data packet with an importance level higher than a threshold is used as a target data packet, and steps S120 to S140 are performed for these data packets, so that it can be ensured that the interconnected device can accurately forward data packets with higher importance levels.
[0058] For example, from the information of the data packets sent by each monitor, according to the information such as the identification (master_id) and the tag (tag), the information of the target data packet is found, and the information of the router forwarding the target data packet is obtained. The forwarding information of the target data packet is summarized, and the forwarding information includes at least one of the information such as the router forwarding the target data packet (i.e., the router through which the target data packet passes), the information of the port passed, and the forwarding time, so as to obtain the actual forwarding characteristics of the target data packet in the interconnected device. Correspondingly, the actual forwarding characteristics include at least one of the characteristics such as the actual forwarding path, the actual forwarding port, and the actual forwarding time. In addition, according to actual needs, the actual forwarding characteristics may also include other characteristic items.
[0059] For example, in step S130, the expected forwarding feature corresponding to the target data packet is, for example, preset information, which is a design feature of the target data packet in the interconnected device obtained according to design requirements. The feature items included in the expected forwarding feature are, for example, consistent with the feature items included in the actual forwarding feature, for example, including at least one of the features such as the expected forwarding path, the expected forwarding port, and the expected forwarding time.
[0060] For example, in step S140, the actual forwarding characteristics of the target data packet are compared with the expected forwarding characteristics to verify the interconnected device. For example, if the actual forwarding characteristics of the target data packet are consistent or partially consistent with the expected forwarding characteristics, it can be considered that the interconnected device is operating normally and the verification is passed. Otherwise, it is considered that there is a problem with the interconnected device, and an error message can be reported or other processing can be performed.
[0061] According to the verification method of the embodiment of the present disclosure, information of data packets forwarded by multiple routing units in an interconnected device is obtained, and forwarding information of at least part of the data packets in multiple routing units is tracked and summarized respectively, so as to check whether the overall forwarding situation of the data packets in the interconnected device is correct. Compared with the solution of checking each router separately, the verification method of the embodiment of the present disclosure can check and verify the overall situation of the interconnected device, and can merge the scattered data packets in the interconnected device for unified processing, thereby improving the efficiency of code operation, and can find out whether there is a deadlock in the interconnected device, and quickly locate the problematic router, saving the time spent on locating the problem during the verification process.
[0062] For example, at least one initiating device sends a data packet to at least one receiving device through an interconnection device, for example, Core sends a data packet to DDR through an interconnection device. In some of the following embodiments, the initiating device may also be referred to as Master, and the receiving device may also be referred to as Slave. The verification method may also include: forming a first queue, wherein the first queue includes a data packet information set formed by recording each data packet sent by at least one initiating device to the interconnection device; wherein each data packet information set includes at least one information item for the corresponding data packet, and at least one information item is used to record at least one of an initiating device identifier, a receiving device identifier, a data packet label, an expected forwarding path, and an actual forwarding path, wherein the data packet label is used to distinguish different data packets sent by the same initiating device.
[0063] Figure 5 FIG. 1 shows a schematic diagram of a first queue provided by at least one embodiment of the present disclosure. Figure 5As shown, a queue q (first queue) can be set inside the global scoreboard to store the data packet information set corresponding to the data packet sent by each initiator. Each data packet information set stored in q can be called a set item. For example, the queue q includes set items such as q[0], q[1], and q[2]. For each set item, the internal variables may include master_id, slave_id, tag, real_path, expect_path, start_time, arrive_time, etc., wherein master_id can represent the id of the initiator of the data packet; slave_id can represent the id of the receiving device of the data packet; tag can represent the label of different data packets sent by the same initiator, which is used to distinguish different data packets sent by the same initiator; real_path can be a string or a string queue, which is used to record the actual forwarding path of the data packet, and the actual forwarding path includes, for example, each router actually passed through; expect_path can be a string or a string queue, which is used to record the expected forwarding path of the data packet, and the expected forwarding path includes, for example, each router that the data packet needs to pass through under a correct design; start_time can represent the time when the initiator sends the data packet; arrive_time can represent the time when the receiving device receives the data packet.
[0064] For example, the plurality of data packet information sets in the first queue may be arranged in the order in which the data packets are sent to the interconnected device.
[0065] For example, forming the first queue may include: in response to the interconnected device receiving the target data packet from the initiator of the target data packet, forming a target data packet information set corresponding to the target data packet. For example, each time the interconnected device receives a data packet sent by the initiator, the global scoreboard creates a corresponding set item in the q queue and assigns master_id, slave_id, tag and start_time. The global scoreboard can also search the global routing table according to the master_id and slave_id to obtain the expect_path.
[0066] Figure 6 A schematic diagram of a global routing table provided by at least one embodiment of the present disclosure is shown. Figure 6As shown, the global routing table structure records the expected forwarding path from each initiating device (e.g., including processor cores Core 0 to Core 20) to each receiving device (e.g., including DDR 0 to DDR 20). It should be noted that the initiating device and the receiving device are respectively the device that sends a data packet and the device that receives a data packet. The initiating device and the receiving device can be interchangeable. For example, one device can be the initiating device of one data packet and can also be the receiving device of another data packet.
[0067] According to the verification method of the embodiment of the present disclosure, by establishing a first queue, various information corresponding to each data packet can be accurately and orderly summarized, which facilitates the verification of the interconnected device.
[0068] For example, the actual forwarding feature includes an actual forwarding path. In step S120, the routing units that the target data packet passes through in the interconnected device can be summarized to obtain the actual forwarding path of the target data packet in the interconnected device. In step S130, the expected forwarding path of the target data packet in the interconnected device calculated according to the routing table can be obtained. In step S140, in response to the target data packet passing through at least one routing unit, it can be verified whether the actual forwarding path is consistent with at least part of the expected forwarding path.
[0069] For example, the actual forwarding path corresponding to the target data packet includes a queue formed by arranging the unit identifiers of at least one forwarding unit that the target data packet actually passes through in the order in which the target data packet passes through, and the expected forwarding path includes a queue formed by arranging the unit identifiers of multiple forwarding units that the target data packet is configured to pass through in the order in which the configuration is made, and the expected forwarding path is calculated according to the routing table. Verifying whether the actual forwarding path is consistent with at least part of the path in the expected forwarding path includes: verifying whether the unit identifiers at the same arrangement position in the actual forwarding path and the preset forwarding path are consistent.
[0070] For example, the actual forwarding path and the expected forwarding path corresponding to the target data packet may also include an initiator and a receiver of the target data packet.
[0071] For example, the target data packet is sent from Core 0 to the interconnection device, and several monitors collect information about the target data packet from the ports of Router 0 and Router 2 in turn and send them to the global scoreboard in turn. The actual forwarding path of the target data packet includes Core 0->Router 0->Router 2. If the expected forwarding path is Core 0->Router 0->Router 2->Router 5->DDR1, the unit identifiers at the same arrangement position in the actual forwarding path and the preset forwarding path are consistent.
[0072] For example, the first queue includes a target data packet information set corresponding to the target data packet, and the plurality of routing units include a first routing unit. In the case where the first routing unit forwards the target data packet, based on the information of the target data packet collected from the first routing unit, the unit identifier of the first routing unit is added to the actual forwarding path information item in the target data packet information set, so as to update the actual forwarding path corresponding to the target data packet using the unit identifier of the first routing unit. For example, the unit identifier of the first routing unit is added to the end of the queue of the actual forwarding path.
[0073] For example, the above-mentioned adding the unit identifier of the first routing unit to the actual forwarding path information item in the target data packet information set based on the information of the target data packet collected from the first routing unit may include: extracting the initiator identifier and the data packet label of the target data packet from the collected information of the target data packet; searching the target data packet information set corresponding to the target data packet from the first queue according to the extracted initiator identifier and the data packet label of the target data packet; and adding the unit identifier of the first routing unit to the actual forwarding path information item in the target data packet information set.
[0074] For example, when the target data packet is output from a port of a router, the monitor of this port will transmit the collected information to the global scoreboard. The global scoreboard extracts the master_id and tag of the target data packet and compares them with all the collection items in the first queue q. If the master_id and tag of a collection item are found to be the same as the extracted master_id and tag, the router identifier is added to the real_path of this collection item. If the updated real_path is inconsistent with the expected_path, the global scoreboard may report an error. If the extracted master_id and tag do not match any collection item in the first queue q, the global scoreboard may also report an error.
[0075] For example, in response to each time the target data packet passes through a routing unit, the actual forwarding path corresponding to the target data packet may be updated. After each update of the actual forwarding path corresponding to the target data packet, it is verified whether the updated actual forwarding path is consistent with at least a portion of the expected forwarding path. For example, after each target data packet passes through a router, the actual forwarding path may be updated, and the updated actual forwarding path may be compared with the expected forwarding path. In this way, problems may be discovered and adjusted in a timely manner.
[0076] For example, Figure 5As shown, q[1] represents the second set item in the first queue q of the global scoreboard, which records a data packet information set of a data packet sent from processor core Core 0 to DDR1 with a tag (tag) of 4, which is, for example, the target data packet. This set item is created and stored in the first queue q when the target data packet is sent from Core0. When the set item is created, the expected_path (Core0->Router0->Router2->Router5->DDR1) and real_path (Core0) information can be added. After that, the real_path information can be updated and checked every time the target data packet passes through a router.
[0077] Through the above method, it can be ensured that the target data packet is forwarded in the interconnected device according to the global routing table. Once an incorrect route occurs in the interconnected device, the global scoreboard can report an error and quickly locate the problematic router.
[0078] For example, in other embodiments, the updated actual forwarding path and the expected forwarding path may be compared once after the target data packet passes through multiple routers, or the complete actual forwarding path and the expected forwarding path may be compared after the target data packet passes through the last router in the interconnection device.
[0079] For example, in addition to verifying the forwarding path, the verification method of the embodiment of the present disclosure may also check the sequence between multiple data packets.
[0080] For example, the actual forwarding characteristics of the target data packet in the interconnected device may also include: the actual arrival time of the target data packet from the interconnected device to the corresponding receiving device. For example, in some embodiments, the last router that the target data packet passes through in the interconnected device sends the target data packet to the receiving device, and the time when the monitor of the last router collects the information of the target data packet is the time when the interconnected device sends the target data packet to the receiving device, and this time can be used as the actual arrival time of the target data packet.
[0081] For example, the verification method may also include: in response to the target data packet arriving at a corresponding receiving device, determining at least one associated data packet sent by the initiating device of the target data packet; and based on the actual arrival time of the target data packet, verifying whether the order in which the target data packet and at least one associated data packet arrive at the corresponding receiving device meets the first order requirement.
[0082] For example, the target data packet has a sequence tag, wherein the sequence tag indicates that the target data packet and other data packets with sequence tags sent by the initiator of the target data packet need to meet a set sequence requirement. At least one data packet with a sequence tag can be determined from multiple data packets sent by the initiator of the target data packet as the at least one associated data packet.
[0083] For example, the first order requirement may include: the order in which the multiple data packets arrive at the corresponding receiving device is consistent with the order in which the multiple data packets are sent by the initiating device. For example, if the sending time of the target data packet is earlier than the sending time of at least one associated data packet, it is required that the sending time of the target data packet is also earlier than the sending time of at least one associated data packet. It should be noted that the receiving device of the target data packet and the receiving device of any associated data packet may be the same or different.
[0084] For example, when the sending time of the target data packet is earlier than the sending time of at least one associated data packet, if the actual arrival time of the target data packet is earlier than the actual arrival time of at least one associated data packet, then it is considered that the target data packet and the at least one associated data packet meet the first order requirement. The sending time is, for example, the start_time mentioned above, and the actual arrival time is, for example, the arrive_time mentioned above.
[0085] For example, in the case where the sending time of the target data packet is earlier than the sending time of at least one associated data packet, if the arrival time information item (arrive_time) in the target data packet information set corresponding to the target data packet has recorded the arrival time, while the arrival time information item (arrive_time) in the data packet information set corresponding to the associated data packet has not yet recorded the arrival time, it is considered that the associated data packet has not yet arrived at the corresponding receiving device. Therefore, the arrival time of the target data packet is earlier than the arrival time of the associated data packet, and the target data packet and the associated data packet meet the first order requirement.
[0086] Figure 7 FIG. 2 shows another schematic diagram of a first queue provided by at least one embodiment of the present disclosure. Figure 7As shown, an ordered variable can be added to each collection item of the global scoreboard. If the ordered variables in multiple collection items corresponding to the same initiator are in a valid state, it can be considered that the multiple data packets corresponding to the multiple collection items have sequence tags, which further indicates that the multiple data packets need to ensure that the order in which they arrive at the receiving device is consistent with when they are sent. When a data packet arrives at the destination, the global scoreboard can check whether the ordered variable of the data packet is valid. If the ordered variable of the data packet is valid, the global scoreboard can search the collection items corresponding to all data packets sent by the same initiator in the first queue q to see if there is a collection item whose start_time is earlier than the start_time of the data packet, the ordered variable is valid, and the arrive_time has not been assigned. Once such a collection item is found, it indicates that the interconnected device has an error in maintaining the order, and the global scoreboard can perform error processing.
[0087] For example, Figure 7 As shown in the figure, Core0 sends two data packets to DDR0 and DDR1 respectively. The tags of the two data packets are 5 and 4 respectively. The data packet with tag 5 is sent from Core0 first. After the data packet with tag 4 arrives at DDR1 first, the global scoreboard searches for data packets also sent by Core0 in the first queue q. When it is found that the ordered variable of the data packet with tag 5 is valid, the start_time is smaller, and the arrive_time has not been assigned, it is considered that the order of the two data packets is wrong.
[0088] According to the above method, the sequence relationship between the data packets can be checked to ensure that the interconnected device forwards each data packet in a predetermined order.
[0089] For example, the interconnected device can forward broadcast type data packets. For example, a data packet sent by an initiating device (Master) can be converted into multiple data packets after being broadcast by a router, and finally sent to multiple receiving devices (Slave). In the following embodiments, it can be checked whether the forwarding behavior of the interconnected device for broadcast type data packets is correct.
[0090] For example, if the target data packet is a broadcast type data packet, and the target data packet is expected to be sent to a first receiving device and a second receiving device through an interconnected device, when obtaining the expected forwarding characteristics corresponding to the target data packet, a first expected forwarding path corresponding to the first receiving device and a second expected forwarding path corresponding to the second receiving device calculated according to the routing table can be obtained for the target data packet.
[0091] For example, the processor core Core 0 sends a target data packet and needs to broadcast the target data packet to the memory DDR 0 and DDR 1 through the interconnect device. In this case, you can query Figure 6 The global routing table shown obtains the expected forwarding path from the processor core Core 0 to the memory DDR 0 (eg, the first expected forwarding path) and the expected forwarding path from the processor core Core 0 to the memory DDR 1 (eg, the second expected forwarding path).
[0092] For example, the plurality of routing units included in the interconnected device include a second routing unit, and the second routing unit receives the target data packet and forwards the first broadcast data packet and the second broadcast data packet based on the target data packet to the first receiving device and the second receiving device respectively. For example, one of the first broadcast data packet and the second broadcast data packet may be the target data packet, and the other may be a duplicate data packet obtained by duplicating the target data packet, or the first broadcast data packet and the second broadcast data packet may both be duplicate data packets.
[0093] For example, the actual forwarding characteristics of the target data packet in the interconnected device may include: a first actual forwarding path of the target data packet corresponding to the first receiving device and a second actual forwarding path of the target data packet corresponding to the second receiving device. For example, the routing units that the target data packet passes through in sequence from the initiating device to the second routing unit may be summarized to obtain a first partial path; based on the first partial path, the routing units that the first broadcast data packet passes through in sequence starting from the second routing unit may be added to obtain the first actual forwarding path; and based on the first partial path, the routing units that the second broadcast data packet passes through in sequence starting from the second routing unit may be added to obtain the second actual forwarding path.
[0094] For example, during verification, it is verified whether the first actual forwarding path is consistent with at least a portion of the first expected forwarding path; and it is verified whether the second actual forwarding path is consistent with at least a portion of the second expected forwarding path. If the first actual forwarding path is consistent with at least a portion of the first expected forwarding path, and the second actual forwarding path is consistent with at least a portion of the second expected forwarding path, it can be considered that the verification is passed, otherwise, the verification is not passed. Figure 8 FIG. 1 is a schematic diagram showing a broadcast data packet provided by at least one embodiment of the present disclosure. Figure 8As shown, Core0 sends a data packet with label 4 and needs to be broadcast to DDR0 and DDR1 respectively. When the data packet is output from Router 0, there is only one real_path corresponding to the collection item in the first queue q of the global scoreboard, while there can be two expected_paths. The data packet can be transformed into two data packets after passing through Router 2: Router 2 outputs a data packet destined for DDR0 and Router 2 outputs a data packet destined for DDR 1, one of which can be copied. Router2 can first output the data packet destined for DDR 0, at which time the real_path of the collection item is updated to Core0->Router0->Router2 (for example, the first actual forwarding path), and then Router 2 can output the data packet destined for DDR1, at which time the real_path of the collection item can add a new path Core0->Router0->Router2 (for example, the second actual forwarding path). During the data packet transmission process, a routing check can be performed at each router passed. When all broadcast packets finally reach the destination, the global scoreboard can determine whether the behavior of broadcast packets in the NOC network is correct by checking whether each expected forwarding path expect_path is exactly the same as the corresponding actual forwarding path real_path.
[0095] According to the verification method of the embodiment of the present disclosure, the data packets in the interconnected devices are checked from a global perspective, thereby ensuring the correctness of various functions of the interconnected devices.
[0096] According to the verification method of the embodiment of the present disclosure, it is only necessary to rely on the global routing table to ensure the correct routing of data packets in the interconnected devices, thereby increasing the reusability of the verification code.
[0097] According to the verification method of the embodiment of the present disclosure, it is possible to find out whether a deadlock exists in the interconnected devices and quickly locate the problematic router, thus saving the time spent on locating the problem during the verification process.
[0098] According to the verification method of the embodiment of the present disclosure, the sequence relationship between data packets can be checked.
[0099] According to the verification method of the embodiment of the present disclosure, the correctness of the forwarding behavior of the broadcast type data packet can be checked.
[0100] According to the verification method of the embodiment of the present disclosure, the scattered data packets in the interconnected devices are merged and processed uniformly, thereby improving the efficiency of code operation.
[0101] Fig. 9 A schematic block diagram of a verification device 200 for interconnecting devices provided by at least one embodiment of the present disclosure is shown.
[0102] For example, Fig. 9 As shown, the verification device 200 includes an acquisition module 210 and an evaluation module 220. The evaluation module 220 includes a summary unit 221, an acquisition unit 222 and a verification unit 223. These components are interconnected via a bus system and / or other forms of connection mechanisms (not shown). For example, these modules can be implemented by hardware (e.g., circuit) modules, software modules, or any combination of the two. The following embodiments are the same and will not be repeated here. For example, these units can be implemented by a central processing unit (CPU), a graphics processing unit (GPU), a tensor processing unit (TPU), a field programmable gate array (FPGA), or other forms of processing units with data processing capabilities and / or instruction execution capabilities, as well as corresponding computer instructions. It should be noted that Fig. 9 The components and structures of the verification device 200 shown are merely exemplary and non-limiting. The verification device 200 may also have other components and structures as required.
[0103] The collection module 210 is configured to collect information about data packets forwarded by multiple routing units. The collection module 210 can, for example, execute Figure 3 Step S110 described.
[0104] The summarizing unit 221 is configured to summarize the forwarding information of the target data packet in the interconnected device according to the information of the data packets forwarded by the multiple routing units, so as to obtain the actual forwarding characteristics of the target data packet in the interconnected device. The summarizing unit 221 can, for example, execute Figure 3 Step S120 described.
[0105] The acquisition unit 222 is configured to acquire the expected forwarding characteristics corresponding to the target data packet. The acquisition unit 222 may, for example, execute Figure 3 Step S130 described.
[0106] The verification unit 223 is configured to verify the interconnection device according to the actual forwarding characteristics and the expected forwarding characteristics of the target data packet. The verification unit 223 can, for example, perform Figure 3 Step S140 described.
[0107] For example, the acquisition module 210 and the evaluation module 220 may be hardware, software, firmware, or any feasible combination thereof. For example, the acquisition module 210 and the evaluation module 220 may be a dedicated or general circuit, chip, or device, or may be a combination of a processor and a memory. The embodiments of the present disclosure do not limit the specific implementation forms of the above-mentioned units.
[0108] For example, the acquisition module 210 and the evaluation module 220 may include codes and programs stored in a memory; the processor may execute the codes and programs to implement some or all of the functions of the acquisition module 210 and the evaluation module 220 as described above. For example, the acquisition module 210 and the evaluation module 220 may be dedicated hardware devices used to implement some or all of the functions of the acquisition module 210 and the evaluation module 220 as described above. For example, the acquisition module 210 and the evaluation module 220 may be a circuit board or a combination of multiple circuit boards used to implement the functions described above. In an embodiment of the present disclosure, the circuit board or the combination of multiple circuit boards may include: (1) one or more processors; (2) one or more non-temporary memories connected to the processor; and (3) firmware stored in the memory that is executable by the processor.
[0109] It should be noted that in the embodiment of the present disclosure, each unit of the verification device 200 corresponds to each step of the aforementioned verification method. For the specific functions of the verification device 200, reference can be made to the relevant description of the verification method, which will not be repeated here. Fig. 9 The components and structures of the verification device 200 shown are only exemplary and non-restrictive. The verification device 200 may also include other components and structures as needed. The verification device 200 may include more or fewer circuits or units, and the connection relationship between the various circuits or units is not limited and can be determined according to actual needs. The specific configuration of each circuit or unit is not limited and can be composed of analog devices according to circuit principles, or can be composed of digital chips, or can be composed in other applicable ways.
[0110] For example, in a verification device provided in an embodiment of the present disclosure, the aggregation unit is configured to aggregate the routing units that the target data packet passes through in the interconnected device in succession to obtain an actual forwarding path of the target data packet in the interconnected device; the acquisition unit is configured to obtain an expected forwarding path of the target data packet in the interconnected device calculated according to the routing table; and the verification unit is configured to verify whether the actual forwarding path is consistent with at least a portion of the expected forwarding path in response to the target data packet passing through at least one routing unit.
[0111] For example, in a verification device provided in an embodiment of the present disclosure, the verification unit is configured to: update an actual forwarding path corresponding to the target data packet once in response to each time the target data packet passes through a routing unit; after each update of the actual forwarding path corresponding to the target data packet, verify whether the updated actual forwarding path is consistent with at least part of the expected forwarding path.
[0112] For example, in a verification device provided by an embodiment of the present disclosure, actual forwarding characteristics of a target data packet in an interconnected device include: an actual arrival time of the target data packet from the interconnected device to a corresponding receiving device; the verification device also includes a sequence unit, the sequence unit being configured to: in response to the target data packet arriving at the corresponding receiving device, determine at least one associated data packet sent by an initiating device of the target data packet; and verify, based on the actual arrival time of the target data packet, whether the order in which the target data packet and at least one associated data packet arrive at the corresponding receiving device satisfies a first sequence requirement.
[0113] For example, in a verification device provided by an embodiment of the present disclosure, the sequence unit is configured to, when the sending time of a target data packet is earlier than the sending time of at least one associated data packet, if the actual arrival time of the target data packet is earlier than the actual arrival time of at least one associated data packet, then it is considered that the target data packet and at least one associated data packet meet the first sequence requirement.
[0114] For example, in a verification device provided in an embodiment of the present disclosure, a target data packet is a broadcast type data packet, and the target data packet is expected to be sent to at least a first receiving device and a second receiving device through an interconnected device, and the acquisition unit is configured to: for the target data packet, obtain a first expected forwarding path corresponding to the first receiving device and a second expected forwarding path corresponding to the second receiving device obtained by calculation according to a routing table; the actual forwarding characteristics of the target data packet in the interconnected device include: a first actual forwarding path of the target data packet corresponding to the first receiving device and a second actual forwarding path of the target data packet corresponding to the second receiving device; the verification unit is configured to: verify whether the first actual forwarding path is consistent with at least a portion of the path in the first expected forwarding path; and verify whether the second actual forwarding path is consistent with at least a portion of the path in the second expected forwarding path.
[0115] At least one embodiment of the present disclosure further provides an electronic device, the electronic device comprising a processor and a memory, wherein the memory stores one or more computer program modules. The one or more computer program modules are configured to be executed by the processor to implement the above verification method.
[0116] Fig.10 A schematic block diagram of an electronic device provided in some embodiments of the present disclosure. Fig.10As shown, the electronic device 300 includes a processor 310 and a memory 320. The memory 320 stores non-transitory computer-readable instructions (e.g., one or more computer program modules). The processor 310 is used to run non-transitory computer-readable instructions, and the non-transitory computer-readable instructions are executed by the processor 310 to execute one or more steps in the verification method described above. The memory 320 and the processor 310 can be interconnected via a bus system and / or other forms of connection mechanisms (not shown). For the specific implementation of each step of the verification method and the related explanation content, please refer to the embodiment of the above-mentioned verification method, and the repetitions will not be repeated here.
[0117] It should be noted that Fig.10 The components of the electronic device 300 shown are merely exemplary and non-limiting. The electronic device 300 may also have other components according to actual application requirements.
[0118] For example, the processor 310 and the memory 320 may communicate with each other directly or indirectly.
[0119] For example, the processor 310 and the memory 320 may communicate via a network. The network may include a wireless network, a wired network, and / or any combination of a wireless network and a wired network. The processor 310 and the memory 320 may also communicate with each other via a system bus, which is not limited in the present disclosure.
[0120] For example, the processor 310 and the memory 320 may be arranged on a server side (or a cloud side).
[0121] For example, the processor 310 can control other components in the electronic device 300 to perform desired functions. For example, the processor 310 can be a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units with data processing capabilities and / or program execution capabilities. For example, the central processing unit (CPU) can be an X86 or ARM architecture, etc. The processor 310 can be a general-purpose processor or a special-purpose processor, and can control other components in the electronic device 300 to perform desired functions.
[0122] For example, the memory 320 may include any combination of one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disk read-only memory (CD-ROM), USB memory, flash memory, etc. One or more computer program modules may be stored on the computer-readable storage medium, and the processor 310 may run one or more computer program modules to implement various functions of the electronic device 300. Various applications and various data, as well as various data used and / or generated by the application, etc. may also be stored in the computer-readable storage medium.
[0123] For example, in some embodiments, the electronic device 300 may be a mobile phone, a tablet computer, an electronic paper, a television, a monitor, a laptop computer, a digital photo frame, a navigator, a wearable electronic device, a smart home device, etc.
[0124] For example, the electronic device 300 may have a touch function, that is, the electronic device 300 may be a touch device.
[0125] It should be noted that, in the embodiment of the present disclosure, the specific functions and technical effects of the electronic device 300 can refer to the above description of the verification method, which will not be repeated here.
[0126] Fig.11 This is a schematic block diagram of another electronic device provided in some embodiments of the present disclosure. The electronic device 400 is suitable for implementing the verification method provided in the embodiments of the present disclosure. The electronic device 400 may be a terminal device, etc. It should be noted that: Fig.11 The electronic device 400 shown is only an example and does not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0127] like Fig.11 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 410, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 420 or a program loaded from a storage device 480 into a random access memory (RAM) 430. In the RAM 430, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 410, the ROM 420, and the RAM 430 are connected to each other via a bus 440. An input / output (I / O) interface 450 is also connected to the bus 440.
[0128] Typically, the following devices may be connected to the I / O interface 450: an input device 460 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 470 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 480 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 490. The communication device 490 may allow the electronic device 400 to communicate with other electronic devices wirelessly or by wire to exchange data. Although Fig.11 The electronic device 400 is shown to have various devices, but it should be understood that it is not required to implement or possess all the devices shown, and the electronic device 400 may alternatively implement or possess more or fewer devices.
[0129] For example, according to an embodiment of the present disclosure, the above verification method can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the above verification method. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 490, or installed from the storage device 480, or installed from the ROM420. When the computer program is executed by the processing device 410, the functions defined in the verification method provided in the embodiment of the present disclosure can be implemented.
[0130] At least one embodiment of the present disclosure further provides a computer-readable storage medium storing non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a computer, the above-mentioned verification method can be implemented.
[0131] Fig.12 A schematic diagram of a storage medium provided in some embodiments of the present disclosure. Fig.12 As shown, the storage medium 500 stores non-transitory computer-readable instructions 510. For example, when the non-transitory computer-readable instructions 510 are executed by a computer, one or more steps in the verification method described above are performed.
[0132] For example, the storage medium 500 may be applied to the electronic device 300. Fig.10 The memory 320 in the electronic device 300 is shown. For example, the description of the storage medium 500 can refer to Fig.10 The corresponding description of the memory 320 in the electronic device 300 is shown and will not be repeated here.
[0133] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0134] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0135] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
[0136] There are a few points to note about this disclosure:
[0137] (1) The drawings of the embodiments of the present disclosure only relate to the structures involved in the embodiments of the present disclosure, and other structures may refer to the general design.
[0138] (2) In the absence of conflict, the embodiments of the present disclosure and the features therein may be combined with each other to obtain new embodiments.
[0139] The above description is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. The protection scope of the present disclosure shall be based on the protection scope of the claims.
Claims
1. A verification method for an interconnected device, wherein the interconnected device is a network on chip, and the interconnected device includes a plurality of routing units in communication connection, the verification method comprising: Collecting information of data packets forwarded respectively by the multiple routing units; According to the information of the data packets respectively forwarded by the multiple routing units, the forwarding information of the target data packet in the interconnected device is summarized to obtain the actual forwarding characteristics of the target data packet in the interconnected device; Obtaining the expected forwarding characteristics corresponding to the target data packet; Verifying the interconnection device according to the actual forwarding characteristics and the expected forwarding characteristics of the target data packet; The step of verifying the interconnection device according to the actual forwarding characteristic and the expected forwarding characteristic of the target data packet includes: In response to each time the target data packet passes through a routing unit, updating an actual forwarding path corresponding to the target data packet; After each update of the actual forwarding path corresponding to the target data packet, it is verified whether the updated actual forwarding path is consistent with at least a portion of the expected forwarding path.
2. The verification method according to claim 1, wherein: Summarizing the forwarding information of the target data packet in the interconnected device to obtain the actual forwarding characteristics of the target data packet in the interconnected device, including: summarizing the routing units that the target data packet passes through in the interconnected device to obtain the actual forwarding path of the target data packet in the interconnected device; Acquiring the expected forwarding feature corresponding to the target data packet includes: acquiring the expected forwarding path of the target data packet in the interconnected device obtained by calculation according to the routing table.
3. The verification method according to claim 2, wherein: At least one initiating device sends a data packet to at least one receiving device via the interconnection device, and the verification method further includes: forming a first queue, wherein the first queue includes a data packet information set formed by recording each data packet sent by the at least one initiating device to the interconnected device; Each of the data packet information sets includes at least one information item for the corresponding data packet, and the at least one information item is used to record at least one of an initiating device identifier, a receiving device identifier, a data packet label, an expected forwarding path, and an actual forwarding path. The data packet label is used to distinguish different data packets sent by the same initiator.
4. The verification method according to claim 3, wherein: The first queue includes a target data packet information set corresponding to the target data packet, and the plurality of routing units include a first routing unit; Summarizing the routing units that the target data packet passes through in the interconnected device to obtain an actual forwarding path of the target data packet in the interconnected device, including: In the case where the first routing unit forwards the target data packet, based on the information of the target data packet collected from the first routing unit, the unit identifier of the first routing unit is added to the actual forwarding path information item in the target data packet information set, so as to update the actual forwarding path corresponding to the target data packet using the unit identifier of the first routing unit.
5. The verification method according to claim 4, wherein: Based on the information of the target data packet collected from the first routing unit, adding the unit identifier of the first routing unit to the actual forwarding path information item in the target data packet information set includes: Extracting the initiator identifier and the data packet label of the target data packet from the collected information of the target data packet; According to the extracted initiator identifier and the data packet tag of the target data packet, searching the first queue for a target data packet information set corresponding to the target data packet; The unit identifier of the first routing unit is added to the actual forwarding path information item in the target data packet information set.
6. The verification method according to claim 2, wherein: The first queue is formed, including: In response to the interconnection device receiving the target data packet from the initiator of the target data packet, a target data packet information set corresponding to the target data packet is formed.
7. The verification method according to any one of claims 1 to 6, wherein: The actual forwarding characteristics of the target data packet in the interconnected device include: the actual arrival time of the target data packet from the interconnected device to the corresponding receiving device; The verification method further comprises: In response to the target data packet arriving at the corresponding receiving device, determining at least one associated data packet sent by the initiating device of the target data packet; According to the actual arrival time of the target data packet, it is verified whether the order in which the target data packet and the at least one associated data packet arrive at the corresponding receiving device meets a first order requirement.
8. The verification method according to claim 7, wherein: The target data packet has a sequence tag, wherein the sequence tag indicates that the target data packet and other data packets with the sequence tag sent by the initiator of the target data packet need to meet a set sequence requirement; In response to the target data packet arriving at a corresponding receiving device, at least one associated data packet sent by the initiating device of the target data packet is determined, including: from multiple data packets sent by the initiating device of the target data packet, at least one data packet with the sequence label is determined as the at least one associated data packet.
9. The verification method according to claim 7, wherein: Determining, according to the actual arrival time of the target data packet, whether the order in which the target data packet and the at least one associated data packet arrive at the corresponding receiving device meets the first order requirement includes: In the case where the sending time of the target data packet is earlier than the sending time of the at least one associated data packet, if the actual arrival time of the target data packet is earlier than the actual arrival time of the at least one associated data packet, it is considered that the target data packet and the at least one associated data packet meet the first sequence requirement.
10. The verification method according to any one of claims 1 to 6, wherein: The target data packet is a broadcast type data packet, and the target data packet is expected to be sent to at least a first receiving device and a second receiving device through the interconnection device. Acquiring the expected forwarding feature corresponding to the target data packet, including: acquiring, for the target data packet, a first expected forwarding path corresponding to the first receiving device and a second expected forwarding path corresponding to the second receiving device obtained by calculation according to a routing table; The actual forwarding characteristics of the target data packet in the interconnected device include: a first actual forwarding path of the target data packet corresponding to the first receiving device and a second actual forwarding path of the target data packet corresponding to the second receiving device; Verifying the interconnection device according to the actual forwarding characteristic and the expected forwarding characteristic of the target data packet includes: Verifying whether the first actual forwarding path is consistent with at least a portion of the first expected forwarding path; and Verify whether the second actual forwarding path is consistent with at least a portion of the second expected forwarding path.
11. The verification method according to claim 10, wherein: The plurality of routing units include a second routing unit that receives the target data packet and forwards a first broadcast data packet and a second broadcast data packet based on the target data packet to the first receiving device and the second receiving device respectively; Summarizing the forwarding information of the target data packet in the interconnected device to obtain actual forwarding characteristics of the target data packet in the interconnected device, including: Summarizing the routing units that the target data packet passes through successively from the initiating device to the second routing unit to obtain a first partial path; On the basis of the first partial path, adding routing units that the first broadcast data packet passes through in sequence starting from the second routing unit to obtain the first actual forwarding path; and On the basis of the first partial path, routing units that the second broadcast data packet passes through in sequence starting from the second routing unit are added to obtain the second actual forwarding path.
12. A verification device for an interconnection device, the interconnection device being a network on chip, the interconnection device comprising a plurality of routing units in communication connection, the verification device comprising: A collection module, configured to collect information of data packets forwarded respectively by the plurality of routing units; Assessment modules include: a summarizing unit configured to summarize forwarding information of a target data packet in the interconnected device according to information of data packets respectively forwarded by the plurality of routing units, so as to obtain actual forwarding characteristics of the target data packet in the interconnected device; An acquisition unit, configured to acquire an expected forwarding feature corresponding to the target data packet; a verification unit configured to verify the interconnection device according to the actual forwarding characteristic and the expected forwarding characteristic of the target data packet; Wherein, the verification unit is further configured to: update the actual forwarding path corresponding to the target data packet once in response to each time the target data packet passes through a routing unit; after each update of the actual forwarding path corresponding to the target data packet, verify whether the updated actual forwarding path is consistent with at least part of the expected forwarding path.
13. The verification device according to claim 12, wherein: The summarizing unit is configured to summarize the routing units that the target data packet passes through successively in the interconnected device to obtain an actual forwarding path of the target data packet in the interconnected device; The acquisition unit is configured to acquire an expected forwarding path of the target data packet in the interconnected device obtained by calculation according to the routing table.
14. The verification device according to claim 12 or 13, wherein: The actual forwarding characteristics of the target data packet in the interconnected device include: the actual arrival time of the target data packet from the interconnected device to the corresponding receiving device; The verification device further comprises a sequence unit, wherein the sequence unit is configured as follows: In response to the target data packet arriving at the corresponding receiving device, determining at least one associated data packet sent by the initiating device of the target data packet; According to the actual arrival time of the target data packet, it is verified whether the order in which the target data packet and the at least one associated data packet arrive at the corresponding receiving device meets a first order requirement.
15. The verification device according to claim 14, wherein: The sequence unit is configured to consider that the target data packet and the at least one associated data packet meet the first sequence requirement if the sending time of the target data packet is earlier than the sending time of the at least one associated data packet and if the actual arrival time of the target data packet is earlier than the actual arrival time of the at least one associated data packet.
16. The verification device according to claim 12 or 13, wherein: The target data packet is a broadcast type data packet, and the target data packet is expected to be sent to at least a first receiving device and a second receiving device through the interconnection device. The acquisition unit is configured to: for the target data packet, acquire a first expected forwarding path corresponding to the first receiving device and a second expected forwarding path corresponding to the second receiving device obtained by calculation according to the routing table; The actual forwarding characteristics of the target data packet in the interconnected device include: a first actual forwarding path of the target data packet corresponding to the first receiving device and a second actual forwarding path of the target data packet corresponding to the second receiving device; The verification unit is configured to: verify whether the first actual forwarding path is consistent with at least a portion of the first expected forwarding path; and verify whether the second actual forwarding path is consistent with at least a portion of the second expected forwarding path.
17. An electronic device comprising: processor; a memory storing one or more computer program modules; The one or more computer program modules are configured to be executed by the processor to implement the verification method according to any one of claims 1 to 11.
18. A computer-readable storage medium storing non-transitory computer-readable instructions, which can implement the verification method according to any one of claims 1 to 11 when executed by a computer.
