The TCAM requires a minimum number of RAM read accessed independently of the TCAM size. For small TCAMs, it is therefore beneficial to use block RAM. Each RAM has associated logic, as the TCAM size increases less logic resources will be used if the total number of RAMs is kept low. This can be accomplished by using deeper RAMs, such as UltraRAM, or depth cascaded block RAMs. The API software calculates and selects the optimum solution in terms of hardware resources. If the target device has more spare capacity for a certain RAM type, the MEMORY_PRIMITIVE parameter can be forced to use this RAM type even if it is less efficient, because it will provide better overall device utilization.