diff --git a/CMakeLists.txt b/CMakeLists.txt index b1272f2b2..a12664c3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ set(VERSION_MINOR 0) # Add the spdlog directory to the include path include_directories(${CMAKE_CURRENT_SOURCE_DIR}/third_party/spdlog/include ${CMAKE_CURRENT_SOURCE_DIR}/third_party/exprtk ${CMAKE_CURRENT_SOURCE_DIR}/third_party/scope_guard) -set(VERSION_PATCH 432) +set(VERSION_PATCH 433) option( diff --git a/src/Compiler/CompilerOpenFPGA.cpp b/src/Compiler/CompilerOpenFPGA.cpp index fd31b7e1c..95bb6bacc 100644 --- a/src/Compiler/CompilerOpenFPGA.cpp +++ b/src/Compiler/CompilerOpenFPGA.cpp @@ -3469,8 +3469,17 @@ std::string CompilerOpenFPGA::FinishOpenFPGAScript(const std::string& script) { } result = ReplaceAll(result, "${OPENFPGA_BITSTREAM_SETTING_FILE}", m_runtime_OpenFpgaBitstreamSettingFile.string()); - result = ReplaceAll(result, "${OPENFPGA_PIN_CONSTRAINTS}", - m_OpenFpgaPinConstraintXml.string()); + + // Use run time generated clk pin XML if exists + std::filesystem::path clk_pin_xml = + FilePath(Action::Synthesis) / "clk_pin.xml"; + if (std::filesystem::exists(clk_pin_xml)) { + result = + ReplaceAll(result, "${OPENFPGA_PIN_CONSTRAINTS}", clk_pin_xml.string()); + } else { + result = ReplaceAll(result, "${OPENFPGA_PIN_CONSTRAINTS}", + m_OpenFpgaPinConstraintXml.string()); + } if (m_bitstreamMoreOpt.find("wl_decremental_order") != std::string::npos) { result = ReplaceAll(result, "${WL_ORDER_OPTION}", "--wl_decremental_order");