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

reset value for array #63

Closed
soleshka opened this issue Sep 22, 2020 · 3 comments
Closed

reset value for array #63

soleshka opened this issue Sep 22, 2020 · 3 comments
Labels
duplicate This issue or pull request already exists question Further information is requested

Comments

@soleshka
Copy link

soleshka commented Sep 22, 2020

Hello,
I have found this compiler a very useful for my register description.
The only issue i hit is how to reset an array ?

I ma trying to do something like:

			reg R003_IPATOV {
				name = "R003_IPATOV";
				hdl_path   	= "";
				field {name = "field1";} field1[31:0]=0x0;
			}R003_IPATOV[8] = '{};

But i fail on compilation.

Is this doable ?

Thank you for the prompt response,
Oleg

@amykyta3
Copy link
Member

Since you already provide a reset value for field1, there is no need to provide a reset value for the array of registers.
In SystemRDL, reset values are only defined for the individual fields, since registers are simply a collection of fields.

@soleshka
Copy link
Author

soleshka commented Sep 23, 2020 via email

@amykyta3
Copy link
Member

Not at the moment. The SystemRDL spec does describe the ability to do this, but this compiler does not support this yet. I may extend support for this feature in the future. See the discussion in #51

Example: (Not supported by this compiler yet)

reg R003_IPATOV {
    field {} field1[31:0] = 0x0;
} R003_IPATOV[8];

R003_IPATOV[0].field1->reset = 1;
R003_IPATOV[1].field1->reset = 2;
R003_IPATOV[2].field1->reset = 3;
R003_IPATOV[3].field1->reset = 4;

@amykyta3 amykyta3 added duplicate This issue or pull request already exists question Further information is requested labels Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants