TinyTCAM - 2022.2 English

Vitis Networking P4 User Guide (UG1308)

Document ID
UG1308
Version
2022.2 English
Revision

The TinyTCAM is a light-weight register-based version of the TCAM for less than 32 entries. The TinyTCAM requires no additional license. The primary characteristic of the TinyTCAM is that the position of the table entry in the table determines its priority.

  • Key width: up to 1024 bits
  • Response width: up to 1024 bits
  • Size: Up to 32 entries
  • Range key match type not supported

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

    table forwardIPv4 {
        key             = { hdr.ipv4.flags : ternary; 
                            hdr.ipv4.version : ternary;
                            hdr.ipv4.offset : ternary;
                            hdr.ipv4.hdr_len : ternary;
                            hdr.ipv4.src : exact; }
        actions         = { forwardPacket; 
                            dropPacket; }
        size            = 24;
        default_action  = dropPacket;
    }
Note: Because of the small number of entries involved and simplified implementation, the TinyTCAM can fully support a unique mask per entry. As such there is no concept of a TinySTCAM with further restrictions to the number of masks.