Skip to content

Conversation

teqdruid
Copy link
Contributor

@teqdruid teqdruid commented Jul 1, 2025

Improves the location information emitted from PyCDE.

  • Move from single location to stack
  • Add location to a bunch of places it was missing

- Move from single location to stack
- Add location to a bunch of places it was missing
@teqdruid teqdruid requested a review from Copilot July 1, 2025 22:08
@teqdruid teqdruid added the PyCDE Python CIRCT Design Entry API label Jul 1, 2025
Copy link

@Copilot 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 enhances how PyCDE captures and reports source locations by switching from a single location to a stack-based callsite and annotating many IR operations with the new location information.

  • Rewrote get_user_loc to accumulate a stack of user frames and emit a callsite location.
  • Added loc=get_user_loc() arguments to MLIR operation constructors across multiple modules.
  • Updated hidden filenames set to skip support.py along with functools.py.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
frontends/PyCDE/src/pycde/support.py Reworked location extractor to build a stack, updated hidden files.
frontends/PyCDE/src/pycde/signals.py Annotated BitcastOp with loc=get_user_loc().
frontends/PyCDE/src/pycde/esi.py Added loc parameters to various ESI service operations.
frontends/PyCDE/src/pycde/bsp/cosim.py Imported get_user_loc and added loc to top-level cosim op.

@teqdruid teqdruid merged commit 7473654 into main Jul 7, 2025
8 checks passed
@teqdruid teqdruid deleted the teqdruid/pycde-loc branch July 7, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PyCDE Python CIRCT Design Entry API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant