The BCAM requires at least four RAM read accesses independently of the BCAM size. For small BCAMs it is therefore beneficial to use block RAM. Each RAM has associated logic, therefore as the BCAM 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 (URAM), or depth cascaded RAMs. The API software calculates and automatically selects the optimum solution in terms of hardware resources. In addition to automatic optimization, the user can also direct the configuration to minimize either logic resources or RAM resources. If the target device has more spare capacity for a certain RAM type, the MEMORY_PRIMITIVE parameter can be forced to this RAM type even if it is less efficient, because it will provide better overall device utilization.