Jump to content

IP-XACT 1685-2014 TGI getConfigurableElementIDs definition


Recommended Posts

Hi,

It's not quite clear to me what the TGI API getConfigurableElementIDs input unconfiguredElementID param and output configurableElementIDs refer to. There are only ipxact:configurableElementValues and ipxact:configurableElementValue mentioned in the IP-xact schema.

Here is the definition of the API:

F.7.35.1 getConfigurableElementIDs
Description: Returns all configurableElementIDs of the given unconfigured element
— Returns: configurableElementIDs of type String[] - List of configurable element handles
— Input: unconfiguredElementID of type String - Handle to an unconfigured element

In below example, which part corresponds to configurableElement and unconfiguredElement?

<ipxact:design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ipxact="http://www.accellera.org/XMLSchema/IPXACT/2.0" xsi:schemaLocation="http://www.accellera.org/XMLSchema/IPXACT/2.0/index.xsd">
...
  <ipxact:componentInstances>
   <!-- LINK: componentInstance: see 7.2, Design component instances -->
   <ipxact:componentInstance>
     <ipxact:instanceName>U1</ipxact:instanceName>
     <ipxact:componentRef vendor="accellera.org" library="Sample" name="SampleComponent" version="1.0">
     <ipxact:configurableElementValues>
     <ipxact:configurableElementValue referenceId="comp_dual_mode">0</ipxact:configurableElementValue>
     </ipxact:configurableElementValues>
     </ipxact:componentRef>
   </ipxact:componentInstance>
   <ipxact:componentInstance>
     <ipxact:instanceName>U2</ipxact:instanceName>
     <ipxact:componentRef vendor="accellera.org" library="Sample" name="SampleComponent" version="1.0">
     </ipxact:componentRef>
   </ipxact:componentInstance>
   <ipxact:componentInstance>
     <ipxact:instanceName>U3</ipxact:instanceName>
     <ipxact:componentRef vendor="accellera.org" library="Sample" name="SampleComponent" version="1.0">
     </ipxact:componentRef>
   </ipxact:componentInstance>
  </ipxact:componentInstances>
...
</ipxact:design>

 

thanks,

yohuang

Link to comment
Share on other sites

Hi Yohuang,

In your example, you can get an unconfigured componentID assuming that you have a configured componentInstanceID for instance U1 as follows:

String componentID = getUnconfiguredID( componentInstanceID )

This componentID can also be obtained in another way, for instance, through the VLNV of the component.

If you apply getConfigurableElementIDs on the componentID, you get the IDs of the component parameters that are configurable (meaning that they can be set by a configurable element)

String[] parameterIDs = getConfigurableElementIDs( componentID )

Best regards,
Erwin

Link to comment
Share on other sites

Thanks for quick response.

So the resulting parameterIDs correspond to the parameterId attribute values in ipxact:moduleParameter elements and thus equal to new String[] { "id_B", "id_C" } in below example, right?

<ipxact:component>
  <ipxact:moduleParameters>
    <ipxact:moduleParameter parameterId="id_B" resolve="user">
      <ipxact:name>pB</ipxact:name>
      <ipxact:value>1</ipxact:value>
    </ipxact:moduleParameter>
    <ipxact:moduleParameter parameterId="id_C" resolve="user">
      <ipxact:name>pC</ipxact:name>
      <ipxact:value>1</ipxact:value>
    </ipxact:moduleParameter>
  </ipxact:moduleParameters>
  ...
</ipxact:component>


The configurableElement and configuredElement are a bit hard to understand at first look, and now becomes clearer after you explained.

 

For a hierarchical design, the configuration to the leaf module might be from any level of the hierarchy, e.g., the top most component via its moduleParameter default value or via parent component’s design configuration. The leaf module can be configured many times when we go upper the hierarchy. Will we create many configured copies of the leaf component in the TGI library? 

 

 

thanks,

yohuang

Edited by xjtu.yohuang
Link to comment
Share on other sites

Hi Yohang,

No, the parameterIDs that I mentioned are handles to the ipxact:parameter or ipxact:moduleParameter elements. You can get the values of the parameterId attributes using the TGI calls

String value = getAttributeValue( parameterID, "parameterId" )  // Returns resolved expression value

String valueExpression = getAttributeValueExpression( parameterID, "parameterId" )  // Returns expression

Indeed, you can pass down parameter values through the hierarchy. In order to get the configured parameter values, you have to propose them from the top. A designInstantiation element passes actual parameter values to design. So that designID needs to be a configured one rather than an unconfigured one in order to take the value from the designInstantiation element. If not, the default values of the design parameters are used.

Best regards,
Erwin

 

Link to comment
Share on other sites


Hmm, below component has both ipxact:parameters and ipxact:moduleParameters, do you mean the parameterIDs String array would contain the IDs of both ipxact:parameter and ipxact:moduleParameter? The ip-xact spec and user guide do not have clear definition on the configurableElements which makes it hard to understand the spec sometimes.

<?xml version="1.0" encoding="UTF-8"?>
<ipxact:component xmlns:ipxact="http://www.accellera.org/XMLSchema/IPXACT/1685-2014"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.accellera.org/
XMLSchema/IPXACT/1685-2014 http://www.accellera.org/XMLSchema/IPXACT/1685-2014/index.xsd">
 <ipxact:vendor>accellera.org</ipxact:vendor>
 <ipxact:library>ug</ipxact:library>
 <ipxact:name>A</ipxact:name>
 <ipxact:version>2.0</ipxact:version>
 <ipxact:model>
 <ipxact:views>
   <ipxact:view>
     <ipxact:name>rtl</ipxact:name>
     <ipxact:componentInstantiationRef>hdl-rtl</ipxact:componentInstantiationRef>
     <ipxact:designInstantiationRef>hdl-rtl_design</ipxact:designInstantiationRef>
     <ipxact:designConfigurationInstantiationRef>hdl-rtl_design_cfg</ipxact:designConfigurationInstantiationRef>
   </ipxact:view>
 </ipxact:views>
 <ipxact:instantiations>
   <ipxact:componentInstantiation>
   <ipxact:name>hdl-rtl</ipxact:name>
   <ipxact:language>Verilog</ipxact:language>
   <ipxact:moduleName>A</ipxact:moduleName>
   <ipxact:moduleParameters>
     <ipxact:moduleParameter>
       <ipxact:name>pA</ipxact:name>
       <ipxact:value>param_A1</ipxact:value>
     </ipxact:moduleParameter>
   </ipxact:moduleParameters>
   </ipxact:componentInstantiation>
   <ipxact:designInstantiation>
     <ipxact:name>hdl-rtl_design</ipxact:name>
     <ipxact:designRef vendor="accellera.org" library="ug" name="A_design" version="2.0"/>
   </ipxact:designInstantiation>
   <ipxact:designConfigurationInstantiation>
     <ipxact:name>hdl-rtl_design_cfg</ipxact:name>
     <ipxact:designConfigurationRef vendor="accellera.org" library="ug" name="A_design_cfg" version="2.0">
     <ipxact:configurableElementValues>
       <ipxact:configurableElementValue referenceId="id_A3">param_A1*param_A2</ipxact:configurableElementValue>
     </ipxact:configurableElementValues>
     </ipxact:designConfigurationRef>
   </ipxact:designConfigurationInstantiation>
   </ipxact:instantiations>
 </ipxact:model>
 <ipxact:parameters>
   <ipxact:parameter parameterId="id_A1" resolve="user">
     <ipxact:name>param_A1</ipxact:name>
     <ipxact:value>3</ipxact:value>
   </ipxact:parameter>
   <ipxact:parameter parameterId="id_A2" resolve="user">
     <ipxact:name>param_A2</ipxact:name>
     <ipxact:value>4</ipxact:value>
   </ipxact:parameter>
 </ipxact:parameters>
</ipxact:component>

 

thanks,

yohuang

Link to comment
Share on other sites

Ok, I found this in the p35 of IEEE Std 1685-2022 spec:

configurable element: An element in an IP-XACT description that can be set to a new value by a user,
generator, or dependency equation. This includes all elements with a resolve attribute of user or generated.

So configurableElement includes the ipxact:moduleParameter and ipxact:parameter elements which have the attribute resolve="user" or resolve="generated".

Given the componentID, the configurableElmenet should include the ipxact:parameter(s) w/ resolve="user" or "generated" in elements ipxact:component, ipxact:designConfigurationInstantiation and ipxact:componentInstantiation, and also the ipxact:moduleParameters in elements  ipxact:componentInstantiation.

 

thanks,

Justin

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...