Jump to content

Array of registers


rahuljn

Recommended Posts

Hi Folks

 

I have a scenario where I have 32 identical register which are placed equally spaced in the memory map but there is some unused space beetween them.

For example, register are 32 bit wide and located at 0x0, 0x10, 0x20,.....

Do I need to write all 32 instances speartely in the IP-XACT ?

I see there is a dim element but I think it is for the cases when there is no gaps between successive registers.

Is there a way to write such registers in a compact way in IP-Xact ?

 

Thanks

RahulJn

Link to post
Share on other sites
  • 3 weeks later...

Hi Rahul,

 

This is how we modelled this scenario:

 

        <spirit:register>
          <spirit:name>REG_A</spirit:name>
          <spirit:addressOffset>0x0</spirit:addressOffset>
          <spirit:size>32</spirit:size>
          <spirit:field>
            <spirit:name>FIELD_A</spirit:name>
            <spirit:bitOffset>0</spirit:bitOffset>
            <spirit:bitWidth>32</spirit:bitWidth>
            <spirit:access>read-write</spirit:access>
          </spirit:field>
          <spirit:vendorExtensions>
            <vendorExtensions:array xmlns:vendorExtensions="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1.5">
              <vendorExtensions:x_from>0</vendorExtensions:x_from>
              <vendorExtensions:x_to>31</vendorExtensions:x_to>
              <vendorExtensions:offset_calc>0x0 + ( x * 16 )</vendorExtensions:offset_calc>
            </vendorExtensions:array>
          </spirit:vendorExtensions>

        </spirit:register>
 

vendorExtensions helps us to capture the array of registers inside an existing address space or register file.

 

This approach does not need a new register file inside your address_block.

Link to post
Share on other sites

Hi Mark

 

When I model this using register file. I have some schema complaincy error.

In my IP-XACT, can I have a registerFile followed by a register and again followed by a registerFile ?

For example

<spirit:registerFile>

..

</spirit:registerFile>

<spirit:register>

..

</spirit:register>

<spirit:registerFile>

..

</spirit:registerFile>

 

As per the schema, it says we need to put all registers together and followed by all registerFiles together.

 

But I want to keep all registers (including registers within registerFile) in increasing offset order.

Can we do that

 

 

Thanks

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...