Circuits, Chips, and Electronic Devices

The circuit design in high-speed network chips addresses latency issues by optimizing processor-memory connections, resulting in reduced latency and area usage, suitable for network switches and routers.

JP7556606B2Active Publication Date: 2024-09-26HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2023519636
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-10-28
Filing Date
2021-08-31
Publication Date
2024-09-26
Estimated Expiration
2041-08-31

AI Technical Summary

Technical Problem

Current high-speed network chips suffer from high latencies due to inadequate design between processors and memory, particularly in the storage and retrieval of program states during packet transfer.

Method used

The implementation of a circuit design with specific processor and memory configurations, including multi-core processors and optimized bus connections, reduces transmission latency by minimizing the distance and bit width of bus connections, thereby enhancing data transfer efficiency.

Benefits of technology

This design significantly reduces data transmission latency and chip area while maintaining processing efficiency, making it suitable for applications in network switches and routers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007556606000004
    Figure 0007556606000004
  • Figure 0007556606000003
    Figure 0007556606000003
  • Figure 0007556606000005
    Figure 0007556606000005
Patent Text Reader

Abstract

The present application provides a circuit, a chip, and an electronic device. The circuit includes a first processor and a first processing module connected to the first processor. The first processing module includes a second processor connected to a first memory. A transmission latency generated when the second processor performs read and write operations on the first memory is less than a transmission latency generated when the first processor communicates with the first processing module. Because the transmission latency generated when the second processor performs read and write operations on the first memory is less than a transmission latency generated when the first processor communicates with the first processing module, the cost of data transmission latency on the bus can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority to Chinese Patent Application No. 202011060780.0, filed with the State Intellectual Property Office of the People's Republic of China on September 30, 2020, and entitled "Processor Architecture, Device, and Method," and Chinese Patent Application No. 202011176149.7, filed with the State Intellectual Property Office of the People's Republic of China on October 28, 2020, and entitled "Circuit, Chip, and Electronic Device," both of which are incorporated by reference in their entireties herein.

[0002] This application relates to the field of chip technology, and more particularly to circuits, chips, and electronic devices. [Background technology]

[0003] Processors in current high-speed network chips are generally arranged in a pipelined manner. After a packet enters the chip, a program state (PS) is generated for the packet to store context information during packet transfer. A processor on the pipeline processes the packet, saves the processing result in the PS, and then sends the processing result to the next processor. Currently, the design between the processors and the memory that stores the PS in the chip is inadequate. As a result, high latency is generated when the PS is read and written. Summary of the Invention

[0004] The present application provides circuits, chips, and electronic devices that reduce transmission latency.

[0005] According to a first aspect, an embodiment of the present application provides a circuit. The circuit includes a first processor and a first processing module connected to the first processor. The first processing module includes a second processor connected to a first memory. A transmission latency generated when the second processor performs read and write operations on the first memory is less than a transmission latency generated when the first processor communicates with the first processing module. Since the transmission latency generated when the second processor performs read and write operations on the first memory is less than a transmission latency generated when the first processor communicates with the first processing module, a cost of data transmission latency on a bus can be reduced.

[0006] With reference to the first aspect, in a possible implementation, the transmission latency generated when the second processor performs read and write operations on the first memory is less than or equal to 1 / 10 of the transmission latency generated when the first processor communicates with the first processing module.

[0007] With reference to the first aspect, in a possible implementation, the second processor is a multi-core processor, and the transmission latency generated when the second processor performs read and write operations on the first memory is the transmission latency generated when any core processor of the multi-core processor included in the second processor performs read and write operations on the first memory.

[0008] Referring to the first aspect, in a possible implementation, the first processor is connected to the first processing module by a first bus, and the second processor is connected to the first memory by a second bus, and the bus bit width of the second bus is larger than the bus bit width of the first bus and / or the length of the second bus is smaller than the length of the first bus. Since the length of the second bus is smaller than the length of the first bus, the area of ​​the circuit can be reduced.

[0009] Referring to the first aspect, in a possible implementation, the length of the second bus may be less than or equal to 1 / 10 of the length of the first bus. In the above technical solution, the area of ​​the circuit can be further reduced.

[0010] With reference to the first aspect, in a possible implementation, the first processing module further includes a third processor connected to the second memory, and a transmission latency generated when the third processor performs read and write operations on the second memory is less than a transmission latency generated when the first processor communicates with the first processing module.

[0011] With reference to the first aspect, in a possible implementation, a first processor is connected to a first processing module by a first bus, a second processor is connected to a first memory by a second bus, and a third processor is connected to a second memory by a third bus, and the sum of the bus bit width of the second bus and the bus bit width of the third bus is greater than the bus bit width of the first bus.

[0012] With reference to the first aspect, in a possible implementation, the first processing module further includes a third processor connected to the first memory, and a transmission latency generated when the third processor performs read and write operations on the first memory is less than a transmission latency generated when the first processor communicates with the first processing module.

[0013] With reference to the first aspect, in a possible implementation, a first processor is connected to a first processing module by a first bus, a second processor is connected to a first memory by a second bus, and a third processor is connected to the first memory by a third bus, and the sum of the bus bit width of the second bus and the bus bit width of the third bus is greater than the bus bit width of the first bus.

[0014] With reference to the first aspect, in a possible implementation, the second processor and the third processor are pipeline processors.

[0015] Referring to the first aspect, in a possible implementation, the circuit further includes a fourth processor and a second processing module connected to the fourth processor. The second processing module includes N fifth processors connected to M memories, where both N and M are integers greater than or equal to 1. A transmission latency generated when any of the fifth processors performs read and write operations on the memories connected to the fifth processors is less than a transmission latency generated when the fourth processor communicates with the second processing module.

[0016] With reference to the first aspect, in a possible implementation, the second processor is connected to the third processor by a fourth bus, and the fourth processor is connected to the first processor by a fifth bus, and the bus bit width of the fourth bus is smaller than the bus bit width of the fifth bus.

[0017] With reference to the first aspect, in a possible implementation, the number of processor cores included in the fourth processor is greater than or equal to the number of processor cores included in the first processor.

[0018] With reference to the first aspect, in a possible implementation, the fourth processor and the first processor are pipeline processors.

[0019] With reference to the first aspect, in a possible implementation, the first processing module further includes a first memory.

[0020] According to a second aspect, an embodiment of the present application further provides a chip, the chip including the circuit according to the first aspect or any one of the possible implementations of the first aspect.

[0021] According to a third aspect, the embodiment of the present application further provides an electronic device. The electronic device includes a chip according to the embodiment of the present application, and the electronic device further includes a receiver and a transmitter. The receiver is configured to receive a packet and send the packet to the chip. The chip is configured to process the packet. The transmitter is configured to obtain the packet processed by the chip and send the processed packet to another electronic device. The electronic device may be a switch, a router, or any other electronic device in which the aforementioned chip can be arranged.

[0022] According to a fourth aspect, an embodiment of the present application further provides a processing method, the method including: a first processor receiving a first packet, where the first packet includes flow identifier information; the first processor determining a first processing module based on the flow identifier information, where the first processing module corresponds to the flow identifier information; and the first processor sending the first packet to the first processing module.

[0023] In the above method, the first processor sends packets that need to be processed by the first processing module to the first processing module based on the flow identifier information carried in the packets, and the processor of the first processing module performs the corresponding processing. Since the first processing module is closer to the memory than the first processor, the transmission latency can be reduced.

[0024] Optionally, the method further includes the first processor receiving a second packet from the first processing module, where the second packet is a packet obtained by processing performed by the first processing module based on the flow identifier information, and the second packet includes the flow identifier information.

[0025] Optionally, the method further comprises the first processor sending the second packet to a next processor, where the next processor is a next hop of the first processor on a pipeline to which the first processor belongs.

[0026] According to a fifth aspect, an embodiment of the present application further provides a processing method, the method including: a second processor in a first processing module receiving a first packet from the first processor, where the first packet includes flow identifier information; the second processor retrieving parameters used for processing the first packet from a memory corresponding to the second processor based on the flow identifier information; the second processor processing the first packet based on the parameters and sending the processed first packet to a third processor in the first processing module, where the processed first packet includes flow identifier information; the third processor in the first processing module retrieving parameters used for processing the processed first packet from a memory corresponding to the third processor based on the flow identifier information; and the third processor processing the processed first packet based on the parameters to obtain a second packet and sending the second packet to the first processor.

[0027] In the above method, the processor in the first processing module performs a read operation on the memory based on the flow identifier in the first packet, and performs corresponding processing. Since the first processing module is closer to the memory than the first processor, transmission latency can be reduced.

[0028] Optionally, the process may include a table lookup for forwarding, where the parameters include one or more of an index, a base address, and a hash value of the forwarding entry, where the parameter corresponds to a flow identifier. [Brief description of the drawings]

[0029] [Figure 1] 1 is a schematic diagram of a chip according to an embodiment of the present application;

[0030] [Diagram 2] 1 is a schematic diagram of another chip according to an embodiment of the present application;

[0031] [Diagram 3] A schematic diagram of the circuit;

[0032] [Figure 4] Schematic diagram of another circuit;

[0033] [Diagram 5] 5 is a schematic flow chart of determining a next hop port by using the circuit shown in FIG. 4;

[0034] [Figure 6A] 4 is a schematic flow chart of determining a next hop port by using the circuit shown in FIG. 3; [Figure 6B] 4 is a schematic flow chart of determining a next hop port by using the circuit shown in FIG. 3; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0035] The technical solutions of the present application are described below with reference to the accompanying drawings.

[0036] All aspects, embodiments, or features are presented herein by describing a system that may include multiple devices, components, modules, etc. It is expressly understood that each system may include other devices, components, modules, etc. and / or may not include all devices, components, modules, etc. described with reference to the accompanying drawings. Combinations of these solutions may also be used.

[0037] Furthermore, in the embodiments of this application, terms such as "example" and "for example" are used to denote providing an example, illustration, or explanation. Any embodiment or design manner described in this application as an "example" should not be described as preferred or having more advantages over another embodiment or design manner. Specifically, the term "example" is used to present concepts in a concrete manner.

[0038] In the embodiments of the present application, "corresponding" and "corresponding" may be used interchangeably in some cases. It should be noted that the meanings expressed by the terms are consistent unless differences are highlighted.

[0039] In the embodiments of the present application, in some cases, a subscript such as W1 may be written in an imprecise form such as W1. When the difference is not emphasized, the meaning expressed is consistent.

[0040] The network architectures and service scenarios described in the embodiments of the present application are intended to more clearly explain the technical solutions in the embodiments of the present application, and are not intended to constitute any limitations on the technical solutions in the embodiments of the present application.

[0041] Those skilled in the art will recognize that as network architecture evolves and new service scenarios emerge, the technical solutions according to the embodiments of the present application can also be applied to similar technical problems.

[0042] References to "an embodiment" or "some embodiments" as described herein indicate that one or more embodiments of the present application include the particular features, structures, or characteristics described with reference to the embodiment. Thus, statements such as "in an embodiment," "in some embodiments," "in some other embodiments," and "in other embodiments" appearing in different places in this specification are not necessarily meant to refer to the same embodiment. Instead, such statements mean "one or more, but not all, of the embodiments," unless otherwise specifically emphasized in another manner. The terms "including," "having," and derivatives thereof all mean "including, but not limited to," unless otherwise specifically emphasized in another manner.

[0043] In this application, "at least one" means one or more, and "multiple" means two or more. The term "and / or" describes a correspondence between related objects and indicates that three relationships may exist. For example, A and / or B may represent three cases: only A is present, both A and B are present, and only B is present. Each of A and B may be singular or plural. The character " / " generally represents an "or" relationship between related objects. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of singular items or multiple items. For example, at least one item of a, b, or c may refer to a, b, c, a and b, a and c, b and c, or a, b, and c. Here, a, b, and c may be singular or plural.

[0044] FIG. 1 is a schematic diagram of a chip according to an embodiment of the present application. As shown in FIG. 1, the chip 100 includes an input / output interface 101, a processor 111, a processor 112, a processor 113, and a processor 114. The chip 100 further includes a processing module 121 and a processing module 122. The processing module 121 includes a processor 1211, a processor 1212, a memory 1221, and a memory 1222. The processing module 122 includes a processor 1213, a processor 1214, a processor 1215, a memory 1223, a memory 1224, and a memory 1225. The chip 100 further includes a memory 131 and a memory 132. The processor 111 is connected to the input / output interface 101 by a bus 61, to the processor 112 by a bus 41, and to the memory 131 by a bus 51. The processor 112 is connected to the processor 113 by a bus 42, and to the processing module 121 by a bus 11. The processor 113 is connected to the processor 114 by the bus 43 and to the memory 132 by the bus 52. The processor 114 is connected to the input / output interface 101 by the bus 62 and to the processing module 122 by the bus 12. The processor 1211 is connected to the memory 1221 by the bus 31 and to the processor 1212 by the bus 21. The processor 1212 is connected to the memory 1222 by the bus 32. The processor 1213 is connected to the memory 1223 by the bus 33 and to the processor 1214 by the bus 22. The processor 1214 is connected to the memory 1224 by the bus 34 and to the processor 1215 by the bus 23. The processor 1215 is connected to the memory 1225 by the bus 35.

[0045] The chip 100 processes received packets in a pipeline manner. As shown in FIG. 1, the processor 111, the processor 112, the processor 113, and the processor 114 belong to the same pipeline, and the processor 111, the processor 112, the processor 113, and the processor 114 may also be referred to as pipeline processors. Optionally, the processor 1211 and the processor 1212 belong to the same pipeline, and the processor 1213, the processor 1214, and the processor 1215 belong to the same pipeline. For ease of explanation, the pipeline may be referred to as a first pipeline. As shown in FIG. 1, some processors in the first pipeline may directly access memory through a bus. For example, the processor 111 may directly access memory 131 through the bus 11, and the processor 113 may directly access memory 132 through the bus 13. For ease of explanation, the processor in the first pipeline that can directly access memory may be referred to as a type 1 processor. As shown in FIG. 1, other processors in the first pipeline may communicate with the processing modules. For example, processor 112 communicates with processing module 121 via bus 51, and processor 114 communicates with processing module 122 via bus 52. For ease of explanation, the processors in the first pipeline that can communicate with the processing modules may be referred to as type 2 processors. The multiple processors included in each processing module may belong to a single pipeline. For example, processor 1211 and processor 1212 belong to the same pipeline, and processor 1213, processor 1214, and processor 1215 belong to the same pipeline. For ease of explanation, the pipeline in the processing module may be referred to as a second pipeline. The processors in the processing module may be referred to as type 3 processors. Specifically, processor 1211, processor 1212, processor 1213, processor 1214, and processor 1215 shown in FIG. 1 may all be referred to as type 3 processors.

[0046] As shown in FIG. 1, any type 1 processor corresponds to one memory, and any type 3 processor corresponds to one memory. Any type 1 processor or any type 3 processor is connected to the corresponding memory by a bus and performs read and write operations on the memory. For example, memory 131 corresponds to processor 111, and memory 1221 corresponds to processor 1211. The one-to-one correspondence between memories and processors may be replaced with one-to-many or many-to-one correspondence. For example, any type 1 processor or type 3 processor may correspond to multiple memories and perform read and write operations on multiple memories. Alternatively, multiple type 1 processors may correspond to one memory, and multiple type 3 processors may correspond to one memory and perform read and write operations on the memory. For example, memory 131 and memory 132 in FIG. 1 may be replaced with one memory, and processor 111 and processor 113 correspond to the same memory. Memory 131 in FIG. 1 may be replaced with multiple memories, and processor 111 corresponds to multiple memories. The memory 1221 and the memory 1222 in FIG. 1 may be replaced with one memory, and the processor 1211 and the processor 1212 correspond to the same memory.

[0047] Based on different connected objects, the buses in chip 100 include a type 1 bus, a type 2 bus, a type 3 bus, a type 4 bus, a type 5 bus, and a type 6 bus. The type 1 bus is configured to connect a type 2 processor and a processing module corresponding to the type 2 processor. For example, bus 11 configured to connect processor 112 and processing module 121, and bus 12 configured to connect processor 114 and processing module 122 are both type 1 buses. The type 2 bus is configured to connect two type 3 processors. For example, bus 21 configured to connect processor 1211 and processor 1212, bus 22 configured to connect processor 1213 and processor 1214, and bus 23 configured to connect processor 1214 and processor 1215 are all type 2 buses. The type 3 bus is configured to connect a type 3 processor and a memory corresponding to the type 3 processor. For example, bus 31 configured to connect processor 1211 and memory 1221, bus 33 configured to connect processor 1213 and memory 1223, etc. are all type 3 buses. A type 4 bus is configured to connect two processors in a first pipeline. For example, bus 41 configured to connect processor 111 and processor 112, bus 42 configured to connect processor 112 and processor 113, and bus 43 configured to connect processor 113 and processor 114 are all type 4 buses. A type 5 bus is configured to connect a type 1 processor and a memory corresponding to the type 1 processor. For example, bus 51 configured to connect processor 111 and memory 131, and bus 52 configured to connect processor 113 and memory 132 are both type 5 buses. A type 6 bus is configured to connect input / output interface 101 and a processor.For example, bus 61 configured to connect input / output interface 101 and processor 111, and bus 62 configured to connect processor 114 and input / output interface 101 are both Type 6 buses.

[0048] In some embodiments, each processor in the first pipeline is a multi-core processor. Each processor in the first pipeline may include multiple processor cores (which may also be referred to as cores). In some embodiments, different processors in the first pipeline may include the same number of processor cores. In other words, any two processors in the first pipeline include the same number of processor cores. FIG. 1 is further used as an example. The number of processor cores included in processor 111 is equal to the number of processor cores included in processor 112, the number of processor cores included in processor 112 is equal to the number of processor cores included in processor 113, and the number of processor cores included in processor 113 is equal to the number of processor cores included in processor 114. In other embodiments, different processors in the first pipeline may include different numbers of processor cores. In other words, any two processors in the first pipeline may include different numbers of processor cores. For example, the number of processor cores included in processor 111 is greater than the number of processor cores included in processor 112. The number of processor cores included in processor 113 is greater than the number of processor cores included in processor 114. The number of processor cores included in processor 111 is greater than the number of processor cores included in processor 113 , and the number of processor cores included in processor 112 is greater than the number of processor cores included in processor 114 .

[0049] In other embodiments, some processors in the first pipeline include the same number of processor cores. For example, the number of processor cores included in processor 111 is equal to the number of processor cores included in processor 113, the number of processor cores included in processor 112 is equal to the number of processor cores included in processor 114, but the number of processor cores included in processor 111 is different from the number of processor cores included in processor 112. As described above, based on different connected objects, the processors in the first pipeline may be classified into two types: type 1 processors (e.g., processors 111 and 113) and type 2 processors (e.g., processors 112 and 114). In some embodiments, the same type of processors may include the same number of processor cores, and different types of processors may include different numbers of processor cores. In some embodiments, the number of processor cores included in the type 1 processor may be greater than the number of processor cores in the type 2 processor. The type 2 processor communicates with a processing module, and the processor included in the processing module is capable of performing some processing operations. In this way, the type 2 processor may be a single-core processor, or a processor with a small number of cores, which can further reduce hardware costs. For example, the number of processor cores included in a Type 2 processor may be 1 / 2, 1 / 3, 1 / 5, or 1 / 8 the number of processor cores included in a Type 1 processor.

[0050] In other embodiments, the type 1 processor may be a multi-core processor and the type 2 processor may be a single-core processor. In some embodiments, the type 3 processor may also be a multi-core processor. In other words, the type 3 processor may also include multiple processor cores. In some embodiments, the number of processor cores included in the type 3 processor is smaller than the number of processor cores included in the type 1 processor or the number of processor cores included in the type 2 processor. In other words, the number of processor cores included in the type 1 processor and the number of processor cores included in the type 2 processor are both larger than the number of processor cores included in the type 3 processor. For example, the number of processor cores included in the processor 1211 may be smaller than the number of processor cores included in the processor 111, and the number of processor cores included in the processor 1211 may also be smaller than the number of processor cores included in the processor 112. In other embodiments, the number of processor cores included in the type 3 processor may be smaller than the number of processor cores included in the type 1 processor and the number of processor cores included in the type 3 processor may be equal to or larger than the number of processor cores included in the type 2 processor. For example, the number of processor cores included in processor 1213 may be less than the number of processor cores included in processor 111, and the number of processor cores included in processor 1213 may be equal to or greater than the number of processor cores included in processor 114. For example, in some embodiments, the number of processor cores included in a Type 3 processor may be less than or equal to 1 / 10 the number of processor cores included in a Type 1 processor. As another example, in other embodiments, the number of processor cores included in a Type 3 processor may be less than or equal to 1 / 2, 1 / 3, 1 / 5, 1 / 8, etc. the number of processor cores included in a Type 1 processor.

[0051] In another embodiment, the number of processor cores included in the type 2 processor plus the number of processor cores included in one of the type 3 processors in the processing module corresponding to the processor is equal to the number of processor cores included in the type 1 processor. For example, the number of processor cores included in processor 112 plus the number of processor cores included in processor 1212 is equal to the number of processor cores included in processor 111. In another example, the number of processor cores included in processor 114 plus the number of processor cores included in processor 1214 is equal to the number of processor cores included in processor 113. In some embodiments, different type 3 processors may include the same number of processor cores. For example, the number of processor cores included in processor 1211 is equal to the number of processor cores included in processor 1212, which is equal to the number of processor cores included in processor 1215.

[0052] In other embodiments, different Type 3 processors may include different numbers of processor cores.

[0053] In another embodiment, any two processors belonging to the same processing module include the same number of processor cores, and two processors belonging to different processing modules include different numbers of processor cores. For example, the number of processor cores included in processor 1211 is equal to the number of processor cores included in processor 1212, and the number of processor cores included in processor 1212 is not equal to the number of processor cores included in processor 1213. In the chip shown in FIG. 1, each processing module includes at least two processors. In another embodiment, the processing module alternatively includes one multi-core processor. For example, the processing module 121 may include only the processor 1211 and the memory 1221, and the processor 1211 is a multi-core processor.

[0054] In some embodiments, the type 2 processor may also be a single-core processor. When the type 2 processor is a single-core processor, the processing module including the processor may include at least two processors. In other words, when the processing module includes multiple processors, the multiple processors may include at least one single-core processor. The processing module 121 is used as an example. The processor 1211 in the processing module 121 may be a single-core processor, and the processor 1212 may be a single-core processor or a multi-core processor.

[0055] In some embodiments, the length of the Type 1 bus is greater than the length of the Type 3 bus. For example, the length of the Type 3 bus may be equal to 1 / 5, 1 / 8, 1 / 10, etc., of the length of the Type 1 bus. In another example, the length of the Type 3 bus may be less than 1 / 10, 1 / 15, 1 / 20, etc., of the length of the Type 1 bus. In some embodiments, the sum of the length of the Type 1 bus and the length of the Type 3 bus is equal to the length of the Type 5 bus.

[0056] In some embodiments, any two Type 1 buses may have the same length. In some embodiments, any two Type 2 buses may have the same length. In some embodiments, any two Type 3 buses may have the same length. In some embodiments, any two Type 4 buses may have the same length. In some embodiments, any two Type 5 buses may have the same length. Due to limitations in the manufacturing process, it may be difficult to obtain buses of exactly the same length. Therefore, in this embodiment of the present application, the same length may be understood as the length being exactly the same, or the difference in length may be understood as being within an acceptable error range. For example, the sum of the length of the Type 1 bus and the length of the Type 3 bus is equal to the length of the Type 5 bus may be understood as the difference between the sum of the length of the Type 1 bus and the length of the Type 3 bus and the length of the Type 5 bus being 0, or being less than or equal to a preset acceptable error value. In another example, the difference between the length of bus 51 and the length of bus 52 (ie, the lengths of the two Type 5 buses) is 0 or is less than or equal to a preset tolerance value.

[0057] In some embodiments, the sum of the widths of all the third buses in the same processing module is greater than the width of one first bus. For example, the sum of the widths of buses 31 and 32 is greater than the width of bus 11. In another example, the sum of the widths of buses 33, 34, and 35 is greater than the width of bus 12. The number of bits of binary data that can be simultaneously transmitted by a bus is called the width (also called the bit width), and the width is measured in bits. A larger bus width indicates better transmission performance and a larger amount of data that can be transmitted in the same period of time. The formula for calculating the bus bandwidth (the total amount of data that can be transmitted per unit time) is as follows: bus bandwidth = frequency x width (bytes / sec).

[0058] In some embodiments, the width of the Type 2 bus may be smaller than the width of the Type 4 bus. Figure 2 is a schematic diagram of another chip according to an embodiment of the present application. As shown in Figure 2, the chip 200 includes an input / output interface 201, a processor 211, a processor 212, a processor 213, and a processor 214. The chip 200 further includes a processing module 221 and a processing module 222. The processing module 221 includes a processor 2211 and a processor 2212. The processing module 222 includes a processor 2213, a processor 2214, and a processor 2215.

[0059] The processor 211 is connected to the input / output interface 201 by a bus 2461. The processor 211 is connected to the processor 212 by a bus 2441. The processor 212 is connected to the processing module 221 by a bus 2411. The processor 212 is connected to the processor 213 by a bus 2442. The processor 213 is connected to the input / output interface 201 by a bus 2462. The processor 213 is connected to the processor 214 by a bus 2443. The processor 214 is connected to the processing module 222 by a bus 2412. The processing module 221 is connected to the input / output interface 201 by a bus 2431. The processing module 222 is connected to the input / output interface 201 by a bus 2433. The processor 2221 is connected to the processor 2212 by a bus 2421. The processor 2213 is connected to the processor 2214 by a bus 2422. The processor 2214 is connected to the processor 2215 by a bus 2423. The memories 231 to 237 are memories located outside the chip 200. The chip 200 may access the memories 231 to 237 by the input / output interface 201 and the corresponding bus. Specifically, the memory 231 is connected to the chip 200 by a bus 2471, the memory 232 is connected to the chip 200 by a bus 2472, the memory 233 is connected to the chip 200 by a bus 2473, the memory 234 is connected to the chip 200 by a bus 2474, the memory 235 is connected to the chip 200 by a bus 2475, the memory 236 is connected to the chip 200 by a bus 2476, and the memory 237 is connected to the chip 200 by a bus 2477.

[0060] The chip 200 processes the received packets in a pipeline manner. As shown in FIG. 2, the processor 211, the processor 212, the processor 213, and the processor 214 in the chip 200 belong to a single pipeline, and the pipeline may be referred to as a first pipeline. As shown in FIG. 2, some processors in the first pipeline can directly communicate with the input / output interface through a bus, and other processors in the first pipeline are connected to a processing module through a bus. For ease of explanation, the processors that can directly communicate with the input / output interface (i.e., the processors that are not connected to the processing module) may be referred to as type 1 processors, and the processors that are connected to the processing module may be referred to as type 2 processors. For example, in FIG. 2, the type 1 processors may include the processor 211 and the processor 213, and the type 2 processors may include the processor 212 and the processor 214.

[0061] The multiple processors included in each processing module may belong to a single pipeline. For example, the processor 2211 and the processor 2212 belong to the same pipeline, and the processor 2213, the processor 2214, and the processor 2215 belong to the same pipeline. For ease of explanation, the pipeline in the processing module may be referred to as a second pipeline. The processor in the processing module may be referred to as a type 3 processor. Specifically, the processor 2211, the processor 2212, the processor 2213, the processor 2214, and the processor 2215 shown in FIG. 2 may all be referred to as a type 3 processor.

[0062] Each type 1 processor and each processor has one corresponding memory. The processor may read data stored in the corresponding memory. The processor may write data to the corresponding memory. In FIG. 2, the memory corresponding to the processor 211 is memory 231, the memory corresponding to the processor 2211 is memory 232, the memory corresponding to the processor 2212 is memory 233, the memory corresponding to the processor 213 is memory 234, the memory corresponding to the processor 2213 is memory 235, the memory corresponding to the processor 2214 is memory 236, and the memory corresponding to the processor 2215 is memory 237. For example, the processor 211 may read data stored in the memory 231 and / or write data to the memory 231. In another example, the processor 2213 may read data stored in the memory 235 and / or write data to the memory 235.

[0063] A processing module connected to a processor by a bus may be referred to as a processing module corresponding to the processor. For example, processing module 121 is a processing module corresponding to processor 112.

[0064] Based on different connected objects, the buses in the chip 200 may include a type 1 bus, a type 2 bus, a type 3 bus, a type 4 bus, a type 5 bus, and a type 6 bus. The type 1 bus is configured to connect a type 2 processor and a processing module corresponding to the type 2 processor. For example, the bus 2411 configured to connect the processor 212 and the processing module 221, and the bus 2412 configured to connect the processor 214 and the processing module 222 are both type 1 buses. The type 2 bus is configured to connect two type 3 processors. For example, the bus 2421 configured to connect the processor 2221 and the processor 2212, the bus 2422 configured to connect the processor 2213 and the processor 2214, and the bus 2423 configured to connect the processor 2214 and the processor 2215 are all type 2 buses. The type 3 bus is configured to connect the processors and the input / output interfaces in the processing modules. For example, bus 2431, bus 2432, bus 2433, bus 2434, and bus 2435 are all type 3 buses. Bus 2431 is a type 3 bus configured to connect processor 2211 and input / output interface 201. Bus 2432 is a type 3 bus configured to connect processor 2212 and input / output interface 201. Bus 2433 is a type 3 bus configured to connect processor 2213 and input / output interface 201. Bus 2434 is a type 3 bus configured to connect processor 2214 and input / output interface 201. Bus 2435 is a type 3 bus configured to connect processor 2215 and input / output interface 201. The type 4 bus is configured to connect two processors in the first pipeline. For example, bus 2441 configured to connect processor 211 and processor 212, bus 2442 configured to connect processor 212 and processor 213, and bus 2443 configured to connect processor 213 and processor 214 are all Type 4 buses.The type 6 bus is configured to connect the type 1 processors and input / output interfaces. For example, bus 2461 and bus 2462 are both type 6 buses.

[0065] In addition to the bus in the chip 200, the chip 200 is further connected to the memory by a bus. The bus 2471 to the bus 2477 are buses configured to connect the chip 200 and the memory, and the buses may be referred to as type 7 buses. A type 1 processor may access a corresponding memory by a corresponding bus and an input / output interface. For example, the processor 211 may access the memory 231 by the bus 2461, the input / output interface 201, and the bus 2471. In another example, the processor 213 may access the memory 234 by the bus 2462, the input / output interface 201, and the bus 2474. A type 3 processor may access a corresponding memory by a corresponding bus and an input / output interface. For example, the processor 2211 may access the memory 232 by the bus 2431, the input / output interface 201, and the bus 2472. In another example, the processor 2215 may access the memory 237 via the bus 2435, the input / output interface 201, and the bus 2477.

[0066] As with the chip shown in FIG. 1, in some embodiments, all of the processors shown in FIG. 2 may be multi-core processors. In other embodiments, the Type 1 and Type 2 processors may be multi-core processors, and the Type 3 processor may be a single-core processor. The structure of the Type 3 processor may be simpler than the structure of the Type 1 processor. For example, the number of processor cores included in the Type 3 processor may be smaller than the number of processor cores included in the Type 1 processor. In another example, the number of transistors included in the Type 3 processor may be smaller than the number of transistors included in the Type 1 processor. For specific examples of Type 1, Type 2, and Type 3 processors, please refer to the description of the chip 100 shown in FIG. 1. For the sake of brevity, details will not be repeated herein.

[0067] In some embodiments, the length of the Type 1 bus is greater than the length of the Type 3 bus. For example, the length of the Type 1 bus may be equal to 1 / 5, 1 / 8, 1 / 10, etc., of the length of the Type 3 bus. In another example, the length of the Type 3 bus may be less than 1 / 10, 1 / 15, 1 / 20, etc., of the length of the Type 1 bus. In some embodiments, the sum of the length of the Type 1 bus and the length of the Type 3 bus is equal to the length of the Type 6 bus. In some embodiments, any two Type 1 buses may have the same length. In some embodiments, any two Type 2 buses may have the same length. In some embodiments, any two Type 3 buses may have the same length. In some embodiments, any two Type 4 buses may have the same length. In some embodiments, any two Type 6 buses may have the same length.

[0068] In some embodiments, the sum of the widths of the buses between the input / output interfaces and the processors corresponding to the same processing module is greater than the width of one of the first buses. For example, the sum of the width of bus 2431 and the width of bus 2432 is greater than the width of bus 2411. In another example, the sum of the widths of bus 2433, the width of bus 2434, and the width of bus 2435 is greater than the width of bus 2412. In some embodiments, the width of the Type 2 bus may be less than the width of the Type 4 bus. In the embodiment shown in FIG. 1, each processor (Type 3 processor and Type 1 processor) with its corresponding memory and the corresponding memory are located within the chip.

[0069] In the embodiment shown in FIG. 2, the memory corresponding to the processor is located off-chip. In another embodiment, a part of the memory corresponding to the processor may be located on-chip, and another part of the memory corresponding to the processor may be located off-chip. This embodiment may be considered as a combination of the embodiment shown in FIG. 1 and the embodiment shown in FIG. 2. It can be recognized that the chip shown in FIG. 1 or FIG. 2 includes two structures shown in FIG. 3. FIG. 3 is a schematic diagram of a hybrid processor circuit. As shown in FIG. 3, processor 301 is connected to processing module 310 by bus 331. Processing module 310 includes three processors, which are processor 311, processor 312, and processor 313, respectively. The processors in processing module 310 are connected by bus 332. Processor 301 is a type 1 processor, and processor 311, processor 312, and processor 313 are type 3 processors. More specifically, processor 311 is a type 2 processor. Each processor in processing module 310 has one corresponding memory. The memory corresponding to the processor 311 is memory 321, the memory corresponding to the processor 312 is memory 322, and the memory corresponding to the processor 313 is memory 323. Each processor in the processing module 310 is connected to the corresponding memory by a bus. The processor 311 is connected to the memory 321 by a bus 333, the processor 312 is connected to the memory 322 by a bus 334, and the processor 313 is connected to the memory 323 by a bus 335. The processors 301, 311, 312, and 313 are located in the same chip. The corresponding memory of each processor in the processing module 310 may be located in the same chip as the processing module 310 or may be located outside the chip on which the processing module 310 is located. When the memory is located outside the chip on which the processing module 310 is located, the bus configured to connect the processor and the corresponding memory in the processing module may include a bus from the processor to the input / output interface of the chip and a bus from the chip to the corresponding memory.For example, bus 333 may include a bus from the processor 311 to the input / output interface of the chip and a bus from the input / output interface of the chip to the memory 321.

[0070] For ease of explanation, the structure shown in FIG. 3 may be referred to as a hybrid processor circuit or a hybrid processor structure. The processing module in the hybrid processor structure shown in FIG. 3 includes three processors. In other embodiments, the number of processors in the processing module may be a positive integer greater than or equal to 1. For example, the number may be 1, 2, 4, 5, etc. As described above, when the processing module includes one processor, the processor may be a multi-core processor. When the processing module includes at least two processors, the at least two processors may include one or more single-core processors.

[0071] For ease of explanation, it is assumed that the lengths of bus 333, bus 334, and bus 335 are the same. The letter L is used to represent the length of bus 333, and the letter R is used to represent the length of bus 331. As described in the foregoing embodiments, in some embodiments, L is smaller than R. In other embodiments, L may be much smaller than R. For example, L may be equal to one-tenth of R, or L may be smaller than one-tenth of R. It is assumed that the letter A is used to represent the width of bus 333, the letter B is used to represent the width of bus 334, the letter C is used to represent the width of bus 335, and the letter D is used to represent the width of bus 331. In this case, A, B, C, and D satisfy the following relationship: D < A + B + C. Thus, the data transfer cost of the hybrid processor structure shown in FIG. 3 may be shown in Equation 3.1. Cost_TX = L×(A + B + C)+R×D (Equation 3.1)

[0072] Cost_TX represents the data transfer cost, L represents the length of bus 333 (the length of bus 333, the length of bus 334, and the length of bus 335 are equal), R represents the length of bus 331, A represents the width of bus 333, B represents the width of bus 334, C represents the width of bus 335, and D represents the width of bus 331.

[0073] After receiving a packet, a chip using a pipeline structure (e.g., chip 100 shown in FIG. 1 or chip 200 shown in FIG. 2) may generate a program state (PS) for the packet. The PS is used to store context information during packet transfer. The PS passes through each processor in the first pipeline, and the processor in the first pipeline is responsible for processing. For ease of explanation, the PS processed by the processor in the first pipeline may be referred to as the first PS. It is assumed that PS_Full_Size represents the size of the first PS. The processing module 310 also generates a PS in the process of processing the packet. The PS passes through each processor in the second pipeline in turn, and the processor in the second pipeline is responsible for processing. For ease of explanation, the PS processed by the processor in the second pipeline may be referred to as the second PS. It is assumed that PS_Little_Size represents the size of the second PS. The first PS stores context information during packet transfer. The second PS stores only information processed in the second pipeline. Thus, the size of the first PS is greater than the size of the second PS (i.e., PS_Full_Size>PS_Little_Size). In some embodiments, the size of the second PS may be equal to or smaller than 1 / 5, 1 / 8, 1 / 10, 1 / 15, 1 / 20, etc., the size of the first PS.

[0074] Since the size of the second PS is smaller than the size of the first PS, a simpler processor may be used to process the second PS. Thus, the structure of the processor in the processing module (i.e., the type 3 processor) may be simpler than the structure of the processor in the first pipeline. In particular, the number of processor cores included in the type 3 processor may be smaller than the number of processor cores included in the type 1 processor and / or the number of processor cores included in the type 2 processor, and / or the number of transistors included in the type 3 processor may be smaller than the number of transistors included in the type 1 processor and / or the number of transistors included in the type 2 processor. A larger difference between the size of the first PS and the size of the second PS indicates a simpler structure of the type 3 processor.

[0075] In some embodiments, the number of processor cores included in the Type 3 processor may be less than the number of processor cores included in the Type 1 processor and / or the number of transistors included in the Type 3 processor may be less than the number of transistors included in the Type 1 processor. In other embodiments, the number of processor cores included in the Type 3 processor may be less than the number of processor cores included in the Type 2 processor and / or the number of transistors included in the Type 3 processor may be less than the number of transistors included in the Type 2 processor.

[0076] The number of processor cores is used as an example: N_Little may be used to represent the number of processor cores included in a Type 3 processor, N_Big2 may be used to represent the number of processor cores included in a Type 2 processor, and N_Big1 may be used to represent the number of processor cores included in a Type 1 processor.

[0077] Thus, the processor cost for the hybrid processor structure shown in FIG. 3 may be shown in Equation 3.2. Cost_Proc=PS_Little_Size×N_Little+PS_Full_Size×N_Big2 (Formula 3.2)

[0078] Cost_Proc represents the processor cost, and the meanings of PS_Little_Size, N_Little, PS_Full_Size, and N_Big2 are described above, and for the sake of brevity, the details will not be described again in this specification.

[0079] In some embodiments, N_Little, N_Big2, and N_Big1 satisfy the following relationship: N_Big1=N_Little+N_Big2.

[0080] If Latency_L is used to represent the Input / Output (I / O) latency of a bus of length L and Latency_R is used to represent the I / O latency of a bus of length R, the latency cost generated when using the hybrid processor structure shown in FIG. 3 may be shown in Equation 3.3. Cost_LAT=Latency_L×3+Latency_R×1 (Formula 3.3)

[0081] Cost_LAT represents the latency cost, Latency_L represents the I / O latency of a bus of length L, and Latency_R represents the I / O latency of a bus of length R.

[0082] If the processors in one pipeline implement the functions implemented by the hybrid processing structure shown in FIG. 3, then the structure shown in FIG. 4 is required.

[0083] FIG. 4 is a schematic diagram of another circuit including a processor. The circuit shown in FIG. 4 includes three processors: processor 401, processor 402, and processor 403. Furthermore, processor 401, processor 402, and processor 403 are type 1 processors. (Processor 401 to processor 403 are all processors in the same pipeline, and processor 401 to processor 403 are connected by buses to memories rather than processing modules.) Each of the three processors has a corresponding memory. The memory corresponding to processor 401 is memory 411, the memory corresponding to processor 402 is memory 412, and the memory corresponding to processor 403 is memory 413. Processor 401 is connected to memory 411 by bus 421, processor 402 is connected to memory 412 by bus 422, and processor 403 is connected to memory 413 by bus 423. Processor 401 is connected to processor 402 by bus 424, and processor 402 is connected to processor 403 by bus 424.

[0084] Bus 421, bus 422, and bus 423 have the same length. The length of bus 421 may be equal to L+R, i.e., the sum of the length of bus 333 and the length of bus 331 shown in Figure 3. The width of bus 421 may be equal to the width of bus 333, the width of bus 422 may be equal to the width of bus 334, and the width of bus 423 may be equal to the width of bus 335. In this case, the data transfer cost generated when using the structure shown in Figure 4 may be shown in equation 4.1. Cost_TX=(L+R)×(A+B+C)(Formula 4.1)

[0085] Cost_TX represents the data transfer cost, L+R is the length of bus 421 (the length of bus 422 is equal to the length of bus 421, and the length of bus 423 is equal to the length of bus 421), A represents the width of bus 421, B represents the width of bus 422, and C represents the width of bus 423.

[0086] By comparison between Equation 4.1 and Equation 3.1, it can be seen that when L is less than R and D is less than A+B+C, the data transfer cost generated when using the structure shown in FIG. 3 is less than the data transfer cost generated when using the structure shown in FIG. 4.

[0087] In some embodiments, a larger difference between R and L indicates a lower data transfer cost for the structure shown in FIG.

[0088] As described above, since processor 401 to processor 403 are all type 1 processors, the PS passing through processor 401 to processor 403 is PS_Full. Correspondingly, the size of PS_Full is PS_Full_Size, and the number of processor cores included in the type 1 processor is N_Big1. In this case, the processor cost generated when using the structure shown in FIG. 4 may be shown in Equation 4.2. Cost_Proc=PS_Full_Size×N_Big1 (Formula 4.2)

[0089] Cost_Proc represents the processor cost, PS_Full_Size is the size of the PS passing through the processor 401, and N_Big1 is the number of processor cores included in the processor 401.

[0090] If N_Big1=N_Little+N_Big2, the processor cost generated when using the structure shown in Figure 3 may be reduced by (PS_Full_Size-PS_Little_Size) x N_Little, as compared to the structure shown in Figure 4. A larger difference between PS_Full_Size and PS_Little_Size indicates a more reduced processor cost (i.e., lower processor cost). A larger difference between N_Big1 and N_Little1 indicates a more reduced processor cost (i.e., lower processor cost).

[0091] If Latency_L is used to represent the I / O latency of a bus of length L and Latency_R is used to represent the I / O latency of a bus of length R, the latency cost generated when using the structure shown in FIG. 4 may be shown in Equation 4.3. Cost_LAT=(Latency_L+Latency_R)×3(Formula 4.3)

[0092] Cost_LAT represents the latency cost, Latency_L represents the I / O latency of a bus of length L, and Latency_R represents the I / O latency of a bus of length R.

[0093] It can be seen that compared to the structure shown in Figure 4, the structure shown in Figure 3 can reduce the I / O latency by Latency_R x 2. A larger difference between R and L indicates a more reduced I / O latency.

[0094] As a result, in the technical solution of the embodiment of the present application, the corresponding function can be implemented with lower cost (lower data transfer cost, lower processor cost, and lower latency cost). Moreover, the length of the bus required in the processing module is short, and the width of the bus between the type-2 processor and the processing module is small, so that the area of ​​the chip using the technical solution of the present application is small compared with the chip implementing the same function.

[0095] Hereinafter, the two structures in FIG. 3 and FIG. 4 are explained by taking equal-cost multi-path routing (ECMP) as an example.

[0096] The basic process of determining the next hop port by ECMP is as follows: based on the packet's flow identifier information (e.g., quintuple or flow label), a hash value is determined, and then an entry is determined in the ECMP routing table and based on the hash value, and the port included in the entry is the next hop port for sending the packet.

[0097] In some cases, in order to reduce the entries stored in the ECMP routing table and improve lookup efficiency, the ECMP routing table may be divided into multiple tables, for example, into three tables, which are referred to as routing entry table 1, routing entry table 2, and routing entry table 3, respectively. First, based on the flow identifier information of the packet, an entry corresponding to the flow identifier information is determined from the routing entry table 1, and the entry includes one base address and one routing entry table index. Next, the routing entry table 2 is determined based on the routing entry table index, and an entry corresponding to the hash value determined based on the base address and the flow identifier information of the packet is queried from the routing entry table 2, and the entry includes one port index and one routing entry table index. Finally, the routing entry table 3 is determined based on the routing entry table index, and an entry corresponding to the port index is queried from the routing entry table 3, and the entry includes the next hop port of the packet.

[0098] FIG. 5 is a schematic flow chart of determining the next hop port by using the circuit shown in FIG.

[0099] 501: The processor 401 obtains an index of one routing entry table (hereinafter referred to as routing table index 1) from the received PS.

[0100] 502: The processor 401 sends the routing table index 1 to the memory 411.

[0101] 503: The processor 401 receives a routing entry table 1 corresponding to the routing table index 1 from the memory 411.

[0102] 504: The processor 401 determines an entry corresponding to the flow identifier information of the packet from the routing entry table 1. The entry includes one routing entry table index (hereinafter referred to as a routing table index 2) and one base address, and the routing table index 2 and the base address are written to the PS.

[0103] 505: The processor 401 sends the PS (ie, the PS in which the routing table index 2 and the base address are written) to the processor 402.

[0104] 506: The processor 402 obtains a routing table index 2, a base address, and one hash value from the received PS. The hash value is determined based on the flow identifier information of the packet. The hash value may be determined by an upstream node of the processor 401 and written to the PS.

[0105] 507: The processor 402 sends the routing table index 2 to the memory 412.

[0106] 508: The processor 402 receives a routing entry table 2 corresponding to the routing table index 2 from the memory 412.

[0107] 509: The processor 402 queries an entry corresponding to the base address and the hash value from the routing entry table 2, where the entry includes one port index and one routing entry table index (hereinafter referred to as routing table index 3). The processor 402 writes the port index and the routing table index 3 to the PS.

[0108] 510: The processor 402 sends the PS (ie, the PS in which the port index and the routing table index 3 are written) to the processor 403.

[0109] 511: The processor 403 obtains the routing table index 3 and the port index from the received PS.

[0110] 512: The processor 403 sends the routing table index 3 to the memory 413.

[0111] 513: The processor 403 receives the routing entry table 3 corresponding to the routing table index 3 from the memory 412.

[0112] 514: The processor 403 queries the routing entry table 3 for an entry corresponding to the port index, and the content contained in the entry is the next hop port of the packet.

[0113] 515: The processor 403 writes the next hop port of the packet into the PS and sends the PS to the next node in the pipeline, so that the next node continues to process the packet.

[0114] 6A and 6B are a schematic flow chart of determining the next hop port by using the circuit shown in FIG.

[0115] 601: The processor 301 obtains, from the received PS, an index of one routing entry table (hereinafter referred to as routing table index 1), flow identifier information of the packet, and a hash value determined based on the flow identifier information of the packet.

[0116] 602: The processor 301 sends to the processor 311 the routing table index 1, the flow identifier information of the packet, and a hash value determined based on the flow identifier information of the packet.

[0117] 603: The processor 311 sends the routing table index 1 to the memory 321.

[0118] 604: The processor 311 receives a routing entry table 1 corresponding to the routing table index 1 from the memory 321.

[0119] 605: The processor 311 determines an entry corresponding to the flow identifier information of the packet from the routing entry table 1. The entry includes one routing entry table index (hereinafter referred to as a routing table index 2) and one base address, and the routing table index 2 and the base address are written to the PS. The PS may further include a hash value determined based on the flow identifier information of the packet.

[0120] 606: The processor 311 sends the PS (ie, the PS in which the routing table index 2 and the base address are written) to the processor 312.

[0121] 607: The processor 312 obtains the routing table index 2, the base address, and the hash value from the received PS.

[0122] 608: The processor 312 sends the routing table index 2 to the memory 322.

[0123] 609: The processor 312 receives a routing entry table 2 corresponding to the routing table index 2 from the memory 322.

[0124] 610: The processor 312 queries an entry corresponding to the base address and the hash value from the routing entry table 2, where the entry includes one port index and one routing entry table index (hereinafter referred to as routing table index 3). The processor 312 writes the port index and the routing table index 3 to the PS.

[0125] 611: The processor 312 sends the PS (ie, the PS in which the port index and the routing table index 3 are written) to the processor 313.

[0126] 612: The processor 313 obtains the routing table index 3 and the port index from the received PS.

[0127] 613: The processor 313 sends the routing table index 3 to the memory 323.

[0128] 614: The processor 313 receives the routing entry table 3 corresponding to the routing table index 3 from the memory 323.

[0129] 615: The processor 313 queries the routing entry table 3 for an entry corresponding to the port index, and the content contained in the entry is the next hop port of the packet.

[0130] 616: The processor 313 sends the next hop port of the packet to the processor 301.

[0131] 617: The processor 301 writes the next hop port of the packet into the PS and sends the PS to the next node in the pipeline, so that the next node continues to process the packet.

[0132] In the procedure shown in FIG. 5, processor 401 to processor 403 and other processors in the chip all belong to the same pipeline. The PS processed by the processors in the pipeline is used to store context information during packet forwarding. Therefore, the PS sent by processor 401 to processor 402 and the PS sent by processor 402 to processor 403 need to include information required by the subsequent node in addition to information required to query the next hop port. Therefore, the size of the PS is large. For example, the size of the PS may be 512 bytes. Correspondingly, the width of the bus between the processors is also large.

[0133] However, in the procedure shown in FIG. 6A and FIG. 6B, the processor 311 to the processor 313 only care about the routing function, and the transferred PS only needs to include information required for routing. Therefore, setting a small size PS may meet the requirements of the processor 311 to the processor 313. For example, a 64-byte PS may meet the routing requirements. Correspondingly, a small width bus may be set between the processors. Furthermore, the information required by the processor 312 and the information required by the processor 313 are both from the previous node, and there is no need to obtain the information from the processor 301. Furthermore, in the processor 301, the processor 301 only cares about the determined next hop port, and the processor 301 does not need to obtain the routing entry table 3 to determine the next hop port, and the processor 301 does not need to send information unrelated to the determination of the next hop port to the processing module 310. Therefore, a small width bus may be set between the processor 301 and the processing module 310. For example, the width of bus 331 may be 128 bits. In comparison, a large amount of information (e.g., routing entry tables) needs to be transmitted between the processor and memory over the bus, so a large width is needed. For example, the width of bus 333 to bus 335 may be 256 bits, and the width of bus 421 to bus 423 may be 256 bits.

[0134] An embodiment of the present application further provides a circuit, the circuit including a first processor and a first processing module coupled to the first processor, the first processing module including a second processor coupled to a first memory, a transmission latency generated when the second processor performs read and write operations on the first memory is less than a transmission latency generated when the first processor communicates with the first processing module.

[0135] 1 includes only processor 1211 and memory 1221. In this case, the first processor may be equivalent to processor 112, the first processing module may be equivalent to processing module 121, the second processor may be equivalent to processor 1211, and the first memory may be equivalent to memory 1221. The transmission latency generated when processor 1211 performs read and write operations on memory 1221 is less than the transmission latency generated when processor 112 communicates with processing module 121.

[0136] 2 includes only processor 2211. In this case, the first processor may be equivalent to processor 212, the first processing module may be equivalent to processing module 221, the second processor may be equivalent to processor 2211, and the first memory may be equivalent to memory 232.

[0137] Optionally, in some embodiments, the second processor is a multi-core processor, and the transmission latency generated when the second processor performs read and write operations on the first memory is the transmission latency generated when any core processor of the multi-core processor included in the second processor performs read and write operations on the first memory.

[0138] Optionally, in some embodiments, the first processor is connected to the first processing module by a first bus and the second processor is connected to the first memory by a second bus, wherein a bus bit width of the second bus is greater than the bus bit width of the first bus, and / or a length of the second bus is less than the length of the first bus.

[0139] 1 includes only a processor 1211 and a memory 1221. The first bus is equivalent to bus 11 configured to connect the processor 112 and the processing module 121, and the second bus is equivalent to bus 31 configured to connect the processor 1211 and the memory 1221.

[0140] 2 includes only the processor 2211. The first bus may be equivalent to the bus 2411 configured to connect the processor 212 and the processing module 221, and the second bus may be equivalent to the bus configured to connect the processor 2211 and the memory 232, and includes the bus 2431 and the bus 2472. The second bus may also be equivalent to the bus 2431 configured to connect the processor 2211 and the input / output interface 201.

[0141] Optionally, in some embodiments, the first processing module further includes a third processor connected to the second memory, wherein a transmission latency generated when the third processor performs read and write operations on the second memory is less than a transmission latency generated when the first processor communicates with the first processing module.

[0142] 1 is used as an example. The first processor may be equivalent to the processor 112, the first processing module may be equivalent to the processing module 121, the second processor may be equivalent to the processor 1211, the third processor may be equivalent to the processor 1212, the first memory may be equivalent to the memory 1221, and the second memory may be equivalent to the memory 1222. The transmission latency generated when the processor 1211 performs read and write operations on the memory 1221 is less than the transmission latency generated when the processor 112 communicates with the processing module 121, and the transmission latency generated when the processor 1212 performs read and write operations on the memory 1222 is less than the transmission latency generated when the processor 112 communicates with the processing module 121.

[0143] 2 is used as an example. The first processor may be equivalent to processor 212, the first processing module may be equivalent to processing module 221, the second processor may be equivalent to processor 2211, the third processor may be equivalent to processor 2212, the first memory may be equivalent to memory 232, and the second memory may be equivalent to memory 233.

[0144] Optionally, in some embodiments, the first processor is connected to the first processing module by a first bus, the second processor is connected to the first memory by a second bus, and the third processor is connected to the second memory by a third bus, wherein the sum of the bus bit width of the second bus and the bus bit width of the third bus is greater than the bus bit width of the first bus.

[0145] 1 is further used as an example. The first bus may be equivalent to bus 11, the second bus may be equivalent to bus 31, and the third bus may be equivalent to bus 32.

[0146] 2 is further used as an example. The first bus may be equivalent to bus 2411, the second bus may be equivalent to bus 2431 and bus 2472, and the third bus may be equivalent to bus 2432 and bus 2473. The second bus may also be equivalent to bus 2431, and the third bus may also be equivalent to bus 2432.

[0147] Optionally, in some embodiments, the first processing module further includes a third processor connected to the first memory, wherein a transmission latency generated when the third processor performs read and write operations on the first memory is less than a transmission latency generated when the first processor communicates with the first processing module.

[0148] Optionally, in some embodiments, the first processor is connected to the first processing module by a first bus, the second processor is connected to the first memory by a second bus, and the third processor is connected to the first memory by a third bus, wherein the sum of the bus bit width of the second bus and the bus bit width of the third bus is greater than the bus bit width of the first bus.

[0149] Optionally, in some embodiments, the second processor and the third processor are pipeline processors.

[0150] Optionally, in some embodiments, the circuitry further includes a fourth processor and a third memory coupled to the fourth processor.

[0151] 1 is further used as an example. The processor 111 may be equivalent to a fourth processor, and the memory 131 may be equivalent to a third memory.

[0152] 2 is further used as an example. The processor 211 may be equivalent to a fourth processor, and the memory 231 may be equivalent to a third memory.

[0153] Optionally, in some embodiments, the circuit further includes a fourth processor and a second processing module connected to the fourth processor. The second processing module includes N fifth processors connected to the M memories, where both N and M are integers greater than or equal to 1. A transmission latency generated when any of the fifth processors performs read and write operations to the memories connected to the fifth processors is less than a transmission latency generated when the fourth processor communicates with the second processing module.

[0154] 1 is further used as an example. The processor 114 may be equivalent to a fourth processor, and the processing module 122 may be equivalent to a second processing module.

[0155] 2 is further used as an example. The processor 214 may be equivalent to a fourth processor, and the processing module 222 may be equivalent to a second processing module.

[0156] Optionally, in some embodiments, the second processor is connected to the third processor by a fourth bus, and the fourth processor is connected to the first processor by a fifth bus, wherein a bus bit width of the fourth bus is smaller than the bus bit width of the fifth bus.

[0157] 1 is further used as an example. Bus 21 may be equivalent to the fourth bus, and bus 41 may be equivalent to the fifth bus.

[0158] 2 is further used as an example. Bus 2421 may be equivalent to a fourth bus, and bus 2441 may be equivalent to a fifth bus.

[0159] Optionally, in some embodiments, the number of processor cores included in the fourth processor is greater than or equal to the number of processor cores included in the first processor.

[0160] Optionally, in some embodiments, the fourth processor and the first processor are pipeline processors.

[0161] Optionally, in some embodiments, the first processing module further includes a first memory.

[0162] An embodiment of the present application further provides an electronic device. The electronic device includes a chip according to an embodiment of the present application, and the electronic device further includes a receiver and a transmitter. The receiver is configured to receive a packet and send the packet to the chip. The chip is configured to process the packet. The transmitter is configured to obtain the packet processed by the chip and send the processed packet to another electronic device. The electronic device may be a switch, a router, or any other electronic device in which the aforementioned chip can be located.

[0163] The chip in the embodiment of the present application may be a system on chip (SoC), a network processor (NP), or the like.

[0164] The memory in the embodiments of the present application may be volatile or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM) used as an external cache. By way of example and not limitation, many forms of RAM may be used, such as static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchlink dynamic random access memory (synchlink DRAM, SLDRAM), and direct rambus dynamic random access memory (direct rambus RAM, DR RAM). It should be noted that the memory of the systems and methods described herein includes, but is not limited to, any other suitable type of memory.

[0165] It should be noted that the processor in the embodiment of the present application may be an integrated circuit chip and has signal processing capabilities. In the implementation process, each step of the embodiment of the above method may be implemented by using a hardware integrated logic circuit in the processor, or by using an instruction in the form of software. The processor may be a microprocessor, or the processor may be any conventional processor, etc.

[0166] In the implementation process, each step of the aforementioned method may be implemented by using a hardware integrated logic circuit of a processor or by using an instruction in the form of software. Each step of the method disclosed with reference to the embodiments of the present application may be directly executed by a hardware processor, or may be executed by using a combination of hardware and software modules of a processor. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register. The storage medium is located in the memory, and the processor reads the information in the memory and performs each step of the aforementioned method in combination with the hardware of the processor. To avoid repetition, the details will not be described again in this specification.

[0167] Those skilled in the art will recognize that in combination with the examples described in the embodiments disclosed herein, the units and algorithm steps can be implemented by using electronic hardware or a combination of computer software and electronic hardware. Whether a function is implemented by using hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered as going beyond the scope of this application.

[0168] For the purpose of simple and easy description, the detailed operation processes of the above-mentioned systems, devices and units may be clearly understood by those skilled in the art by referring to the corresponding processes in the above-mentioned method embodiments, and the details will not be described again in this specification.

[0169] It should be understood that in some embodiments of the present application, the disclosed system, device, and method may be implemented in other ways. For example, the described device embodiment is merely an example. For example, the division into units is merely a logical division of functions, and other divisions may exist in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some functions may be ignored or not performed. Furthermore, the shown or described interconnections or direct connections or communication connections may be implemented by using some interfaces. Indirect connections or communication connections between devices or units may be implemented in electronic, mechanical, or other forms.

[0170] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, and may be located in one location or distributed among multiple network units. Some or all of these units may be selected according to actual requirements to achieve the objectives of the solutions of the embodiments.

[0171] Furthermore, the functional units in the embodiments of the present application may be integrated into one processing unit, each of the units may exist physically alone, or two or more units may be integrated into one unit.

[0172] When these functions are implemented in the form of a software functional unit and sold or used as an independent product, the functions may be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application may be essentially implemented in the form of a software product, or the part that contributes to the prior art, or some of these technical solutions may be implemented in the form of a software product. The computer software product is stored in a storage medium and includes some instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to execute all or some of the steps of the method described in the embodiments of the present application. The aforementioned storage medium includes any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0173] The above description is merely a specific implementation example of the present application, and is not intended to limit the scope of protection of the present application. Any modifications or replacements that are easily conceived by those skilled in the art within the technical scope disclosed in the present application shall be included in the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims. Other possible items 1. A circuit comprising a first processor and a first processing module connected to the first processor, the first processing module having a second processor connected to a first memory, wherein a transmission latency generated when the second processor performs read and write operations on the first memory is less than a transmission latency generated when the first processor communicates with the first processing module. 2. The circuit described in item 1, wherein the second processor is a multi-core processor, and the transmission latency generated when the second processor executes the read and write operations on the first memory is the transmission latency generated when any of the core processors of the multi-core processor of the second processor executes the read and write operations on the first memory. 3. The circuit of item 1 or 2, wherein the first processor is connected to the first processing module by a first bus and the second processor is connected to the first memory by a second bus, the bus bit width of the second bus being larger than the bus bit width of the first bus, and / or the length of the second bus being smaller than the length of the first bus. 4. The circuit of item 1 or 2, wherein the first processing module further has a third processor connected to a second memory, and a transmission latency generated when the third processor performs read and write operations on the second memory is less than the transmission latency generated when the first processor communicates with the first processing module. 5. The circuit of item 4, wherein the first processor is connected to the first processing module by a first bus, the second processor is connected to the first memory by a second bus, and the third processor is connected to the second memory by a third bus, and the sum of the bus bit width of the second bus and the bus bit width of the third bus is greater than the bus bit width of the first bus. 6. The circuit of item 1 or 2, wherein the first processing module further has a third processor connected to the first memory, and a transmission latency generated when the third processor performs read and write operations on the first memory is less than the transmission latency generated when the first processor communicates with the first processing module. 7. The circuit of item 6, wherein the first processor is connected to the first processing module by a first bus, the second processor is connected to the first memory by a second bus, and the third processor is connected to the first memory by a third bus, and the sum of the bus bit width of the second bus and the bus bit width of the third bus is greater than the bus bit width of the first bus. 8. The circuit of any one of items 4 to 7, wherein the second processor and the third processor are pipeline processors. 9. the circuit further comprises a fourth processor and a third memory coupled to the fourth processor; or 4. The circuit of any one of items 1 to 3, further comprising: a fourth processor and a second processing module connected to the fourth processor; the second processing module having N fifth processors connected to M memories, where both N and M are integers greater than or equal to 1; and a transmission latency generated when any fifth processor performs read and write operations on the memories connected to the fifth processors is less than a transmission latency generated when the fourth processor communicates with the second processing module. 10. The circuit further comprises a fourth processor and a third memory coupled to the fourth processor; or 9. The circuit of any one of items 4 to 8, further comprising: a fourth processor and a second processing module connected to the fourth processor; the second processing module having N fifth processors connected to M memories, where both N and M are integers greater than or equal to 1; and a transmission latency generated when any fifth processor performs read and write operations on the memories connected to the fifth processors is less than a transmission latency generated when the fourth processor communicates with the second processing module. 11. The circuit of item 10, wherein the second processor is connected to the third processor by a fourth bus, and the fourth processor is connected to the first processor by a fifth bus, and a bus bit width of the fourth bus is smaller than a bus bit width of the fifth bus. 12. The circuit of any one of items 9 to 11, wherein the number of processor cores of the fourth processor is greater than or equal to the number of processor cores of the first processor. 13. The circuit of any one of items 9 to 12, wherein the fourth processor and the first processor are pipeline processors. 14. The circuit of any one of items 1 to 13, wherein the first processing module further comprises the first memory. 15. A chip comprising a circuit according to any one of items 1 to 14. 16. An electronic device comprising the chip according to item 15, wherein the electronic device further comprises a receiver and a transmitter, the receiver configured to receive packets and transmit the packets to the chip; the chip is configured to process the packets; The electronic device, wherein the transmitter is configured to obtain packets processed by the chip and transmit the processed packets to another electronic device.

Claims

1. A circuit comprising a first processor and a first processing module connected to the first processor, the first processing module having a second processor connected to a first memory, wherein a transmission latency generated when the second processor performs read and write operations on the first memory is less than a transmission latency generated when the first processor communicates with the first processing module; The circuit, wherein the first processing module further comprises a third processor connected to the first memory, and a transmission latency generated when the third processor performs read and write operations on the first memory is less than the transmission latency generated when the first processor communicates with the first processing module.

2. 2. The circuit of claim 1, wherein the second processor is a multi-core processor, and the transmission latency generated when the second processor performs the read and write operations on the first memory is the transmission latency generated when any of the core processors of the multi-core processor of the second processor performs the read and write operations on the first memory.

3. A circuit comprising a first processor and a first processing module connected to the first processor, the first processing module having a second processor connected to a first memory, wherein a transmission latency generated when the second processor performs read and write operations on the first memory is less than a transmission latency generated when the first processor communicates with the first processing module; the circuit further comprises a fourth processor and a third memory coupled to the fourth processor; or The circuit further comprises a fourth processor and a second processing module connected to the fourth processor; the second processing module has N fifth processors connected to M memories, both N and M being integers greater than or equal to 1; and a transmission latency generated when any fifth processor performs read and write operations to the memories connected to the fifth processors is less than a transmission latency generated when the fourth processor communicates with the second processing module.

4. The circuit described in claim 3, wherein the second processor is a multi-core processor, and the transmission latency generated when the second processor performs the read and write operations on the first memory is the transmission latency generated when any of the core processors of the multi-core processor possessed by the second processor performs read and write operations on the first memory.

5. 5. The circuit of claim 1, wherein the first processor is connected to the first processing module by a first bus and the second processor is connected to the first memory by a second bus, the bus bit width of the second bus being larger than the bus bit width of the first bus and / or the length of the second bus being smaller than the length of the first bus.

6. 5. The circuit of claim 3 or 4, wherein the first processing module further comprises a third processor connected to a second memory, and a transmission latency generated when the third processor performs read and write operations on the second memory is less than the transmission latency generated when the first processor communicates with the first processing module.

7. 7. The circuit of claim 6, wherein the first processor is connected to the first processing module by a first bus, the second processor is connected to the first memory by a second bus, and the third processor is connected to the second memory by a third bus, and a sum of a bus bit width of the second bus and a bus bit width of the third bus is greater than a bus bit width of the first bus.

8. 5. The circuit of claim 3 or 4, wherein the first processing module further comprises a third processor connected to the first memory, and a transmission latency generated when the third processor performs read and write operations on the first memory is less than the transmission latency generated when the first processor communicates with the first processing module.

9. 3. The circuit of claim 1, wherein the first processor is connected to the first processing module by a first bus, the second processor is connected to the first memory by a second bus, and the third processor is connected to the first memory by a third bus, and the sum of the bus bit width of the second bus and the bus bit width of the third bus is greater than the bus bit width of the first bus.

10. The circuit of claim 6 , wherein the second processor and the third processor are pipeline processors.

11. 7. The circuit of claim 6, wherein the second processor is connected to the third processor by a fourth bus and the fourth processor is connected to the first processor by a fifth bus, the bus bit width of the fourth bus being smaller than the bus bit width of the fifth bus.

12. 5. The circuit according to claim 3, wherein the number of processor cores in the fourth processor is greater than or equal to the number of processor cores in the first processor.

13. The circuit of claim 3 or 4, wherein the fourth processor and the first processor are pipeline processors.

14. 5. The circuit of claim 3 or 4, wherein the first processing module further comprises the first memory.

15. A chip comprising a circuit according to any one of claims 1 to 4.

16. 16. An electronic device comprising the chip of claim 15, the electronic device further comprising a receiver and a transmitter, the receiver configured to receive packets and transmit the packets to the chip; the chip is configured to process the packets; The electronic device, wherein the transmitter is configured to obtain packets processed by the chip and transmit the processed packets to another electronic device.

Citation Information

Patent Citations

  • Solid state disk and read-write method thereof

    CN107291392A

  • Disk array controller

    JP2000267816A

  • Data processing system

    JP2005122759A

  • NIC with Programmable Pipeline

    US20190140979A1

  • Data access method and device

    WO2018188084A1