Jump to content

How to replicate multiple register sets using parameters or any other feature in IPXACT


PrashanthP

Recommended Posts

Hello.

I have a use case wrto IPXACT where in we have a register set

image.png.45a8da99c3e0b0f01c4525c044cc69f8.pngimage.png.e651d4fef1faa69792c3f85fbfd92c8b.pngimage.png.35288930c9b65be05b191cda9ed49d66.pngLet us say we have 3 register sets. Register names are same but their offset addresses are different.

Is there any parameter feature in IPXACT where in if we set parameter to be 4 then we have 4 sets of registers created with their respective offset addresses as mentioned above.

Request to help me on this. 

Thanks in Advance,

Prashanth

Link to comment
Share on other sites

You need to avoid embedding "instantiation" information in the register name itself. Arrays are very useful in the address map, and you don't need to uniquify the names when you leverage them.

For example,
 

<registerFile>
  <name>RfGrp</name>
  <dim>3</dim>

  <register>
    <name>Reg1</name>
  </register>
  <register>
    <name>Reg2</name>
  </register>
  <register>
    <name>Reg3</name>
  </register>
  <register>
    <name>Reg4</name>
  </register>
</registerFile>

Then, your names are defined by path, so instead of Reg1_0 you have RfGrp[0].Reg1

Your IP-XACT logical representation doesn't have to match exactly to the implementation (e.g. RTL module), but if they do differ and you want to use backdoor paths in UVM RAL or similar, you can add accessHandles to specify the "view" specific names.

And as for the parameter part, dim is an positiveUnsignedIntExpression, so you can reference a parameter which will adjust the dimensionality.

 

<component>
  <parameters>
    <parameter parameterId="N" resolve="user" type="int" signed="false" minimum="1">
      <name>N</name>
      <value>3</value>
    </parameter>
  </parameters>
  <!-- ... -->
  <registerFile>
    <dim>N</dim>
  </registerFile>
</component>

 

Link to comment
Share on other sites

image.png.f6936be3e641106efd22fd67ec4e3872.png

 

Can you please check this snippet where it is written inside an addressblock. And based on dim PARAM, those many sets of registers will be created. Can you help with the offset address that i require as per the tables given in above comments.

Thanks,

Prashanth

Link to comment
Share on other sites

Hi Prashanth,

Your register offsets are correct. Since the offset of the register file is 0x2000, the register are located at 0x2000, 0x2004, 0x2008, and 0x200C. For the next occurrence of the register file, you add the register file range: 0x2020, 0x2024, 0x2028, and 0x202C.

Best regards,
Erwin

Link to comment
Share on other sites

Hi Erwin,

I did not understand what you said in last comment. You want me to create another register file or for regfile[1] how can i proceed so that register offst addresses should be 1*0x20+0x0,1*0x20+0x4 and so on. 

Could you please add some snippet on same for more understanding on this.

 

Thanks and Regards,

Prashanth

Link to comment
Share on other sites

Sorry for the confusion. You do not need to "add" anything. The next occurrence of the register file is at offset + 0x20 (the range). So the register file array element are at 0x2000, 0x2020, 0x2040 .... Within each register file element you have the registers at offsets 0x0, 0x4, 0x8 and 0xC. The XML snippet is the same as yours above.

Link to comment
Share on other sites

Hi Erwin. thanks for the validation.

I need small info. How can i cross check whether registers with in register file is mapped properly as intended. Are there any built in methods for uvm_reg_file that i can use to check from where a register file is starting and its respective registers ?

 

Thanks and Regards,

Prashanth

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