Skip to content

Conversation

@jopperm
Copy link
Contributor

@jopperm jopperm commented Mar 9, 2023

This is not a generic solution I yet; I mainly need this (and tested it for) writing constant registers like:

architectural_state {
  const register unsigned<8> ROT_0[4] = {31, 17, 0, 24};
  const register unsigned<8> ROT_1[4] = {24, 17, 31, 16};
  const register unsigned<32> RCON[8] =
      {0xB7E15162, 0xBF715880, 0x38B4DA56, 0x324E7738,
      0xBB1185EB, 0x4F7C7B57, 0xCFBFA1C8, 0xC2B3293D};
}

@jopperm jopperm marked this pull request as ready for review March 13, 2023 16:12
@jopperm
Copy link
Contributor Author

jopperm commented Mar 13, 2023

@AtomCrafty Can you have a quick look, please?

Copy link
Contributor

@AtomCrafty AtomCrafty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me for the most part. This is the correct place to perform these checks.
I believe we also need to check that all of the initializer values are constant expressions in case this is an ISA level initialization.

jopperm and others added 2 commits March 14, 2023 09:03
…yzer.xtend

Co-authored-by: AtomCrafty <welzig@frucost.net>
@jopperm jopperm merged commit 954383d into develop Mar 14, 2023
@jopperm jopperm deleted the list-init branch March 14, 2023 08:28
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.

3 participants