Jump to content

What does the field has value and name mean in IP-XACT?


carter

Recommended Posts

To make register model from IP-XACT usually we do the implement XML as I know.
I came across the example as below, But I didn't get the usage of value and name in the field.
You can see the K0, K1, K2 and K3 Also 0,1,2 and 3 are implemented under the field.

Could you guide me please If the field has value and name, how does it work? what is the purpose of them?

 

  <spirit:field>
            <spirit:name>frame_kind</spirit:name>
            <spirit:bitOffset>14</spirit:bitOffset>
            <spirit:bitWidth>2</spirit:bitWidth>
            <spirit:values>
              <spirit:value>0</spirit:value>
              <spirit:name>k0</spirit:name>
              <spirit:description>0</spirit:description>
            </spirit:values>
            <spirit:values>
              <spirit:value>1</spirit:value>
              <spirit:name>k1</spirit:name>
            </spirit:values>
            <spirit:values>
              <spirit:value>2</spirit:value>
              <spirit:name>k2</spirit:name>
            </spirit:values>
            <spirit:values>
              <spirit:value>3</spirit:value>
              <spirit:name>k3</spirit:name>
            </spirit:values>
            <spirit:vendorExtensions>
              <vendorExtensions:type>framek</vendorExtensions:type>
              <!--vendorExtensions:hdl_path>frame</vendorExtensions:hdl_path-->
            </spirit:vendorExtensions>
          </spirit:field>
Link to comment
Share on other sites

Hi,

Your XML fragment is not a valid IP-XACT XML fragment because it does not adhere to the XML schema. Assuming you use IEEE Std. 1685-2009, your XML fragment should be written as:

                    <spirit:field>
                        <spirit:name>frame_kind</spirit:name>
                        <spirit:bitOffset>14</spirit:bitOffset>
                        <spirit:bitWidth>2</spirit:bitWidth>
                        <spirit:enumeratedValues>
                            <spirit:enumeratedValue>
                                <spirit:name>k0</spirit:name>
                                <spirit:description>0</spirit:description>
                                <spirit:value>0</spirit:value>
                            </spirit:enumeratedValue>
                            <spirit:enumeratedValue>
                                <spirit:name>k1</spirit:name>
                                <spirit:value>1</spirit:value>
                            </spirit:enumeratedValue>
                            <spirit:enumeratedValue>
                                <spirit:name>k2</spirit:name>
                                <spirit:value>2</spirit:value>
                            </spirit:enumeratedValue>
                            <spirit:enumeratedValue>
                                <spirit:name>k3</spirit:name>
                                <spirit:value>3</spirit:value>
                            </spirit:enumeratedValue>
                        </spirit:enumeratedValues>
                        <spirit:vendorExtensions>
                            <vendorExtensions:type>framek</vendorExtensions:type>
                            <!--vendorExtensions:hdl_path>frame</vendorExtensions:hdl_path-->
                        </spirit:vendorExtensions>
                    </spirit:field>

The enumerated values are possible values of the field which have been given a name.

Best regards,
Erwin

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