Jump to content

Interleaved registers

Recommended Posts

A common question I get from users regarding the SystemRDL 2.0 standard is whether interleaved arrays of registers (or addrmap, regfile, etc) are allowed.

The spec is extremely vague about the specific semantics regarding what is/is not allowed regarding addressing.

Do SystemRDL semantics allow something like this?

addrmap test {
    field my_field {};

    reg {
        my_field f[0:0] = 0; 
    } array1[2] @ 0x0 += 0x8;

    reg {
        my_field f[0:0] = 0;
    } array2[2] @ 0x4 += 0x8;

Technically the elements of the arrays do not collide due to the offset address allocation and larger stride, but I was wondering if arrays are treated as a strict block or not.

Generally this is something that I would not encourage since it causes compatibility issues in some language definitions (C structs), but the topic seems to come up often enough that I should seek for clarification.

Link to comment
Share on other sites

  • 4 weeks later...

I agree that most device driver languages do not allow interleaving of objects.  Also, IP-XACT and UVM do not allow this kind of interleaving. The committee did not consider interleaving. Interleaving is not explicitly allowed or described by the standard and I would that alone would disallow it.  I will vote to make interleaving explicitly illegal in the next version.  Also, an array of regfile containing regs should be used instead of interleaving register arrays. 

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.

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