Is it possible to create Qsys component in such a way that its interfaces can be changed based on options selected in Qsys when we are about to add it? e.g we can select how many Avalon sink interfaces the component should have at time of adding it and then when the component is added, the HDL file will be updated accordingly.
I believe something like this should be possible with the use of "callback" procedures in the _hw.tcl file. However, I have not used them yet. I don't know if the callback function can invoke changing the actual interface of the Qsys component and it will immediately reflect in Qsys just before we add the component.
BTW it's Platform Designer, not Qsys anymore.
Do you mean the off-the-shelf IP in the IP Catalog or custom components?
You can do whatever you want when creating a custom component, including adding parameters and callbacks in the _hw.tcl to do what you mention. For off-the-shelf, in the Pro edition you can actually change the component footprint when you add the component to the system (Component Instantiation tab), but there won't necessarily be a parameter to add more interfaces.
Platform designer is quite a long name and not as cool and specific as Qsys.
Anyway, I was referring to custom components. How would the call back functions be used to add new interfaces into the component itself e.g extra Avalon-ST components when the component is added into Platform Designer? Is there an example of how this can be done.
I recently found out about the call back function thing, it is quite interesting. However, I am not sure about its limitations.
You may need to refer to link below related to Control Interfaces Dynamically with an Elaboration Callback. You can allow user parameters to dynamically control your component's behavior with an elaboration callback procedure during the elaboration phase. Using an elaboration callback allows you to change interface properties, remove interfaces, or add new interfaces as a function of a parameter value.