diff --git a/litex/soc/cores/cpu/mor1kx/core.py b/litex/soc/cores/cpu/mor1kx/core.py index 95b2801c3..fd663d607 100644 --- a/litex/soc/cores/cpu/mor1kx/core.py +++ b/litex/soc/cores/cpu/mor1kx/core.py @@ -15,7 +15,7 @@ from litex import get_data_mod from litex.soc.interconnect import wishbone from litex.soc.cores.cpu import CPU -CPU_VARIANTS = ["standard", "linux"] +CPU_VARIANTS = ["standard", "standard+fpu", "linux", "linux+fpu"] class MOR1KX(CPU): @@ -51,6 +51,11 @@ class MOR1KX(CPU): flags = "-mhard-mul " flags += "-mhard-div " flags += "-D__mor1kx__ " + + if "linux" in self.variant: + flags += "-mror " + flags += "-msext " + return flags @property @@ -77,7 +82,7 @@ class MOR1KX(CPU): self.memory_buses = [] - if variant == "linux": + if "linux" in variant: self.mem_map = self.mem_map_linux # # # @@ -107,7 +112,12 @@ class MOR1KX(CPU): p_DBUS_WB_TYPE = "B3_REGISTERED_FEEDBACK", ) - if variant == "linux": + if "fpu" in variant: + cpu_args.update( + p_FEATURE_FPU = "ENABLED", + ) + + if "linux" in variant: cpu_args.update( # Linux needs the memory management units. p_FEATURE_IMMU = "ENABLED", @@ -115,6 +125,8 @@ class MOR1KX(CPU): # FIXME: Currently we need the or1k timer when we should be # using the litex timer. p_FEATURE_TIMER = "ENABLED", + p_FEATURE_ROR = "ENABLED", + p_FEATURE_EXT = "ENABLED", ) # FIXME: Check if these are needed? use_defaults = (