Skip to content

Commit

Permalink
Use extractor generated CLK pin XML if possible (#1711)
Browse files Browse the repository at this point in the history
* Use extractor generated CLK pin XML if possible

* Incremented patch version

---------

Co-authored-by: chungshien-chai <[email protected]>
  • Loading branch information
chungshien-chai and chungshien-chai authored Oct 1, 2024
1 parent 0e8942a commit e1992e6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
13 changes: 11 additions & 2 deletions src/Compiler/CompilerOpenFPGA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit e1992e6

Please sign in to comment.