Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive docstring annotations to the API methods in the DUT (Device Under Test) class in template/python/dut.py. The changes enhance code documentation by providing clear descriptions, parameter information, and return value details for all public methods.
- Added docstrings for all 23 public API methods in the DUT class
- Updated existing docstring format for WaveformPaused method to match new style
- Improved documentation consistency across synchronous and asynchronous APIs
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| Get the information of XPort | ||
|
|
||
| Returns: | ||
| XPort: the XPort of dut |
There was a problem hiding this comment.
There are trailing spaces after 'dut' in the return type description.
| XPort: the XPort of dut | |
| XPort: the XPort of dut |
| Get the information of XClock | ||
|
|
||
| Returns: | ||
| XClock: the XClock of dut |
There was a problem hiding this comment.
There is a trailing space after 'dut' in the return type description.
| XClock: the XClock of dut | |
| XClock: the XClock of dut |
| Specify the output file for waveform | ||
|
|
||
| Args: | ||
| filename(str):the name of file |
There was a problem hiding this comment.
Missing space after colon and trailing spaces after 'file' in the parameter description.
| Specify the output file for coverage | ||
|
|
||
| Args: | ||
| filename(str):the name of file |
There was a problem hiding this comment.
Missing space after colon and trailing spaces after 'file' in the parameter description.
| Save current simulation state to a file | ||
|
|
||
| Args: | ||
| name(str): the name of file |
There was a problem hiding this comment.
There are trailing spaces after 'file' in the parameter description.
| Restore simulation state from a file | ||
|
|
||
| Args: | ||
| name(str): the name of file |
There was a problem hiding this comment.
There are trailing spaces after 'file' in the parameter description.
| name(str): the name of file | |
| name(str): the name of file |
|
|
||
| Args: | ||
| name(str): the name of the internal signal | ||
| index(int): |
There was a problem hiding this comment.
The parameter description for 'index' is incomplete. It should explain what the index parameter is used for.
| index(int): | |
| index(int): the index of the internal signal to retrieve. Use a non-negative value to select a specific element for non-array signals; for array signals or VPI signals, index must be negative (typically -1). |
Description
Add annotations to the API in template/python/dut.py
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration
Test Configuration:
Checklist: