The abstract introduction content addressable memory MCM69C232 structure, the characteristic, the performance and the application method, in view of the MCM69C232 key job pattern, have given it in the switchboard system’s application. The practice indicated that uses CAM to be possible to raise the data retrieval speed and the system performance enormously, the enhancement system reliability.
Key word CAM data retrieval content addressable MCM69C232
Content addressable memory CAM (Coment-Addressable Memo-ry) is carries on the addressing by the content the memory, is one kind of special memory array RAM. Its prime task mechanism is automatic simultaneously carries on an input data item and the memory in CAM all data items the comparison, distinguished in this input data item and CAM saves whether the data item does match, and outputs this data item correspondence the match information. American Motorola Corporation’s CAM chip MCM69C232 in the market is the performance-to-price ratio high product, thus widely is applied in domains and so on network service, pattern recognition, it uses in the data retrieval the superiority is the software is unable to compare, may enhance the system performance enormously.
1 MCM69C232 chip introduction
Content addressable memory (CAM) from says is essentially one kind based on the RAM technology special memory, the data item saves in the CAM internal array element. Each data item’s figure is called “the word width”, in the array all data item’s strip number is called “the depth”, the CAM capacity attributes through the word width and the depth. The MCM69C232 design may save 4096 widths is 64 data items.
MCM69C232 has two group of data ports: Control port (controlport) and match port (match port). Controls the port to use in processor (CPU) to the CAM table operation, including the insertion, deletes the data sheet item, the pattern establishment and the simulation match, as well as read chip internal behavior register’s information and so on. The data item retrieval through matches the port to complete.
Although based on the RAM technology, the CAM memory mechanism is actually but widely divergent with RAM. Figure 1 is the MCM69C232 structure diagram. In the chart MCM69C232 has not used in determining that the content memory cell the address bus, its address wire A0~A2 uses to the internal control register’s addressing. The processor through operates MCM69C232 the control port (data line DQ0~DQl5) to be possible to read/writes in the CAM table the data item, the data item memory address by the chip interior logical control. MCM69C232 has two kind of working patterns: ATM pattern and fundamental mode. The ATM pattern mainly uses in the ATM switchboard carrying on hypothesized circuit marking number/hypothesized channel marking number (VPI/VCI) transformation processing to the ATM cell; The fundamental mode mainly uses on ethernet’s data retrievals and so on IP/MAC address match.

The MCM69C232 chip’s principal characteristic is as follows:
◇160 ns match time;
◇ is equipped with shields the register;
◇ through chip cascade expansion depth;
◇ the clock rate most is high is 50 MHz;
◇ the match word width and the output result bit wide may from the definition;
◇ may carry on VPC while the ATM pattern (Virtual Path Circuits) and VCC (Virtual Connection Circuits) match;
◇ the port mainly divides into the control and the match port;
◇20Ons insertion time (in 12 input data item formation not full situation);
◇12ms initialization time (after establishing has read in pattern fast);
◇ has conforms to IEEE standard 1149.1 test port (JTAG).
2 MCM69C232 chip use
Under the elementary operation eo pattern, the MCM69C232 read data-in and compares with the CAM table’s in all table item. Regardless of matched the item to find or not, when after comparing completed, MC (Match Complete) the pin is effective. If has found the match item, then MS (Mateh Successful) the pin is effective, simultaneously on the MQ main line output and match data item related data; If has not found, then the MQ main line maintains a high-impedance state, so that the cascade CAM chip can expand the memory depth.
On after MCM69C232 electricity, the default working pattern is the fundamental mode. Before data input search operation, the chip must complete several starting operation process first: First, must establish the overall situation shield register, the definition match word width and the output result bit wide; Next, must choose the data sheet item to read in the pattern, namely reads in the pattern dynamic to read in the pattern fast; Once more, must the user need data item (altogether 64, including match byte and with its corresponding output result byte) loads gradually in the CAM table.
The CAM table data item reads in the pattern the choice, often is takes balanced in the writing speed and in the start matching operation expenditure time. Reads in the pattern fast, initial will read in commonly used the CAM table in the massive data items; But dynamic reads in the pattern, then commonly used after start match inserts the few data items toward the CAM table. The user inserts or deletes the CAM table item through the work management mouth 4 I/O registers, when has the abnormal state appears, may from symbolize that the register and the error code register reflect. MCM69C232 internal register as shown in Figure 2.

A CAM table’s coordinate is decided by the overall situation shield register’s definition. Shields the register is 0 position request data item corresponding position makes the matching operation; For 1, then the corresponding position does not need to match. In the typical application the user always defines the data item high order of the bits position for “treats the match byte”, the low order of the bits position defines as “the result output byte”. 64 any may define as “the matching operation”, but in fact outputs on the tasty MQ0~MQ31 main line to be always lowest 32 bit data, may program the output willfully by no means. If establishes the output result byte surpasses 32, is insignificant.
Usually in the situation, MCM69C232 through writes the control mouth data and the instruction prepares the matching operation. Generally the step is loads the data item 4 I/O registers, then toward the operation code register write operation code, then completes one kind of instruction the operation. After order complete, the CAM table’s content will possibly be revised, symbolized that register’s corresponding position by the setting, the error code register will be able to return the wrong error code, when will enable, will also trigger the interrupt.
Chip operational order like table 1 arranges in order.


Replacement. The replacement synchronization in master clock’s rise along, a clock cycle’s replacement can the clear spatial CAM table and the input data item formation, sets symbolized that the register is 1C, the error code register is FFFF, the nearly full register is FFF, and eliminates the interrupt mask.
Control mouth succession. The access control mouth is similar to the processor visits RAM to be the same, the succession is simpler.
Tasty succession. Visit divides two kind of situations tasty: One kind is matches the byte is smaller than is equal to 32, only uses the LH/SM signal to load the matched data, the LL signal is useless; Another kind is matches the byte to be bigger than 32, uses the LL signal loading matched data low position part first, then loads the top digit part by the LH/SM signal. The match result instructed by the MC signal and the MS signal that enables the G signal read match result data. A tasty succession see also the reference.
Two also match. When the control mouth simulation match and a tasty match simultaneously carry on, a tasty priority is high. Before moreover control mouth simulation matching operation, request the input formation to spatially, with the aim of receiving the result.
Depth expansion. The chip simple cascade then expands the depth, the concrete expansion segment method please see also the reference.
3 MCM69C232 chip application
3.1 MCM69C232 in switchboard’s application
On ethernet. The switchboard maintains one to use in two exchanges the address tables (usually being called “the CAM table”), this table maintains the MAC address and the connection corresponding relationships. Like this whenever will receive to an ethernet data frame, the switchboard will carry on the judgment. If this data frame is not the transmission for own, inquires the CAM table according to data frame’s goal MAC address; If can hit (so-called hit, was finds in the CAM table with this MAC address correspondence repeater item), (usually was a connection tabulation) carries on the repeater according to the inquiry result; If cannot hit, approaches all ports to broadcast this data frame.
Switchboard’s this CAM table may obtain through many kinds of ways, for instance static allocation, dynamic study. In view of broadcasts, but may also broadcast the agreement through each kind (for example IGMP to spy on, ways and so on GMRP agreement) to obtain (broadcasts transfers publication not to be able to obtain through study, moreover broadcasts repeater item with an ordinary repeater difference, is not only possible with its correspondence’s export, but is an export set); But regarding the unicast, the most important one establishment way is the dynamic study.
When the switchboard receives to a data frame, withdraws this data frame the goal MAC address, and carries on the CAM table inquiry take this as the basis. If can search the result, carries on the data frame according to the result the repeater; If cannot hit, to besides receives port’s all ports to make the copy. While carries on the data repeater, the switchboard also carries on a study the process. It withdraws data frame’s source MAC address, inquires the CAM table, looks in the CAM table whether to have in view of this MAC address repeater item. If does not have, and receives this MAC address this MAC address the port to bind, inserts the CAM table item. Like this when receives transmits to one to this MAC address data frame, does not need to all port broadcast, but only to this port transmission then. What needs to pay attention, data frame’s repeater is inquires the CAM table based on the goal MAC address, but the CAM table’s study is take the source MAC address as the basis.
The reason that uses CAM in the switchboard, is because the switchboard is specially high to the performance requirement. In switchboard’s embedded real-time control system’s performance is mainly decided by two aspects: Hardware platform operation performance and algorithm superiority. And, hardware platform’s operation performance is most essential, this point displays the outstandingly in the switchboard. According to the design requirements, the ethernet frame’s MAC address’s search time is generally μs the level, therefore must first guarantee the data retrieval duty the speed of response; Besides the very arduous data retrieval duty, the switchboard must complete SNMP (Simple Network Management Pmtocol) duties and so on protocol processing, command line processing, therefore must solve the data retrieval to take the question to the system resources. Realizes using the software to the ethernet frame MAC address search is not complex, but because the retrieval number of times is frequent, the massive system resources are taken, the cause system’s speed of response reduced greatly, cannot satisfy the great current capacity data communication request. Therefore the pure software algorithm could not solve the data retrieval part to take the massive resources the question, to raise system’s speed of response, must separate this data retrieval duty the reason hardware to realize, but the protocol processing part still completed by CPU. The data retrieval module and the protocol processing module multi-tasking, realizes the data retrieval using the hardware also to be possible to raise the retrieval speed, reduces the system resources the occupancy rate. Manifested in here CAM superiority.
3.2 search operations
When carries on the MAC address search, CPU first obtains the corresponding index value take the MAC address as the key words through the MAC-CAM table’s retrieval, then found in again the RAM table according to the index value this MAC address correspondence related information storage location, and the address obtains the related disposition information from this. May deposit such as the MAC address, the user port, the effective symbol territory in the RAM related disposition information and so on other information. The CAM table and RAM mapping relations as shown in Figure 3.

According to the agreement stipulated that the MAC address occupies 48, the expression is 6 bytes arrays, therefore regarding the MAC address’s matching operation, the shield character supposes is 0×0000_0000_0000_FFFF, namely 48 matches. The shield character’s hypothesis must when the CAM initialization completes. Before the execution matching operation, CAM must carry on the initialization. On after MCM69C232 electricity, the default working pattern is the fundamental mode, therefore does not need to establish the working pattern again. Front had mentioned, in CAM the MAC table’s formation is through obtains from the study, therefore does not need to the CAM table to read in the data item.
The matching operation through reads tasty to/writes completes. Tasty data line MQ has 32. Because the MAC address occupies 48, therefore needs two times to write the operation to be able to express completely a MAC address. When carries on the MAC address search, CPU reads in the MAC address tasty first to the low 32 bit data, the high 16 effectiveness, low 16 may be the random values; Follows closely CPU to read in the high 32 bit data tasty to; Afterward CPU reads tasty, then obtains the match result.
Conclusion
Uses content addressable memory MCM69C232, raised the data retrieval speed enormously. But this is cannot compare with the pure software searching algorithm. Equipment’s data-handling capacity has satisfied the great current capacity network service request, caused the product to obtain the good social efficiency and the economic efficiency.