Skip to content

Partitioner branch does not check leafLUTCountLimit for valid value. #1283

@pnewlin-amd

Description

@pnewlin-amd

If you attempt to run the partitioner (Partitioner branch) on a netlist and set your leafLUTCountLimit parameter to > (total LUTs of netlist) then it will exit poorly and error out. It doesn't make sense for this algorithm to work with leafLUTCountLimit > than total number of LUTs anyway.. but adding a check would be nice, then it promptly informs the user how many LUTs are in the netlist at the error statement.

I added this line to Partitioner.java (RapidWright/src/com/xilinx/rapidwright/edif/partition/Partitioner.java):

        //verify desired leaf LUT count < total in netlist, else exit.
        int totalLuts = instLutCountMap.get(n.getTopHierCellInst());
        if (leafLUTCountLimit >= totalLuts) {
            System.err.printf("ERROR: leafLUTCountLimit (%d) must be less than total LUTs in netlist (%d)\n",
                    leafLUTCountLimit, totalLuts);
            return;
        }

I got desired clean exits by adding my statement after the t.stop() on line 74 of Partitioner.java

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions