Skip to content

Commit e1992e6

Browse files
Use extractor generated CLK pin XML if possible (#1711)
* Use extractor generated CLK pin XML if possible * Incremented patch version --------- Co-authored-by: chungshien-chai <chungshien-chai@users.noreply.github.com>
1 parent 0e8942a commit e1992e6

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ set(VERSION_MINOR 0)
3939
# Add the spdlog directory to the include path
4040
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)
4141

42-
set(VERSION_PATCH 432)
42+
set(VERSION_PATCH 433)
4343

4444

4545
option(

src/Compiler/CompilerOpenFPGA.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3469,8 +3469,17 @@ std::string CompilerOpenFPGA::FinishOpenFPGAScript(const std::string& script) {
34693469
}
34703470
result = ReplaceAll(result, "${OPENFPGA_BITSTREAM_SETTING_FILE}",
34713471
m_runtime_OpenFpgaBitstreamSettingFile.string());
3472-
result = ReplaceAll(result, "${OPENFPGA_PIN_CONSTRAINTS}",
3473-
m_OpenFpgaPinConstraintXml.string());
3472+
3473+
// Use run time generated clk pin XML if exists
3474+
std::filesystem::path clk_pin_xml =
3475+
FilePath(Action::Synthesis) / "clk_pin.xml";
3476+
if (std::filesystem::exists(clk_pin_xml)) {
3477+
result =
3478+
ReplaceAll(result, "${OPENFPGA_PIN_CONSTRAINTS}", clk_pin_xml.string());
3479+
} else {
3480+
result = ReplaceAll(result, "${OPENFPGA_PIN_CONSTRAINTS}",
3481+
m_OpenFpgaPinConstraintXml.string());
3482+
}
34743483

34753484
if (m_bitstreamMoreOpt.find("wl_decremental_order") != std::string::npos) {
34763485
result = ReplaceAll(result, "${WL_ORDER_OPTION}", "--wl_decremental_order");

0 commit comments

Comments
 (0)