gcc_triple = ("riscv64-unknown-elf", "riscv64-linux", "riscv-sifive-elf",
"riscv64-none-elf")
linker_output_format = "elf64-littleriscv"
+ nop = "nop"
io_regions = {0x50000000: 0x10000000} # origin, length
@property
endianness = "big"
gcc_triple = "lm32-elf"
linker_output_format = "elf32-lm32"
+ nop = "nop"
io_regions = {0x80000000: 0x80000000} # origin, length
@property
endianness = "little"
gcc_triple = ("powerpc64le-linux")
linker_output_format = "elf64-powerpcle"
+ nop = "nop"
io_regions = {0xc0000000: 0x10000000} # origin, length
@property
gcc_triple = ("riscv64-unknown-elf", "riscv32-unknown-elf", "riscv-none-embed",
"riscv64-linux", "riscv-sifive-elf", "riscv64-none-elf")
linker_output_format = "elf32-littleriscv"
+ nop = "nop"
io_regions = {0x80000000: 0x80000000} # origin, length
@property
gcc_triple = "or1k-elf"
clang_triple = "or1k-linux"
linker_output_format = "elf32-or1k"
+ nop = "l.nop"
io_regions = {0x80000000: 0x80000000} # origin, length
@property
gcc_triple = ("riscv64-unknown-elf", "riscv32-unknown-elf", "riscv-none-embed",
"riscv64-linux", "riscv-sifive-elf", "riscv64-none-elf")
linker_output_format = "elf32-littleriscv"
+ nop = "nop"
io_regions = {0x80000000: 0x80000000} # origin, length
@property
gcc_triple = ("riscv64-unknown-elf", "riscv64-linux", "riscv-sifive-elf",
"riscv64-none-elf")
linker_output_format = "elf64-littleriscv"
+ nop = "nop"
io_regions = {0x10000000: 0x70000000} # origin, length
@property
gcc_triple = ("riscv64-unknown-elf", "riscv32-unknown-elf", "riscv-none-embed",
"riscv64-linux", "riscv-sifive-elf", "riscv64-none-elf")
linker_output_format = "elf32-littleriscv"
+ nop = "nop"
io_regions = {0x80000000: 0x80000000} # origin, length
@property
gcc_triple = ("riscv64-unknown-elf", "riscv32-unknown-elf", "riscv-none-embed",
"riscv64-linux", "riscv-sifive-elf", "riscv64-none-elf")
linker_output_format = "elf32-littleriscv"
+ nop = "nop"
io_regions = {0x80000000: 0x80000000} # origin, length
@property
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"))
+ if hasattr(self.cpu, "nop"):
+ self.add_constant("CONFIG_CPU_NOP", self.cpu.nop)
def add_timer(self, name="timer0"):
self.check_if_exists(name)
__attribute__((unused)) static void cdelay(int i)
{
- /* FIXME: move nop definitions to CPUs */
while(i > 0) {
-#if defined (__lm32__)
- __asm__ volatile("nop");
-#elif defined (__or1k__)
- __asm__ volatile("l.nop");
-#elif defined (__picorv32__)
- __asm__ volatile("nop");
-#elif defined (__vexriscv__)
- __asm__ volatile("nop");
-#elif defined (__minerva__)
- __asm__ volatile("nop");
-#elif defined (__rocket__)
- __asm__ volatile("nop");
-#elif defined (__powerpc__)
- __asm__ volatile("nop");
-#elif defined (__microwatt__)
- __asm__ volatile("nop");
-#elif defined (__blackparrot__)
- __asm__ volatile("nop");
-#elif defined (__serv__)
- __asm__ volatile("nop");
-#else
-#error Unsupported architecture
-#endif
+ __asm__ volatile(CONFIG_CPU_NOP);
i--;
}
}