Skip to content

generate parameters as constexprs#23

Open
emrebayrm wants to merge 1 commit into
HEP-SoC:masterfrom
emrebayrm:feature/generate-parameters-as-constants
Open

generate parameters as constexprs#23
emrebayrm wants to merge 1 commit into
HEP-SoC:masterfrom
emrebayrm:feature/generate-parameters-as-constants

Conversation

@emrebayrm
Copy link
Copy Markdown
Contributor

@emrebayrm emrebayrm commented Apr 15, 2026

parameters defined in addrmap are now generated,
In an rdl like below

addrmap atxmega #(
    longint unsigned VER_MAJOR = 0,
    longint unsigned VER_MINOR = 1,

    longint SOME_MINUS_CONSTANT = -10000000, // This is a problem, those are converted to 2's complement unsigned ints by the rdlcompiler, and they are not represented correctly.
    longint SOME_CONSTANT = 1234
) {
....
}

this is generated as below

namespace atxmega_nm
{
    constexpr uint32_t VER_MAJOR = 0;
    constexpr uint32_t VER_MINOR = 1;
    constexpr uint32_t SOME_MINUS_CONSTANT = 18446744073699551616;
    constexpr uint32_t SOME_CONSTANT = 1234;

....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant