Jump to content

How to set the attributes per each fields on the register?


Recommended Posts

Hi, 

I'm trying to set attributes per each fields of one register.

 

My register xml is like the below 

The register "ureg0" has 3 fields "destination". "frame_kind" and "rsvd".

I want to set the attribute of "NO_REG_ACCESS_TEST" into the  "rsvd" field. not the whole field in a "ureg0".

 

 

 <spirit:vendor>accellea.org</spirit:vendor>
  <spirit:library>uvm_reg_example</spirit:library>
  <spirit:name>example_xml</spirit:name>
  <spirit:version>1.4</spirit:version>
  <spirit:memoryMaps>
    <spirit:memoryMap>
      <spirit:name>mmap0</spirit:name>
      <spirit:addressBlock>
        <spirit:name>rfile0</spirit:name>
        <spirit:baseAddress>0</spirit:baseAddress>
        <spirit:range>40</spirit:range>
        <spirit:width>32</spirit:width>
        <spirit:register>
          <spirit:name>ureg0</spirit:name>
          <spirit:addressOffset>0</spirit:addressOffset>
          <spirit:size>32</spirit:size>
          <spirit:field>
            <spirit:name>destination</spirit:name>
            <spirit:bitOffset>0</spirit:bitOffset>
            <spirit:bitWidth>14</spirit:bitWidth>
          </spirit:field>
          <spirit:field>
            <spirit:name>frame_kind</spirit:name>
            <spirit:bitOffset>14</spirit:bitOffset>
            <spirit:bitWidth>2</spirit:bitWidth>
           </spirit:field>
          <spirit:field>
            <spirit:name>rsvd</spirit:name>
            <spirit:bitOffset>16</spirit:bitOffset>
            <spirit:bitWidth>16</spirit:bitWidth>
            <spirit:vendorExtensions>

I came across one example  "NO_REG_ACCESS_TEST" into the "my_reg[0]" register. But this way is a just set to the whole of one register not each fields. I want to know how do I set per each fields

          <spirit:vendorExtensions>
            <vendorExtensions:hdl_path>myreg[0]</vendorExtensions:hdl_path>
            <vendorExtensions:attributes>
              <vendorExtensions:attribute type="bit">
                <vendorExtensions:name>NO_REG_ACCESS_TEST</vendorExtensions:n
                <vendorExtensions:value>1</vendorExtensions:value>
              </vendorExtensions:attribute>
          </spirit:vendorExtensions>

 

Could you guide me how do I set the attribute per each fields not just set the whole of one register?

Thank you in advance.

 

Link to comment
Share on other sites

  • carter changed the title to How to set the attributes per each fields on the register?

Hello,

You are working with vendor extensions here. The IP-XACT TGI functions only allow you to create or remove the entire spirit:vendorExtensions fragment. There is no standard support to work on fragment inside the vendor extensions since that content is not part of the standard. Vendor extensions are supported inside the register element as well as inside the field element. You need to work together with your EDA vendor to align on the meaning of the vendor extensions and how you can create/edit them efficiently. There is no standard solution.

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.

 Share

×
×
  • Create New...