When implementing a CPLD design, I receive a warning message similar to the following, prior to a fitting failure:
"WARNING:Cpld:1081 - Cannot assign signal 'dout' to location '82=FB13_14'. Not enough block inputs."
The pin assignment in the warning message cannot be met because the number of function block inputs required by the output pin assigned to the specified function block exceeds the number available. A CoolRunner-II/XPLA3 function block has a limit of 40 input signals. A XC9500XL/XV function block has a limit of 54.
In the sample warning message above, the output signal "dout" causes the fitting failure. There are likely to be other output signals assigned to the same function block (FB13 in this example), and the sum of all output pins assigned to this function block exceeds the maximum limit. The signal "dout" is merely the equation that CPLDFit attempts to fit when the function block inputs are exhausted.
You can solve this problem by using one of the following methods:
- Increase the function block input limit to 40 (the default is 38 to allow flexibility for future design revisions).
- Unlock the pin assignment for the output specified in the warning and let the fitter attempt a re-fit. Repeat if other outputs produce similar warnings. This allows the fitter to place the outputs in function blocks that have inputs available.
- Lower the collapsing input limit. This limits the maximum number of inputs that can be used in each equation, forcing the fitter to create additional levels of logic. This has the benefit of allowing logic to be shared and distributed more effectively, at the cost of speed. The disadvantage is that it is a global option and affects your entire design.
- Decrease the number of inputs that apply to the given output. When choosing inputs to remove, select inputs that are not used in any other logic in that function block. Otherwise, no additional inputs would be saved for that function block.
- Apply the MAXPT attribute to the output specified in the warning and let the fitter attempt a re-fit. The MAXPT attribute is a constraint that limits the number of product terms allowed for the given equation. This allows you to specifically target equations that cause the fitting error. (UCF example: NET "dout" MAXPT=1; ). Repeat if other outputs produce similar warnings.