Skip to content

Commit

Permalink
soc: use self.cpu_reset_address as rom mem_map address and increase d…
Browse files Browse the repository at this point in the history
…efault bios size to 0xa000
enjoy-digital committed Feb 28, 2015
1 parent 6107b78 commit 165a5b6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions misoclib/soc/__init__.py
Original file line number Diff line number Diff line change
@@ -27,15 +27,14 @@ class SoC(Module):
"timer0": 1,
}
mem_map = {
"rom": 0x00000000, # (shadow @0x80000000)
"sram": 0x10000000, # (shadow @0x90000000)
"sdram": 0x40000000, # (shadow @0xc0000000)
"csr": 0x60000000, # (shadow @0xe0000000)
}
def __init__(self, platform, clk_freq, cpu_or_bridge=None,
with_cpu=True, cpu_type="lm32", cpu_reset_address=0x00000000,
cpu_boot_file="software/bios/bios.bin",
with_rom=False, rom_size=0x8000,
with_rom=False, rom_size=0xa000,
with_sram=True, sram_size=4096,
with_sdram=False, sdram_size=64*1024,
with_csr=True, csr_data_width=8, csr_address_width=14,
@@ -87,7 +86,7 @@ def __init__(self, platform, clk_freq, cpu_or_bridge=None,

if with_rom:
self.submodules.rom = wishbone.SRAM(rom_size, read_only=True)
self.register_mem("rom", self.mem_map["rom"], self.rom.bus, rom_size)
self.register_mem("rom", self.cpu_reset_address, self.rom.bus, rom_size)

if with_sram:
self.submodules.sram = wishbone.SRAM(sram_size)
@@ -140,7 +139,7 @@ def register_mem(self, name, address, interface, size=None):

# XXX for retro-compatibilty, we should maybe use directly register_mem in targets
def register_rom(self, interface):
self.register_mem("rom", self.mem_map["rom"], interface, size=self.rom_size)
self.register_mem("rom", self.cpu_reset_address, interface, size=self.rom_size)

def check_csr_region(self, name, origin):
for n, o, l, obj in self.csr_regions:

0 comments on commit 165a5b6

Please sign in to comment.