-
Notifications
You must be signed in to change notification settings - Fork 12
Fix user guide #422
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
Fix user guide #422
Conversation
include core's constants ('C') and derived parameters ('D') in user guide.
This avoids strings like '32/8' from appearing in widths of user guide tables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR improves the user guide documentation by making several targeted fixes: changing VERSION from a constant to a macro, removing unnecessary "Table of" prefixes from LaTeX table captions, excluding internal constants and derived parameters from the user guide, and evaluating width expressions to display concrete values instead of raw math strings.
Changes:
- Changed VERSION configuration type from constant ('C') to macro ('M')
- Added
try_evaluate()function to evaluate mathematical expressions in width parameters - Removed documentation sections for constants ('C') and derived parameters ('D')
- Updated table captions to remove redundant "Table of" prefixes
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| py2hwsw/scripts/iob_core.py | Changes VERSION type from 'C' to 'M' to generate as macro |
| py2hwsw/scripts/iob_base.py | Adds try_evaluate() utility function for safe math expression evaluation |
| py2hwsw/scripts/interfaces.py | Updates width parameters to use try_evaluate() for computed values |
| py2hwsw/scripts/config_gen.py | Removes sections documenting constants and derived parameters |
| py2hwsw/scripts/block_gen.py | Simplifies subblocks table caption |
| py2hwsw/py2hwsw_document/document/tsrc/standard_interfaces.tex | Removes "Table of" from attributes table caption |
| py2hwsw/py2hwsw_document/document/tsrc/core_lib.tex | Removes "Table of" from core library table caption |
| py2hwsw/lib/iob_system/submodules/iob_eth | Updates submodule commit reference |
| py2hwsw/lib/iob_system/submodules/iob_cache | Updates submodule commit reference |
| py2hwsw/lib/iob_system/iob_system_linux/submodules/iob_uart16550 | Updates submodule commit reference |
| py2hwsw/lib/hardware/memories/iob_memwrapper/iob_memwrapper.py | Simplifies memories table caption |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Evaluating constants is messy. Either the user enters 4 explicitly, or enters the expression for python to calculate it immediately. It should never be a py2 job. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Normally, the user just specifies which interface he wants py2 to generate, and gives it a value for the address and data widths. Py2hwsw then uses the given data_w value to automatically generate and calculate the wstrb signal width (data_w/8). Currently, the py2hwsw script that generates interfaces, does not allow the user to specify the "WSTRB_W" directly. So, it is always automatically calculated based on the given data_w. |
|
yes, value or expression should be entered by the user , not by py2 |
|
I suggest saying something like this: There may be other macros or generic parameters in the code that are not documented. They are typically derived from other primary macros or parameters or exist for documentation purposes. |
…macros/parameters.
Update 'interfaces.py' to try evaluating width math expressions - avoids strings like '32/8'.STRB_Wconfiguration parameter - allows user to pass custom values, like '4' instead of using the default '32/8'.