Skip to content

stream.Signature should allow setting the init value for the payload #1404

Closed
@whitequark

Description

@whitequark

This for example does not work:

class BitSerializer(wiring.Component):
    def __init__(self, *, width, length):
        self._length = length

        super().__init__({
            "shift": In(1),
            "stream": In(stream.Signature(data.StructLayout({
                "o":  data.ArrayLayout(width, length),
                "oe": 1
            })), init={"payload": {"oe": 1}}),
            "buffer": Out(io.FFBuffer.Signature("o", width)),
        })

but could be valuable for the same reason io.Buffer.Signature's oe member has init=1.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions