def word_select(self, offset, width):
        """Part-select with word granularity.

        Selects a constant width, variable offset part of :py:`self`, where parts with successive
        offsets are adjacent but do not overlap. Bits above the most significant bit of :py:`self`
        may be selected; they are equal to zero if :py:`self` is unsigned, to :py:`self[-1]` if
        :py:`self` is signed, and assigning to them does nothing.

        When :py:`offset` is a constant integer and :py:`width:(offset + 1) * width <= len(self)`,
        this operation is equivalent to :py:`self[offset * width:(offset + 1) * width]`.

        Parameters
        ----------
        offset: :ref:`value-like <lang-valuelike>`
            Index of the first selected word.
        width: :class:`int`
            Amount of bits to select.

        Returns
        -------
        :class:`Value`, :py:`unsigned(width)`, :ref:`assignable <lang-assignable>`

        Raises
        ------
        :exc:`TypeError`
            If :py:`offset` is signed.
        :exc:`TypeError`
            If :py:`width` is negative.
        """
        offset = Value.cast(offset)
        if type(offset) is Const and isinstance(width, int):
            return self[offset.value * width:(offset.value + 1) * width]
        return Part(self, offset, width, stride=width, src_loc_at=1)
Part-select with word granularity.

        Selects a constant width, variable offset part of :py:`self`, where parts with successive
        offsets are adjacent but do not overlap. Bits above the most significant bit of :py:`self`
        may be selected; they are equal to zero if :py:`self` is unsigned, to :py:`self[-1]` if
        :py:`self` is signed, and assigning to them does nothing.

        When :py:`offset` is a constant integer and :py:`width:(offset + 1) * width <= len(self)`,
        this operation is equivalent to :py:`self[offset * width:(offset + 1) * width]`.

        Parameters
        ----------
        offset: :ref:`value-like <lang-valuelike>`
            Index of the first selected word.
        width: :class:`int`
            Amount of bits to select.

        Returns
        -------
        :class:`Value`, :py:`unsigned(width)`, :ref:`assignable <lang-assignable>`

        Raises
        ------
        :exc:`TypeError`
            If :py:`offset` is signed.
        :exc:`TypeError`
            If :py:`width` is negative.
        
amaranth/hdl/_ast.py