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

The SVD needs improvements #1

Open
sajattack opened this issue Nov 28, 2020 · 4 comments
Open

The SVD needs improvements #1

sajattack opened this issue Nov 28, 2020 · 4 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@sajattack
Copy link

I would recommend, before developing HAL further, we should concentrate on improving the SVD and PAC so we have a better foundation. I generated the docs for the PAC, and I can see there are:

  • No/useless documentation for what the peripherals are
  • Duplications of blocks that are identical (ie timer2 and timer3 have the same fields but are totally duplicated)
  • No field accessors / enumeratedValues beyond .bits()
  • No/useless field documentation

So I think we should start by going through the reference manual and updating the SVD.

@mkroman
Copy link
Collaborator

mkroman commented Jan 11, 2021

I asked them if they had an updated SVD, but the one I got unfortunately only has a single change (cks base address changed from 0x4000A000 to 0x4000A700.)

So we might indeed have to update the SVD ourselves.

We should see if we can't combine the work with https://github.com/pine64/bl602-docs/tree/main/hardware_notes somehow.. Maybe we could write a script that generates those tables from the SVD, and then everyone works on the SVD instead.

@mkroman mkroman changed the title SVD needs a lot of work The SVD needs improvements Jan 19, 2021
@mkroman mkroman added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Jan 19, 2021
@mkroman
Copy link
Collaborator

mkroman commented Jan 19, 2021

We've started maintaining our own version of the SVD.

There's already been some great improvements, but there's still a lot that could be better, and there's still details in the above-mentioned hardware notes that haven't made it in yet.

Contributions are welcome!

@sajattack
Copy link
Author

I started making some changes on my fork, but I also converted all the tabs to spaces, so I'm afraid the diff isn't very clean/mergable.

@sajattack
Copy link
Author

I encourage you to use enumeratedValues where possible, I see you did the glb register, have a look at what I did here: https://github.com/sajattack/bl602-pac/blob/svd-improvements-glb/soc602_reg.svd#L86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants