-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add support for arrays of constants #114
Comments
Question: do we need to be able to evaluate const unsigned int arr[] = {16, 32, 64};
unsigned int XLEN = arr[1]; |
For the usecases I have in mind: no. Does the frontend support const unsigned int c = 32;
unsigned int XLEN = c; |
It does, yes. I'm specifically asking about the array accesses. |
Another question: Should this support multi-dimensional arrays with nested array initializers? const int a[][] = { {1, 2}, {3, 4} }; |
I guess in the long run we need to, I can imagine there are algorithms which need this. So we should start with a 1-dimensional array documenting the limitation. |
CoreDSL shall support arrays of constants ether as:
const unsigned int arr[] = {3,4,5};
which inferes the size or
const unsigned int arr[3] = {3,4,5};
where size has to be specified explicitly.
The text was updated successfully, but these errors were encountered: