Skip to content

Commit 2ef3388

Browse files
wanda-phiwhitequark
authored andcommitted
hdl: remove (Const|Signal).(width|signed).
1 parent e7aaf60 commit 2ef3388

File tree

3 files changed

+2
-25
lines changed

3 files changed

+2
-25
lines changed

amaranth/hdl/_ast.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,18 +1607,6 @@ def shape(self):
16071607
def value(self):
16081608
return self._value
16091609

1610-
# TODO(amaranth-0.6): remove
1611-
@property
1612-
@deprecated("`const.width` is deprecated and will be removed in Amaranth 0.6; use `len(const)` instead")
1613-
def width(self):
1614-
return self.shape().width
1615-
1616-
# TODO(amaranth-0.6): remove
1617-
@property
1618-
@deprecated("`const.signed` is deprecated and will be removed in Amaranth 0.6; use `const.shape().signed` instead")
1619-
def signed(self):
1620-
return self.shape().signed
1621-
16221610
def _rhs_signals(self):
16231611
return SignalSet()
16241612

@@ -2089,18 +2077,6 @@ def __init__(self, shape=None, *, name=None, init=None, reset=None, reset_less=F
20892077
def shape(self):
20902078
return Shape(self._width, self._signed)
20912079

2092-
# TODO(amaranth-0.6): remove
2093-
@property
2094-
@deprecated("`signal.width` is deprecated and will be removed in Amaranth 0.6; use `len(signal)` instead")
2095-
def width(self):
2096-
return self.shape().width
2097-
2098-
# TODO(amaranth-0.6): remove
2099-
@property
2100-
@deprecated("`signal.signed` is deprecated and will be removed in Amaranth 0.6; use `signal.shape().signed` instead")
2101-
def signed(self):
2102-
return self.shape().signed
2103-
21042080
@property
21052081
def init(self):
21062082
return self._init

amaranth/lib/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ def is_subnormal(self):
12301230
12311231
>>> IEEE754Single.as_shape()
12321232
StructLayout({'fraction': 23, 'exponent': 8, 'sign': 1})
1233-
>>> Signal(IEEE754Single).as_value().width
1233+
>>> Signal(IEEE754Single).as_value().shape().width
12341234
32
12351235
12361236
Instances of this class can be used where :ref:`values <lang-values>` are expected:

docs/changes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Language changes
3333
* Removed: (deprecated in 0.5) :class:`Memory` (`RFC 45`_)
3434
* Removed: (deprecated in 0.5) public submodules of :mod:`amaranth.hdl`.
3535
* Removed: (deprecated in 0.5) :meth:`Value.implies`.
36+
* Removed: (deprecated in 0.5) :meth:`Const.width`, :meth:`Const.signed`, :meth:`Signal.width`, :meth:`Signal.signed`
3637

3738

3839
Standard library changes

0 commit comments

Comments
 (0)