diff --git a/coloquinte/src/MCF_opt.cxx b/coloquinte/src/MCF_opt.cxx deleted file mode 100644 index 67e46b5b..00000000 --- a/coloquinte/src/MCF_opt.cxx +++ /dev/null @@ -1,147 +0,0 @@ - -#include "coloquinte/detailed.hxx" -#include "coloquinte/circuit_helper.hxx" - -#include -#include - -#include - -namespace coloquinte{ -namespace dp{ - -void optimize_on_topology_HPWL(netlist const & circuit, detailed_placement & pl){ - // Solves a minimum cost flow problem to optimize the placement at fixed topology - // Concretely, it means aligning the pins to minimize the wirelength - // It uses the Lemon network simplex solver from the Coin-OR initiative, which should scale well up to hundred of thousands of cells - - using namespace lemon; - DIGRAPH_TYPEDEFS(SmartDigraph); - // Create a graph with the cells and bounds of the nets as node - SmartDigraph g; - - std::vector cell_nodes(circuit.cell_cnt()); - for(index_t i=0; i Lnet_nodes(circuit.net_cnt()), Unet_nodes(circuit.net_cnt()); - for(index_t i=0; i 0){ - Lnet_nodes[i] = g.addNode(); - Unet_nodes[i] = g.addNode(); - } - } - - // Two nodes for position constraints - Node fixed = g.addNode(); - - typedef std::pair arc_pair; - typedef std::pair node_pair; - // The arcs corresponding to constraints of the original problem - std::vector constraint_arcs; - - // Now we add every positional constraint, which becomes an arc in the min-cost flow problem - for(index_t i=0; i net_supplies; - for(index_t n=0; n 0){ - net_supplies.push_back(node_pair(Unet_nodes[n], circuit.get_net(n).weight)); - net_supplies.push_back(node_pair(Lnet_nodes[n], -circuit.get_net(n).weight)); - } - } - - // Create the maps to have cost and capacity for the arcs - IntArcMap cost(g, 0); - IntArcMap capacity(g, circuit.net_cnt()); - IntNodeMap supply(g, 0); - - for(arc_pair A : constraint_arcs){ - cost[A.first] = A.second; - } - - for(node_pair N : net_supplies){ - supply[N.first] = N.second; - } - - // Then we (hope the solver can) solve it - NetworkSimplex ns(g); - ns.supplyMap(supply).costMap(cost); - auto res = ns.run(); - if(res != ns.OPTIMAL){ - abort(); - } - - // And we get the new positions as the dual values of the current solution (compared to the fixed pin) - for(index_t c=0; c`_ (used by the detailed placer) * LEF/DEF (from `SI2 `_) -The |Coloquinte| component requires the |LEMON| component from |Coin-Or| (`Coin Or Home`_). -A repository of |Coin-Or| packages backported from |Fedora| 21 is available here: - -* |SL6|: `ftp://pub/linux/distributions/slsoc/slsoc/soc/addons/i386/RPMS `_ -* |SL7|: `ftp://pub/linux/distributions/slsoc/soc/7/addons/x86_64/RPMS `_ - For other distributions, refer to their own packaging system. |newpage|