-
Notifications
You must be signed in to change notification settings - Fork 212
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
[sw/lib] move register and bit definitions to according module header files #542
Conversation
I think I like this idea! |
In my opinion looks really good!. The Hardware adresses are in the neorv32.h header and the rest of the sw layer is in the driver itself. Question how to deal with Bit definition in other modules? |
What do you mean exactly? |
Yes exactaly the enums, but for sure they can also move to the *.h files. |
@emb4fun looks good so far! Thank you very much! The list of base addresses might cause some issues with Doxygen. But that is not critical. I can fix that after merging this. In your Pr we have three new files: for the system information memory (SYSINFO), the debug module (DM) and the bus monitor (BUSKEEPER). Having a new file for SYSINFO is just fine. Same for the BUSKEEPER. But what about the DM? The debug module cannot be accessed by "normal" software running on the core. All the register and bit definition were just listed for "completeness". So I am not sure what we should do with this file? By the way, I will modify your PR and add the new files to the software sections file list. 😉 |
The DM file was listed for completeness too. Because all structure definitions of a "device" was moved to its own file. |
The question is do we really want to keep this file. 🤔 Anyway, I'll have a look at your modifications. 👍 |
Seems ready. @emb4fun what do you think? |
Yes it is ready. @stnolting please merge. |
The idea behind this is to also define the information of a device in its header file.
Using the GPIO as an example, I moved the definition of the structure from neorv32.h
to neorv32_gpio.h. Only the define for NEORV32_GPIO_BASE remains in the neorv32.h file.
Later you can then summarize all the BASE addresses again in the neorv32.h file.
What do you think of this proposal?