Application of Content Addressable Memory MCM69C232 in Exchange

Content addressable memory CAM (Coment-Addressable Memo-ry) is a special memory array RAM that addresses content. Its main working mechanism is to automatically and simultaneously compare an input data item with all data items stored in the CAM, determine whether the input data item matches the data item stored in the CAM, and output matching information corresponding to the data item . US Motorola's CAM chip MCM69C232 is a cost-effective product in the market, so it is widely used in network communication, pattern recognition and other fields. Its advantage for data retrieval is unmatched by software, which can greatly improve system performance .

1 MCM69C232 chip introduction

Content addressable memory (CAM) is essentially a special memory based on RAM technology. Data items are stored in the array unit inside the CAM. The number of bits of each data item is called "word width", the number of all data items in the array is called "depth", and the capacity of CAM is characterized by the word width and depth. MCM69C232 is designed to store 4096 data items with a width of 64 bits.

MCM69C232 has two sets of data ports: control port and match port. The control port is used by the processor (CPU) to operate the CAM table, including inserting and deleting data table items, mode setting and analog matching, and reading the information of the chip's internal status register. The retrieval of data items is done through matching ports.

Although based on RAM technology, the storage mechanism of CAM is very different from RAM. Figure 1 is a structural block diagram of MCM69C232. In the figure, MCM69C232 does not have an address bus for determining the content storage unit, and its address lines A0 to A2 are used to address the on-chip control register. The processor can read / write the data items in the CAM table by operating the control port (data lines DQ0 ~ DQl5) of MCM69C232, and the storage address of the data items is controlled by the internal logic of the chip. MCM69C232 has two working modes: ATM mode and basic mode. ATM mode is mainly used for ATM switches to convert virtual channel identification number / virtual channel identification number (VPI / VCI) to ATM cells; basic mode is mainly used for data retrieval such as IP / MAC address matching on Ethernet.


The main features of the MCM69C232 chip are as follows:

â—‡ 160 ns matching time;

â—‡ With shield register;

â—‡ Expand depth through chip cascading;

â—‡ The maximum clock frequency is 50 MHz;

â—‡ Matching word width and output result bit width can be customized;

â—‡ Simultaneous matching of VPC (Virtual Path Circuits) and VCC (Virtual ConnecTIon Circuits) in ATM mode;

â—‡ Ports are mainly divided into control and matching ports;

â—‡ Insert time of 20Ons (in case the queue of 12 input data items is not full);

â—‡ 12ms initialization time (after setting the fast write mode);

â—‡ It has a test port (JTAG) conforming to IEEE standard 1149.1.

2 Use of MCM69C232 chip

In the basic operation mode, the MCM69C232 reads the input data and compares it with all entries in the CAM table. Regardless of whether a match is found or not, when the comparison is complete, the MC (Match Complete) pin is valid. If a match is found, the MS (Mateh Successful) pin is valid, and the data related to the matching data item is output on the MQ bus; if it is not found, the MQ bus remains in a high-impedance state, so as to cascade the CAM chip to expand storage depth.

After MCM69C232 is powered on, the default working mode is basic mode. Before entering the data retrieval operation, the chip must first complete several startup operations: first, set the global mask register, define the matching word width and the output result bit width; second, select the write mode of the data table item, that is, fast write The entry mode is also the dynamic write mode; again, the data items required by the user (a total of 64 bits, including matching bytes and output byte corresponding to them) should be loaded into the CAM table one by one.

The selection of the writing mode of the CAM table data item is often a balance between the writing speed and the time it takes to start the matching operation. The fast write mode is often used to initially write a large number of data items into the CAM table; and the dynamic write mode is often used to insert a small number of data items into the CAM table after starting matching. The user inserts or deletes CAM entries by operating the 4 I / O registers of the control port. When an abnormal state occurs, it can be reflected from the flag register and error code register. The register inside MCM69C232 is shown as in Fig. 2.

The match bit of the CAM table depends on the definition of the global mask register. A bit in the mask register that is 0 requires the corresponding bit of the data item to be matched; if it is 1, the corresponding bit does not need to match. In a typical application, the user always defines the high-order bit of the data item as "byte to be matched", and the low-order bit as "result output byte". Any of the 64 bits can be defined as a "matching operation", but in fact the lowest 32-bit data is always output to the matching port MQ0 ~ MQ31 bus, and it is not arbitrarily programmable. If the set output result byte exceeds 32 bits, it is meaningless.

Normally, MCM69C232 prepares matching operation by writing control port data and instructions. The general procedure is to load data items into 4 I / O registers, and then write operation codes to the operation code register to complete the operation of an instruction. After the instruction is completed, the content of the CAM table may be modified, the corresponding bit of the flag register will be set, the error code register will return an error code, and when enabled, it will also trigger an interrupt. The operation instructions of the chip are listed in Table 1.

Reset. The reset is synchronized with the rising edge of the main clock. One clock cycle of reset can clear the CAM table and input data item queue, set the flag register to 1C, the error code register to FFFF, the almost full register to FFF, and clear the interrupt mask. Control port timing. The access control port is as simple as the processor accessing RAM.

Matching port timing. There are two cases to access the matching port: one is that the matching byte is less than or equal to 32 bits, only the LH / SM signal is used to load the matching data, and the LL signal is useless; the other is that the matching byte is greater than 32 bits, and the LL signal is used to load the match first The lower part of the data is then loaded by the LH / SM signal. The matching result is indicated by the MC signal and the MS signal, and the G signal is enabled to read the matching result data. See the reference for the timing of the matching port.

The two are matched at the same time. When the simulation matching of the control port and the matching of the matching port are performed simultaneously, the matching port has a higher priority. In addition, the control port requires that the input queue be empty before the simulation matching operation in order to receive the result. Deep expansion. The chip can be simply cascaded to expand the depth, please refer to the reference for the specific extension wiring method.

3 Application of MCM69C232 chip

3.1 Application of MCM69C232 in the exchange

On Ethernet. The switch maintains an address table (usually called "CAM table") for Layer 2 switching. This table maintains the correspondence between MAC addresses and outgoing interfaces. Whenever an Ethernet data frame is received, the switch will make a judgment. If the data frame is not sent to itself, query the CAM table according to the destination MAC address of the data frame; if it can hit (so-called hit, it is to find the forwarding item corresponding to the MAC address in the CAM table), according to the query result (Usually a list of outgoing interfaces) to forward; if it fails to hit, then broadcast the data frame to all ports.

The CAM table of the switch can be obtained in various ways, such as static configuration and dynamic learning. For multicast, it can also be obtained through various multicast protocols (such as IGMP snooping, GMRP protocol, etc.) (the multicast forwarding table cannot be obtained through learning, and the multicast forwarding item is different from the ordinary forwarding item, and the corresponding export may not only be One, but a set of exits); but for unicast, the most important way to establish is dynamic learning.

When the switch receives a data frame, it extracts the destination MAC address of the data frame and uses it as a basis to query the CAM table. If the result can be found, the data frame is forwarded according to the result; if it cannot be hit, all ports except the receiving port are copied. While forwarding data, the switch also conducts a learning process. It extracts the source MAC address of the data frame and queries the CAM table to see if there is a forwarding entry for the MAC address in the CAM table. If not, the MAC address and the port that received the MAC address are bound and inserted into the CAM entry. In this way, when receiving a data frame sent to the MAC address, there is no need to broadcast to all ports, but only to this port. It should be noted that the forwarding of data frames is based on the destination MAC address to query the CAM table, and the learning of the CAM table is based on the source MAC address.

The reason why the CAM is used in the switch is because the switch has particularly high performance requirements. The performance of the embedded real-time control system in the switch mainly depends on two aspects: the computing performance of the hardware platform and the superiority of the algorithm. Among them, the computing performance of the hardware platform is the most critical, which is particularly prominent in the switch. According to the design requirements, the retrieval time of the MAC address of the Ethernet frame is generally μs, so the response speed of the data retrieval task must be ensured first; in addition to the very heavy data retrieval task, the switch must also complete SNMP (Simple Network Management Pmtocol) Protocol processing, command line processing and other tasks, so we must also solve the problem of data retrieval to occupy system resources. Using software to achieve MAC address retrieval of Ethernet frames is not complicated, but due to frequent retrieval times, a large amount of system resources are occupied, resulting in a greatly reduced response speed of the system and unable to meet the requirements of large-flow data communication. Therefore, the pure software algorithm can not solve the problem that the data retrieval part takes up a lot of resources. In order to improve the response speed of the system, the task of data retrieval must be separated and implemented by hardware, while the protocol processing part is still completed by the CPU. The data retrieval module and the protocol processing module work in parallel. Using hardware to realize data retrieval can also increase the retrieval speed and reduce the occupancy rate of system resources. Here the advantages of CAM are reflected.

3.2 Search operation

When performing MAC address retrieval, the CPU first uses the MAC address as a key to retrieve the corresponding index value through the MAC-CAM table search, and then finds the storage location of the relevant information corresponding to the MAC address in the RAM table according to the index value, and then This address obtains relevant configuration information. Other information such as MAC address, user port, valid flag field, etc. can be stored in the relevant configuration information in RAM. The mapping relationship between CAM table and RAM is shown in Figure 3.

According to the agreement, the MAC address occupies 48 bits and is expressed as a 6-byte array. Therefore, for the matching operation of the MAC address, the mask word is set to 0x0000_0000_0000_FFFF, that is, 48 ​​bit matching. The setting of the mask word must be completed when the CAM is initialized. Before performing the matching operation, the CAM must be initialized. After MCM69C232 is powered on, the default working mode is basic mode, so there is no need to set the working mode. As mentioned earlier, the formation of the MAC table in the CAM is obtained through self-learning, so there is no need to write data items to the CAM table.

The matching operation is completed by reading / writing the matching mouth. The matching port data line MQ has only 32 bits. Since the MAC address occupies 48 bits, it takes two write operations to completely express a MAC address. When performing MAC address retrieval, the CPU first writes the low 32-bit data of the MAC address to the matching port, of which the upper 16 bits are valid, and the lower 16 bits can be any value; then the CPU writes the high 32-bit data to the matching port; The CPU reads the matching port to get the matching result.

Conclusion

The use of content-addressable memory MCM69C232 greatly improves the speed of data retrieval. This is unmatched by a pure software retrieval algorithm. The data processing capability of the equipment meets the requirements of large-flow network communication, and the products have obtained good social and economic benefits.

We offer Phone Glass Protector, iPhone Glass Screen Protector, Tempered Glass for iPhone

Features:

 

 

 

 

 

Feature

Thickness: 0.33mm

 Hardness: 9H

Anti-oil, easy absorption

Super high-definition for true color display, enjoy your visual feast

Our cell phone protective films can anti-smudge and anti-fingerprints protection

Anti-scratch and explosion-proof

Provide supreme and nice appearance , our tempered glass protector make people feel comfortable and smooth grip

Bubble-free and easily absorb

Lead time

7-9 working days/ Sample lead time : 1-4 days

Package

crystal boxes and Blister box packing available

Payment

T/T, Western Union, L/C, PayPal 

 

Glass Screen Protector

Glass Screen Protector,Tempered Glass Screen Protector,Anti Fingerprint Glass Screen Protector,Iphone 6 Plus Screen Protector,Iphone 6 Screen Protector,Iphone 6S Screen Protector,Iphone Glass Screen Protector,Tempered Glass For Iphone

Hebei Baisiwei Import&Export Trade Co., LTD. , https://www.baisiweicable.com

This entry was posted in on