build: efinix: fix backend defaults, project generation, and toolchain detection.#2440
Merged
enjoy-digital merged 4 commits intomasterfrom Apr 2, 2026
Merged
build: efinix: fix backend defaults, project generation, and toolchain detection.#2440enjoy-digital merged 4 commits intomasterfrom
enjoy-digital merged 4 commits intomasterfrom
Conversation
Programmatic Efinix builds were still starting from empty efx_map and efx_pnr parameter dictionaries, so the Efinity 2025.2 work_dir workaround only took effect for CLI flows using build_argdict(). Share the default parameter construction between build() and build_argdict() so both entry points get the same map, pnr and pgm defaults. Also forward infer-sync-set-reset, which was parsed but never emitted into the generated project settings. Add focused unit tests for the CLI argdict and direct build() path.
The Efinix project XML was forcing every non-header design file into the default library, which breaks non-default VHDL library layouts. Header files still need the default bucket, but regular Verilog and VHDL sources should keep the library selected by the platform. Also fix SEU auto-mode generation to look up wait_interval as a dict key. The previous hasattr() check was always false, so WAIT_INTERVAL never reached the generated interface script. Extend the focused Efinix unit tests to cover both cases.
The Efinix platform and programmer claimed PATH-based discovery worked, but both code paths hard-required LITEX_ENV_EFINITY and duplicated the setup.sh environment parsing logic. Introduce a shared helper that resolves the Efinity root from either LITEX_ENV_EFINITY or common PATH-exposed tools, and reuse it from the platform, programmer and backend build flow. While touching the programmer, stop relying on process-global EFINITY_HOME and use the resolved toolchain path directly for bridge images. Extend the focused Efinix unit tests to cover PATH fallback and shared environment loading.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes the issues found during review of the Efinix build backend integration.
infer-sync-set-resetinto generated Efinity project settingsWAIT_INTERVALis emitted when requestedLITEX_ENV_EFINITYor tools exposed onPATH