This paper is concerned with content-addressable memory (CAM), which is a kind of functional memory. Flexible multiport content-addressable memory (FMCAM) is proposed, in which flexible retrieval functions and a multiport structure are realized. The implementation and an evaluation are presented. It is known that CAM offers high speed of the matching retrieval function. On the other hand, there are problems in practice concerning the relation between the processing speed and the number of comparators, and also the problem of cost, which have prevented its widespread use. Consequently, we developed the following FMCAM. Multiport CAM is realized by reducing the increase of the number of comparators while retaining high-speed matching retrieval functions. Functions for flexible retrieval can be added by implementation in an FPGA. By the categorization process and the use of a ring counter, multiple processing operations can be performed immediately while reducing the number of comparators. This improves the performance of the CAM itself. Another advantage is that FMCAM alone can perform the same processing in situations in which parallel CAM should be applied. After implementing the proposed FMCAM, several tests were performed for comparison. Excellent values were obtained: the AT product was 37.5% lower on average than in conventional CAM, and the increase in hardware complexity was by a factor of 1.57 even if the number of ports was increased by a factor of 4. © 2006 Wiley Periodicals, Inc. Syst Comp Jpn, 37(11): 57–67, 2006; Published online in Wiley InterScience (www.interscience.wiley.com). DOI 10.1002/scj.20148