We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 9152

5.1i CPLD CPLDFit/Hitop - Error: "Insufficient number of macrocells (hi302)"


Keywords: 5.1i, 4.1i, 4.2i, hi302, insufficient, fit, CPLD, XC9500, 9500

Urgency: Standard

General Description:
When I fit a design, error messages similar to the following appear:

"hi302 - Insufficient number of macro cells: Needs at least 39, but only 36 left after allocating other resources. Device XC9536XL-PC44 was disqualified."

"ERROR:hi301 - Cannot fit the design into any of the specified devices. You may want to decrease the p-term limit for a denser fit, or split the design into sub-designs, or try a larger device."



This may be a result of having more registers and combinational outputs in your design than macrocells available in your selected device. This is relevant because each register will occupy a macrocell, and each output will occupy a macrocell.

You can determine how many registers + distinct outputs you have in your design by looking at the first page in your fitter report. There will be a section labelled MACROCELL RESOURCES: that lists the number of registers and outputs being used.

If the sum of registers and outputs exceed the macrocell limit, your possible resolutions are:

1. Reduce the number of registers in the design. (For example, using binary encoding instead of one-hot.)
2. Remove some registers or outputs from the design.
3. Use the next larger device in the family. (http://www.xilinx.com/partinfo/databook.htm#cpld)


If the sum of registers and outputs does not exceed the macrocell limit, this error may be the result of excessive logic layers. By adjusting the optimization method to "speed" (the default is "balanced"), you will allow the fitter to perform more logic collapsing. For further fine tuning, adjust the p-term (product term) limit to a value that you feel should be the maximum number of p-terms for a single level of logic.

Changing p-terms and optimization style will not change the macrocell usage by a very large amount. This is because the software cannot remove any registers, nor can it remove any combinational outputs (each of which consumes a macrocell). The optimization style will only serve to reduce combinational buffers (macrocells) at the sacrifice of using more p-terms.

Example of a combinational buffer:

Buf <= InA or InB or InC or InD; -- 4 Pterms in 1 MC
DoutA <= Buf or InE; -- 2 Pterms in 1 MC
DoutB <= Buf or InF; -- 2 Pterms in 1 MC

-- This results in a total of 8 p-terms and 3 macrocells.

Example of a flattened buffer:

DoutA <= InA or InB or InC or InD or InE; -- 5 Pterms in 1 MC
DoutB <= InA or InB or InC or InD or InF; -- 5 Pterms in 1 MC

-- This results in a total of 10 p-terms and 2 macrocells.
AR# 9152
Date Created 08/21/2007
Last Updated 09/26/2002
Status Active
Type General Article