Skip to content

Commit

Permalink
integration/soc/add_uartbone: fix jtag_uart integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Jan 22, 2021
1 parent d7aedfb commit 8623b0a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions litex/soc/integration/soc.py
Expand Up @@ -1163,16 +1163,15 @@ def add_uart(self, name, baudrate=115200, fifo_depth=16):
# Add UARTbone ---------------------------------------------------------------------------------
def add_uartbone(self, name="serial", clk_freq=None, baudrate=115200, cd="sys"):
from litex.soc.cores import uart
if clk_freq is None:
clk_freq = self.sys_clk_freq
if name == "jtag_uart":
from litex.soc.cores.jtag import JTAGPHY
phy = JTAGPHY(device=self.platform.device)
else:
phy = uart.UARTPHY(platform.request(name), clk_freq, bandrate)
phy = uart.UARTPHY(self.platform.request(name), clk_freq, baudrate)
self.submodules += phy
self.submodules.uartbone = uart.UARTBone(
phy = phy,
clk_freq = clk_freq if clk_freq is not None else self.sys_clk_freq,
cd = cd)
self.submodules.uartbone = uart.UARTBone(phy=phy, clk_freq=clk_freq, cd=cd)
self.bus.add_master(name="uartbone", master=self.uartbone.wishbone)

# Add SDRAM ------------------------------------------------------------------------------------
Expand Down

0 comments on commit 8623b0a

Please sign in to comment.