Skip to content

Instantly share code, notes, and snippets.

@tucanae47
Last active September 21, 2020 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tucanae47/8915148b9476066cc8194d29e5387194 to your computer and use it in GitHub Desktop.
Save tucanae47/8915148b9476066cc8194d29e5387194 to your computer and use it in GitHub Desktop.
arty wishbone uart bridge
from litex.soc.cores import uart
from litex.soc.cores.uart import UARTWishboneBridge
from litex_boards.platforms import arty
from litex_boards.targets.arty import BaseSoC
from litex.soc.integration.builder import Builder
class BridgeSoC(BaseSoC):
def __init__(self, platform, *args, **kwargs):
sys_clk_freq = int(100e6)
BaseSoC.__init__(self,sys_clk_freq,
cpu_type=None,
csr_data_width=32,
with_uart=True,
with_timer=False,
uart_name="crossover"
)
self.bridge = UARTWishboneBridge(platform.request("serial"), self.clk_freq, baudrate=115200)
self.add_wb_master(self.bridge.wishbone)
platform = arty.Platform()
soc = BridgeSoC(platform)
builder = Builder(soc,
output_dir="build", csr_csv="build/csr.csv",
compile_software=False)
vns = builder.build()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment