periph_buses = []
memory_buses = []
+CPU_GCC_TRIPLE_RISCV32 = (
+ "riscv64-unknown-elf",
+ "riscv32-unknown-elf",
+ "riscv-none-embed",
+ "riscv64-linux",
+ "riscv-sifive-elf",
+ "riscv64-none-elf",
+)
+
+CPU_GCC_TRIPLE_RISCV64 = (
+ "riscv64-unknown-elf",
+ "riscv64-linux",
+ "riscv-sifive-elf",
+ "riscv64-none-elf",
+)
+
# CPUS ---------------------------------------------------------------------------------------------
from litex.soc.cores.cpu.lm32 import LM32
from litex.soc.cores.cpu.mor1kx import MOR1KX
+from litex.soc.cores.cpu.microwatt import Microwatt
+from litex.soc.cores.cpu.serv import SERV
from litex.soc.cores.cpu.picorv32 import PicoRV32
-from litex.soc.cores.cpu.vexriscv import VexRiscv
from litex.soc.cores.cpu.minerva import Minerva
+from litex.soc.cores.cpu.vexriscv import VexRiscv
from litex.soc.cores.cpu.rocket import RocketRV64
-from litex.soc.cores.cpu.microwatt import Microwatt
from litex.soc.cores.cpu.blackparrot import BlackParrotRV64
-from litex.soc.cores.cpu.serv import SERV
CPUS = {
+ # None
"None" : CPUNone,
+
+ # LM32
"lm32" : LM32,
+
+ # OpenRisc
"mor1kx" : MOR1KX,
+
+ # Open Power
+ "microwatt" : Microwatt,
+
+ # RISC-V 32-bit
+ "serv" : SERV,
"picorv32" : PicoRV32,
- "vexriscv" : VexRiscv,
"minerva" : Minerva,
+ "vexriscv" : VexRiscv,
+
+ # RISC-V 64-bit
"rocket" : RocketRV64,
- "microwatt" : Microwatt,
"blackparrot" : BlackParrotRV64,
- "serv" : SERV
}
# CPU Variants/Extensions Definition ---------------------------------------------------------------
CPU_VARIANTS = {
# "official name": ["alias 1", "alias 2"],
- "minimal" : ["min",],
- "lite" : ["light", "zephyr", "nuttx"],
- "standard": [None, "std"],
- "full": [],
- "linux" : [],
- "linuxd" : [],
- "linuxq" : [],
+ "minimal" : ["min",],
+ "lite" : ["light", "zephyr", "nuttx"],
+ "standard": [None, "std"],
+ "full": [],
+ "linux" : [],
+ "linuxd" : [],
+ "linuxq" : [],
}
CPU_VARIANTS_EXTENSIONS = ["debug", "no-dsp"]
-
class InvalidCPUVariantError(ValueError):
def __init__(self, variant):
msg = """\
from litex import get_data_mod
from litex.soc.interconnect import axi
from litex.soc.interconnect import wishbone
-from litex.soc.cores.cpu import CPU
+from litex.soc.cores.cpu import CPU, CPU_GCC_TRIPLE_RISCV64
CPU_VARIANTS = {
"standard": "freechips.rocketchip.system.LitexConfig",
human_name = "BlackParrotRV64[ia]"
data_width = 64
endianness = "little"
- gcc_triple = ("riscv64-unknown-elf", "riscv64-linux", "riscv-sifive-elf",
- "riscv64-none-elf")
+ gcc_triple = CPU_GCC_TRIPLE_RISCV64
linker_output_format = "elf64-littleriscv"
nop = "nop"
io_regions = {0x50000000: 0x10000000} # origin, length
from litex import get_data_mod
from litex.soc.interconnect import wishbone
-from litex.soc.cores.cpu import CPU
+from litex.soc.cores.cpu import CPU, CPU_GCC_TRIPLE_RISCV32
CPU_VARIANTS = ["standard"]
human_name = "Minerva"
data_width = 32
endianness = "little"
- gcc_triple = ("riscv64-unknown-elf", "riscv32-unknown-elf", "riscv-none-embed",
- "riscv64-linux", "riscv-sifive-elf", "riscv64-none-elf")
+ gcc_triple = CPU_GCC_TRIPLE_RISCV32
linker_output_format = "elf32-littleriscv"
nop = "nop"
io_regions = {0x80000000: 0x80000000} # origin, length
from litex import get_data_mod
from litex.soc.interconnect import wishbone
-from litex.soc.cores.cpu import CPU
+from litex.soc.cores.cpu import CPU, CPU_GCC_TRIPLE_RISCV64
CPU_VARIANTS = ["minimal", "standard"]
human_name = "PicoRV32"
data_width = 32
endianness = "little"
- gcc_triple = ("riscv64-unknown-elf", "riscv32-unknown-elf", "riscv-none-embed",
- "riscv64-linux", "riscv-sifive-elf", "riscv64-none-elf")
+ gcc_triple = CPU_GCC_TRIPLE_RISCV64
linker_output_format = "elf32-littleriscv"
nop = "nop"
io_regions = {0x80000000: 0x80000000} # origin, length
from litex import get_data_mod
from litex.soc.interconnect import axi
from litex.soc.interconnect import wishbone
-from litex.soc.cores.cpu import CPU
+from litex.soc.cores.cpu import CPU, CPU_GCC_TRIPLE_RISCV64
CPU_VARIANTS = {
human_name = "RocketRV64[imac]"
data_width = 64
endianness = "little"
- gcc_triple = ("riscv64-unknown-elf", "riscv64-linux", "riscv-sifive-elf",
- "riscv64-none-elf")
+ gcc_triple = CPU_GCC_TRIPLE_RISCV64
linker_output_format = "elf64-littleriscv"
nop = "nop"
io_regions = {0x10000000: 0x70000000} # origin, length
from litex import get_data_mod
from litex.soc.interconnect import wishbone
-from litex.soc.cores.cpu import CPU
+from litex.soc.cores.cpu import CPU, CPU_GCC_TRIPLE_RISCV32
CPU_VARIANTS = ["standard"]
human_name = "SERV"
data_width = 32
endianness = "little"
- gcc_triple = ("riscv64-unknown-elf", "riscv32-unknown-elf", "riscv-none-embed",
- "riscv64-linux", "riscv-sifive-elf", "riscv64-none-elf")
+ gcc_triple = CPU_GCC_TRIPLE_RISCV32
linker_output_format = "elf32-littleriscv"
nop = "nop"
io_regions = {0x80000000: 0x80000000} # origin, length
from litex import get_data_mod
from litex.soc.interconnect import wishbone
from litex.soc.interconnect.csr import *
-from litex.soc.cores.cpu import CPU
+from litex.soc.cores.cpu import CPU, CPU_GCC_TRIPLE_RISCV32
CPU_VARIANTS = {
human_name = "VexRiscv"
data_width = 32
endianness = "little"
- gcc_triple = ("riscv64-unknown-elf", "riscv32-unknown-elf", "riscv-none-embed",
- "riscv64-linux", "riscv-sifive-elf", "riscv64-none-elf")
+ gcc_triple = CPU_GCC_TRIPLE_RISCV32
linker_output_format = "elf32-littleriscv"
nop = "nop"
io_regions = {0x80000000: 0x80000000} # origin, length