This description relates to integrated circuits which access memory.
Integrated circuits (ICs), such as application-specific integrated circuits (ASICs) may receive data, such as data included in packets, and route the data based on associated data which is stored in one or more memory devices.
The details of one or more implementations are set forth in the accompanying drawings and the description below. Other features will be apparent from the description and drawings, and from the claims.
The IC 102 may enter data into the logical tables, such as by downloading the content from application software onto the logical tables. In an example implementation, the logical tables may include lookup tables. The data may be downloaded onto specific physical portions or blocks of memory devices. When a block associated with a logical table becomes full, the IC 102 may assign a new block to the logical table. The blocks may be assigned by application software, according to an example implementation. The application software may keep track of which physical portions or blocks of memory have been assigned to which logical tables, and may assign or reassign the physical portions or blocks according to current needs, according to an example implementation. The blocks may, for example, be assigned to logical tables as the IC 102 is processing data and/or packets.
In an example implementation, the IC 102 may assign physical blocks to logical tables associated with types of addresses, such as level 2 or medium access control (MAC) addresses, level 3 or Internet Protocol (IP) addresses, and/or access control list (ACL) entries. For example, the IC 102 may determine that more memory is needed for level 2 or MAC addresses, and assign a physical block to a logical table associated with level 2 or MAC addresses. The IC 102 may thereafter determine that more memory is needed for level 3 or IP addresses, and assign a physical block to a logical table associated with level 3 or IP addresses. The IC 102 may thereafter determine that the memory allocated for the logical table associated with level 2 or MAC addresses is insufficient, and assign another physical block to the logical table associated with level 2 or MAC addresses. The second physical block assigned to the logical table associated with level 2 or MAC addresses may be noncontiguous with the first physical block assigned to the logical table associated with level 2 or MAC addresses. The IC 102 may thereby assign noncontiguous physical blocks of memory to each of a plurality of logical tables.
The IC 102 may also delete entries, and may determine that a physical portion or block is empty as a result of deletions. The IC 102 may reassign a physical portion or block to a new logical table associated with a different address type.
In the example shown in
In the example shown in
Physical blocks of memory included in the first memory device 104 may be associated with physical blocks of memory included in the second memory device 106. For example, physical blocks of memory included in the first memory device 104 may include indices or addressing information used to find data included in the second memory device 106. For example, the IC 102 may receive data (which may be included in a packet), extract key-related information from the data, and send the key-related information to the first memory device 104. The first memory device 104 may, in response to receiving the key-related information, send an index to the IC 102 based on the key-related information. The index may indicate a physical portion of the second memory device 106, which may store data associated with the received packet. The IC 102, in response to receiving the index, may send the index to the second memory device 106. The IC 102 also may translate the index based on a translation table, and send a translated index or address to the second memory device 106. The second memory device 106 may retrieve the data from a portion of the second memory device's 106 memory based on the received index. The second memory device 106 may send the retrieved data to the IC 102. Based on the data received from the second memory device 106, the IC 102 may forward, route, or drop the received packet, according to an example implementation.
In the example shown in
The first memory device 104, which may include a TCAM, may include a semiconductor integrated circuit which allows one or more tables of data to be stored in a memory array(s) that incorporates circuitry to permit a search function. The first memory device 104 may search for an index based on the key-related information (which may include a key), such as by performing a table look-up and/or searching the physical blocks associated with the indicated logical table. In an example implementation, the first memory device 104 may search through the physical portions of blocks in a predetermined order, such as ascending order. The search or table look-up may be based on the key or key-related information and/or MAC addresses, IP addresses, or ACL entries. For example, the first memory device 104 may search all physical portions or blocks which are associated with MAC addresses, IP addresses, or ACL entries, depending on the received key or key-related information. The first memory device 104 may, for example, search through the physical portions or blocks from a first end of the first memory device 104 to a second, opposite end of the first memory device 104.
The first memory device 104 may find the index or match index value based on the search using the key or key-related information. The first memory device 104 may provide an indication of whether a match was found or not found based on the search. If a match is found, the first memory device 104 may output the index to the IC 102, such as to a translation table block 112.
The translation table block 112 may store mapping tables which allow logical tables of address types to be specified based on application needs, rather than selecting from a set of predetermined configurations, and may allow noncontiguous physical blocks in the first memory device 104 and/or second memory device 106 to be allocated to the same logical table and/or address type. The translation table block may also allow physical blocks in the first memory device 104 and/or second memory device 106 to be allocated and/or deallocated during run-time, or while application software 122 is running, according to an example embodiment.
The translation table block 112 may translate the index received from the first external memory device 104 to an address on the second memory device 106. In an example implementation, the translation table block 112 may store a mapping table (described further with reference to
In an example implementation, the mapping table stored in translation table block 112 is updated when the memory assigner 120 assigns physical portions of the first memory device 104 and/or second memory device 106 to logical tables. The mapping table stored in translation table block 112 may include information indicating associations between logical tables, physical portions or blocks of the first memory device 104, and/or physical portions or blocks of the second memory device 106.
In an example implementation, the translation table block 112 may send a data request to the second memory device 106 based on the received index, such as by checking the received index against the translation table and/or mapping table. The data request may identify a physical portion or block of the second memory device 106, such as by including an address which identifies the physical portion or block of the second memory device 106.
The second memory device 106 may retrieve the data in response to receiving the data request, such as by retrieving the data based on the included address or the identified physical portion or block of the second memory device 106. The second memory device 106 may include rules that determine what actions may be taken on a received packet, such as rules that indicate to drop a packet, to change a packet, or to perform other actions on the packet. Other actions may include determining which port or ports to send the packet to or through. In an example implementation, the second memory device 106 may send the retrieved data, which may include the rule(s), to the IC 102, such as to a switching module 114.
In an example implementation, the switching module 114 may receive the data from the second memory device 106. The switching module 114 also may receive a copy of the received packet, such as via a buffer 116. The switching module 114 may, for example, forward, reroute, or drop the packet based on the data received from the second memory device 106. The switching module 114 may, for example, forward or reroute the packet the packet via a port 118. The port 118 may be configured to receive, send, and/or forward packets, according to example implementations. While one port is shown in
Application software 122 may include a memory assigner 120. The memory assigner 120 may, for example, determine memory needs for each of the address types, and assign physical portions or blocks of the first memory device 104 to each of the plurality of address types based on the determined memory needs. The memory assigner 120 may assign memory as described in paragraphs [0009] to [0012] above, according to example implementations.
The memory assigner 120 may specify logical tables of address types based on application needs, rather than selecting from a set of predetermined configurations, and may allocated noncontiguous physical blocks in the first memory device 104 and/or second memory device 106 to the same logical table and/or address type. The memory assigner 120 may also allocate and/or deallocate physical blocks in the first memory device 104 and/or second memory device 106 during run-time, or while application software 122 is running. The memory assigner 120 may specify the sizes and/or locations in the first memory device 104 and/or second memory device 106 of logical tables associated with address types both during initialization of the integrated circuit 102 and during run-time, according to an example implementation.
The physical blocks 202, 204, 206, 208, 214, 216, 218, 220 assigned to a particular logical table and/or address type need not be contiguous, and may be noncontiguous, according to an example implementation. In the example shown in
The unassigned physical portions or blocks 210, 212, 222 may be assigned to logical tables by the memory assigner 120 when additional memory is needed, according to an example implementation (additional physical portions or blocks of the first memory device 104 and second memory device 106, not shown, may be unassigned and available for assignment). The physical blocks 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222 may be assigned to logical tables associated with address types in any order, and physical blocks 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222 assigned to a particular logical table may be contiguous or noncontiguous. In an example implementation, the memory assigner 120 may assign the physical blocks 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222 in ascending order, so that the physical blocks 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222 which are assigned to any logical table are contiguous beginning at the end of the memory device 104, 106 at which the scanning or searching will begin, according to an example implementation.
In the example shown in
Physical blocks 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222 assigned to logical tables may not all be the same size. In the example shown in
In the example shown in
In the example shown in
The mapping table 300 also may include entries for finding physical blocks 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222 on the first and second memory devices 104, 106, and/or for mapping a physical block 202, 204, 206, 208, 210, 212 of the first memory device 104 onto a physical block 214, 216, 218, 220, 222 of the second memory device 106. For example, the mapping table 300 may include a “first memory width” column 308 indicating a width or size of each physical block 202, 204, 206, 208, 210, 212 of the first memory device 104. In the example shown in
The mapping table 300 also may include a “hit bit base” column 310. The entries in the hit base column 310 may indicate locations of hit bits in the second memory device 106, or in another memory device, according to example implementations. In some implementations, some but not all of the logical tables associated with address types mapped by the mapping table 300 may be associated with hit bits. In the example shown in
The mapping table 300 also may include a “second memory base” column 312. The entries in the second memory base column 312 may indicate starting points of physical portions or blocks of the second memory device 106 which correspond to physical portions or blocks of the first memory device 104. In the example shown in
The mapping table 300 may include a second memory width column 314 indicating a width or size of each physical block 214, 216, 218, 220, 222 of the second memory device 106. In the example shown in
Implementations of the various techniques described herein may be implemented in digital electronic circuitry, or in computer hardware, firmware, software, or in combinations of them. Implementations may implemented as a computer program product, i.e., a computer program tangibly embodied in an information carrier, e.g., in a machine-readable storage device, for execution by, or to control the operation of, data processing apparatus, e.g., a programmable processor, a computer, or multiple computers. A computer program, such as the computer program(s) described above, can be written in any form of programming language, including compiled or interpreted languages, and can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program can be deployed to be executed on one computer or on multiple computers at one site or distributed across multiple sites and interconnected by a communication network.
Method steps may be performed by one or more programmable processors executing a computer program to perform functions by operating on input data and generating output. Method steps also may be performed by, and an apparatus may be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit).
To provide for interaction with a user, implementations may be implemented on a computer having a display device, e.g., a cathode ray tube (CRT) or liquid crystal display (LCD) monitor, for displaying information to the user and a keyboard and a pointing device, e.g., a mouse or a trackball, by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including acoustic, speech, or tactile input.
Implementations may be implemented in a computing system that includes a back-end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front-end component, e.g., a client computer having a graphical user interface or a Web browser through which a user can interact with an implementation, or any combination of such back-end, middleware, or front-end components. Components may be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (LAN) and a wide area network (WAN), e.g., the Internet.
While certain features of the described implementations have been illustrated as described herein, many modifications, substitutions, changes and equivalents will now occur to those skilled in the art. It is, therefore, to be understood that the appended claims are intended to cover all such modifications and changes as fall within the true spirit of the implementations of the invention.
This application claims the benefit of priority based on U.S. Provisional Patent Application No. 61/049,652, filed on May 1, 2008, entitled, “Assigning Memory for Address Types,” the disclosure of which is hereby incorporated by reference.
Number | Date | Country | |
---|---|---|---|
61049652 | May 2008 | US |