self._decoder.add(self.ram.bus, addr=0x8000000) # SRAM at 0x8000_000
# UART
- opencores_16550 = "../../uart16550/rtl/verilog"
- pth = os.path.split(__file__)[0]
- pth = os.path.join(pth, opencores_16550)
- fname = os.path.abspath(pth)
- print (fname)
- self.uart = UART16550(verilog_src_dir=fname)
+ self.uart = UART16550()
umap = MemoryMap(addr_width=7, data_width=8, name="uart_map")
#umap.add_resource(self._mem, name="mem", size=1<<5)
self.uart.bus.memory_map = umap
# wire up the CPU interrupts
comb += self.cpu.ip.eq(self.intc.ip)
+ # add uart16550 verilog source. assumes a directory
+ # structure where ls2 has been checked out in a common
+ # subdirectory as https://github.com/freecores/uart16550
+ opencores_16550 = "../../uart16550/rtl/verilog"
+ pth = os.path.split(__file__)[0]
+ pth = os.path.join(pth, opencores_16550)
+ fname = os.path.abspath(pth)
+ print (fname)
+ self.uart.add_verilog_source(fname, platform)
+
return m