From 48f27707d1fef4eb7d2d8266d2c1884e7981b70b Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Fri, 27 Oct 2023 11:16:55 +0200 Subject: [PATCH] soc/cores: Make sure all Modules are switched to LiteXModule. --- litex/soc/cores/clock/lattice_nx.py | 2 +- litex/soc/cores/cpu/cv32e41p/core.py | 8 ++++---- litex/soc/cores/cpu/gowin_emcu/core.py | 2 +- litex/soc/cores/cpu/ibex/core.py | 2 +- litex/soc/cores/cpu/microwatt/core.py | 2 +- litex/soc/cores/cpu/openc906/core.py | 2 +- litex/soc/cores/cpu/vexriscv/core.py | 2 +- litex/soc/cores/emif.py | 1 + litex/soc/cores/spi_opi.py | 1 + 9 files changed, 12 insertions(+), 10 deletions(-) diff --git a/litex/soc/cores/clock/lattice_nx.py b/litex/soc/cores/clock/lattice_nx.py index 429b49172..6702461f1 100644 --- a/litex/soc/cores/clock/lattice_nx.py +++ b/litex/soc/cores/clock/lattice_nx.py @@ -106,7 +106,7 @@ class NXOSCA(LiteXModule): # Lattice / NX PLL --------------------------------------------------------------------------------- -class NXPLL(Module): +class NXPLL(LiteXModule): nclkouts_max = 5 clki_div_range = ( 1, 128+1) clkfb_div_range = ( 1, 128+1) diff --git a/litex/soc/cores/cpu/cv32e41p/core.py b/litex/soc/cores/cpu/cv32e41p/core.py index 0345c9126..13bfa9cff 100644 --- a/litex/soc/cores/cpu/cv32e41p/core.py +++ b/litex/soc/cores/cpu/cv32e41p/core.py @@ -73,7 +73,7 @@ def add_manifest_sources(platform, manifest): # OBI <> Wishbone ---------------------------------------------------------------------------------- -class OBI2Wishbone(Module): +class OBI2Wishbone(LiteXModule): def __init__(self, obi, wb): addr = Signal.like(obi.addr) be = Signal.like(obi.be) @@ -123,7 +123,7 @@ class OBI2Wishbone(Module): ) ) -class Wishbone2OBI(Module): +class Wishbone2OBI(LiteXModule): def __init__(self, wb, obi): self.fsm = fsm = FSM(reset_state="IDLE") fsm.act("IDLE", @@ -147,7 +147,7 @@ class Wishbone2OBI(Module): # Wishbone <> APB ---------------------------------------------------------------------------------- -class Wishbone2APB(Module): +class Wishbone2APB(LiteXModule): def __init__(self, wb, apb): self.fsm = fsm = FSM(reset_state="IDLE") fsm.act("IDLE", @@ -171,7 +171,7 @@ class Wishbone2APB(Module): # Debug Module ------------------------------------------------------------------------------------- -class DebugModule(Module): +class DebugModule(LiteXModule): jtag_layout = [ ("tck", 1), ("tms", 1), diff --git a/litex/soc/cores/cpu/gowin_emcu/core.py b/litex/soc/cores/cpu/gowin_emcu/core.py index 7af5ac90b..c8551b21c 100644 --- a/litex/soc/cores/cpu/gowin_emcu/core.py +++ b/litex/soc/cores/cpu/gowin_emcu/core.py @@ -13,7 +13,7 @@ from litex.soc.cores.cpu import CPU # AHB Flash ---------------------------------------------------------------------------------------- -class AHBFlash(Module): +class AHBFlash(LiteXModule): def __init__(self, bus): addr = Signal(13) read = Signal() diff --git a/litex/soc/cores/cpu/ibex/core.py b/litex/soc/cores/cpu/ibex/core.py index b3e88077e..d3010e9b5 100644 --- a/litex/soc/cores/cpu/ibex/core.py +++ b/litex/soc/cores/cpu/ibex/core.py @@ -45,7 +45,7 @@ obi_layout = [ ("rdata", 32), ] -class OBI2Wishbone(Module): +class OBI2Wishbone(LiteXModule): def __init__(self, obi, wb): addr = Signal.like(obi.addr) be = Signal.like(obi.be) diff --git a/litex/soc/cores/cpu/microwatt/core.py b/litex/soc/cores/cpu/microwatt/core.py index e32648b5f..99316f89b 100644 --- a/litex/soc/cores/cpu/microwatt/core.py +++ b/litex/soc/cores/cpu/microwatt/core.py @@ -236,7 +236,7 @@ class Microwatt(CPU): # XICS Slave --------------------------------------------------------------------------------------- -class XICSSlave(Module, AutoCSR): +class XICSSlave(LiteXModule): def __init__(self, platform, core_irq_out=Signal(), int_level_in=Signal(16), variant="standard"): self.variant = variant diff --git a/litex/soc/cores/cpu/openc906/core.py b/litex/soc/cores/cpu/openc906/core.py index 4e6846235..06d32e998 100644 --- a/litex/soc/cores/cpu/openc906/core.py +++ b/litex/soc/cores/cpu/openc906/core.py @@ -34,7 +34,7 @@ apb_layout = [ # Wishbone <> APB ---------------------------------------------------------------------------------- -class Wishbone2APB(Module): +class Wishbone2APB(LiteXModule): def __init__(self, wb, apb): assert wb.data_width == 32 self.fsm = fsm = FSM(reset_state="IDLE") diff --git a/litex/soc/cores/cpu/vexriscv/core.py b/litex/soc/cores/cpu/vexriscv/core.py index 42bc67dca..3145a7e95 100644 --- a/litex/soc/cores/cpu/vexriscv/core.py +++ b/litex/soc/cores/cpu/vexriscv/core.py @@ -82,7 +82,7 @@ GCC_FLAGS = { # VexRiscv Timer ----------------------------------------------------------------------------------- -class VexRiscvTimer(Module, AutoCSR): +class VexRiscvTimer(LiteXModule): def __init__(self): self._latch = CSR() self._time = CSRStatus(64) diff --git a/litex/soc/cores/emif.py b/litex/soc/cores/emif.py index 923a30e99..bde48b15e 100644 --- a/litex/soc/cores/emif.py +++ b/litex/soc/cores/emif.py @@ -11,6 +11,7 @@ from litex.gen import * from litex.soc.interconnect import wishbone +# EMIF (External Memory Interface) ----------------------------------------------------------------- class EMIF(LiteXModule): """External Memory Interface core diff --git a/litex/soc/cores/spi_opi.py b/litex/soc/cores/spi_opi.py index 0e1f68d31..5b628977f 100644 --- a/litex/soc/cores/spi_opi.py +++ b/litex/soc/cores/spi_opi.py @@ -14,6 +14,7 @@ from litex.soc.interconnect.csr_eventmanager import * from litex.soc.integration.doc import AutoDoc, ModuleDoc +# 7-Series SPI OPI --------------------------------------------------------------------------------- class S7SPIOPI(LiteXModule): def __init__(self, pads,