Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot alias registers with we = true #173

Closed
Gragaloth opened this issue May 11, 2023 · 2 comments
Closed

Cannot alias registers with we = true #173

Gragaloth opened this issue May 11, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Gragaloth
Copy link

I'm unable to generate an alias of a register where we = true, as I get an error complaining that the aliased copy has we = true when it isn't implementing logic.

field foo_f {
    sw = r;
    hw = rw;
    we = true;
};

reg bar_r {
    foo_f foo;
};

addrmap top {
    //Bar Register
    bar_r bar @0x100;

    //Alias to Bar
    alias bar bar_r bar2 @0x200;
};
aliasing_bug.rdl:4:5: error: Use of 'we' property on field 'foo' that does not implement storage does not make sense
    we = true;
    ^^
fatal: Elaborate aborted due to previous errors

The spec requires the hardware properties of the alias to be identical (10.5.1), so it would be nice if alias registers ignored this check on we.

@amykyta3
Copy link
Member

Agree this is a bug. Alias registers naturally do not have their own storage element, but it looks like the rule check isn't waived if it is an alias.

Thanks for finding this.

@amykyta3 amykyta3 added the bug Something isn't working label May 11, 2023
@amykyta3 amykyta3 self-assigned this May 12, 2023
@amykyta3
Copy link
Member

amykyta3 commented Jun 9, 2023

Fixed in v1.26.0

@amykyta3 amykyta3 closed this as completed Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants