Exemplo n.º 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)
        ]
Exemplo n.º 2
0
Arquivo: uart.py Projeto: olofk/misoc
    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),
        ]
Exemplo n.º 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)
        ]
Exemplo n.º 4
0
Arquivo: uart.py Projeto: gbraad/misoc
    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)
        ]