mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
soc: move uart to a single file
This commit is contained in:
parent
1acca39397
commit
e1319924aa
3 changed files with 7 additions and 11 deletions
|
@ -5,6 +5,7 @@ from litex.gen.genlib.cdc import MultiReg
|
||||||
from litex.soc.interconnect.csr import *
|
from litex.soc.interconnect.csr import *
|
||||||
from litex.soc.interconnect.csr_eventmanager import *
|
from litex.soc.interconnect.csr_eventmanager import *
|
||||||
from litex.soc.interconnect import stream
|
from litex.soc.interconnect import stream
|
||||||
|
from litex.soc.interconnect.wishbonebridge import WishboneStreamingBridge
|
||||||
|
|
||||||
|
|
||||||
class RS232PHYRX(Module):
|
class RS232PHYRX(Module):
|
||||||
|
@ -176,3 +177,9 @@ class UART(Module, AutoCSR):
|
||||||
# Generate RX IRQ when tx_fifo becomes non-empty
|
# Generate RX IRQ when tx_fifo becomes non-empty
|
||||||
self.ev.rx.trigger.eq(~rx_fifo.source.valid)
|
self.ev.rx.trigger.eq(~rx_fifo.source.valid)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
class UARTWishboneBridge(WishboneStreamingBridge):
|
||||||
|
def __init__(self, pads, clk_freq, baudrate=115200):
|
||||||
|
self.submodules.phy = RS232PHY(pads, clk_freq, baudrate)
|
||||||
|
WishboneStreamingBridge.__init__(self, self.phy, clk_freq)
|
|
@ -1 +0,0 @@
|
||||||
from litex.soc.cores.uart.core import UART, RS232PHY, RS232PHYModel
|
|
|
@ -1,10 +0,0 @@
|
||||||
from litex.gen import *
|
|
||||||
|
|
||||||
from litex.soc.interconnect.wishbonebridge import WishboneStreamingBridge
|
|
||||||
from litex.soc.cores.uart.core import RS232PHY
|
|
||||||
|
|
||||||
|
|
||||||
class UARTWishboneBridge(WishboneStreamingBridge):
|
|
||||||
def __init__(self, pads, clk_freq, baudrate=115200):
|
|
||||||
self.submodules.phy = RS232PHY(pads, clk_freq, baudrate)
|
|
||||||
WishboneStreamingBridge.__init__(self, self.phy, clk_freq)
|
|
Loading…
Reference in a new issue