Skip to content

Commit e002f24

Browse files
committed
Implement RFC 5: Remove Const.normalize.
Closes #754.
1 parent 28e1d28 commit e002f24

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

amaranth/hdl/ast.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -661,16 +661,6 @@ class Const(Value):
661661
"""
662662
src_loc = None
663663

664-
# TODO(amaranth-0.5): remove
665-
@staticmethod
666-
@deprecated("instead of `Const.normalize(value, shape)`, use `Const(value, shape).value`")
667-
def normalize(value, shape):
668-
mask = (1 << shape.width) - 1
669-
value &= mask
670-
if shape.signed and value >> (shape.width - 1):
671-
value |= ~mask
672-
return value
673-
674664
@staticmethod
675665
def cast(obj):
676666
"""Converts ``obj`` to an Amaranth constant.

0 commit comments

Comments
 (0)