Shared memory block configuration

By using shared memory blocks of multiple single-port memory banks in network devices and configuring them into single-port or virtual multi-port mode through the memory controller, the problems of high cost and small capacity of dual-port memory are solved and efficient memory is achieved. Sharing and flexible configuration.

CN112334982BActive Publication Date: 2024-09-06MARVELL WORLD TRADE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201980044360.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-07-30
Filing Date
2019-07-30
Publication Date
2024-09-06
Estimated Expiration
2039-07-30

AI Technical Summary

Technical Problem

Among existing network equipment, dual-port memory and multi-port memory are not suitable for scenarios that do not require additional capabilities due to their high cost, complexity, and small capacity, making it difficult to achieve efficient memory sharing.

Method used

By using shared memory blocks of multiple single-port memory banks in the network switch device and configuring the memory controller into single-port or virtual multi-port mode, the memory access requirements of different processor devices are supported and concurrent reads of memory locations are achieved. fetch or write operations.

Benefits of technology

It achieves efficient sharing of memory resources between different processor devices, reduces cost and complexity, and provides flexible memory configuration options to adapt to the needs of different applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112334982B_ABST
    Figure CN112334982B_ABST
Patent Text Reader

Abstract

A network switch device is described. The network switch device includes a plurality of processor devices configured to perform different respective functions of the network switch device; a shared memory block having a plurality of single-port memory banks; and a memory controller configured to allocate a respective set of banks in the single-port memory banks to processor devices among the plurality of processor devices, and to determine a respective configuration of the set of memory banks as one of: i) a single-port configuration, wherein the respective single-port memory bank supports a single read or write memory operation to a memory location within a memory access cycle; and ii) a virtual multi-port configuration, wherein the respective single-port memory bank supports two or more concurrent read or write memory operations to the same memory location based on the memory access requirements of the corresponding processor device.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the benefit of U.S. Provisional Patent Application No. 62 / 712,066, filed on July 30, 2018, entitled “Flexible Memory Design for Shared Memory,” the entire disclosure of which is expressly incorporated herein by reference. Technical Field

[0003] The present disclosure relates generally to communication networks and, more particularly, to configurable shared memory suitable for use in network devices. Background Art

[0004] The purpose of the background description provided herein is to present the context of the present disclosure in general. The work of the presently named inventors within the scope described in this background section and various aspects of the description that were not considered prior art at the time of filing are not explicitly or implicitly considered to be prior art with respect to the present disclosure.

[0005] Some network devices, such as network switches, bridges, routers, etc., employ multiple processor engines to concurrently process multiple packets at high throughput. The processor devices utilize memory banks to provide various functions of the network switch device, such as a longest exact match engine for routing, a forwarding table lookup that determines the egress port for a packet, a packet buffer that stores packets while processing is performed, and a hash engine that determines a hash output.

[0006] In various network devices, efforts are made to design systems with shared memory spaces shared between different processor engines. Some memory banks are provided with a single physical port ("single-port memory"), which generally allows one memory access per clock cycle, while other memory banks are provided with two or more physical ports ("dual-port memory" or "multi-port memory"), which generally allow two or more memory accesses per clock cycle. In some systems, the memory port is physical, while in other systems, the single-port memory device is suitable for providing virtual dual-port capability or multi-port capability. However, compared with single-port memory, dual-port memory and multi-port memory (whether the port is a physical port or a virtual port) generally have higher cost and / or complexity and / or reduced capacity, therefore, in some scenarios, especially when a specific application does not need the additional capabilities of dual-port memory and multi-port memory, it is not desirable to use the dual-port memory and multi-port memory. Summary of the invention

[0007] In one embodiment, a network switch device includes a plurality of processor devices, a shared memory block having a plurality of single-port memory banks, and a memory controller. The plurality of processor devices are configured to perform different respective functions of the network switch device. The shared memory block is shared between the plurality of processor devices. The memory controller is configured to assign a set of respective banks in the plurality of single-port memory banks to processor devices in the plurality of processor devices, and to determine a respective configuration of the set of memory banks as one of the following: i) a single-port configuration, wherein the respective single-port memory bank supports a single read or write memory operation to a memory location within a memory access cycle; and ii) a virtual multi-port configuration, wherein the respective single-port memory bank supports two or more concurrent read or write memory operations to the same memory location based on the memory access requirements of the corresponding processor device.

[0008] In another embodiment, a method for providing access to a shared memory block having multiple single-port memory banks includes: allocating a set of corresponding banks among the multiple single-port memory banks to processor devices among multiple processor devices by a memory controller of a network switch device, the network switch device including a shared memory block and multiple processor devices, the multiple processor devices being configured to perform different corresponding functions of the network switch device, the shared memory block being shared among the multiple processor devices; determining, by the memory controller, a corresponding configuration of the set of memory banks as one of the following: i) a single-port configuration, wherein the corresponding single-port memory bank supports a single read or write memory operation to a memory location within a memory access cycle; and ii) a virtual multi-port configuration, wherein the corresponding single-port memory bank supports two or more concurrent read or write memory operations to the same memory location based on memory access requirements of the corresponding processor device; and configuring, by the memory controller, a connectivity controller of the network switch device to couple the multiple processor devices to the shared memory block and provide the corresponding processor devices with access to the set of corresponding banks according to the determined configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 is a block diagram of an example network switch device having a shared memory block according to one embodiment;

[0010] Figure 2A According to an embodiment Figure 1 A diagram of an example single-port configuration of a memory block;

[0011] Figure 2B According to an embodiment Figure 1 A diagram of an example virtual dual-port configuration of a memory block of;

[0012] Figure 3 According to an embodiment Figure 1 Figure 1 shows an example dual single port configuration of a memory block;

[0013] Figure 4 is a diagram illustrating an example method for providing access to a shared memory block having multiple single-ported memory banks according to one embodiment. DETAILED DESCRIPTION

[0014] Various embodiments of network switch devices that utilize multiple processor devices to process data packets simultaneously are described herein. In some embodiments, multiple processor devices are arranged in multiple processor pipelines, each pipeline has one or more processor devices, and multiple processor devices are configured to use shared memory. The memory library is configured to use one or more memory ports for access. The basic memory library usually has one memory port ("single port"), which usually allows one memory access per clock cycle, while more advanced memories have two memory ports ("dual ports") or more than two memory ports ("multi-ports"), which usually provide two or more memory access rights per clock cycle. However, compared with single-port memory, dual-port memory and multi-port memory (whether the port is a physical port or a virtual port) usually have higher cost and / or complexity and / or reduced capacity, so in some scenarios, especially when the additional capabilities of dual-port memory and multi-port memory are not required for a specific application, it is not desirable to use the dual-port memory and multi-port memory.

[0015] In various embodiments, a network switch device includes a memory controller and a shared memory block having a plurality of single-port memory libraries. The memory controller is configured to share the shared memory block between a plurality of processor engines, which in one embodiment are coupled together to form one or more packet processing pipelines, or are shared between a plurality of processors, and in one embodiment, are configured to provide the processor engines with access to the single-port memory library according to a suitable memory configuration. The memory controller determines the memory configuration for the processor device based on the memory access requirements of the processor device (e.g., in various embodiments, according to the nature of the operation to be performed by the processing engine that needs to access the shared processor or the type of data to be stored in the memory). In various embodiments, examples of memory configurations include one or more of the following: a single-port configuration, a virtual multi-port configuration, and a dual single-port configuration. Even if the same single-port memory library is used for different memory configurations, different memory configurations provide different memory performance parameters respectively. In one embodiment, for example, compared with a virtual multi-port (e.g., virtual dual-port) configuration, a single-port configuration provides a larger address space, but provides a lower access frequency (i.e., the ability of multiple devices to access the same memory space in a given clock cycle is lower). Similarly, compared with dual-port memory or multi-port memory, single-port memory may be able to more easily provide repeated read and / or write access to the same addressable memory location in consecutive clock cycles. Moreover, providing virtual dual-port functionality or virtual multi-port functionality may require some memory cells dedicated to (e.g., within a memory block assigned to a specific processing engine) to temporarily store data, such as parity data required for dual-port functionality or multi-port functionality and / or to achieve access in consecutive clock cycles, thereby reducing the size of available memory. In some embodiments, the memory controller determines different configurations of memory banks for different processor devices based on the requirements of the processor device to access the memory space in order to provide specific functions.

[0016] Figure 1 1 is a simplified block diagram of an example network switch device 100 according to one embodiment. The network switch device 100 includes a memory controller 102, one or more shared memory blocks 130, and a plurality of processor devices 140, such as processor engines in a packet processing pipeline. The plurality of processor devices 140 are configured to perform different respective functions of the network switch device 100. Figure 1In the illustrated embodiment, a plurality of processor devices 140 (referred to herein as processor devices 140) include an integer number k of processors, which are illustrated as processor device 1 (141), processor device 2 (142), and processor device k (143). In various embodiments, the integer k is 1, 2, 3, 16, 64, or another suitable number. The processor device 140 utilizes the shared memory block 130 to provide the functionality of the network switch device 100. Examples of the processor device 140 include a longest exact match engine for routing, a tunnel start engine, a longest prefix match (LPM) engine, an address resolution protocol (ARP) engine, a forwarding table lookup (e.g., a forwarding database and / or a media access control table) to determine the egress port of a network switch device (not shown) for a data packet, a policy engine to limit an input transmission rate or an output transmission rate, and other suitable processor devices. In some embodiments, the processor device 140 provides different functions. In one embodiment, for example, the processor device 141 is a longest exact match engine, the processor device 142 is a forwarding table lookup engine, and the processor device 143 is a policy engine. In another embodiment, both the processor device 141 and the processor device 142 are longest exact match engines, and the processor device 143 is a policer engine. In other embodiments, the network switch device 100 includes a different combination of processor devices.

[0017] The shared memory block 130 (also referred to herein as "memory block 130") includes a plurality of single-port memory banks 132. Figure 1 In the illustrated embodiment, a plurality of single-port memory banks 132 (referred to herein as "memory banks 132") include an integer number n of memory banks, which are illustrated as bank 1, bank 2, bank 3, bank 4, and bank n. In various embodiments, the integer n is 2, 3, 8, 16, or any other suitable number. In some embodiments, the network switch device 100 includes only single-port memory banks, such as memory bank 132. In other embodiments, the network switch device 100 includes the single-port memory bank 132 as well as other multi-port memory banks (e.g., dual-port memory banks). Although Figure 1 Only a single memory block 130 is shown in FIG. 1 , but in other embodiments, the network switch device 100 includes two, three, or more memory blocks.

[0018] In various embodiments, the memory controller 102 is configured to enable access to the memory block 130 to be shared between the processor devices 140. For example, the memory controller 102 is configured to assign a corresponding set of banks among the memory banks 132 to the processor devices 140. In one embodiment, for example, the memory block 130 includes 24 banks, and the memory controller 102 assigns a group of eight memory banks to the processor device 141, six memory banks to the processor device 142, and ten memory banks to the processor device 143. In another embodiment, for example, the memory block 130 includes 16 banks, and the memory controller 102 assigns a first group of eight memory banks to the processor devices 141 and 142, and assigns a second group of eight memory banks to the processor device 143.

[0019] In one embodiment, the memory controller 102 is configured to determine the corresponding configuration of the set of memory banks as one of: i) a single-port configuration, wherein the corresponding single-port memory bank supports a single read or write memory operation to a memory location (e.g., within the same bank) within a memory access cycle; and ii) a virtual multi-port configuration, wherein in various embodiments, the corresponding single-port memory bank supports two or more concurrent read or write memory operations to the same memory location (e.g., within the same bank) based on the memory access requirements of the corresponding processor device. In some embodiments, the memory controller 102 is configured to both assign a set of memory blocks 130 and / or a set of memory banks 132 to one or more processor devices 140 and determine the corresponding configuration of the memory banks 130. Although the memory banks 132 are single-port memory banks and are capable of individually executing no more than one read command or a single write command within each clock cycle (or memory access cycle), in some embodiments and / or scenarios, the memory controller 102 is configured to execute multiple memory operations (e.g., read commands or write commands) within each memory access cycle by utilizing a virtual multi-port configuration, as described herein. In various embodiments, a virtual multi-port configuration provides a greater number of read commands and / or write commands within each memory access cycle. In some embodiments, the multi-port configuration includes the configurations described in U.S. Patent No. 8,514,651, entitled “Sharing Access to a Memory Among Clients,” U.S. Patent No. 10,089,018, entitled “Multi-Bank Memory with Multiple Read Ports and Multiple Write Ports Per Cycle,” U.S. Patent Application Publication No. 2016 / 0320989, entitled “Multi-Bank Memory with one Read Port and One or more Write Ports Per Cycle,” U.S. Patent Application Publication No. 2016 / 0321184, entitled “Multiple Read and Write Port Memory,” and U.S. Patent Application Publication No. 2017 / 0364408, entitled “Multiple Read and Write Port Memory,” the entire contents of which are incorporated herein by reference.In some embodiments, the memory controller 102 is configured to provide a multi-port configuration in which a corresponding single-port memory bank supports two concurrent read or write memory operations to the same memory location based on the memory access requirements of the corresponding processor device.

[0020] In one embodiment, the memory controller 102 includes a control logic 110 and a connectivity controller 120. The control logic 110 is a processor implemented on an integrated circuit, for example, using one or more application specific integrated circuits (ASICs), programmable logic devices (PLDs), or other discrete hardware components. In one embodiment, the control logic 110 is coupled to a plurality of processor devices 140, wherein each of the processor devices 140 has one or more (up to an integer m) memory connections. The control logic 110 is configured to assign a corresponding set of libraries to the processor devices 140, and to determine a corresponding configuration of the memory library set based on the memory access requirements of the corresponding processor devices. In one embodiment, the control logic 110 receives a user configuration ("Config") identifying the memory access requirements of the processor devices 140. In one embodiment, the user configuration includes an indication of an estimated memory size requirement and / or an estimated average access frequency of the processor device. In one embodiment, the user configuration indicates the following requirements:

[0021]

[0022] In another embodiment, the user configuration indicates the following requirements:

[0023]

[0024] In other embodiments, the user configuration indicates a device type of the processor device 140. In one such embodiment, the control logic 110 is configured to determine the memory access requirements using the device type, wherein the device type is one of a plurality of different device types corresponding to respective predetermined memory access requirements.

[0025] In one embodiment, for example, a device type such as a forwarding table lookup engine or other processor devices with a more chaotic access pattern corresponds to a multi-port configuration, which provides a relatively high number of concurrent memory read access rights in each cycle. For example, this requirement may occur in the context of a memory for storing a forwarding table, and the forwarding table may need to be accessed by multiple processing engines simultaneously to make forwarding decisions for incoming network data packets. A suitable configuration for this purpose can be a virtual multi-port system, which facilitates multiple concurrent read accesses at any given memory address. For some device types, in addition to concurrent read operations, it may also be desirable to facilitate the ability to perform concurrent or interleaved write operations. In another example, a device type (such as a packet buffer) configured to store a data packet while processing a data packet header in a fixed time period generally has a more systematic and orderly expected access pattern, for which a single-port configuration provides a relatively small number of memory access rights in each cycle, but providing a more intensive memory per unit area may be more appropriate.

[0026] The connectivity controller 120 of the memory controller 102 is configured to couple the plurality of processor devices 140 with the shared memory block 130 based on the configuration (“Control”) indicated by the control logic 110. In one embodiment, the connectivity controller 120 includes n memory access ports corresponding to the n memory banks of the memory block 130. In one embodiment, the connectivity controller 120 implements a memory connectivity network, such as the memory connectivity network described in U.S. Patent Application Publication No. 2014-0177470, the contents of which are incorporated herein by reference in their entirety. In various embodiments, the control logic 110 determines the memory access requirements of the processor device 140 during the configuration phase (e.g., during startup) of the network switch device 100 before the operation phase (e.g., while processing packets), and configures the connectivity controller 120 accordingly. In some embodiments, the same memory bank is part of different memory configurations at different times. For example, in one embodiment, the memory bank is used for a first operation phase of the network switch device in a single-port configuration and for a second operation phase of the network switch device in a virtual dual-port configuration.

[0027] Figure 2A According to an embodiment Figure 1 FIG. 2 is a diagram of an exemplary single-port configuration 200 of a memory block. Figure 2B According to an embodiment Figure 1 FIG250 is a diagram of an example virtual dual-port configuration of a memory block. Figure 3 According to an embodiment Figure 1 FIG. 3 is a diagram of an exemplary dual single port configuration 300 of a memory block. Figure 2A , Figure 2B and Figure 3 In the illustrated embodiment, the plurality of memory banks 132 in the memory block 130 include eight single-port memory banks 202, 204, 206, 208, 210, 212, 214, and 216. As described below, the memory banks 214 and 216 are half the capacity of the remaining memory banks allowed by the dual single-port configuration 300. In one embodiment, for example, each of the memory banks 202, 204, 206, 208, 210, and 212 is a single-port memory bank with a storage capacity of 2048 address spaces (e.g., addresses 0 to 2047), and the memory banks 214 and 216 are single-port memory banks with a storage capacity of 1024 address spaces (e.g., addresses 0 to 1023). In various embodiments, each address space corresponds to a single bit, a multi-bit word (e.g., two, three, or more bits), a byte (8 bits), multiple bytes, or any other suitable data size. In some embodiments, half-sized memory banks 214 and 216 are omitted, and the plurality of memory banks 132 includes only memory banks having the same size.

[0028] exist Figure 2A In the illustrated embodiment of the single-port configuration 200, the memory controller 102 provides a single addressable memory space for a single memory access (i.e., a single read operation or a single write operation) in each memory access cycle. In one embodiment, for example, the memory controller 102 assigns a memory bank set to a processor device, and designates each bank of the bank set as a content database and stores content data (e.g., a control table, a forwarding table, a routing table, or other suitable data). In this embodiment, the memory bank set includes a plurality of memory banks 132, and the content database 220 includes each memory bank in the memory banks 202, 204, 206, 208, 210, 212, 214, and 216. In this embodiment, the addressable memory space covers each bank in the memory bank set and has an addressable space of 14K (i.e., 2048*6=12k for banks 0 to 5, 1024*2=2k for banks 7 and 8). In one embodiment, the memory controller 102 maps addresses 0 to 2047 to the first memory bank 202 (bank 0), addresses 2048 to 4095 to the second memory bank 204 (bank 1), and so on. In this way, the shared memory block 130 is addressable using addresses 0 to 2047 and an offset corresponding to the appropriate memory bank (i.e., for bank 0, the offset is "0", for bank 1, the offset is "2048", and so on). Figure 2A In the illustrated single port configuration 200 , the memory controller 102 maps addresses 12k to 13k-1 to bank 6 , and maps addresses 13k to 14k-1 to bank 7 .

[0029] exist Figure 2B In the illustrated embodiment of the virtual dual-port configuration 250, the memory controller 102 provides a single addressable memory space for two memory accesses in each memory access cycle. In one embodiment, for example, the memory controller 102 assigns a memory bank set to a processor device and designates i) at least one bank of the bank set as a parity bank 260, and ii) the remaining banks in the bank set as content databases 220. In this embodiment, the memory bank set includes a plurality of memories 132, the content database 220 includes memories 202, 204, 206, 208, 210, and 212, and the parity bank 260 includes memory banks 214 and 216. In this embodiment, the addressable memory space covers the content database and has an addressable space of 12K (i.e., 2048*6 for memory banks 0 to 5), while memory banks 214 and 216 are not used for content data.

[0030] In one embodiment, the parity bank 260 stores an "exclusive OR" ("XOR") of content data stored in the content database at the same memory address. When both virtual memory ports attempt to access the same memory bank, the first memory access is read from that bank, and the second memory access is read from the remaining bank including the parity bank and performing the XOR to obtain the desired data. In one embodiment, as an example, the processor device 141 requests two read operations at address locations "2060" and "2066" during the same memory access cycle. These address locations are both located in (e.g., mapped to) the same memory bank 204 (i.e., bank 1). In one embodiment, for example, the memory controller 102 performs a first read operation on the bank 204 (e.g., at address 12, which is 2060 minus the offset 2048 for bank 1), and performs a second read operation (e.g., at address 18, which is 2066 minus the offset 2048 for bank 1) and an XOR operation on the remaining content databases 202, 206, 208, 210, 212 and the parity bank 214. In other words, the memory controller 102 reconstructs the content data at the mapped address 18 of bank 1 (corresponding to address 2066) by performing bank 0 (18) XOR bank 2 (18) XOR bank 3 (18) XOR bank 4 (18) XOR bank 5 (18) XOR bank 6 (18), where "bank 0 (18)" refers to the content data at address 18 of bank 0, etc. As another example, the memory controller 102 reconstructs the content data at the mapped address 1030 of bank 4 (corresponding to address 9222, or 1030 plus an offset of 8k for bank 4) by executing bank 0 (1030) XOR bank 1 (1030) XOR bank 2 (1030) XOR bank 3 (1030) XOR bank 5 (1030) XOR bank 7 (6). In this example, an additional offset of 1024 is applied to bank 7 to account for the reduced size of banks 6 and 7, which have only 1024 addresses.

[0031] In a related configuration, in some embodiments, it may be necessary to provide concurrent access to more than two processor engines. In this case, additional XOR libraries are selectively provided, for example, to save parity data of rows, columns and / or angular positions of memory libraries for those memory libraries configured as virtual multi-port memories, according to various virtual multi-port virtualization techniques described in, for example, U.S. Patent No. 8,514,651, which is incorporated herein by reference. Although other concurrent accesses can be provided in such an implementation, the increase in the number of XOR libraries will further reduce the available memory space for storing data such as forwarding tables.

[0032] exist Figure 3In the embodiment of the dual single port configuration 300 shown, the memory controller 102 provides two different addressable memory spaces for two memory accesses in each memory access cycle. In one embodiment, for example, the memory controller 102 assigns a memory bank set to a processor device, designates a first portion of the bank set as a first content database having a first address space, and designates a second remaining portion of the bank set as a second content database having a second address space, which is different from the first address space. In this embodiment, the memory bank set includes a plurality of memory banks 132, the first content database 320 includes memory banks 202, 204, 206, and 214, and the second content database 340 includes memory banks 208, 210, 212, and 216. In one embodiment, for example, the first address space has an addressable space of 7K (i.e., 2048*3 for banks 0 to 2 plus 1024 for bank 6), and the second address space has an addressable space of 7K (e.g., 2048*3 for banks 3 to 5 plus 1024 for bank 7). In this embodiment, during the same memory cycle, the first address space is different from the second memory space, and the first address space (e.g., addresses 0 to 7k-1) is accessible to the corresponding processor device through a "first port", and the second address space (e.g., 7k to 14k-1) is accessible to the corresponding processor device through a "second port". In one embodiment, the dual single-port configuration 300 allows multiple memory banks 132 to be used as two small (i.e., 7K) memories instead of a non-single large (i.e., 14k) memory. In some scenarios, the dual single-port configuration 300 is used (e.g., configured using a user configuration "Config") for engines that require smaller memory banks with improved resolution, such as, for example, a longest prefix match (LPM) routing engine. In one embodiment, for example, the memory controller 102 configures a set of memory banks of an LPM routing engine having a relatively large number of memory ports to a shared memory (with the memory banks arranged, for example, as Figure 3 In some use cases, the LPM routing engines need only connect to relatively small banks (e.g., 7k instead of 14k), so dual single-port configuration 300 may allow for improved utilization of shared memory 130, for example, by avoiding the need to allocate full-size blocks 130 with more capacity (e.g., 28*14k) than is needed by the LPM routing engines.

[0033] By switching the memory configuration of the memory bank 132 between configurations 200, 250, and 300, in some embodiments, the logic controller 110 avoids the memory bank being "wasted" as a parity bank when the increased access frequency provided by the parity bank is not needed. Example embodiments of engines (e.g., processor devices 140) and configurations are defined in Table 1 below:

[0034] Table 1

[0035]

[0036] In the example embodiment shown in Table 1, the memory controller 102 configures the memory bank set using a virtual dual-port configuration 250 for an address resolution protocol (ARP) routing engine and a tunnel initiation engine. In one embodiment, the ARP routing engine and the tunnel initiation engine can be mapped to the same bank, and the virtual dual-port configuration 250 allows concurrent access to them. In various embodiments, an ARP engine is provided without a tunnel initiation engine, an ARP engine is provided together with an IPv4 tunnel initiation engine, or an IPv6 tunnel initiation engine is provided without an ARP engine.

[0037] In one embodiment, the memory controller 102 configures the shared memory block 130 as a single-port memory bank that supports only a single memory access operation in a given memory access cycle but has multiple individually addressable memory locations, for example, 16 single-port memory banks in the single-port memory bank 132, using a virtual dual-port configuration 250 for the MAC table. In other words, the memory controller 102 configures the content database 220 to include 16 separate memory banks. This configuration improves random access reads, such as for MAC source address and MAC target address lookups, which may hit the same memory bank. In one embodiment, the memory controller 102 configures the shared memory block 130 (or another shared memory block, not shown) using a virtual dual-port configuration 250 for an exact match engine in a manner similar to that provided for a MAC table engine. This configuration improves random access reads, such as for exact match searches, which may hit the same memory bank.

[0038] In one embodiment, the memory controller 102 configures the shared memory block 130 as dual single-port memory banks, each memory bank supporting only a single memory access operation in a given memory access cycle, using a dual single-port configuration 300 for a longest prefix match (LPM) engine. In one embodiment, the dual single-port configuration 300 for the LPM engine includes 28 content database groups, for example, 14 instances of the first content database 320 and the second content database 340.

[0039] Figure 4is a flow chart illustrating an example method 400 for providing access to a shared memory block having multiple single-port memory banks according to one embodiment. In one embodiment, the method 400 is implemented by a memory controller of a network switch device. Figure 1 In one embodiment, the method 400 is implemented by the memory controller 102. For example, in one such embodiment, the control logic 110 is configured to implement the method 400. In the method 400, the memory controller of the network switch device includes a shared memory block and a plurality of processor devices configured to perform different corresponding functions of the network switch device. In one embodiment, the network switch device is the network switch device 100.

[0040] At block 402, a respective set of banks among a plurality of single-port memory banks is allocated by a memory controller to a processor engine among a plurality of processor engines. A shared memory block is shared among a plurality of processor devices.

[0041] At block 404, a corresponding configuration of the memory bank set is determined by the memory controller as one of: i) a single-port configuration, wherein the corresponding single-port memory bank supports a single read or write memory operation to a memory location during a memory access cycle; and ii) a virtual dual-port or multi-port configuration, wherein the corresponding single-port memory bank supports two or more concurrent read or write memory operations to the same memory location based on the memory access requirements of the corresponding processor device. In one embodiment, the single-port configuration corresponds to the single-port configuration 200 of FIG. 2, while the virtual multi-port configuration generally corresponds to Figure 3 The virtual dual-port configuration 300 corresponds.

[0042] In some embodiments, determining a corresponding configuration of the memory bank set includes: determining the corresponding configuration based on one or more of the following: i) an estimated memory size requirement of the corresponding processor device; and ii) an estimated average access frequency of the memory block by the corresponding processor device. In one embodiment, for example, the memory controller 102 determines the configuration as a single-port configuration 200 for a processor device that has i) a relatively high estimated memory size requirement, or ii) a relatively low access frequency.

[0043] In one embodiment, determining the corresponding configuration of the memory bank set includes determining the memory access requirements of the plurality of processor devices during a configuration phase of the network switch device prior to an operation phase of the network switch device. For example, the memory controller 102 determines the configuration of the memory bank set during a startup phase before the network switch device 100 begins processing packets.

[0044] In some embodiments, determining the corresponding configuration of the memory bank set includes: determining the memory access requirements using a device type of the processor device. In one embodiment, for example, the device type is one of a plurality of different device types corresponding to the corresponding predetermined memory access requirements.

[0045] At block 306 , a connectivity controller of the network switch device is configured through the memory controller to couple the plurality of processor devices to the shared memory block and provide access to the respective set of repositories to the respective processor devices according to the determined configuration. In one embodiment, the connectivity controller corresponds to the connectivity controller 120 of the network switch device 100 .

[0046] In some embodiments, when the memory controller 102 determines the configuration of the bank set as a single-port configuration, the memory controller 102 designates each bank in the bank set as a content database and provides an address space covering each bank in the bank set to a corresponding processor device.

[0047] In some embodiments, when the memory controller 102 determines the configuration of the bank set as a virtual dual-port configuration or a virtual multi-port configuration, the memory controller 102 i) designates at least one bank in the bank set as a parity bank, and ii) designates the remaining banks in the bank set as content databases. The content database stores content data, and the parity bank stores parity data, which is associated with the content database and different from the content data. The memory controller 102 provides an address space to the corresponding processor device, the address space including the content database and omitting the parity bank.

[0048] In some embodiments, the memory controller 102 allocates a library set as a dual single-port configuration, which includes designating a first portion of the library set as a first content database having a first address space and designating a second remaining portion of the library set as a second content database having a second address space, which is different from the first address space; and providing the first address space and the second address space to a corresponding processor device, the first content database supporting concurrent memory operations with the second content database during a memory access cycle.

[0049] At least some of the various blocks, operations, and techniques described above may be implemented using hardware, a processor executing firmware instructions, a processor executing software instructions, or any combination thereof. When implemented using a processor executing software instructions or firmware instructions, the software instructions or firmware instructions may be stored in any computer-readable memory, such as a disk, optical disk, or other storage medium, RAM or ROM or flash memory, a processor, a hard drive, a tape drive, etc. The software instructions or firmware instructions may include machine-readable instructions that, when executed by one or more processors, cause the one or more processors to perform various actions.

[0050] When implemented in hardware, the hardware may include one or more of discrete components, an integrated circuit, an application specific integrated circuit (ASIC), a programmable logic device (PLD), or the like.

[0051] Although the present invention has been described with reference to specific examples, these specific examples are intended to be illustrative only and not limiting of the invention, and modifications, additions and / or deletions may be made to the disclosed embodiments without departing from the scope of the invention.

Claims

1. A network switch device, comprising: a plurality of processor devices configured to perform different corresponding functions of the network switch device; blocks of shared memory, each block having a plurality of single-port memory banks, the blocks of shared memory being shared among the plurality of processor devices; The memory controller is configured as: allocating blocks of the shared memory to processor devices among the plurality of processor devices, and Based on the memory access requirements of the corresponding processor device, a corresponding configuration of the allocated block is determined as one of the following: i) a single-port configuration that uses each single-port memory bank in a corresponding allocated block and supports a single read or write memory operation from a first access port to a corresponding allocated block during a memory access cycle; as well as ii) a virtual dual-port configuration that uses each single-port memory bank in the corresponding allocated block and supports two concurrent read or write memory operations from the first access port and a second access port to the corresponding allocated block during the memory access cycle; as well as ⅲ) a dual single-port configuration, wherein the dual single-port configuration uses each single-port memory bank in the corresponding allocated block, wherein the memory controller divides the single-port memory bank of the corresponding allocated block into a first sub-block and a second sub-block, and during the memory access cycle, supports a single read or write memory operation from the first access port to the first sub-block and supports a single read or write memory operation from the second access port to the second sub-block.

2. The network switch device of claim 1 , wherein the memory controller is configured to determine the corresponding configuration based on one or more of: i) an estimated memory size requirement of the corresponding processor device, and ii) an estimated average access frequency of the corresponding processor device to the blocks of the memory.

3. The network switch device of claim 1, wherein the memory controller is configured to determine the memory access requirements of the plurality of processor devices during a configuration phase of the network switch device prior to an operation phase of the network switch device.

4. The network switch device of claim 1, wherein the memory controller is configured to determine the memory access requirement using a device type of the processor device, wherein the device type is one of a plurality of different device types corresponding to respective predetermined memory access requirements.

5. The network switch device according to claim 4, wherein the memory controller is configured to: determine the configuration of the allocated block as the virtual dual-port memory when the device type of the processor device to which the allocated block is allocated corresponds to a forwarding table lookup engine.

6. The network switch device according to claim 1, wherein when the memory controller determines the configuration of the allocated block as the single-port configuration, the memory controller designates each single-port memory library in the allocated block as a content database, and provides a continuous address space to the corresponding processor device via the first access port, and the continuous address space covers each single-port memory library in the allocated block.

7. The network switch device according to claim 1, wherein when the memory controller determines the configuration of the allocated block as the virtual dual-port configuration, the memory controller: i) designating at least one bank in the allocated block as a parity bank, and ii) designating the remaining libraries in the allocated blocks as content databases storing content data and the parity libraries storing parity data associated with the content database and different from the content data, and A continuous address space is provided to the corresponding processor device via the first access port and the second access port, the continuous address space including the content database and omitting the parity bank.

8. The network switch device of claim 1 , wherein when the memory controller determines the configuration of the allocated block to be the dual single-port configuration, the memory controller: designating the first sub-block of the allocated block as a first content database having a first contiguous address space, and designating the second sub-block of the allocated block as a second content database having a second contiguous address space, the second contiguous address space being different from the first contiguous address space; and The first contiguous address space is provided to a first processor device via the first access port, and the second contiguous address space is provided to a second processor device via the second access port, the first processor device and the second processor device being different processor devices, and the network controller supports concurrent memory operations on the first content database for the first processor device and the second content database for the second processor device during the memory access cycle.

9. The network switch device according to claim 8, wherein the memory controller is configured to: determine the configuration of the allocated block as the dual single-port configuration when the device types of the first processor device and the second processor device correspond to a longest prefix match engine.

10. The network switch device according to claim 1, further comprising: a connectivity controller configured to couple the plurality of processor devices with the block of shared memory; The memory controller is configured to configure the connectivity controller to provide the corresponding processor device with access to the corresponding allocated block according to the determined configuration.

11. The network switch device of claim 1, wherein a corresponding single-port memory bank in the virtual dual-port configuration supports two or more memory access operations to a memory location within a memory access cycle, the memory access operation comprising one or more of a read operation and a write operation. 12 . The network switch device according to claim 1 , wherein the memory access requirement is at least one of a memory size requirement and an average access frequency requirement.

13. The network switch device according to claim 1, wherein: When the memory controller determines the configuration of the allocated block as the dual single-port configuration, the memory controller: designating the first sub-block of the allocated block as a first content database having a first contiguous address space, and designating the second sub-block of the allocated block as a second content database having a second contiguous address space, the second contiguous address space being different from the first contiguous address space, and providing the first contiguous address space to a first processor device via the first access port and providing the second contiguous address space to a second processor device via the second access port, the first processor device and the second processor device being different processor devices, the network controller supporting concurrent memory operations on the first content database for the first processor device and on the second content database for the second processor device during the memory access cycle; as well as When the memory controller determines the configuration of the allocated block as the single-port configuration, the memory controller designates each single-port memory library in the allocated block as a content database and provides a third contiguous address space to the corresponding processor device via the first access port, the third contiguous address space covering each single-port memory library of the allocated block, wherein a size of the third contiguous address space is the same as a size of a combination of the first contiguous address space and the second contiguous address space.

14. A method for providing access to blocks of shared memory, each block having a plurality of single-port memory banks, the method comprising: allocating, by a memory controller of a network switch device including the block of shared memory and a plurality of processor devices, the block of shared memory to processor devices among the plurality of processor devices, the plurality of processor devices being configured to perform different respective functions of the network switch device, the block of shared memory being shared among the plurality of processor devices; By the memory controller, based on the memory access requirements of the corresponding processor device, a corresponding configuration of the allocated block is determined as one of the following: i) a single-port configuration that uses each single-port memory bank in a corresponding said allocated block and supports a single read or write memory operation from a first access port to a corresponding said memory block during a memory access cycle, and ii) a virtual dual-port configuration that uses each single-port memory bank in the corresponding allocated block and supports two concurrent read or write memory operations from the first access port and a second access port to the corresponding allocated block during the memory access cycle; as well as iii) a dual single-port configuration using each single-port memory bank in a corresponding allocated block, wherein the memory controller divides the single-port memory bank of the corresponding allocated block into a first sub-block and a second sub-block and supports a single read or write memory operation from the first access port to the first sub-block and supports a single read or write memory operation from the second access port to the second sub-block during the memory access cycle; as well as The connectivity controller of the network switch device is configured, through the memory controller, to couple the plurality of processor devices to the blocks of the shared memory and provide access rights to the corresponding blocks to the respective processor devices according to the determined configuration.

15. The method of claim 14, wherein determining the corresponding configuration of the allocated block comprises determining the corresponding configuration based on one or more of: i) an estimated memory size requirement of the corresponding processor device, and ii) an estimated average access frequency of the corresponding processor device to the block of the memory.

16. The method of claim 14, wherein determining the corresponding configuration of the allocated blocks comprises: The memory access requirements of the plurality of processor devices are determined during a configuration phase of the network switch device prior to an operation phase of the network switch device.

17. The method of claim 14, wherein determining the corresponding configuration of the allocated blocks comprises: The memory access requirement is determined using a device type of the processor device, wherein the device type is one of a plurality of different device types corresponding to respective predetermined memory access requirements.

18. The method of claim 17, wherein using the device type of the processor device to determine the memory access requirement comprises: When the device type of the processor device to which the allocated block is allocated corresponds to a forwarding table lookup, a configuration of the allocated block is determined as the virtual dual-port memory.

19. The method according to claim 14, further comprising: When the memory controller determines the configuration of the allocated block as the single-port configuration, designating each single-port memory bank in the allocated block as a content database, the content database storing content data, and A contiguous address space is provided to the corresponding processor device via the first access port, the contiguous address space covering each single-port memory bank in the allocated block.

20. The method according to claim 14, further comprising: When the memory controller determines the configuration of the allocated block as the virtual dual-port configuration, i) designating at least one bank in the allocated block as a parity bank, and ii) designating the remaining libraries in the allocated blocks as content databases storing content data and the parity libraries storing parity data associated with the content database and different from the content data, and A continuous address space is provided to the corresponding processor device via the first access port and the second access port, the continuous address space including the content database and omitting the parity bank.