Set FPGA top entity from the project explorer and restore the top entity indicator#249
Merged
Merged
Conversation
Co-authored-by: hendrikmennen <25281882+hendrikmennen@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Enhance project explorer to set toplevel entity
Set FPGA top entity from the project explorer and restore the top entity indicator
Jun 22, 2026
hendrikmennen
approved these changes
Jun 24, 2026
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.
Since the top entity rework, the top entity could only be set through project settings, and the file containing it was no longer visually identifiable. This adds a context-menu shortcut to set the top entity and reinstates the indicator overlay with a new meaning.
Changes
UniversalFpgaProjectManager— HDL files (.vhd,.vhdl,.v,.sv) now expose a Set Top Entity submenu with one entry per entity/module declared in the file (extracted via the file'sINodeProvider). Selecting one setstopEntityand saves; the active entity is marked with a check icon.topEntitymodel.UniversalFpgaProjectRoot.TopEntityFilePath— new runtime-only (non-persisted) cache resolvingtopEntity→ owning file viaFpgaService.GetAllTopEntitiesAsync. The manager recomputes it on project load/reload and subscribes totopEntitychanges, so the indicator stays correct regardless of where the top entity is changed (context menu, settings, pin planner).UniversalProjectRoot.InvalidateAllModifications()— reusable helper to re-run entry modification handlers across all loaded entries when project-wide state changes.topEntityFilereference and documented the new behavior.Notes for reviewers
ObservableCollectionand filled on the UI thread once parsing completes.topEntitychanges and reloads trigger recomputation) — an intentional edge-case trade-off to avoid re-scanning on unrelated property changes.