Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@FrankOu2001
Copy link
Contributor

@FrankOu2001 FrankOu2001 commented Aug 31, 2025

Description

The selected options for waveform and coverage export are now written into the DUT class. A flag has also been added to the DUT to explicitly close waveform dumping.
This allows upstream tools, such as toffee-test, to handle the output data accordingly.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Call the following function with cpp, python, java, golang:

  • dut.GetWaveFormat()
  • dut.GetCovMetrics()
  • dut.WaveformClosed()

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 review from Makiras and Copilot and removed request for Copilot August 31, 2025 11:34
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 functionality to store and retrieve export settings in the generated DUT class across multiple language templates. The changes enable upstream tools like toffee-test to query waveform format settings, coverage metrics configuration, and waveform dumping status.

Key changes:

  • Added getter methods for waveform format and coverage metrics configuration
  • Added method to check if waveform dumping is currently paused/closed
  • Implemented compile-time constants for storing export configuration in the C++ base class

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
template/scala/dut.scala Added WaveformClosed(), GetWaveFormat(), and GetCovMetrics() methods
template/python/dut.py Added WaveformClosed(), GetWaveFormat(), and GetCovMetrics() methods with documentation
template/lua/dut.lua Added WaveformClosed(), GetWaveFormat(), and GetCovMetrics() methods
template/lib/dut_base.hpp Added static constants and method declarations for export settings
template/lib/dut_base.cpp Implemented export settings methods and waveform state tracking
template/java/dut.java Added WaveformClosed(), GetWaveFormat(), and GetCovMetrics() methods
template/golang/dut.go Added WaveformClosed(), GetWaveFormat(), and GetCovMetrics() methods
template/cpp/dut.hpp Added WaveformClosed(), GetWaveFormat(), and GetCovMetrics() methods
src/codegen/lib.cpp Added gen_coverage_metrics function to generate coverage configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Makiras
Copy link
Contributor

Makiras commented Sep 3, 2025

Add function comments for closed/paused/open/close/set/get to prevent misunderstood.

- Store waveform and coverage export settings in the DUT class.
- **BREAKING CHANGE**: Renamed waveform control APIs to clarify pause/resume semantics:
  - `OpenWaveform` -> `ResumeWaveformDump`
  - `CloseWaveform` -> `PauseWaveformDump`
  - `WaveformClosed` -> `WaveformPaused`
- Fix syntax error in `template/mem_direct/Makefile`.
@Makiras Makiras merged commit bc3570e into master Sep 4, 2025
12 checks passed
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