- MODE
- The pull-down menu options are: BCAM, CBCAM, STCAM, and TCAM. Depending on
the option selected, the available configuration parameters vary.
- BCAM
- Selects the Binary Content Addressable Memory. Figure 1 shows the configuration parameters when BCAM is selected. Refer to the Binary CAM Search LogiCORE IP Product Guide (PG317).
- STCAM
- Selects the Semi-Ternary Content Addressable Memory. Figure 2 shows the configuration parameters when STCAM is selected. STCAM is described in this document.
- TCAM
- Selects the Ternary Content Addressable Memory. Figure 3 shows the configuration parameters when TCAM is selected. Refer to the Ternary CAM Search LogiCORE IP Product Guide (PG318).
Figure 1. BCAM Configuration Parameters

Figure 2. STCAM Configuration Parameters

Figure 3. TCAM Configuration Parameters

- NUM_ENTRIES
- The supported number of entries (depth). The number of entries is limited
by the number of RAM instances used:Note: (BCAM and variable rate STCAM only) NUM_ENTRIES represent number of usable entries. When targeting a certain memory depth for a BCAM, specify 95% of the target. For example, to get a BCAM with memory of depth 4K, specify NUM_ENTRIES = 0.95 x 4096 = 3891.
- OPTIMIZE_ENTRIES
- When this check box is selected, NUM_ENTRIES is adjusted up
or down to use 95% of the available memory. Refer to the row BRAM36/URAM
Utilization in the Figure 4 table for resulting values based on this
selection.Note: This parameter is not available for TCAM.Note: When specifying NUM_ENTRIES as a power of two, that is, 1024, the maximum fill level will be adjusted down to 972 (95% of 1024). The CAM reports full after 972 entries have been stored.
- KEY_WIDTH
- The width of the lookup key.Note: This parameter is only available for BCAM and STCAM.
- FORMAT_STRING
-
Note: This parameter is only available for TCAM.The format string describes the format of all keys and masks. A key consists of several fields and the format string specifies the location and size of the fields. In the format string, fields are separated by a colon ':'. The format string is read left to right. The first field corresponds to the least significant bit of the key. The key is specified as little-endian. Each field is specified with a field length and field type. There are no alignment restrictions for the fields. The location, type, number, and size of fields is fully flexible. The following field types and lengths are supported:
- b - bit field
- The field mask is either all zeroes or all ones; field_len = 1..128 bit, complexity = 2
- t - ternary field
- The field mask can have any value; field_len = 2..16 bit, complexity = 2^field_len
- c - constant bit field
- The mask is all ones; field_len = 1..128 bit, complexity = 1
- u - unused bit field
- The mask is all zeroes; field_len = 1..128 bit, complexity = 1
- p - prefix field
- The mask has a pattern of consecutive zeroes and ones; field_len = 1..128 bit, complexity = field_len + 1
- r - range field
- Matching is performed with logic comparators within start/end
valuesNote: The ternary (t) field has the highest compute complexity and must be used with caution. Specifying a wide key with only ternary fields makes the software driver too slow for practical use.
- RESPONSE_WIDTH
- The width of the lookup response.
- DEFAULT_RESPONSE_VALUE
- Specify the Default Response value when Lookup has no match. Valid range between 1 to 1024 bits specified in Hex. The value is set to zero by default.
- NUM_MASKS
- The number of unique masks. The Vivado CAM compiler generates a STCAM supporting both the
specified number of unique masks and the specified number of entries at the
same time.Note: This parameter is only available for STCAM.
- PRIORITY_WIDTH
-
Note: This parameter is only available for STCAM and TCAMThe priority is usually defined wide enough to support one unique priority value per entry. The width can be larger to facilitate easier STCAM and TCAM management or narrower if entries are order independent and guaranteed not to overlap.
- AUTO
- When this check box is selected, the Vivado CAM compiler automatically
calculates the appropriate value for
PRIORITY_WIDTH
based on NUM_ENTRIES for TCAM, and NUM_MASKS for STCAM. You can override this by deselecting this check box and specifying the appropriate value.
For STCAM, the PRIORITY_WIDTH is calculated to accomodate NUM_MASKS different priorities and for TCAM it is calculated to accommodate NUM_ENTRIES different priorities.
- LOOKUP_RATE
- This is the supported lookup rate of the CAM instance (expressed in million lookups per second). In order to save resources it is important not to set the lookup rate higher than required.
- VARIABLE_RATE
- Enable variable lookup rate. Variable rate uses less RAM and logic resources
for most configurations, but does not guarantee a fixed lookup rate or fixed
latency.Note: This parameter is only available for STCAM.
- LOOKUP_INTERFACE_FREQ
- This is the clock frequency for the Lookup Request and Response Interfaces, specified in MHz.
- FLOW_CONTROL
- Enable flow control for the lookup interface output. Flow control adds extra
FIFOs for SINGLE_CLOCK mode, so the lookups can be stopped. Flow control is
not needed if the
m_axis_lkup_tready
port always is High when the lookup response arrives. - CLOCKING_MODE
- Options available in this pull-down menu are: SINGLE CLOCK
and DUAL CLOCK. When SINGLE CLOCK is selected the configuration parameter
RAM_FREQ
is not available. - RAM_FREQ
- This is the clock frequency for the memories (block
RAM/URAM) and the internal datapath, specified in MHz. Specifying a higher
frequency RAM clock enables time division of the hardware resources, leading
to significant resource savings. This configuration parameter is only
available when
CLOCKING_MODE = DUAL CLOCK
is selected.Note: When CLOCKING_MODE = SINGLE CLOCK, RAM_FREQ = LOOKUP_INTERFACE_FREQ. - MEMORY_PRIMITIVE
- Options available in this pull-down menu are: AUTO, BLOCK,
and ULTRA.
- AUTO
- The Vivado CAM compiler will select the best suited memory type, either being block RAM or URAM, automatically. The respective block RAM/URAM resource usage is shown in the "CAM Configuration Information" section of the GUI.
- BLOCK
- You specify the memory primitive to be block RAM. The block RAM resource usage is shown in the "CAM Configuration Information" section of the GUI.
- ULTRA
- You specify the memory primitive to be URAM. The URAM resource usage is shown in the "CAM Configuration Information" section of the GUI.
- OPTIMIZATION
- Options available in this pull-down menu are: AUTO, RAM, and
LOGIC. The logic usage is proportional to the number of Physical Memory
Units. The RAM usage and number of Memory Units are shown in the CAM
Configuration Information section of the GUI:
- AUTO
- The Vivado CAM generator will balance the usage of logic and RAM resources.
- RAM
- Use this option to reduce RAM usage at a potentially higher logic usage.
- LOGIC
- Use this option to reduce logic usage at a potentially higher RAM usage.
- OPTIMIZE_MASKS
- When this check box is selected, use the available memory to insert more
masks than the specified NUM_MASKS limit. A side effect of this is that the
specified NUM_ENTRIES value is no longer guaranteed but ‘up to’ instead.
Refer to the rows BRAM36/URAM Utilization and Number of Masks in Figure 4 for
resulting values based on this selection.Note: This parameter is only available for STCAM.
- LOGICAL_MEM_UNITS
- Force Number of Logical Memory Units, the value will be
rounded up to a multiple of the TDM_FACTOR. This is an Advanced Feature and
it is recommended to use the AUTO selection.
- AUTO
- When this check box is selected, the Vivado CAM compiler automatically calculates the appropriate value for LOGICAL_MEM_UNITS. You can override this by deselecting the check box and specifying the appropriate value.
- PHYSICAL_CONSTRAINTS
- Enable generation of Relative Location Constraints (RLOCs) for RAMs. Recommended for CAM instances using many RAM instances clocked at high frequency.
- STATISTICS
- Enable support for hardware statistics for rate counters and lookup debug.
- CAM Configuration Information
- This table provides interactive information based on the configuration
parameter values entered. It allows a quick way to converge on the required
CAM settings for the design needs. The information provided is shown in the
following figure.Figure 4. CAM Configuration Information
- Memory Depth
- The depth of the resulting memory based on the
value of configuration parameter
NUM_ENTRIES
. - Memory Width
- The width of the resulting memory based on configuration parameter values entered. The contributing composition of the individual components (which vary depending on the Lookup Mode selected) to the width is also provided. For example, the unused component (if not zero) indicates to the user that the other component sizes can be increased with no additional memory resource penalty.
- RAM Utilization
- The memory utilization efficiency.
- LUTRAM Usage
- The number of resulting LUTRAMs used to implement the required memory size. A value of 0 indicates no LUTRAMs are used.
- BRAM36 Usage
- The number of resulting BRAM36s used to implement the required memory size. A value of 0 indicates no BRAM36s are used.
- URAM Usage
- The number of resulting URAMs used to implement the required memory size. A value of 0 indicates no URAMs are used.
- Memory Units
- Each Physical Memory Units requires logic resources. The number of Physical Memory Units can be used to compare relative logic resource cost between different configurations.
- Lookup Latency
- The lookup latency value indicated in multiples
of the
LOOKUP_INTERFACE_FREQ
clock cycles. - Lookup Interface Frequency
- The
LOOKUP_INTERFACE_FREQ
frequency and the number of lookups occurring perLOOKUP_INTERFACE_FREQ
clock cycle. - RAM Clock Frequency
- The
RAM_FREQ
frequency (note when CLOCKING_MODE = SINGLE CLOCK, RAM_FREQ = LOOKUP_INTERFACE_FREQ). And the way the memory bandwidth is split between Lookup Requests and Management Requests. - TDM Factor
- The time division multiplexing of hardware
resources. The value indicated describes the number of memory
accesses per Lookup Request. When the value is indicated as
“capped” then a lower
RAM_FREQ
can be chosen without additional memory resource penalty. - Number of Masks
- Displays the number of masks used for STCAM.
- Debug Flags
- The debug flags can be enabled or disabled via selection of
the tick-boxes as shown in the following figure, thus enabling /disabling
the respective debug functions. The debug functions are controlled via the
DEBUG_FLAGS
parameter, a 32-bit integer, whose value is also shown in grey specified as "Debug Flags Value". Details of what each debug function does can be found in the Debugging section.Figure 5. Debug Flags
Note: During HDL simulation
the
DEBUG_FLAGS
parameter can be modified
dynamically as required. Debug flags can also be enabled using Verilog macros in the
simulation. For example, +define+CAM_DEBUG_HW_LOOKUP.