From 7356003dd912c1f1e9077d242641b18765ade2c8 Mon Sep 17 00:00:00 2001 From: Marek Materzok Date: Wed, 29 Nov 2023 17:05:15 +0100 Subject: [PATCH 1/7] Update Amaranth version --- requirements.txt | 2 +- stubs/amaranth/hdl/ast.pyi | 9 ++++++--- stubs/amaranth/hdl/dsl.pyi | 2 +- stubs/amaranth/hdl/ir.pyi | 4 ++-- stubs/amaranth/hdl/rec.pyi | 2 +- stubs/amaranth/lib/coding.pyi | 2 +- stubs/amaranth/lib/data.pyi | 11 +++++------ stubs/amaranth/lib/enum.pyi | 3 +++ stubs/amaranth/lib/fifo.pyi | 2 +- stubs/amaranth/lib/scheduler.pyi | 2 +- transactron/lib/transformers.py | 12 ++++++------ 11 files changed, 28 insertions(+), 23 deletions(-) diff --git a/requirements.txt b/requirements.txt index 278864342..050718227 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ amaranth-yosys==0.25.0.0.post77 -git+https://github.com/amaranth-lang/amaranth@ccf7aaf00db54c7647b2f0f0cfdf34835c16fa8f +git+https://github.com/amaranth-lang/amaranth@ef5cfa72bc4c3edbbdcc4c38b35e8e756a27bb8c diff --git a/stubs/amaranth/hdl/ast.pyi b/stubs/amaranth/hdl/ast.pyi index abb57120c..d67b653eb 100644 --- a/stubs/amaranth/hdl/ast.pyi +++ b/stubs/amaranth/hdl/ast.pyi @@ -6,7 +6,7 @@ from abc import ABCMeta, abstractmethod from collections.abc import Callable, MutableMapping, MutableSequence, MutableSet from typing import Any, Generic, Iterable, Iterator, Mapping, NoReturn, Optional, Sequence, TypeVar, final, overload from enum import Enum -from coreblocks.utils import ValueLike, ShapeLike, StatementLike +from transactron.utils import ValueLike, ShapeLike, StatementLike __all__ = ["Shape", "ShapeCastable", "signed", "unsigned", "Value", "Const", "C", "AnyConst", "AnySeq", "Operator", "Mux", "Part", "Slice", "Cat", "Repl", "Array", "ArrayProxy", "Signal", "ClockSignal", "ResetSignal", "ValueCastable", "Sample", "Past", "Stable", "Rose", "Fell", "Initial", "Statement", "Switch", "Property", "Assign", "Assert", "Assume", "Cover", "ValueKey", "ValueDict", "ValueSet", "SignalKey", "SignalDict", "SignalSet", "ValueLike", "ShapeLike", "StatementLike", "SwitchKey"] @@ -50,7 +50,7 @@ class Shape: ... @staticmethod - def cast(obj: ShapeLike, *, src_loc_at=...): + def cast(obj: ShapeLike, *, src_loc_at=...) -> Shape: ... def __repr__(self) -> str: @@ -411,7 +411,10 @@ class Signal(Value, DUID, metaclass=_SignalMeta): """Create Signal based on another. """ ... - + + def as_value(self) -> Value: + ... + def shape(self) -> Shape: ... diff --git a/stubs/amaranth/hdl/dsl.pyi b/stubs/amaranth/hdl/dsl.pyi index 41fdd8330..9d0c07f76 100644 --- a/stubs/amaranth/hdl/dsl.pyi +++ b/stubs/amaranth/hdl/dsl.pyi @@ -5,7 +5,7 @@ This type stub file was generated by pyright. from contextlib import _GeneratorContextManager, contextmanager from typing import Callable, ContextManager, Iterator, NoReturn, OrderedDict, ParamSpec, TypeVar, Optional from typing_extensions import Self -from coreblocks.utils import HasElaborate +from transactron.utils import HasElaborate from .ast import * from .ast import Flattenable from .ir import * diff --git a/stubs/amaranth/hdl/ir.pyi b/stubs/amaranth/hdl/ir.pyi index f5c7ba509..63acd1e3c 100644 --- a/stubs/amaranth/hdl/ir.pyi +++ b/stubs/amaranth/hdl/ir.pyi @@ -2,10 +2,10 @@ This type stub file was generated by pyright. """ -from abc import ABCMeta, abstractmethod +from abc import abstractmethod from .ast import * from .cd import * -from coreblocks.utils import HasElaborate +from transactron.utils import HasElaborate __all__ = ["Elaboratable", "DriverConflict", "Fragment", "Instance"] diff --git a/stubs/amaranth/hdl/rec.pyi b/stubs/amaranth/hdl/rec.pyi index a03644901..62887dd68 100644 --- a/stubs/amaranth/hdl/rec.pyi +++ b/stubs/amaranth/hdl/rec.pyi @@ -5,7 +5,7 @@ This type stub file was generated by pyright. from enum import Enum from typing import NoReturn, OrderedDict from .ast import * -from coreblocks.utils import LayoutLike +from transactron.utils import LayoutLike __all__ = ["Direction", "DIR_NONE", "DIR_FANOUT", "DIR_FANIN", "Layout", "Record"] Direction = Enum('Direction', ('NONE', 'FANOUT', 'FANIN')) diff --git a/stubs/amaranth/lib/coding.pyi b/stubs/amaranth/lib/coding.pyi index 9fe2bc3f3..aa0f3ffd3 100644 --- a/stubs/amaranth/lib/coding.pyi +++ b/stubs/amaranth/lib/coding.pyi @@ -3,7 +3,7 @@ This type stub file was generated by pyright. """ from .. import * -from coreblocks.utils import HasElaborate +from transactron.utils import HasElaborate __all__ = ["Encoder", "Decoder", "PriorityEncoder", "PriorityDecoder", "GrayEncoder", "GrayDecoder"] class Encoder(Elaboratable): diff --git a/stubs/amaranth/lib/data.pyi b/stubs/amaranth/lib/data.pyi index 84ea4684f..46d13be39 100644 --- a/stubs/amaranth/lib/data.pyi +++ b/stubs/amaranth/lib/data.pyi @@ -3,18 +3,17 @@ This type stub file was generated by pyright. """ from abc import ABCMeta, abstractmethod -from collections.abc import Callable, Iterator, Mapping -from enum import Enum -from typing import Optional, TypeVar, Generic +from collections.abc import Iterator, Mapping +from typing import TypeVar, Generic from typing_extensions import Self from amaranth.hdl import * from amaranth.hdl.ast import Assign, ShapeCastable, ValueCastable -from coreblocks.utils._typing import ShapeLike, ValueLike +from transactron.utils._typing import ShapeLike, ValueLike __all__ = ["Field", "Layout", "StructLayout", "UnionLayout", "ArrayLayout", "FlexibleLayout", "View", "Struct", "Union"] -_T_ShapeCastable = TypeVar("_T_ShapeCastable", bound=ShapeCastable) +_T_ShapeCastable = TypeVar("_T_ShapeCastable", bound=ShapeCastable, covariant=True) class Field: @@ -186,7 +185,7 @@ class View(ValueCastable, Generic[_T_ShapeCastable]): def as_value(self) -> Value: ... - def shape(self) -> Layout: + def shape(self) -> _T_ShapeCastable: ... def eq(self, other: ValueLike) -> Assign: diff --git a/stubs/amaranth/lib/enum.pyi b/stubs/amaranth/lib/enum.pyi index 2cd19fdbd..079582047 100644 --- a/stubs/amaranth/lib/enum.pyi +++ b/stubs/amaranth/lib/enum.pyi @@ -14,6 +14,9 @@ auto = py_enum.auto unique = py_enum.unique +# TODO: update stubs for enums + + class EnumMeta(ShapeCastable, py_enum.EnumMeta): """Subclass of the standard :class:`enum.EnumMeta` that implements the :class:`ShapeCastable` protocol. diff --git a/stubs/amaranth/lib/fifo.pyi b/stubs/amaranth/lib/fifo.pyi index 5da2d3659..a64c5e8e5 100644 --- a/stubs/amaranth/lib/fifo.pyi +++ b/stubs/amaranth/lib/fifo.pyi @@ -4,7 +4,7 @@ This type stub file was generated by pyright. from .. import * from ..asserts import * -from coreblocks.utils import HasElaborate +from transactron.utils import HasElaborate """First-in first-out queues.""" __all__ = ["FIFOInterface", "SyncFIFO", "SyncFIFOBuffered", "AsyncFIFO", "AsyncFIFOBuffered"] diff --git a/stubs/amaranth/lib/scheduler.pyi b/stubs/amaranth/lib/scheduler.pyi index 3bd76c34e..b9662f19e 100644 --- a/stubs/amaranth/lib/scheduler.pyi +++ b/stubs/amaranth/lib/scheduler.pyi @@ -1,5 +1,5 @@ from .. import * -from coreblocks.utils import HasElaborate +from transactron.utils import HasElaborate class RoundRobin(Elaboratable): count: int diff --git a/transactron/lib/transformers.py b/transactron/lib/transformers.py index 18c3ac73a..cd98d508f 100644 --- a/transactron/lib/transformers.py +++ b/transactron/lib/transformers.py @@ -19,7 +19,7 @@ ] -class Transformer(ABC): +class Transformer(ABC, Elaboratable): """Method transformer abstract class. Method transformers construct a new method which utilizes other methods. @@ -45,7 +45,7 @@ def use(self, m: ModuleLike): return self.method -class MethodMap(Transformer, Elaboratable): +class MethodMap(Transformer): """Bidirectional map for methods. Takes a target method and creates a transformed method which calls the @@ -101,7 +101,7 @@ def _(arg): return m -class MethodFilter(Transformer, Elaboratable): +class MethodFilter(Transformer): """Method filter. Takes a target method and creates a method which calls the target method @@ -157,7 +157,7 @@ def _(arg): return m -class MethodProduct(Transformer, Elaboratable): +class MethodProduct(Transformer): def __init__( self, targets: list[Method], @@ -205,7 +205,7 @@ def _(arg): return m -class MethodTryProduct(Transformer, Elaboratable): +class MethodTryProduct(Transformer): def __init__( self, targets: list[Method], @@ -257,7 +257,7 @@ def _(arg): return m -class Collector(Transformer, Elaboratable): +class Collector(Transformer): """Single result collector. Creates method that collects results of many methods with identical From e5be8b35bbbcd24b3488925beda32e97417cf21d Mon Sep 17 00:00:00 2001 From: Marek Materzok Date: Thu, 30 Nov 2023 10:08:21 +0100 Subject: [PATCH 2/7] New typing for enums --- stubs/amaranth/lib/enum.pyi | 148 ++++++++++++++++++++++++++++++++---- 1 file changed, 135 insertions(+), 13 deletions(-) diff --git a/stubs/amaranth/lib/enum.pyi b/stubs/amaranth/lib/enum.pyi index 079582047..12229bbc8 100644 --- a/stubs/amaranth/lib/enum.pyi +++ b/stubs/amaranth/lib/enum.pyi @@ -3,21 +3,24 @@ This type stub file was generated by pyright. """ import enum as py_enum +from typing import Generic, Optional, TypeVar, overload from typing_extensions import Self from amaranth import * -from ..hdl.ast import ShapeCastable +from ..hdl.ast import Assign, ValueCastable, ShapeCastable, ValueLike -__all__ = ['EnumMeta', 'Enum', 'IntEnum', 'Flag', 'IntFlag', 'auto', 'unique'] +__all__ = ['EnumMeta', 'Enum', 'IntEnum', 'Flag', 'IntFlag', 'EnumView', 'FlagView', 'auto', 'unique'] -auto = py_enum.auto -unique = py_enum.unique +_T_EnumMeta = TypeVar("_T_EnumMeta", bound=EnumMeta) +_T = TypeVar("_T") +_T_ViewClass = TypeVar("_T_ViewClass", bound=None | ValueCastable) -# TODO: update stubs for enums +auto = py_enum.auto +unique = py_enum.unique -class EnumMeta(ShapeCastable, py_enum.EnumMeta): +class EnumMeta(ShapeCastable, py_enum.EnumMeta, Generic[_T_ViewClass]): """Subclass of the standard :class:`enum.EnumMeta` that implements the :class:`ShapeCastable` protocol. @@ -29,10 +32,10 @@ class EnumMeta(ShapeCastable, py_enum.EnumMeta): or the values of its members. """ @classmethod - def __prepare__(metacls, name, bases, shape=..., **kwargs) -> py_enum._EnumDict: + def __prepare__(metacls, name, bases, shape: Shape=..., view_class:_T_ViewClass=..., **kwargs) -> py_enum._EnumDict: ... - def __new__(cls, name, bases, namespace, shape=..., **kwargs) -> Self: + def __new__(cls, name, bases, namespace, shape: Shape=..., view_class:_T_ViewClass=..., **kwargs) -> Self: ... def as_shape(cls) -> Shape: @@ -51,35 +54,154 @@ class EnumMeta(ShapeCastable, py_enum.EnumMeta): """ ... - def __call__(cls, value) -> Value: + @overload + def __call__(cls: type[_T], value: int) -> _T: + ... + + @overload + def __call__(cls: type[_T], value: _T) -> _T: + ... + + @overload + def __call__(cls: EnumMeta[None], value: int | ValueLike) -> Value: + ... + + @overload + def __call__(cls: EnumMeta[_T_ViewClass], value: int | ValueLike) -> _T_ViewClass: + ... + + def __call__(cls, value: int | ValueLike) -> Value | ValueCastable: ... def const(cls, init) -> Const: ... +class E(IntEnum): + X = 1 + +x = E(5) -class Enum(py_enum.Enum, metaclass=EnumMeta): +class Enum(py_enum.Enum, metaclass=EnumMeta[EnumView]): """Subclass of the standard :class:`enum.Enum` that has :class:`EnumMeta` as its metaclass.""" ... -class IntEnum(py_enum.IntEnum, metaclass=EnumMeta): +class IntEnum(py_enum.IntEnum, metaclass=EnumMeta[None]): """Subclass of the standard :class:`enum.IntEnum` that has :class:`EnumMeta` as its metaclass.""" ... -class Flag(py_enum.Flag, metaclass=EnumMeta): +class Flag(py_enum.Flag, metaclass=EnumMeta[FlagView]): """Subclass of the standard :class:`enum.Flag` that has :class:`EnumMeta` as its metaclass.""" ... -class IntFlag(py_enum.IntFlag, metaclass=EnumMeta): +class IntFlag(py_enum.IntFlag, metaclass=EnumMeta[None]): """Subclass of the standard :class:`enum.IntFlag` that has :class:`EnumMeta` as its metaclass.""" ... +class EnumView(ValueCastable, Generic[_T_EnumMeta]): + """The view class used for :class:`Enum`. + + Wraps a :class:`Value` and only allows type-safe operations. The only operators allowed are + equality comparisons (``==`` and ``!=``) with another :class:`EnumView` of the same enum type. + """ + + def __init__(self, enum: _T_EnumMeta, target: ValueLike): + ... + + def shape(self) -> _T_EnumMeta: + ... + + @ValueCastable.lowermethod + def as_value(self) -> Value: + ... + + def eq(self, other: ValueLike) -> Assign: + ... + + def __eq__(self, other: FlagView[_T_EnumMeta] | _T_EnumMeta) -> Value: + """Compares the underlying value for equality. + + The other operand has to be either another :class:`EnumView` with the same enum type, or + a plain value of the underlying enum. + + Returns + ------- + :class:`Value` + The result of the equality comparison, as a single-bit value. + """ + ... + + def __ne__(self, other: FlagView[_T_EnumMeta] | _T_EnumMeta) -> Value: + ... + + + +class FlagView(EnumView[_T_EnumMeta], Generic[_T_EnumMeta]): + """The view class used for :class:`Flag`. + + In addition to the operations allowed by :class:`EnumView`, it allows bitwise operations among + values of the same enum type.""" + + def __invert__(self) -> FlagView[_T_EnumMeta]: + """Inverts all flags in this value and returns another :ref:`FlagView`. + + Note that this is not equivalent to applying bitwise negation to the underlying value: + just like the Python :class:`enum.Flag` class, only bits corresponding to flags actually + defined in the enumeration are included in the result. + + Returns + ------- + :class:`FlagView` + """ + ... + + def __and__(self, other: FlagView[_T_EnumMeta] | _T_EnumMeta) -> FlagView[_T_EnumMeta]: + """Performs a bitwise AND and returns another :class:`FlagView`. + + The other operand has to be either another :class:`FlagView` of the same enum type, or + a plain value of the underlying enum type. + + Returns + ------- + :class:`FlagView` + """ + ... + + def __or__(self, other: FlagView[_T_EnumMeta] | _T_EnumMeta) -> FlagView[_T_EnumMeta]: + """Performs a bitwise OR and returns another :class:`FlagView`. + + The other operand has to be either another :class:`FlagView` of the same enum type, or + a plain value of the underlying enum type. + + Returns + ------- + :class:`FlagView` + """ + ... + + def __xor__(self, other: FlagView[_T_EnumMeta] | _T_EnumMeta) -> FlagView[_T_EnumMeta]: + """Performs a bitwise XOR and returns another :class:`FlagView`. + + The other operand has to be either another :class:`FlagView` of the same enum type, or + a plain value of the underlying enum type. + + Returns + ------- + :class:`FlagView` + """ + ... + + __rand__ = __and__ + __ror__ = __or__ + __rxor__ = __xor__ + + + From 659eca4cf18349cd86fb107e7b8c17d2252d52e6 Mon Sep 17 00:00:00 2001 From: Marek Materzok Date: Thu, 30 Nov 2023 10:14:03 +0100 Subject: [PATCH 3/7] Update yosys --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 050718227..39d8390e2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -amaranth-yosys==0.25.0.0.post77 +amaranth-yosys==0.35.0.0.post81 git+https://github.com/amaranth-lang/amaranth@ef5cfa72bc4c3edbbdcc4c38b35e8e756a27bb8c From 2bedfa04a078c5d665c4f2987f2e4dfec96b70fd Mon Sep 17 00:00:00 2001 From: Marek Materzok Date: Thu, 30 Nov 2023 10:28:35 +0100 Subject: [PATCH 4/7] Enum type correction --- stubs/amaranth/lib/enum.pyi | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/stubs/amaranth/lib/enum.pyi b/stubs/amaranth/lib/enum.pyi index 12229bbc8..de7fa47f1 100644 --- a/stubs/amaranth/lib/enum.pyi +++ b/stubs/amaranth/lib/enum.pyi @@ -11,7 +11,6 @@ from ..hdl.ast import Assign, ValueCastable, ShapeCastable, ValueLike __all__ = ['EnumMeta', 'Enum', 'IntEnum', 'Flag', 'IntFlag', 'EnumView', 'FlagView', 'auto', 'unique'] -_T_EnumMeta = TypeVar("_T_EnumMeta", bound=EnumMeta) _T = TypeVar("_T") _T_ViewClass = TypeVar("_T_ViewClass", bound=None | ValueCastable) @@ -106,17 +105,17 @@ class IntFlag(py_enum.IntFlag, metaclass=EnumMeta[None]): ... -class EnumView(ValueCastable, Generic[_T_EnumMeta]): +class EnumView(ValueCastable, Generic[_T]): """The view class used for :class:`Enum`. Wraps a :class:`Value` and only allows type-safe operations. The only operators allowed are equality comparisons (``==`` and ``!=``) with another :class:`EnumView` of the same enum type. """ - def __init__(self, enum: _T_EnumMeta, target: ValueLike): + def __init__(self, enum: _T, target: ValueLike): ... - def shape(self) -> _T_EnumMeta: + def shape(self) -> _T: ... @ValueCastable.lowermethod @@ -126,7 +125,7 @@ class EnumView(ValueCastable, Generic[_T_EnumMeta]): def eq(self, other: ValueLike) -> Assign: ... - def __eq__(self, other: FlagView[_T_EnumMeta] | _T_EnumMeta) -> Value: + def __eq__(self, other: FlagView[_T] | _T) -> Value: """Compares the underlying value for equality. The other operand has to be either another :class:`EnumView` with the same enum type, or @@ -139,18 +138,18 @@ class EnumView(ValueCastable, Generic[_T_EnumMeta]): """ ... - def __ne__(self, other: FlagView[_T_EnumMeta] | _T_EnumMeta) -> Value: + def __ne__(self, other: FlagView[_T] | _T) -> Value: ... -class FlagView(EnumView[_T_EnumMeta], Generic[_T_EnumMeta]): +class FlagView(EnumView[_T], Generic[_T]): """The view class used for :class:`Flag`. In addition to the operations allowed by :class:`EnumView`, it allows bitwise operations among values of the same enum type.""" - def __invert__(self) -> FlagView[_T_EnumMeta]: + def __invert__(self) -> FlagView[_T]: """Inverts all flags in this value and returns another :ref:`FlagView`. Note that this is not equivalent to applying bitwise negation to the underlying value: @@ -163,7 +162,7 @@ class FlagView(EnumView[_T_EnumMeta], Generic[_T_EnumMeta]): """ ... - def __and__(self, other: FlagView[_T_EnumMeta] | _T_EnumMeta) -> FlagView[_T_EnumMeta]: + def __and__(self, other: FlagView[_T] | _T) -> FlagView[_T]: """Performs a bitwise AND and returns another :class:`FlagView`. The other operand has to be either another :class:`FlagView` of the same enum type, or @@ -175,7 +174,7 @@ class FlagView(EnumView[_T_EnumMeta], Generic[_T_EnumMeta]): """ ... - def __or__(self, other: FlagView[_T_EnumMeta] | _T_EnumMeta) -> FlagView[_T_EnumMeta]: + def __or__(self, other: FlagView[_T] | _T) -> FlagView[_T]: """Performs a bitwise OR and returns another :class:`FlagView`. The other operand has to be either another :class:`FlagView` of the same enum type, or @@ -187,7 +186,7 @@ class FlagView(EnumView[_T_EnumMeta], Generic[_T_EnumMeta]): """ ... - def __xor__(self, other: FlagView[_T_EnumMeta] | _T_EnumMeta) -> FlagView[_T_EnumMeta]: + def __xor__(self, other: FlagView[_T] | _T) -> FlagView[_T]: """Performs a bitwise XOR and returns another :class:`FlagView`. The other operand has to be either another :class:`FlagView` of the same enum type, or From 26d710be18af728e6419bde6ac3eb9c7bef824ed Mon Sep 17 00:00:00 2001 From: Marek Materzok Date: Sun, 3 Dec 2023 14:35:01 +0100 Subject: [PATCH 5/7] Update Amaranth --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 39d8390e2..c08979f0e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ amaranth-yosys==0.35.0.0.post81 -git+https://github.com/amaranth-lang/amaranth@ef5cfa72bc4c3edbbdcc4c38b35e8e756a27bb8c +git+https://github.com/amaranth-lang/amaranth@ab6503e352825b36bb29f1a8622b9e98aac9a6c6 From fecb12675dcf2e1e52b339d7b879e80c362a099c Mon Sep 17 00:00:00 2001 From: Marek Materzok Date: Sun, 3 Dec 2023 15:01:09 +0100 Subject: [PATCH 6/7] Remove debug stuff --- stubs/amaranth/lib/enum.pyi | 5 ----- 1 file changed, 5 deletions(-) diff --git a/stubs/amaranth/lib/enum.pyi b/stubs/amaranth/lib/enum.pyi index de7fa47f1..9c2d71e73 100644 --- a/stubs/amaranth/lib/enum.pyi +++ b/stubs/amaranth/lib/enum.pyi @@ -76,11 +76,6 @@ class EnumMeta(ShapeCastable, py_enum.EnumMeta, Generic[_T_ViewClass]): ... -class E(IntEnum): - X = 1 - -x = E(5) - class Enum(py_enum.Enum, metaclass=EnumMeta[EnumView]): """Subclass of the standard :class:`enum.Enum` that has :class:`EnumMeta` as its metaclass.""" From d27598d9d398afb17e1220c30730d4fa616383de Mon Sep 17 00:00:00 2001 From: Marek Materzok Date: Mon, 4 Dec 2023 10:34:34 +0100 Subject: [PATCH 7/7] Remove as_value from Signal --- stubs/amaranth/hdl/ast.pyi | 3 --- 1 file changed, 3 deletions(-) diff --git a/stubs/amaranth/hdl/ast.pyi b/stubs/amaranth/hdl/ast.pyi index d67b653eb..b22901c29 100644 --- a/stubs/amaranth/hdl/ast.pyi +++ b/stubs/amaranth/hdl/ast.pyi @@ -412,9 +412,6 @@ class Signal(Value, DUID, metaclass=_SignalMeta): """ ... - def as_value(self) -> Value: - ... - def shape(self) -> Shape: ...