Skip to content

Conversation

@GarethAres
Copy link

@GarethAres GarethAres commented Sep 23, 2025

Description

Add annotations to the API in template/python/dut.py

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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 A
  • Test B

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • My code follows the style guidelines of this project
  • I have added the appropriate labels
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@FrankOu2001 FrankOu2001 requested a review from Copilot September 25, 2025 02:47
Copy link
Contributor

Copilot AI left a 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 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
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are trailing spaces after 'dut' in the return type description.

Suggested change
XPort: the XPort of dut
XPort: the XPort of dut

Copilot uses AI. Check for mistakes.
Get the information of XClock
Returns:
XClock: the XClock of dut
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a trailing space after 'dut' in the return type description.

Suggested change
XClock: the XClock of dut
XClock: the XClock of dut

Copilot uses AI. Check for mistakes.
Specify the output file for waveform
Args:
filename(str):the name of file
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after colon and trailing spaces after 'file' in the parameter description.

Copilot uses AI. Check for mistakes.
Specify the output file for coverage
Args:
filename(str):the name of file
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after colon and trailing spaces after 'file' in the parameter description.

Copilot uses AI. Check for mistakes.
Save current simulation state to a file
Args:
name(str): the name of file
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are trailing spaces after 'file' in the parameter description.

Copilot uses AI. Check for mistakes.
Restore simulation state from a file
Args:
name(str): the name of file
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are trailing spaces after 'file' in the parameter description.

Suggested change
name(str): the name of file
name(str): the name of file

Copilot uses AI. Check for mistakes.
Args:
name(str): the name of the internal signal
index(int):
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter description for 'index' is incomplete. It should explain what the index parameter is used for.

Suggested change
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).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants