mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
soc: create specific add_jtagbone method instead of integrating it in add_uartbnone.
Creates a JTAG bridge in the SoC simply with self.add_jtagbone(), almost comes for free :)
This commit is contained in:
parent
ed1da7ed1e
commit
531ce0e8b7
1 changed files with 10 additions and 7 deletions
|
@ -1169,15 +1169,18 @@ class LiteXSoC(SoC):
|
||||||
from litex.soc.cores import uart
|
from litex.soc.cores import uart
|
||||||
if clk_freq is None:
|
if clk_freq is None:
|
||||||
clk_freq = self.sys_clk_freq
|
clk_freq = self.sys_clk_freq
|
||||||
if name == "jtag_uart":
|
self.submodules.phy = uart.UARTPHY(self.platform.request(name), clk_freq, baudrate)
|
||||||
from litex.soc.cores.jtag import JTAGPHY
|
self.submodules.uartbone = uart.UARTBone(phy=self.phy, clk_freq=clk_freq, cd=cd)
|
||||||
phy = JTAGPHY(device=self.platform.device)
|
|
||||||
else:
|
|
||||||
phy = uart.UARTPHY(self.platform.request(name), clk_freq, baudrate)
|
|
||||||
self.submodules += phy
|
|
||||||
self.submodules.uartbone = uart.UARTBone(phy=phy, clk_freq=clk_freq, cd=cd)
|
|
||||||
self.bus.add_master(name="uartbone", master=self.uartbone.wishbone)
|
self.bus.add_master(name="uartbone", master=self.uartbone.wishbone)
|
||||||
|
|
||||||
|
# Add JTAGbone ---------------------------------------------------------------------------------
|
||||||
|
def add_jtagbone(self):
|
||||||
|
from litex.soc.cores import uart
|
||||||
|
from litex.soc.cores.jtag import JTAGPHY
|
||||||
|
self.submodules.phy = JTAGPHY(device=self.platform.device)
|
||||||
|
self.submodules.jtagbone = uart.UARTBone(phy=self.phy, clk_freq=self.sys_clk_freq)
|
||||||
|
self.bus.add_master(name="jtagbone", master=self.jtagbone.wishbone)
|
||||||
|
|
||||||
# Add SDRAM ------------------------------------------------------------------------------------
|
# Add SDRAM ------------------------------------------------------------------------------------
|
||||||
def add_sdram(self, name, phy, module, origin, size=None, with_bist=False, with_soc_interconnect=True,
|
def add_sdram(self, name, phy, module, origin, size=None, with_bist=False, with_soc_interconnect=True,
|
||||||
l2_cache_size = 8192,
|
l2_cache_size = 8192,
|
||||||
|
|
Loading…
Reference in a new issue