Forum Discussion
Modifying and/or hiding interfaces based on component parameters?
- 3 months ago
After refer to https://docs.altera.com/r/docs/683609/26.1/quartus-prime-pro-edition-user-guide-platform-designer/answers-to-top-faqs
You can do this, but not through ongoing Component Editor edits.
Platform Designer supports parameter-dependent interface visibility via ELABORATION_CALLBACK (see Section 4.7, “Control Interfaces Dynamically with an Elaboration Callback” in the link above).
The expected flow is: create the component once in Component Editor, then manually edit _hw.tcl for callbacks/custom Tcl (Section 4.3). If you reopen that customized component in Component Editor, your custom Tcl is overwritten (Section 4.3 note / 4.3.2).For loading/testing without “New Component”: Platform Designer discovers _hw.tcl from IP search paths during Discovery (Section 4.2). So put your component directory in IP Catalog Search Locations / SEARCH_PATH / user_components.ipx (Sections 2.6.5.1.x and 2.6.5.2), reopen Platform Designer, and instantiate from IP Catalog.
So in short: your approach is valid; use manual _hw.tcl + IP search path discovery, not repeated Component Editor edits.
You create the component with Component Editor first and then you simply edit the _hw.tcl file the tool creates manually. Going back to the Component Editor will always create a new _hw.tcl without your customizations (backs up the previous file as _hw.tcl~).
Thanks for your comment! I am wondering though, how do you then test the _hw.tcl that you've modified? Other than placing the file in the project directory and restarting Platform Designer such that it is reloaded? Feels like there should be an easier way...
- KennyT_altera3 months ago
Super Contributor
After refer to https://docs.altera.com/r/docs/683609/26.1/quartus-prime-pro-edition-user-guide-platform-designer/answers-to-top-faqs
You can do this, but not through ongoing Component Editor edits.
Platform Designer supports parameter-dependent interface visibility via ELABORATION_CALLBACK (see Section 4.7, “Control Interfaces Dynamically with an Elaboration Callback” in the link above).
The expected flow is: create the component once in Component Editor, then manually edit _hw.tcl for callbacks/custom Tcl (Section 4.3). If you reopen that customized component in Component Editor, your custom Tcl is overwritten (Section 4.3 note / 4.3.2).For loading/testing without “New Component”: Platform Designer discovers _hw.tcl from IP search paths during Discovery (Section 4.2). So put your component directory in IP Catalog Search Locations / SEARCH_PATH / user_components.ipx (Sections 2.6.5.1.x and 2.6.5.2), reopen Platform Designer, and instantiate from IP Catalog.
So in short: your approach is valid; use manual _hw.tcl + IP search path discovery, not repeated Component Editor edits.
- KennyT_altera2 months ago
Super Contributor
closing the caes since the soln accepted