/* * program to place dips on wire-wrap board. * based on PLAC by D.G.Schweikert. * * There are two parts to this: * placA does an initial placement and placB improves it. * * A chip has a given number of pins and occupies a rectangular * shaped area of the circuit board. Each chip has a package type. * A board is an array of sockets whose positions on the board are fixed. * Each socket serves a rectangular area of the circuit board. * and for each socket there is a list of the * package types that can be placed in that socket. * * Placement rules allow for any chip to be placed in any socket * providing that the package type is permitted for that socket. * if the area covered by the chip overlaps beyond the edge of the * area served by the socket then the neighbouring sockets are blocked. * only one chip is permitted in each socket. * * the initial placement performed by placA is constructive in that it * only places un-placed cells and does not move any cell that is already * placed. Plac2 exchanges the positions of chips already placed. * Only Plac1 is able to move a chip into a position that blocks * sockets not already blocked by a chip in that positon. * * Plac1 choses an un-placed chip and places it in an unoccupied socket. * the chip chosen is the one 'most connected' to already placed chips * (see TM75-2255-4) and the socket is the one that minimises total wire * length. * * Plac2 choses pairs of chips whose placements can be exchanged and * which thereby reduce total wire length. * * It is assumed that a given chip appears at most once in any net. * */