cpu: Add default set_reset_address function to CPU that will be overrided by each CPU (avoid hasattr check).

This commit is contained in:
Florent Kermarrec 2022-01-07 15:17:37 +01:00
parent cb13f71b56
commit c010a98719
1 changed files with 8 additions and 1 deletions

View File

@ -26,6 +26,9 @@ class CPU(Module):
def __init__(self, *args, **kwargs):
pass
def set_reset_address(self, reset_address):
pass
class CPUNone(CPU):
variants = ["standard"]
data_width = 32
@ -34,7 +37,11 @@ class CPUNone(CPU):
io_regions = {0x00000000: 0x100000000} # origin, length
periph_buses = []
memory_buses = []
mem_map = {"csr": 0x00000000, "ethmac": 0x00020000} # FIXME: remove ethmac.
mem_map = {
"csr" : 0x00000000,
"ethmac" : 0x00020000, # FIXME: Remove.
"spiflash" : 0x10000000, # FIXME: Remove.
}
CPU_GCC_TRIPLE_RISCV32 = (
"riscv64-unknown-elf",