Khushi Posted January 25, 2023 Report Share Posted January 25, 2023 Hello How to link subsystem level parameter to components under that subsystem. For example, I have some module with condifurable width for sockets. I created that leaf with a module parameter and make their sockets dependent on that parameter. Now when I instantiate this module in a subsystem, instead of providing the hardcoded value for the socket width, I want to make it dependent on subsystem parameter so that subsystem instatiation will derive the socket width. Really great if there exists some example for this. Thank you Khushi Quote Link to comment Share on other sites More sharing options...
kock Posted January 30, 2023 Report Share Posted January 30, 2023 Hello Kushi, In 1685-2014, you can add configurable element values to the designRef element inside designInstantiation: <ipxact:designInstantiation> <ipxact:name>RTL_cfg</ipxact:name> <ipxact:designRef vendor="accellera.org" library="ipxact-wg" name="design" version="0.0"> <ipxact:configurableElementValues> <ipxact:configurableElementValue referenceId="myParameterId">A_id*B_id</ipxact:configurableElementValue> </ipxact:configurableElementValues> </ipxact:designRef> </ipxact:designInstantiation> Here the value of the configurableElementValue is expression A_id*B_id. The terms are parameter IDs of parameters in this component: <ipxact:parameters> <ipxact:parameter parameterId="A_id" resolve="user" type="longint"> <ipxact:name>A</ipxact:name> <ipxact:value>2</ipxact:value> </ipxact:parameter> <ipxact:parameter parameterId="B_id" resolve="user" type="longint"> <ipxact:name>B</ipxact:name> <ipxact:value>2</ipxact:value> </ipxact:parameter> </ipxact:parameters> The referenceId value "myParameterId" is referencing a parameter ID in your leaf component. Please note that there are rules to separate two classes of parameters: view-specific parameters and view-independent parameters. View-specific parameters are parameters and moduleParameters in a component componentInstantiation, a component designConfigurationInstantiation, and in designConfiguration elements. You are not allowed to reference view-specific parameters outside of these mentioned elements. Hence, if you use reference a parameter in a port (in your case a socket), then this parameter cannot be a moduleParameter (since that is inside componentInstantation). To solve this, you have to create a component parameter P then and create a separate module parameter MP with a value P (so you can reference a view-independent parameters inside view-specific elements). You can then reference parameter P in the port also. Best regards, Erwin Quote Link to comment Share on other sites More sharing options...
Khushi Posted January 31, 2023 Author Report Share Posted January 31, 2023 Thank you Erwin. In your example the "myParameterId" is a component parameter or design parameter ? I see it is referenced in designRef so I think this is a parameter defined in the design. Can you confirm this ? Also what is the use of configurableElementValue under designConfigurationInstantiaton ? Thank you Khushi Quote Link to comment Share on other sites More sharing options...
kock Posted February 1, 2023 Report Share Posted February 1, 2023 Hello Kushi, Indeed myParameterId is a parameterId of a parameter in the design that is referenced by <ipxact:designRef vendor="accellera.org" library="ipxact-wg" name="design" version="0.0">. The configurableElementValue under designConfigurationInstantiaton sets the actual value of the parameter with parameterId myParameterId for this specific instantiation of the design with VLNV vendor="accellera.org" library="ipxact-wg" name="design" version="0.0". Best regards, Erwin Quote Link to comment Share on other sites More sharing options...
Jason H Posted April 10, 2023 Report Share Posted April 10, 2023 @Khushi The existing IP-XACT User Guide from 2018 has an example of parameter passing. If you are like me, you will need to read through it several times, then play with the example to fully understand it. It's far more complex than parameter passing in a language like SystemVerilog. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.