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

Skip to content

Conversation

@SFangYy
Copy link
Contributor

@SFangYy SFangYy commented Sep 5, 2025

Description

This PR introduces performance improvements to the FIRRTL file parsing logic in firrtl.cpp and resolves a bug where the -v flag failed to propagate arguments to gsim.

Type of change

  • Bug fix (Corrected the argument parsing logic to ensure the -v flag properly passes arguments to gsim.)
  • Breaking change (Refactored the firrtl file parsing function to significantly reduce parsing time, especially for large design files.

How Has This Been Tested?

run picker command like this
picker export SimTop.fir --sim gsim -V "--supernode-max-size=2;--cpp-max-size-KB=8192"

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

@Copilot Copilot AI review requested due to automatic review settings September 5, 2025 06: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 fixes a bug where the -v flag failed to propagate arguments to gsim and includes performance improvements to FIRRTL file parsing.

  • Fixed argument parsing logic in the CMake build system to properly handle gsim flags separated by semicolons
  • Optimized FIRRTL file parsing by replacing regex-based parsing with string operations for better performance
  • Added debug logging to track port parsing progress

Reviewed Changes

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

File Description
template/lib/cmake/gsim.cmake Fixed flag propagation by converting semicolon-separated flags to space-separated arguments
src/parser/firrtl.cpp Replaced regex parsing with string operations and added debug logging for performance optimization

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

@Makiras Makiras force-pushed the fix_gsim branch 2 times, most recently from 6b536ef to 8b750bf Compare September 5, 2025 07:40
Makiras
Makiras previously approved these changes Sep 5, 2025
@Makiras Makiras requested a review from FrankOu2001 September 5, 2025 09:33
@FrankOu2001 FrankOu2001 merged commit 283136f into XS-MLVP:master Sep 10, 2025
6 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.

3 participants