Skip to content

Conversation

@teqdruid
Copy link
Contributor

No description provided.

@teqdruid teqdruid requested a review from Copilot November 19, 2025 23:49
@teqdruid teqdruid added the PyCDE Python CIRCT Design Entry API label Nov 19, 2025
Copy link

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 support for union types in PyCDE, enabling hardware designs to use union data structures. Union types complement the existing struct type support by allowing values to be interpreted as different field types.

Key changes:

  • Added UnionType class with field definitions supporting optional offsets
  • Implemented UnionSignal for runtime union value manipulation
  • Added validation for union field tuple format in C++ bindings

Reviewed Changes

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

Show a summary per file
File Description
lib/Bindings/Python/support.py Added type conversion support for UnionType
lib/Bindings/Python/HWModule.cpp Added validation for union field info tuple format
frontends/PyCDE/test/test_pycde_types.py Added comprehensive tests for UnionType and UnionSignal functionality
frontends/PyCDE/src/pycde/types.py Implemented UnionType class with field management and value creation
frontends/PyCDE/src/pycde/signals.py Implemented UnionSignal class for field access operations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@teqdruid teqdruid merged commit 97814a7 into main Nov 20, 2025
8 checks passed
@teqdruid teqdruid deleted the teqdruid/pycde-unions branch November 20, 2025 00:44
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.

2 participants