Skip to content

Conversation

@teqdruid
Copy link
Contributor

This was just a shortcut which proved unwise.

This was just a shortcut which proved unwise.
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 removes the pycde.types.types shortcut functionality, which was a convenience wrapper providing attribute-based type access (e.g., types.i32, types.struct()). All usages have been updated to use explicit type constructors.

Key Changes

  • Removed the _Types class and types singleton from pycde/types.py
  • Updated all references from types.iN pattern to explicit Bit/Bits(N) constructors
  • Updated imports across 21 test files and 6 source files to use specific type imports

Reviewed Changes

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

Show a summary per file
File Description
frontends/PyCDE/src/pycde/types.py Removed _Types class and types singleton; updated internal uses to Bit
frontends/PyCDE/src/pycde/signals.py Replaced types.* with explicit Bit, Bits, and Array constructors
frontends/PyCDE/src/pycde/fsm.py Replaced types.i1 with Bit
frontends/PyCDE/src/pycde/esi.py Removed unused types import
frontends/PyCDE/src/pycde/constructs.py Replaced types.i1 with Bit in ControlReg
frontends/PyCDE/src/pycde/init.py Removed types from exports
frontends/PyCDE/test/test_verilog_readablility.py Updated to use Bits constructor
frontends/PyCDE/test/test_syntactic_sugar.py Updated to use Bits, StructType, and TypeAlias
frontends/PyCDE/test/test_pycde_values.py Updated to use Bit and Bits
frontends/PyCDE/test/test_pycde_types.py Updated to use explicit type constructors
frontends/PyCDE/test/test_polynomial.py Updated to use Bit, Bits, StructType, and TypeAlias
frontends/PyCDE/test/test_ndarray_errors.py Updated to use Bit and Bits
frontends/PyCDE/test/test_ndarray.py Updated to use Bit and Bits
frontends/PyCDE/test/test_muxing.py Updated to use Bit
frontends/PyCDE/test/test_module_naming.py Updated to use Bit
frontends/PyCDE/test/test_instances.py Updated to use Bit
frontends/PyCDE/test/test_hwarith.py Updated to use Bit, Bits, SInt, and UInt
frontends/PyCDE/test/test_handshake.py Updated to use explicit type constructors
frontends/PyCDE/test/test_generator_options.py Updated to use Bits
frontends/PyCDE/test/test_fsm_errors.py Updated to use Bit and Bits
frontends/PyCDE/test/test_fsm.py Updated to use Bit
frontends/PyCDE/test/test_esi_errors.py Updated to use explicit type constructors with helper constants
frontends/PyCDE/test/test_esi.py Updated to use explicit type constructors with helper constants
frontends/PyCDE/test/test_errors.py Updated to use Bits and SInt
frontends/PyCDE/test/test_constructs_errors.py Updated to use Bit and Bits with helper constants
frontends/PyCDE/test/test_constructs.py Updated to use Bit and Bits with helper constants
frontends/PyCDE/test/test_cocotb_testbench.py Updated to use Bit and Bits
frontends/PyCDE/integration_test/pytorch/dot_prod_system.py Updated to use Bit and Bits

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

@teqdruid teqdruid merged commit a683eb7 into main Nov 18, 2025
6 checks passed
@teqdruid teqdruid deleted the teqdruid/pycde-types branch November 18, 2025 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants