from litex.soc.interconnect import wishbone as wb
from litex.soc.cores.cpu import CPU
-CPU_VARIANTS = ["standard", "standard32"]
+CPU_VARIANTS = ["standard", "standard32", "ls180"]
def make_wb_bus(prefix, obj):
self.xics_icp = icp = wb.Interface(data_width=32, adr_width=30)
self.xics_ics = ics = wb.Interface(data_width=32, adr_width=30)
- self.simple_gpio = gpio = wb.Interface(data_width=32, adr_width=30)
+
+ if variant != "ls180":
+ self.simple_gpio = gpio = wb.Interface(data_width=32, adr_width=30)
self.periph_buses = [ibus, dbus]
self.memory_buses = []
self.cpu_params.update(make_wb_bus("dbus_", dbus))
self.cpu_params.update(make_wb_bus("ics_wb_", ics))
self.cpu_params.update(make_wb_bus("icp_wb_", icp))
- self.cpu_params.update(make_wb_bus("gpio_wb_", gpio))
+ if variant != "ls180":
+ self.cpu_params.update(make_wb_bus("gpio_wb_", gpio))
# add verilog sources
self.add_sources(platform)
#cpu_data_width = 32
cpu_data_width = 64
- if cpu_data_width == 32:
- variant = "standard32"
- else:
- variant = "standard"
+ variant = "ls180"
#ram_fname = "/home/lkcl/src/libresoc/microwatt/" \
# "hello_world/hello_world.bin"
# reserve XICS ICP and XICS memory addresses.
self.mem_map['icp'] = 0xc0010000
self.mem_map['ics'] = 0xc0011000
- self.mem_map['gpio'] = 0xc0012000
#self.csr_map["icp"] = 8 # 8 x 0x800 == 0x4000
#self.csr_map["ics"] = 10 # 10 x 0x800 == 0x5000
integrated_main_ram_size = 0x00000000 if with_sdram \
else 0x10000000 , # 256MB
)
- self.platform.name = "sim"
+ self.platform.name = "ls180"
# SDR SDRAM ----------------------------------------------
if False: # not self.integrated_main_ram_size:
ics_region = SoCRegion(origin=ics_addr, size=0x1000, cached=False)
self.bus.add_slave(name='ics', slave=ics_wb, region=ics_region)
- # Simple GPIO peripheral
- gpio_addr = self.mem_map['gpio']
- gpio_wb = self.cpu.simple_gpio
- gpio_region = SoCRegion(origin=gpio_addr, size=0x20, cached=False)
- self.bus.add_slave(name='gpio', slave=gpio_wb, region=gpio_region)
-
-
# CRG -----------------------------------------------------------------
self.submodules.crg = CRG(platform.request("sys_clk"))