diff --git a/xc7/arch.cc b/xc7/arch.cc index bd0dd5d2..786163e9 100644 --- a/xc7/arch.cc +++ b/xc7/arch.cc @@ -349,7 +349,9 @@ void IdString::initialize_arch(const BaseCtx *ctx) 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) { torc_info = std::unique_ptr(new TorcInfo(this, "xc7z020", args.package)); } else if (args.type == ArchArgs::VX980) { @@ -358,8 +360,10 @@ Arch::Arch(ArchArgs args) : args(args) log_error("Unsupported XC7 chip type.\n"); } - width = torc_info->width; - height = torc_info->height; + // TODO: FIXME + width = torc_info->width; + height = torc_info->height; + /*if (getCtx()->verbose)*/ { log_info("Number of bels: %d\n", torc_info->num_bels); log_info("Number of wires: %d\n", torc_info->num_wires); diff --git a/xc7/family.cmake b/xc7/family.cmake index c1c7dcb8..99eb21ed 100644 --- a/xc7/family.cmake +++ b/xc7/family.cmake @@ -28,8 +28,10 @@ if (NOT DEFINED TORC_ROOT) set(TORC_ROOT ${CMAKE_CURRENT_SOURCE_DIR}) endif() +target_compile_definitions(nextpnr-${family} PRIVATE -DTORC_ROOT="${TORC_ROOT}") target_include_directories(nextpnr-${family} PUBLIC ${TORC_ROOT}/torc/src) 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) endif() if (BUILD_GUI)