Skip to content

[BUG] alignment not working for registers in arrays #82

@elodg

Description

@elodg

I expect each r64 instance to be aligned to 8 bytes, which is not happening. For example, am.rfa[1].r64 begins at 0x0c.

addrmap am{
    addressing = regalign;
    default accesswidth = 32;
    regfile {
        reg {
            regwidth = 64;
            field {
                fieldwidth = 64;
            } f;
        } r64 %=8;
        reg {
            regwidth = 32;
            field {
                fieldwidth = 32;
            } f;
        } r32;
    } rfa[8];
};

$ peakrdl dump test.rdl -u
0x00-0x07: am.rfa[0].r64
0x08-0x0b: am.rfa[0].r32
0x0c-0x13: am.rfa[1].r64
0x14-0x17: am.rfa[1].r32
0x18-0x1f: am.rfa[2].r64
0x20-0x23: am.rfa[2].r32
0x24-0x2b: am.rfa[3].r64
0x2c-0x2f: am.rfa[3].r32
0x30-0x37: am.rfa[4].r64
0x38-0x3b: am.rfa[4].r32
0x3c-0x43: am.rfa[5].r64
0x44-0x47: am.rfa[5].r32
0x48-0x4f: am.rfa[6].r64
0x50-0x53: am.rfa[6].r32
0x54-0x5b: am.rfa[7].r64
0x5c-0x5f: am.rfa[7].r32

Peakrdl version 1.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions