class BlackParrotRV64(CPU):
name = "blackparrot"
+ human_name = "BlackParrotRV64[ia]"
data_width = 64
endianness = "little"
gcc_triple = ("riscv64-unknown-elf", "riscv64-linux", "riscv-sifive-elf",
"riscv64-none-elf")
linker_output_format = "elf64-littleriscv"
io_regions = {0x50000000: 0x10000000} # origin, length
-
+
@property
def mem_map(self):
return {
# clock, reset
i_clk_i = ClockSignal(),
i_reset_i = ResetSignal() | self.reset,
-
- # irq
+
+ # irq
#i_interrupts = self.interrupt,
-
+
#wishbone
i_wbm_dat_i = idbus.dat_r,
o_wbm_dat_o = idbus.dat_w,
o_wbm_cti_o = idbus.cti,
o_wbm_bte_o = idbus.bte,
)
-
+
# add verilog sources
self.add_sources(platform, variant)
class LM32(CPU):
name = "lm32"
+ human_name = "LM32"
data_width = 32
endianness = "big"
gcc_triple = "lm32-elf"
class Microwatt(CPU):
name = "microwatt"
+ human_name = "Microwatt"
data_width = 64
endianness = "little"
gcc_triple = ("powerpc64le-linux")
class Minerva(CPU):
name = "minerva"
+ human_name = "Minerva"
data_width = 32
endianness = "little"
gcc_triple = ("riscv64-unknown-elf", "riscv32-unknown-elf", "riscv-none-embed",
class MOR1KX(CPU):
name = "mor1kx"
+ human_name = "MOR1KX"
data_width = 32
endianness = "big"
gcc_triple = "or1k-elf"
class PicoRV32(CPU):
name = "picorv32"
+ human_name = "PicoRV32"
data_width = 32
endianness = "little"
gcc_triple = ("riscv64-unknown-elf", "riscv32-unknown-elf", "riscv-none-embed",
class RocketRV64(CPU):
name = "rocket"
+ human_name = "RocketRV64[imac]"
data_width = 64
endianness = "little"
gcc_triple = ("riscv64-unknown-elf", "riscv64-linux", "riscv-sifive-elf",
class SERV(CPU):
name = "serv"
+ human_name = "SERV"
data_width = 32
endianness = "little"
gcc_triple = ("riscv64-unknown-elf", "riscv32-unknown-elf", "riscv-none-embed",
class VexRiscv(CPU, AutoCSR):
name = "vexriscv"
+ human_name = "VexRiscv"
data_width = 32
endianness = "little"
gcc_triple = ("riscv64-unknown-elf", "riscv32-unknown-elf", "riscv-none-embed",
self.comb += self.cpu.reset.eq(self.ctrl.reset)
self.add_config("CPU_RESET_ADDR", reset_address)
# Add constants
- self.add_config("CPU_TYPE", str(name))
- self.add_config("CPU_VARIANT", str(variant.split('+')[0]))
+ self.add_config("CPU_TYPE", str(name))
+ self.add_config("CPU_VARIANT", str(variant.split('+')[0]))
+ self.add_constant("CONFIG_CPU_HUMAN_NAME", getattr(self.cpu, "human_name", "Unknown"))
def add_timer(self, name="timer0"):
self.check_if_exists(name)
#include <crc.h>
#include <generated/csr.h>
+#include <generated/soc.h>
#include <generated/mem.h>
#include <generated/git.h>
printf(" LiteX git sha1: "LITEX_GIT_SHA1"\n");
printf("\n");
printf("--=============== \e[1mSoC\e[0m ==================--\n");
- printf("\e[1mCPU\e[0m: ");
-#ifdef __lm32__
- printf("LM32");
-#elif __or1k__
- printf("MOR1KX");
-#elif __picorv32__
- printf("PicoRV32");
-#elif __vexriscv__
- printf("VexRiscv");
-#elif __minerva__
- printf("Minerva");
-#elif __rocket__
- printf("RocketRV64[imac]");
-#elif __blackparrot__
- printf("BlackParrotRV64[ia]");
-#elif __serv__
- printf("SERV");
-#else
- printf("Unknown");
-#endif
- printf(" @ %dMHz\n", CONFIG_CLOCK_FREQUENCY/1000000);
+ printf("\e[1mCPU\e[0m: %s @ %dMHz\n",
+ CONFIG_CPU_HUMAN_NAME,
+ CONFIG_CLOCK_FREQUENCY/1000000);
printf("\e[1mROM\e[0m: %dKB\n", ROM_SIZE/1024);
printf("\e[1mSRAM\e[0m: %dKB\n", SRAM_SIZE/1024);
#ifdef CONFIG_L2_SIZE