[xc7] Remove hardcoded Torc path
This commit is contained in:
parent
1a9b2d9803
commit
ef35b41e0f
10
xc7/arch.cc
10
xc7/arch.cc
@ -349,7 +349,9 @@ void IdString::initialize_arch(const BaseCtx *ctx)
|
|||||||
|
|
||||||
Arch::Arch(ArchArgs args) : args(args)
|
Arch::Arch(ArchArgs args) : args(args)
|
||||||
{
|
{
|
||||||
torc::common::DirectoryTree directoryTree("/opt/torc/src/torc");
|
std::stringstream ss;
|
||||||
|
ss << TORC_ROOT << "/torc/src/torc";
|
||||||
|
torc::common::DirectoryTree directoryTree(ss.str().c_str());
|
||||||
if (args.type == ArchArgs::Z020) {
|
if (args.type == ArchArgs::Z020) {
|
||||||
torc_info = std::unique_ptr<TorcInfo>(new TorcInfo(this, "xc7z020", args.package));
|
torc_info = std::unique_ptr<TorcInfo>(new TorcInfo(this, "xc7z020", args.package));
|
||||||
} else if (args.type == ArchArgs::VX980) {
|
} else if (args.type == ArchArgs::VX980) {
|
||||||
@ -358,8 +360,10 @@ Arch::Arch(ArchArgs args) : args(args)
|
|||||||
log_error("Unsupported XC7 chip type.\n");
|
log_error("Unsupported XC7 chip type.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
width = torc_info->width;
|
// TODO: FIXME
|
||||||
height = torc_info->height;
|
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);
|
||||||
|
@ -28,8 +28,10 @@ if (NOT DEFINED TORC_ROOT)
|
|||||||
set(TORC_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
|
set(TORC_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
target_compile_definitions(nextpnr-${family} PRIVATE -DTORC_ROOT="${TORC_ROOT}")
|
||||||
target_include_directories(nextpnr-${family} PUBLIC ${TORC_ROOT}/torc/src)
|
target_include_directories(nextpnr-${family} PUBLIC ${TORC_ROOT}/torc/src)
|
||||||
if (BUILD_TESTS)
|
if (BUILD_TESTS)
|
||||||
|
target_compile_definitions(nextpnr-${family}-test PRIVATE -DTORC_ROOT="${TORC_ROOT}")
|
||||||
target_include_directories(nextpnr-${family}-test PUBLIC ${TORC_ROOT}/torc/src)
|
target_include_directories(nextpnr-${family}-test PUBLIC ${TORC_ROOT}/torc/src)
|
||||||
endif()
|
endif()
|
||||||
if (BUILD_GUI)
|
if (BUILD_GUI)
|
||||||
|
Loading…
Reference in New Issue
Block a user