Untitled

Pasted by zyp on Fri Dec 8 16:17:03 2023 UTC as Python
# Before:
        self.fsm.act('IDLE',
            port.source.connect(port.sink, omit = {'last', 'last_be'}),
            If(port.source.valid & port.source.ready & port.source.first & (port.source.data == self.addr),
                NextState('OUTPUT'),
            ).Else(
                port.sink.last.eq(port.source.last),
                port.sink.last_be.eq(port.source.last_be),
            ),
        )

# After:
        self.fsm.act('IDLE',
            port.source.connect(port.sink, omit = {'last', 'last_be'}),
            If(port.source.first & (port.source.data == self.addr),
                If(port.source.valid & port.source.ready ,
                    NextState('OUTPUT'),
                ),
            ).Else(
                port.sink.last.eq(port.source.last),
                port.sink.last_be.eq(port.source.last_be),
            ),
        )