Methods and apparatus are disclosed for implementing and using multiple virtual
portions of an associative memory. An associative memory is programmed with multiple
sets of entries, each of the multiple sets of entries including a different unique
decoder field. A piece of information is received including a data item. A decoder
field is identified. The decoder field and the data item are typically included
in a lookup word used in a lookup operation in the associated memory, with the
decoder field identifying which of the multiple sets of entries to search based
on the data item. In one implementation, a nested condition associated with the
data item is identified, and in response, multiple lookup words are generated with
a predefined set of decoder fields for the data item. Multiple levels of decoder
fields may be used to identify multiple subsets of entries within one of the multiple
sets of entries.