BCAM (EM) - 2022.2 English

Vitis Networking P4 User Guide (UG1308)

Document ID
UG1308
Version
2022.2 English
Revision

EM (exact match) is a binary match of a search key to one of the keys stored in the table. The associated value for the key is returned within the response as well as an indication of whether the key produced a match. This CAM uses internal URAM or BRAM to store data. There are limits for the number of URAMs and BRAMs that can be used at higher frequencies. Refer to Binary CAM Search LogiCORE IP Product Guide (PG317), Tables 1 and 6 for parameter limits, and NUM_ENTRIES in Chapter 5, Design Flow Steps of Binary CAM Search LogiCORE IP Product Guide for more information on these limits.

  • Key width: 10 to 1024 bits
  • Response width: 1 to 1024 bits
  • Hit/miss flag: Yes

Here is an example of how to instantiate a BCAM in a P4 file:

    table forwardIPv4 {
        key             = { hdr.ipv4.src : exact; 
                            hdr.ipv4.dst : exact; }
        actions         = { forwardPacket; 
                            dropPacket; }
        size            = 1024;
        default_action  = dropPacket;
    }

For more details on how the compiler selects a BCAM, see the Compiler Table Selection section of this chapter. See the Binary CAM Search LogiCORE IP Product Guide (PG317) for more information on BCAMs.