Exemple #1
0
    def __init__(self, port, tx_fifo_depth=16, rx_fifo_depth=16):

        phy = LiteUSBUARTPHY()
        UART.__init__(self, phy, tx_fifo_depth, rx_fifo_depth)

        # TX
        self.comb += [
            port.sink.valid.eq(phy.sink.valid),
            port.sink.last.eq(1),
            port.sink.length.eq(1),
            port.sink.dst.eq(port.tag),
            port.sink.data.eq(phy.sink.data),
            phy.sink.ready.eq(port.sink.ready)
        ]

        # RX
        self.comb += [
            phy.source.valid.eq(port.source.valid),
            phy.source.data.eq(port.source.data),
            port.source.ready.eq(phy.source.ready)
        ]
Exemple #2
0
    def __init__(self, port, tx_fifo_depth=16, rx_fifo_depth=16):

        phy = LiteUSBUARTPHY()
        UART.__init__(self, phy, tx_fifo_depth, rx_fifo_depth)

        # TX
        self.comb += [
            port.sink.stb.eq(phy.sink.stb),
            port.sink.sop.eq(1),
            port.sink.eop.eq(1),
            port.sink.length.eq(1),
            port.sink.dst.eq(port.tag),
            port.sink.data.eq(phy.sink.data),
            phy.sink.ack.eq(port.sink.ack),
        ]

        # RX
        self.comb += [
            phy.source.stb.eq(port.source.stb),
            phy.source.data.eq(port.source.data),
            port.source.ack.eq(phy.source.ack),
        ]
Exemple #3
0
    def __init__(self, port,
                 tx_fifo_depth=16,
                 rx_fifo_depth=16):

        phy = LiteUSBUARTPHY()
        UART.__init__(self, phy, tx_fifo_depth, rx_fifo_depth)

        # TX
        self.comb += [
            port.sink.valid.eq(phy.sink.valid),
            port.sink.last.eq(1),
            port.sink.length.eq(1),
            port.sink.dst.eq(port.tag),
            port.sink.data.eq(phy.sink.data),
            phy.sink.ready.eq(port.sink.ready)
        ]

        # RX
        self.comb += [
            phy.source.valid.eq(port.source.valid),
            phy.source.data.eq(port.source.data),
            port.source.ready.eq(phy.source.ready)
        ]
Exemple #4
0
    def __init__(self, port,
                 tx_fifo_depth=16,
                 rx_fifo_depth=16):

        phy = LiteUSBUARTPHY()
        UART.__init__(self, phy, tx_fifo_depth, rx_fifo_depth)

        # TX
        self.comb += [
            port.sink.stb.eq(phy.sink.stb),
            port.sink.sop.eq(1),
            port.sink.eop.eq(1),
            port.sink.length.eq(1),
            port.sink.dst.eq(port.tag),
            port.sink.data.eq(phy.sink.data),
            phy.sink.ack.eq(port.sink.ack)
        ]

        # RX
        self.comb += [
            phy.source.stb.eq(port.source.stb),
            phy.source.data.eq(port.source.data),
            port.source.ack.eq(phy.source.ack)
        ]