fig1 is a simplified block diagram of a router 100 connected to a cam array memory chip 104 as may be used in a communications network , such as , e . g ., part of the internet backbone . the router 100 contains a plurality of input lines and a plurality of output lines . when data is transmitted from one location to another , it is sent in a form known as a packet . oftentimes , prior to the packet reaching its final destination , that packet is first received by a router , or some other device . the router 100 then decodes that part of the data identifying the ultimate destination and decides which output line and what forwarding instructions are required for the packet . generally , cams are very useful in router applications because of their ability for instantaneous search of a large database . as a result , when a packet is received by the router 100 , the router already has a table of forwarding instructions for each ultimate destination stored within its cam . therefore , only that portion of the packet that identifies the sender and recipient need be decoded in order to perform a search of the cam to identify which output line and instructions are required to pass the packet onto a next node of its journey . in many applications where cams are used , the data stored in the cam is acquired by a process of learning or absorption , wherein a specific data value is searched in the cam , and if not found , the data is stored ( or learned ) in the cam for later use . to store data in the cam , the user must know which location ( address ) in the cam is free , i . e . the nfa , and thus may be written to . writing data into the cam typically requires a search for a free address , and a write operation performed to that free address . in the present invention the cam automatically generates the nfa to which the new data is to be written and therefore if a search does not yield a match within the cam , the nfa is always present , and the data in the comparand register can be written automatically to that nfa . a first embodiment of the cam array 104 of the present invention is shown in fig2 . a plurality of cam words each have a respective match detector 228 having an output connected to a respective input of a priority encoder 300 . an address decoder 244 is connected to a respective or gate 240 for indicating a specific word in the cam array 104 to be written to . within the cam array 104 , a “ learn ” operation requires two operational stages . in the first stage of the search operation , the valid bit 204 of every location ( word ) in the cam is checked . typically , a valid bit is “ 1 ” in a cam location holding stored valid data , and the valid bit is “ 0 ” when a location is empty or invalid . all the valid bits 204 are connected to the priority encoder 300 . the inputs to the priority encoder 300 are active when “ 0 ”, and therefore all invalid locations are considered active . the priority encoder 300 only responds to one active highest priority input , and ignores all other active inputs . the priority encoder 300 then indicates an address of an empty location in the cam , and this indication is temporarily stored within the priority encoder 300 . the address decoder 244 in combination with the or gate 240 then activates the specific word select line 236 indicated by the priority encoder 300 . in the second stage of operation , a write is done into the nfa found in the first stage of the operation . the word to write into is selected by its word select 236 which gets its input from the priority encoder . or gate 240 allows cam words to be selected either by the priority encoder 300 ( in the case of a learn operation ) or from the decoded address ( in the case of an addressed read or write ). the priority encoder 300 of the present invention is comprised of two sections , as shown in fig3 . the highest priority indicator 304 is followed by the address encoder 308 . every memory location in the cam array 104 has exactly one input into the highest priority indicator 304 . although many matches can occur during a cam search , one purpose of the highest priority indicator 304 is to select a single memory location and provide that location to an address encoder 308 . thus , the highest priority indicator 304 will always indicate one and only one location within the cam array 104 to the address encoder 308 . the address encoder 308 then outputs an address as shown by the arrow 312 . fig4 shows an exemplary embodiment of the highest priority indicator ( hpi ) 304 . the hpi operates as follows . in an initial state , all inputs p_n 0 through p_nn are at a state of “ 1 ” which is the inactive state , while all the outputs t 0 through tn are in the inactive state of “ 0 ”. whenever any input p_n * goes to the active state of “ 0 ”, the output associated with this input t * becomes active as well , and goes to the state of “ 1 ”. an active input disables all the inputs above it in the chain , forcing their associated outputs to remain inactive (“ 0 ”). an active input on an input p_n 0 will cause the output t 1 of p_n 1 to be inactive because of the inverter 408 0 which feeds into the nor gate 412 1 . similarly , each succeeding output will be disabled partially by the nand gates 416 1 - n . thus , the bottom of the highest priority indicator 304 has the highest priority , and the priority descends toward the top . accordingly , input p_n 0 will always have the highest priority over any other input . therefore , if any number of inputs is simultaneously active , the highest priority indicator will activate only the output associated with the highest priority active input , leaving all other outputs inactive . thus , the highest priority indicator 304 can be relied upon to consistently present one and only one location within the cam 104 to the address encoder 308 . the location of a cam word available for writing is indicated by enabling one of the latches 420 . an enabled latch 420 activates one of the word select lines 236 , thereby pointing to the highest priority cam word for writing new data . because the address encoder 308 and address decoded 244 are not utilized in the pointing process , the entire write process can be accomplished in a single clock cycle . many methods could used to convert the output of the highest priority indicator 304 into an address . the simplest method is that of a look - up table , although the present invention should not be limited only to that conversion method . fig5 shows an 8 bit section of a 32 bit look - up table which comprises the address encoder 308 of the present invention . the inputs bb 0 through bb 4 are connected to ground , and the pins marked as bt 0 through bt 4 are each connected to the power supply via a separate resistor . the operation of the address encoder 308 will now be explained using a simple example . t 0 - t 7 will be enabled at any given time . now assume that the input t 0 is “ 1 ”, turning on all the transistors m 67 through m 71 connected thereto . the resulting current through the turned on transistors causes the voltage at the output pins bt 0 through bt 4 to go down to zero volts , thus forming the binary output value of 00000 . now suppose instead the input t 3 is active , transistors m 56 - 58 would be enabled so that only the outputs bt 2 , bt 3 , and bt 4 go to 0 volts , while bt 0 and bt 1 are pulled high . thus the binary value 00011 would be present on the output pins bt 0 through bt 4 . the priority encoder 300 of the present invention could also be implemented in a hierarchical fashion out of many smaller priority encoders . for example , a 256 input priority encoder could be constructed out of 17 sixteen - input priority encoders . each of sixteen inputs would go to one of sixteen priority encoders and the 17th input determines a priority among the first sixteen priority encoders . each of the sixteen priority encoders could be further constructed using five four input priority encoders . the fifth priority encoder used to select from among the first four priority encoders . fig6 illustrates an exemplary processing system 600 which utilizes the cam arrays of the present invention . the processing system 600 includes one or more processors 601 coupled to a local bus 604 . a memory controller 602 and a primary bus bridge 603 are also coupled the local bus 604 . the processing system 600 may include multiple memory controllers 602 and / or multiple primary bus bridges 603 . the memory controller 602 and the primary bus bridge 603 may be integrated as a single device 606 . the memory controller 602 is also coupled to one or more memory buses 607 . each memory bus accepts memory components 608 . any one of memory components 608 may contain a cam array of the present invention . the memory components 608 may be a memory card or a memory module . the memory components 608 may include one or more additional devices 609 . for example , in a simm or dimm , the additional device 609 might be a configuration memory , such as a serial presence detect ( spd ) memory . the memory controller 602 may also be coupled to a cache memory 605 . the cache memory 605 may be the only cache memory in the processing system . alternatively , other devices , for example , processors 601 may also include cache memories , which may form a cache hierarchy with cache memory 605 . if the processing system 600 include peripherals or controllers which are bus masters or which support direct memory access ( dma ), the memory controller 602 may implement a cache coherency protocol . if the memory controller 602 is coupled to a plurality of memory buses 607 , each memory bus 607 may be operated in parallel , or different address ranges may be mapped to different memory buses 607 . the primary bus bridge 603 is coupled to at least one peripheral bus 610 . various devices , such as peripherals or additional bus bridges may be coupled to the peripheral bus 610 . these devices may include a storage controller 611 , an miscellaneous i / o device 614 , a secondary bus bridge 615 , a multimedia processor 618 , and an legacy device interface 620 . the primary bus bridge 603 may also coupled to one or more special purpose high speed ports 622 . in a personal computer , for example , the special purpose port might be the accelerated graphics port ( agp ), used to couple a high performance video card to the processing system 600 . the storage controller 611 couples one or more storage devices 613 , via a storage bus 612 , to the peripheral bus 610 . for example , the storage controller 611 may be a scsi controller and storage devices 613 may be scsi discs . the i / o device 614 may be any sort of peripheral . for example , the i / o device 614 may be an local area network interface , such as an ethernet card . the secondary bus bridge may be used to interface additional devices via another bus to the processing system . for example , the secondary bus bridge may be an universal serial port ( usb ) controller used to couple usb devices 617 via to the processing system 600 . the multimedia processor 618 may be a sound card , a video capture card , or any other type of media interface , which may also be coupled to one additional devices such as speakers 619 . the legacy device interface 620 is used to couple legacy devices , for example , older styled keyboards and mice , to the processing system 600 . the processing system 600 illustrated in fig6 is only an exemplary processing system with which the invention may be used . while fig6 illustrates a processing architecture especially suitable for a general purpose computer , such as a personal computer or a workstation , it should be recognized that well known modifications can be made to configure the processing system 600 to become more suitable for use in a variety of applications . for example , many electronic devices which require processing may be implemented using a simpler architecture which relies on a cpu 601 coupled to memory components 608 and / or memory devices 609 . the modifications may include , for example , elimination of unnecessary components , addition of specialized devices or circuits , and / or integration of a plurality of devices . while the invention has been described and illustrated with reference to specific exemplary embodiments , it should be understood that many modifications and substitutions can be made without departing from the spirit and scope of the invention . accordingly , the invention is not to be considered as limited by the foregoing description but is only limited by the scope of the appended claims .