| 85 | return true; |
| 86 | } |
| 87 | bool DefWriter::writeSimple(std::string const& outFile, std::string const& version, std::string const& designName, |
| 88 | std::vector<Node> const& vNode, std::vector<PlaceDB::index_type> const& vNodeIndex, |
| 89 | PlaceDB::coordinate_type const* x, PlaceDB::coordinate_type const* y) const |
| 90 | { |
| 91 | dreamplacePrint(kINFO, "writing placement to %s\n", outFile.c_str()); |
| 92 | |
| 93 | FILE* out = fopen(outFile.c_str(), "w"); |
| 94 | if (out == NULL) |
| 95 | { |
| 96 | dreamplacePrint(kERROR, "failed to open %s for write\n", outFile.c_str()); |
| 97 | return false; |
| 98 | } |
| 99 | |
| 100 | fprintf(out, "VERSION %s ;\n", version.c_str()); |
| 101 | fprintf(out, "DESIGN %s ;\n\n", designName.c_str()); |
| 102 | writeCompBlock(out, vNode, vNodeIndex, x, y); |
| 103 | fprintf(out, "\nEND DESIGN"); |
| 104 | |
| 105 | fclose(out); |
| 106 | return true; |
| 107 | } |
| 108 | void DefWriter::writeCompBlock(FILE* os, std::vector<Node> const& vNode, std::vector<PlaceDB::index_type> const& vNodeIndex, |
| 109 | PlaceDB::coordinate_type const* x, PlaceDB::coordinate_type const* y) const |
| 110 | { |
no test coverage detected