Forum Discussion

wa_itd's avatar
wa_itd
Icon for New Contributor rankNew Contributor
25 days ago
Solved

Modifying and/or hiding interfaces based on component parameters?

I am working in Quartus Prime 26.1 with Platform Designer. I have created a _hw.tcl file for my new component. I would like to hide some interfaces based on the component parameters; for example, "Enable AXI-Stream Output" would un-hide an optional AXI-Stream interface.

I have tried using an elaboration callback (described here), but Platform Designer complains upon loading the _hw.tcl file, stating that the "Component Editor does not save TCL callbacks", and asks me to remove the callback.

I cannot replace ENABLE true with ENABLE [get_parameter_value ... ] either; this also causes an error.

Any help would be greatly appreciated!

  • 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.

5 Replies

  • wa_itd's avatar
    wa_itd
    Icon for New Contributor rankNew Contributor

    I have since discovered that there is no problem if the _hw.tcl is loaded without the Component Editor GUI. So, perhaps the following questions are more important:

    • How is it possible to load a _hw.tcl file without clicking "New Component" (thus opening the Component Editor)?
    • How can you use callbacks when the _hw.tcl file is not located in the project directory?
    • sstrell's avatar
      sstrell
      Icon for Super Contributor rankSuper Contributor

      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~).

      • wa_itd's avatar
        wa_itd
        Icon for New Contributor rankNew Contributor

        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...