內容可定址記憶體 (content addressable memory, CAM) 在數位系統中扮演著重要的角色。為了支援平行搜尋的功能,一個CAM 單元 (cell) 是由一個儲存元件和一個比較元件所組成,這使得CAM在測試上比一個隨機存取記憶體(random access memory, RAM) 困難許多。由於愈來愈多的大容量CAM 被需要於網路相關的應用,有效的良率改善技術對於這些大容量嵌入式或獨立式CAM 是必要的。 內建自我修復 (built-in self-repair, BISR) 的技術是一個有效的方法,用來改善嵌入式CAM 的良率,而所使用之測試演算法的錯誤定位能力會是CAM自我修復的一個主要挑戰。為了觀察測試所回傳的結果,一個針對CAM的測試演算法中必須有比對的測試動作。然而,一旦比對動作偵測到一個錯誤,我們只能知道錯誤的行或列,錯誤單元的位置並不能得知。在本論文中,我們針對CAM提出了一個具有錯誤診斷能力的自我修復方法。其中,我們提出錯誤定位的演算法,用來找到錯誤單元的位置,使得具備優先權位址編碼器的CAM之修復效率能夠提升。此外,為了評估所提出之自我修復的修復效率,我們提出一個估算自我修復方法之修復率的評估工具。模擬結果顯示具錯誤診斷能力之自我修復的修復率要比不具備該能力之自我修復的修復率要好得多。在針對512x128 位元的CAM與使用TSMC 0.13um 製程的情況下,所提出的BISR 面積負擔約占3.29%。;Content addressable memory (CAM) plays an important role in many digital systems. For supporting the function of parallel search, a CAM cell is composed of a storage element and a comparator. This causes that the testing of CAM is more difficult than that of RAM. More and more large-capacity CAMs are needed for network-related applications. Effective yield-enhancement techniques are imperative for these large embedded or stand-alone CAMs. Built-in self-repair (BISR) technique is one effective method for enhancing the yield of embedded memories. One main challenge of CAM BISR is that the fault location capability of the used test algorithms. A test algorithm for CAMs must have compare test operations for observing the test responses. Once a compare operation detects a fault, however, we only can know the faulty row/column and cannot know the location of faulty cell. In this thesis, we propose a BISR scheme with fault diagnosis capability for CAMs. A fault-location algorithm is proposed to identify the location of faulty cell in a CAM with priority address encoder. The BISR uses the fault-location algorithm to identify the location of faulty cells such that the repair efficiency is boosted. To evaluate the repair efficiency of the proposed BISR scheme, furthermore, an evaluation tool for estimating the repair rate of the BISR scheme is proposed. Simulation results show that the BISR with the fault diagnosis capability can provide much better repair rate in comparison with the BISR without the fault diagnosis capability. The area overhead of the BISR circuit is about 3.29% for a 512x128-bit CAM using TSMC 0.13um CMOS standard cell library.