remove the gpio peripheral which was previously hard-linked to interrupts
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 19 Sep 2020 13:10:02 +0000 (14:10 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 19 Sep 2020 13:10:02 +0000 (14:10 +0100)
src/soc/litex/florent/libresoc/core.py
src/soc/litex/florent/ls180soc.py
src/soc/simple/issuer_verilog.py

index dd416ee8de5ec45e00b5f7c4dd028b9a4a1b0ea4..aae1966ef9b6a3ac40ff63b167b6832fb0729917 100644 (file)
@@ -5,7 +5,7 @@ from migen import ClockSignal, ResetSignal, Signal, Instance, Cat
 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):
@@ -63,7 +63,9 @@ class LibreSoC(CPU):
 
         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 = []
@@ -106,7 +108,8 @@ class LibreSoC(CPU):
         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)
index cdbcef133a61d16e882c0f9d23b16cf0d8654f0f..67f87fde2f2adfcf7040226cd5637be8975b6782 100755 (executable)
@@ -63,10 +63,7 @@ class LibreSoCSim(SoCCore):
         #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"
@@ -86,7 +83,6 @@ class LibreSoCSim(SoCCore):
         # 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
 
@@ -127,7 +123,7 @@ class LibreSoCSim(SoCCore):
             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:
@@ -146,13 +142,6 @@ class LibreSoCSim(SoCCore):
             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"))
 
index b93d47c2ed3b10d6276ce4c6ab4c98e613dfa193..8cd713f8d1393ad85f4179e078e44f47c8d4a37f 100644 (file)
@@ -28,7 +28,7 @@ if __name__ == '__main__':
                          # set to 32 to make data wishbone bus 32-bit
                          #wb_data_wid=32,
                          xics=True,
-                         gpio=True, # for test purposes
+                         gpio=False, # for test purposes
                          units=units)
 
     dut = TestIssuer(pspec)