Example #1
0
int main (int argc, char *argv[])
{
    char benchmarkPath[BUFFERSIZE], auxFile[BUFFERSIZE], placefile[BUFFERSIZE];

    if(argc != 4) {
        printf("Usage: %s <benchmark_dir> <aux_file> <placement_file>\n",
               argv[0]);
        printf("    <benchmark_dir> is the benchmark file directory.\n");
        printf("    <aux_file> is the bookshelf format auxiliary file");
        printf(" (assume in <benchmark_dir>).\n");
        printf("    <placement_file> is the placement file");
        printf(" (assume in current directory).\n");
        exit(1);
    }    

    strcpy(benchmarkPath, argv[1]);
    strcpy(auxFile, argv[2]);
    strcpy(placefile, argv[3]);

    readAuxFile(benchmarkPath, auxFile);
    createHash(benchmarkPath, nodesFile);
    readNodesFile(benchmarkPath, nodesFile);
    readNetsFile(benchmarkPath, netsFile);
    readPlFile(".", placefile);
    freeHash();

    readLUT();

    printf("Half-perimeter wirelength: %.2f\n", HPwl());
    printf("FLUTE wirelength         : %.2f\n", flutewl());
}
Example #2
0
RoadMap::RoadMap(const std::string& fnodes, const std::string& froads, const std::string& fsubroads){

    latitude_min = 180;
    longitude_min = 180;
    longitude_max = -180;
    latitude_max = -180;

    readNodesFile(fnodes);
    cout << this->crossRoads.size() << " nodes loaded" << endl;
    readRoadsFile(froads);
    cout << this->roads.size() << " roads loaded" << endl;
    readSubRoadsFile(fsubroads);
    cout << " edges loaded" << endl;

    //floydWarshallShortestPath();

    cout << "latitude_min: " << latitude_min << endl;
    cout << "latitude_max: " << latitude_max << endl;
    cout << "longitude_min: " << longitude_min << endl;
    cout << "longitude_max: " << longitude_max << endl;

}