carter Posted June 10, 2022 Report Share Posted June 10, 2022 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> Quote Link to comment Share on other sites More sharing options...
kock Posted June 10, 2022 Report Share Posted June 10, 2022 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 carter 1 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.