Skip to content

Update VPR CLI Parameter#1722

Closed
amin1377 wants to merge 1360 commits into
os-fpga:mainfrom
QuickLogic-Corp:vpr_cli_update
Closed

Update VPR CLI Parameter#1722
amin1377 wants to merge 1360 commits into
os-fpga:mainfrom
QuickLogic-Corp:vpr_cli_update

Conversation

@amin1377

Copy link
Copy Markdown

With the recent changes to update CRR generation, sb_count no longer works as expected, so this parameter has been removed.

Also, skip_sync_clustering_and_routing_results is disabled during routing since analysis is now run in the routing stage.

coolbreeze413 and others added 30 commits October 29, 2025 23:01
…usly-selected-device-array-x-and-y-on-device-grid-change
Navid Jafarof and others added 25 commits April 10, 2026 11:41
Fixes macOS build failure with Apple Clang 21 / macOS 26 SDK where
zlib 1.2.11's fdopen(fd,mode)->NULL macro in zutil.h conflicts with
the SDK's _stdio.h fdopen() declaration, causing hard compilation
errors.

zlib 1.3.1 removes the legacy MACOS/TARGET_OS_MAC fdopen suppression
block entirely. The custom zlib_make.cmake build script is preserved
unchanged as zlib 1.3.1 uses the same configure/make interface.

Also addresses known CVEs in zlib 1.2.11:
- CVE-2022-37434 (heap-based buffer over-read in inflate)
- CVE-2023-45853 (integer overflow in MiniZip)
The compiler_resources.qrc referenced a relative path
(../../../../build/power_calculator/power_calculator.xlsx) that only
resolves when FOEDAG is built as a submodule within Aurora2. This broke
FOEDAG standalone CI on all platforms since the xlsx is produced by
Aurora2's power-calculator build target, which doesn't exist in FOEDAG.

Fix: Remove the hardcoded relative path from compiler_resources.qrc
and instead conditionally generate a separate .qrc at CMake configure
time when the POWER_CALCULATOR_XLSX variable is set to the xlsx path.
The generated qrc uses a file alias matching the original Qt resource
path (:/build/power_calculator/power_calculator.xlsx), so existing C++
code in CompilerOpenFPGA_ql.cpp works unchanged.

Aurora2 integration: set -DPOWER_CALCULATOR_XLSX=<path> in CMake.
On MSYS2/MinGW, zlib_make.cmake ran cmake -G 'MSYS Makefiles' after
./configure, which failed ('Configuring incomplete') and corrupted the
Makefile. The outer CMake then expected libzlibstatic.a (CMake output
name) but only libz.a (configure output name) could have been produced.

Fix:
- Remove the MSYSTEM cmake reconfiguration block from zlib_make.cmake
- Change ZLIB_STATIC_LIB from libzlibstatic.a to libz.a for MSYSTEM
  in tcl_cmake/CMakeLists.txt to match ./configure output
On MSYS2/MinGW, zlib_make.cmake ran cmake -G 'MSYS Makefiles' after
./configure, which failed ('Configuring incomplete') and corrupted the
Makefile. The outer CMake then expected libzlibstatic.a (CMake output
name) but only libz.a (configure output name) could have been produced.

Fix:
- Remove the MSYSTEM cmake reconfiguration block from zlib_make.cmake
- Change ZLIB_STATIC_LIB from libzlibstatic.a to libz.a for MSYSTEM
  in tcl_cmake/CMakeLists.txt to match ./configure output
On MSYS2/MinGW, the bundled zlib ./configure && make fails silently
(ERROR_QUIET). The CI workflow already installs system zlib via pacman
(mingw-w64-*-zlib), so copy it from $MSYSTEM_PREFIX/lib/ — matching
the existing pattern used for TCL on MSYS2.
On MSYS2/MinGW, the bundled zlib ./configure && make fails silently
(ERROR_QUIET). The CI workflow already installs system zlib via pacman
(mingw-w64-*-zlib), so copy it from $MSYSTEM_PREFIX/lib/ — matching
the existing pattern used for TCL on MSYS2.
The ZLIB_STATIC_LIB variable was set to libzlibstatic.a (CMake build
output name) in 3 locations for MSYSTEM builds, but ./configure && make
produces libz.a. The previous commit fixed third_party/tcl_cmake/ but
missed the root CMakeLists.txt and tests/TestInstall/CMakeLists.txt.

This caused link failures:
  No rule to make target '../../lib/libzlibstatic.a', needed by '...exe'
The ZLIB_STATIC_LIB variable was set to libzlibstatic.a (CMake build
output name) in 3 locations for MSYSTEM builds, but ./configure && make
produces libz.a. The previous commit fixed third_party/tcl_cmake/ but
missed the root CMakeLists.txt and tests/TestInstall/CMakeLists.txt.

This caused link failures:
  No rule to make target '../../lib/libzlibstatic.a', needed by '...exe'
This file is included by 16 subdirectory CMakeLists.txt files and sets
up the imported zlib target. It was the actual source of the link errors:
  No rule to make target '../../lib/libzlibstatic.a', needed by '*.exe'

Change ZLIB_STATIC_LIB from libzlibstatic.a to libz.a to match the
system zlib library name on MSYS2/MinGW.
This file is included by 16 subdirectory CMakeLists.txt files and sets
up the imported zlib target. It was the actual source of the link errors:
  No rule to make target '../../lib/libzlibstatic.a', needed by '*.exe'

Change ZLIB_STATIC_LIB from libzlibstatic.a to libz.a to match the
system zlib library name on MSYS2/MinGW.
…ndalone-ci

Fix standalone CI: make power_calculator.xlsx embedding conditional
Upgrade bundled zlib from 1.2.11 to 1.3.1
The bundled envs/litex/bin/python3 is a Linux x86-64 ELF binary
that cannot execute on macOS, causing 'execve: Exec format error'
for all IP generator tests (ip_fifo_generator, ip_on_chip_memory,
ip_dsp_generator).

IPCatalog::getPythonPath() found this binary and cached it,
preventing the fallback to system python3 from ever triggering.

Fix: After locating the candidate Python binary, verify it has
the execute bit set. On macOS, additionally check the file magic
bytes to reject Linux ELF binaries (magic: 0x7f ELF). When
rejected, getPythonPath() returns empty, which triggers the
existing fallback logic in buildLiteXIPFromGenerator() to use
the system python3 interpreter.
When the bundled envs/python3.8 directory does not exist (e.g. macOS
builds without the litex environment), unconditionally setting
PYTHONHOME poisons the fallback to system python3, causing:
  Fatal Python error: Failed to import encodings module

Only set PYTHONHOME and LD_LIBRARY_PATH when the directory is actually
present.
The compiler_power_calc_resources.qrc object is compiled into
libcompiler.a but never pulled into the final aurora binary because
no symbol references it — the linker discards unreferenced objects
from static archives.

Add Q_INIT_RESOURCE(compiler_power_calc_resources) before the resource
is opened. This forces the linker to include the resource initializer.
Use a HAS_POWER_CALC_RESOURCE compile definition (set only when
POWER_CALCULATOR_XLSX is provided) so standalone FOEDAG builds without
the xlsx continue to work.

Fixes all 12 EPSON TSMC 12nm sanity test failures on macOS (and likely
any other device with dynamic_power enabled in power_template.json).
Q_INIT_RESOURCE must be called from outside any namespace context
because the macro expands to an extern declaration that resolves
in the enclosing namespace. When called inside a member function
of a namespaced class (CompilerOpenFPGA_ql in FOEDAG namespace),
the generated symbol becomes FOEDAG::qInitResources_... which
doesn't match the actual global symbol.

Move the call to a file-scope static helper function that is
called from PowerAnalysis().
Ubuntu 20.04 GitHub-hosted runners have been deprecated and removed.
Jobs targeting ubuntu-20.04 sit in the queue indefinitely.

Replace with ubuntu-24.04 (Noble):
- Add install_dependencies_build_ubuntu2404.sh
- Use libtcmalloc-minimal4t64 (64-bit time_t transition)
- Use distro default GCC (13) instead of PPA gcc-11
- Keep ubuntu-22.04 as the other matrix entry
…init

Fix Q_INIT_RESOURCE namespace linkage for power calculator
@github-actions github-actions Bot added documentation Improvements or additions to documentation build lang-make github labels May 19, 2026
@amin1377 amin1377 closed this May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build documentation Improvements or additions to documentation github lang-make

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants