compile fix for gui and proper size
This commit is contained in:
parent
f2fecc3c69
commit
bfa2157ae6
@ -123,6 +123,7 @@ if (BUILD_PYTHON)
|
|||||||
STRING(REGEX REPLACE "[^0-9]" "" boost_py_version ${version})
|
STRING(REGEX REPLACE "[^0-9]" "" boost_py_version ${version})
|
||||||
find_package(Boost QUIET COMPONENTS "python-py${boost_py_version}" ${boost_libs})
|
find_package(Boost QUIET COMPONENTS "python-py${boost_py_version}" ${boost_libs})
|
||||||
set(Boost_PYTHON_FOUND ${Boost_PYTHON-PY${boost_py_version}_FOUND})
|
set(Boost_PYTHON_FOUND ${Boost_PYTHON-PY${boost_py_version}_FOUND})
|
||||||
|
set(boost_python_lib "python-py${boost_py_version}")
|
||||||
|
|
||||||
while (NOT "${version}" STREQUAL "" AND NOT Boost_PYTHON_FOUND)
|
while (NOT "${version}" STREQUAL "" AND NOT Boost_PYTHON_FOUND)
|
||||||
STRING(REGEX REPLACE "([0-9.]+).[0-9]+" "\\1" version ${version})
|
STRING(REGEX REPLACE "([0-9.]+).[0-9]+" "\\1" version ${version})
|
||||||
@ -130,6 +131,7 @@ if (BUILD_PYTHON)
|
|||||||
STRING(REGEX REPLACE "[^0-9]" "" boost_py_version ${version})
|
STRING(REGEX REPLACE "[^0-9]" "" boost_py_version ${version})
|
||||||
find_package(Boost QUIET COMPONENTS "python-py${boost_py_version}" ${boost_libs})
|
find_package(Boost QUIET COMPONENTS "python-py${boost_py_version}" ${boost_libs})
|
||||||
set(Boost_PYTHON_FOUND ${Boost_PYTHON-PY${boost_py_version}_FOUND})
|
set(Boost_PYTHON_FOUND ${Boost_PYTHON-PY${boost_py_version}_FOUND})
|
||||||
|
set(boost_python_lib "python-py${boost_py_version}")
|
||||||
|
|
||||||
STRING(REGEX MATCHALL "([0-9.]+).[0-9]+" has_more_version ${version})
|
STRING(REGEX MATCHALL "([0-9.]+).[0-9]+" has_more_version ${version})
|
||||||
if ("${has_more_version}" STREQUAL "")
|
if ("${has_more_version}" STREQUAL "")
|
||||||
@ -139,6 +141,7 @@ if (BUILD_PYTHON)
|
|||||||
|
|
||||||
if (NOT Boost_PYTHON_FOUND)
|
if (NOT Boost_PYTHON_FOUND)
|
||||||
find_package(Boost QUIET COMPONENTS python3 ${boost_libs})
|
find_package(Boost QUIET COMPONENTS python3 ${boost_libs})
|
||||||
|
set(boost_python_lib python3)
|
||||||
if ("${Boost_LIBRARIES}" MATCHES ".*(python|PYTHON).*" )
|
if ("${Boost_LIBRARIES}" MATCHES ".*(python|PYTHON).*" )
|
||||||
set(Boost_PYTHON_FOUND TRUE)
|
set(Boost_PYTHON_FOUND TRUE)
|
||||||
endif ()
|
endif ()
|
||||||
@ -146,6 +149,7 @@ if (BUILD_PYTHON)
|
|||||||
|
|
||||||
if (NOT Boost_PYTHON_FOUND)
|
if (NOT Boost_PYTHON_FOUND)
|
||||||
find_package(Boost QUIET COMPONENTS python36 ${boost_libs})
|
find_package(Boost QUIET COMPONENTS python36 ${boost_libs})
|
||||||
|
set(boost_python_lib python36)
|
||||||
if ("${Boost_LIBRARIES}" MATCHES ".*(python|PYTHON).*" )
|
if ("${Boost_LIBRARIES}" MATCHES ".*(python|PYTHON).*" )
|
||||||
set(Boost_PYTHON_FOUND TRUE)
|
set(Boost_PYTHON_FOUND TRUE)
|
||||||
endif ()
|
endif ()
|
||||||
@ -153,6 +157,7 @@ if (BUILD_PYTHON)
|
|||||||
|
|
||||||
if (NOT Boost_PYTHON_FOUND)
|
if (NOT Boost_PYTHON_FOUND)
|
||||||
find_package(Boost QUIET COMPONENTS python37 ${boost_libs})
|
find_package(Boost QUIET COMPONENTS python37 ${boost_libs})
|
||||||
|
set(boost_python_lib python37)
|
||||||
if ("${Boost_LIBRARIES}" MATCHES ".*(python|PYTHON).*" )
|
if ("${Boost_LIBRARIES}" MATCHES ".*(python|PYTHON).*" )
|
||||||
set(Boost_PYTHON_FOUND TRUE)
|
set(Boost_PYTHON_FOUND TRUE)
|
||||||
endif ()
|
endif ()
|
||||||
@ -161,6 +166,7 @@ if (BUILD_PYTHON)
|
|||||||
if (NOT Boost_PYTHON_FOUND)
|
if (NOT Boost_PYTHON_FOUND)
|
||||||
STRING(REGEX REPLACE "([0-9]+\\.[0-9]+).*" "\\1" gentoo_version ${PYTHONLIBS_VERSION_STRING})
|
STRING(REGEX REPLACE "([0-9]+\\.[0-9]+).*" "\\1" gentoo_version ${PYTHONLIBS_VERSION_STRING})
|
||||||
find_package(Boost QUIET COMPONENTS python-${gentoo_version} ${boost_libs})
|
find_package(Boost QUIET COMPONENTS python-${gentoo_version} ${boost_libs})
|
||||||
|
set(boost_python_lib python-${gentoo_version})
|
||||||
if ("${Boost_LIBRARIES}" MATCHES ".*(python|PYTHON).*" )
|
if ("${Boost_LIBRARIES}" MATCHES ".*(python|PYTHON).*" )
|
||||||
set(Boost_PYTHON_FOUND TRUE)
|
set(Boost_PYTHON_FOUND TRUE)
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -289,6 +289,9 @@ TorcInfo::TorcInfo(BaseCtx *ctx, const std::string &inDeviceName, const std::str
|
|||||||
const auto &tw = arc.getSinkTilewire();
|
const auto &tw = arc.getSinkTilewire();
|
||||||
pip_to_dst_wire.emplace_back(tilewire_to_wire(tw));
|
pip_to_dst_wire.emplace_back(tilewire_to_wire(tw));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
height = (int)tiles.getRowCount();
|
||||||
|
width = (int)tiles.getColCount();
|
||||||
}
|
}
|
||||||
TorcInfo::TorcInfo(const std::string& inDeviceName, const std::string &inPackageName)
|
TorcInfo::TorcInfo(const std::string& inDeviceName, const std::string &inPackageName)
|
||||||
: ddb(new DDB(inDeviceName, inPackageName)), sites(ddb->getSites()), tiles(ddb->getTiles()),
|
: ddb(new DDB(inDeviceName, inPackageName)), sites(ddb->getSites()), tiles(ddb->getTiles()),
|
||||||
@ -332,13 +335,14 @@ Arch::Arch(ArchArgs args) : args(args)
|
|||||||
nextpnr_binary_oarchive oa(fofs, this);
|
nextpnr_binary_oarchive oa(fofs, this);
|
||||||
oa << torc_info;
|
oa << torc_info;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log_error("Unsupported XC7 chip type.\n");
|
log_error("Unsupported XC7 chip type.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
width = torc_info->width;
|
||||||
|
height = torc_info->height;
|
||||||
/*if (getCtx()->verbose)*/ {
|
/*if (getCtx()->verbose)*/ {
|
||||||
log_info("Number of bels: %d\n", torc_info->num_bels);
|
log_info("Number of bels: %d\n", torc_info->num_bels);
|
||||||
log_info("Number of wires: %d\n", torc_info->num_wires);
|
log_info("Number of wires: %d\n", torc_info->num_wires);
|
||||||
|
@ -322,6 +322,8 @@ struct TorcInfo
|
|||||||
std::vector<Arc> pip_to_arc;
|
std::vector<Arc> pip_to_arc;
|
||||||
int num_pips;
|
int num_pips;
|
||||||
std::vector<WireId> pip_to_dst_wire;
|
std::vector<WireId> pip_to_dst_wire;
|
||||||
|
int width;
|
||||||
|
int height;
|
||||||
|
|
||||||
TorcInfo(const std::string &inDeviceName, const std::string &inPackageName);
|
TorcInfo(const std::string &inDeviceName, const std::string &inPackageName);
|
||||||
private:
|
private:
|
||||||
@ -497,6 +499,8 @@ struct Arch : BaseCtx
|
|||||||
bool fast_part;
|
bool fast_part;
|
||||||
const ChipInfoPOD *chip_info;
|
const ChipInfoPOD *chip_info;
|
||||||
const PackageInfoPOD *package_info;
|
const PackageInfoPOD *package_info;
|
||||||
|
int width;
|
||||||
|
int height;
|
||||||
|
|
||||||
mutable std::unordered_map<IdString, int> wire_by_name;
|
mutable std::unordered_map<IdString, int> wire_by_name;
|
||||||
mutable std::unordered_map<IdString, int> pip_by_name;
|
mutable std::unordered_map<IdString, int> pip_by_name;
|
||||||
@ -519,8 +523,8 @@ struct Arch : BaseCtx
|
|||||||
|
|
||||||
// -------------------------------------------------
|
// -------------------------------------------------
|
||||||
|
|
||||||
int getGridDimX() const { return 34; }
|
int getGridDimX() const { return width; }
|
||||||
int getGridDimY() const { return 34; }
|
int getGridDimY() const { return height; }
|
||||||
int getTileBelDimZ(int, int) const { return 8; }
|
int getTileBelDimZ(int, int) const { return 8; }
|
||||||
int getTilePipDimZ(int, int) const { return 1; }
|
int getTilePipDimZ(int, int) const { return 1; }
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
include_directories(/opt/torc/src)
|
include_directories(/opt/torc/src)
|
||||||
#include_directories(torc/externals/zlib)
|
#include_directories(torc/externals/zlib)
|
||||||
|
|
||||||
find_package(Boost REQUIRED COMPONENTS serialization iostreams ${boost_libs})
|
find_package(Boost REQUIRED COMPONENTS serialization iostreams ${boost_libs} ${boost_python_lib})
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
nextpnr-${family}
|
nextpnr-${family}
|
||||||
|
Loading…
Reference in New Issue
Block a user